diff --git a/composables/log.ts b/composables/log.ts deleted file mode 100644 index 6e8e607..0000000 --- a/composables/log.ts +++ /dev/null @@ -1,8 +0,0 @@ -// const infoDialog = new WebviewWindow("log", { -// title: "日志", -// resizable: false, -// width: 600, -// height: 400, -// parent: appWindow, -// url: "/log" -// }); \ No newline at end of file diff --git a/composables/tray.ts b/composables/tray.ts index 3aed2ca..6c87aba 100644 --- a/composables/tray.ts +++ b/composables/tray.ts @@ -4,6 +4,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window"; import pkg from "@/package.json"; import { setTheme } from "~/composables/theme"; import useMainStore from "@/stores/index"; +import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path"; const DEFAULT_TRAY_NAME = "main"; @@ -113,7 +114,10 @@ export async function MenuItemTheme() { export async function setTrayRunState(tray: TrayIcon | null, isRunning: boolean = false) { if (!tray) return; - await tray.setIcon(isRunning ? "easytier/icons/icon-inactive.ico" : "easytier/icons/icon.ico"); + const resourceDir = await getResourceDir(); + const path = await join(resourceDir, isRunning ? "easytier/icons/icon-inactive.ico" : "easytier/icons/icon.ico"); + // "easytier/icons/icon-inactive.ico", { baseDir: BaseDirectory.Resource } + await tray.setIcon(path); } export async function setTrayTooltip(tray: TrayIcon | null, tooltip?: string | null) { diff --git a/package.json b/package.json index 4146e74..6eb2ef4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "author": "leizi97", "description": "A simple network initiator based on Easytier", - "version": "1.1.9", + "version": "1.2.0", "scripts": { "dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0", "build": "nuxt generate --dotenv env/.env.prod" diff --git a/pages/index.vue b/pages/index.vue index 995646f..1be9483 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2,8 +2,7 @@ + :model="config"> + prop="serverUrl">