diff --git a/launcher/constants.py b/launcher/constants.py index 10766e8..f05af07 100644 --- a/launcher/constants.py +++ b/launcher/constants.py @@ -29,6 +29,7 @@ mirror_list = { "aliyun": "https://mirrors.aliyun.com/pypi/simple/", "tuna": "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple", "sjtu": "https://mirror.sjtu.edu.cn/pypi/web/simple", + "ustc": "https://mirrors.ustc.edu.cn/pypi/simple", } # 实例文件夹名 diff --git a/launcher/sys_config/config_dist.json b/launcher/sys_config/config_dist.json index 68e3715..499fad5 100644 --- a/launcher/sys_config/config_dist.json +++ b/launcher/sys_config/config_dist.json @@ -1,5 +1,5 @@ { - "version": "v0.7.0", + "version": "v0.7.1", "url": "ui/dist/index.html", "log_level": "INFO", "debug": false diff --git a/launcher/webview/api.py b/launcher/webview/api.py index 859c14c..8bb62a3 100644 --- a/launcher/webview/api.py +++ b/launcher/webview/api.py @@ -43,7 +43,7 @@ command_list = { "clone": lambda: f"git\\bin\\git -c lfs.concurrenttransfers=100 clone {build_base_url(mower_ng_git_url)} --branch slow", "set_remote": lambda: f"..\\git\\bin\\git remote set-url origin {build_base_url(mower_ng_git_url)}", "set_lfs": lambda: f"..\\git\\bin\\git config lfs.url {build_base_url(mower_ng_git_url)}/info/lfs", - "fetch": lambda: f"..\\git\\bin\\git fetch {build_base_url(mower_ng_git_url)} {config.conf.branch} --progress", + "fetch": lambda: f"..\\git\\bin\\git fetch origin {config.conf.branch} --progress", "switch": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=100 switch -f {config.conf.branch} --progress", "reset": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=200 reset --hard origin/{config.conf.branch}", "pip_tools_install": lambda: f"..\\python\\Scripts\\pip install --no-cache-dir -i {mirror_list[config.conf.mirror]} pip-tools --no-warn-script-location", @@ -279,7 +279,9 @@ class Api: ) return try: - self.run("cli", "mower-ng", {"command": command, "path": path}) + ret = self.run("cli", "mower-ng", {"command": command, "path": path}) + if command == "launch" and ret == "success": + self.run("cli", "mower-ng", {"command": "webui", "path": path}) except Exception as e: custom_event(LogType.error, f"{cli_command[command]} 失败 {repr(e)}") diff --git a/ui/src/App.vue b/ui/src/App.vue index eb2e815..971187b 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -89,35 +89,34 @@ provide('new_version', new_version) - - - - - - - - - - - diff --git a/ui/src/components/FloatButton.vue b/ui/src/components/FloatButton.vue index de0ff86..c16fd80 100644 --- a/ui/src/components/FloatButton.vue +++ b/ui/src/components/FloatButton.vue @@ -1,6 +1,7 @@ diff --git a/ui/src/main.js b/ui/src/main.js index 132098e..647f8a5 100644 --- a/ui/src/main.js +++ b/ui/src/main.js @@ -1,4 +1,3 @@ -import 'vfonts/Lato.css' import 'vfonts/FiraCode.css' import './styles/global.css' diff --git a/ui/src/pages/Fix.vue b/ui/src/pages/Fix.vue index 50190e8..45de0a4 100644 --- a/ui/src/pages/Fix.vue +++ b/ui/src/pages/Fix.vue @@ -1,26 +1,15 @@ diff --git a/ui/src/pages/Launch.vue b/ui/src/pages/Launch.vue index 7300528..2372301 100644 --- a/ui/src/pages/Launch.vue +++ b/ui/src/pages/Launch.vue @@ -12,8 +12,7 @@ import { Stop, Search } from '@vicons/ionicons5' - -const notification = useNotification() +import { notify } from '@/utils/naiveDiscrete.js' const config_store = useConfigStore() const conf = config_store.config @@ -90,17 +89,9 @@ async function handle_migrate(key) { name: '默认实例', path: response.data }) - notification['success']({ - content: '信息', - meta: response.message, - duration: 3000 - }) + notify.success(response.message) } else { - notification['error']({ - content: '错误', - meta: response.message, - duration: 3000 - }) + notify.error(response.message) } } else { const response = await pywebview.api.migrate_instances_config() @@ -110,17 +101,9 @@ async function handle_migrate(key) { conf.instances = [...config_store.config.instances] } if (response.status) { - notification['info']({ - title: '信息', - content: response.message, - duration: 3000 - }) + notify.info(response.message) } else { - notification['error']({ - title: '错误', - content: response.message, - duration: 3000 - }) + notify.error(response.message) } } } @@ -175,8 +158,8 @@ async function handle_migrate(key) { 显示日志 - - + + - + - {{ item.name }} + {{ item.name }} - - - + + +