Skip to content

Commit

Permalink
FIx: GUI open in window
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmusen214 committed Feb 5, 2024
1 parent 54f9b5c commit 4cb3817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jsoneditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import sys
from modules.configs.MyConfig import MyConfigger, config
# 是否以网页形式运行
isweb=True
print("参数:", sys.argv)
if len(sys.argv) > 1:
if sys.argv[1] == "window":
isweb=False
config.sessiondict["GUI_OPEN_IN_WEB"] = False
# 获取到user config文件夹下以json为后缀的文件
def get_json_list():
return [i for i in os.listdir(MyConfigger.USER_CONFIG_FOLDER) if i.endswith(".json")]
Expand Down Expand Up @@ -37,8 +36,7 @@ def get_json_list():
show_GUI(alljson_list[i], MyConfigger())

# 运行GUI
print("打开形式:"+("网页" if isweb else "窗口"))
if not isweb:
if not config.sessiondict["GUI_OPEN_IN_WEB"]:
ui.run(native=True, window_size=(1280,720), title=f"Blue Archive Aris Helper{MyConfigger.NOWVERSION}", favicon="./DATA/assets/aris.ico", language="zh-cn", reload=False, port=native.find_open_port())
else:
ui.run(title=f"Blue Archive Aris Helper{MyConfigger.NOWVERSION}", favicon="./DATA/assets/aris.ico", language="zh-cn", reload=False, port=native.find_open_port())
Expand Down
1 change: 1 addition & 0 deletions modules/configs/defaultSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@
defaultSessionDict = {
"PORT_IS_USED":{"d":False},
"EMULATOR_PROCESS_PID":{"d":None},
"GUI_OPEN_IN_WEB":{"d":True}
}

0 comments on commit 4cb3817

Please sign in to comment.