初步添加反馈功能

This commit is contained in:
gfdgd xi 2021-10-03 20:34:07 +08:00
parent 34937827d9
commit 278e1722a5
4 changed files with 63 additions and 4 deletions

View File

@ -93,7 +93,8 @@
"清空 UEngine 数据(需要 Root"
]
},
"UEngine 键盘映射"
"UEngine 键盘映射",
"UEngine 检测 CPU 是否支持运行"
]
},
{
@ -215,7 +216,8 @@
"Delete All UEngine Data (It Need Run With Root)"
]
},
"UEngine Keyboard"
"UEngine Keyboard",
"UEngine Check CPU Can Or Can't Run"
]
},
{

View File

@ -26,6 +26,12 @@
"4、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁"
],
"Update": [
"V1.5.1",
"※1、修复安装以其的程序图标无法点击进入的问题deepin 社区版不存在此问题)",
"※2、支持在程序本体反馈问题",
"3、修复了菜单栏的部分显示问题",
"4、支持显示 apk 的部分信息",
"",
"V1.5.0",
"※1、部分窗口支持英语",
"2、修复在英语状态下启动器图标名称异常的问题",

13
main.py
View File

@ -91,8 +91,8 @@ def FindApk()->"浏览窗口":
# 安装按钮事件
def Button3Install():
if ComboInstallPath.get() is "":
messagebox.showerror(title="提示", message="信息没有填写完整,无法继续安装 APK")
if ComboInstallPath.get() is "" or not os.path.exists(ComboInstallPath.get()):
messagebox.showerror(title="提示", message="信息没有填写完整或错误,无法继续安装 APK")
return
DisabledAndEnbled(True)
threading.Thread(target=InstallApk, args=(ComboInstallPath.get(),)).start()
@ -518,6 +518,14 @@ def SaveInstallUengineApp():
traceback.print_exc()
messagebox.showerror(title="错误", message=traceback.format_exc())
def UengineCheckCpu():
english = GetCommandReturn("uengine check-features")
chinese = GetCommandReturn("trans -b \"{}\"".format(english)) # 获取中文翻译
for i in chinese.split("\n"): # 删除提示
if "Did you mean:" in i:
chinese = chinese.replace(i, "").replace("\n", "")
messagebox.showinfo(title="提示", message="{}\n{}".format(english, chinese))
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
@ -1171,6 +1179,7 @@ adbServer.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Men
uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][0], command=UengineSettingShow)
uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][1], command=OpenUengineDebBuilder)
uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][7], command=KeyboardToMouse)
uengine.add_command(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][8], command=UengineCheckCpu)
uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Name"], menu=uengineService)
uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Name"], menu=uengineInternet)
uengine.add_cascade(label=langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Name"], menu=uengineIcon)

42
uengine-update-bug Normal file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env python3
import requests
import ttkthemes
import tkinter as tk
import tkinter.ttk as ttk
window = tk.Tk()
win = ttk.Frame()
starValue = tk.StringVar()
starValue.set("5分")
name = ttk.Label(win, text="你的昵称:")
nameThings = ttk.Entry(win, width=25)
contact = ttk.Label(win, text="联系方式:")
contactThings = ttk.Entry(win, width=25)
star = ttk.Label(win, text="评分:")
starMenu = ttk.OptionMenu(win, starValue, "5分", "5分", "4分", "3分", "2分", "1分")
updateThingsTips = ttk.Label(win, text="反馈内容(支持 Markdown 格式):")
updateThings = tk.Text(win)
updateButton = ttk.Button(win, text="提交")
name.grid(row=0, column=0)
nameThings.grid(row=0, column=1)
contact.grid(row=0, column=2)
contactThings.grid(row=0, column=3)
star.grid(row=0, column=4)
starMenu.grid(row=0, column=5)
updateThingsTips.grid(row=1, column=0, columnspan=2)
updateThings.grid(row=2, column=0, columnspan=6)
updateButton.grid(row=3, column=5)
win.pack(expand="yes", fill="both")
window.mainloop()