diff --git a/composables/tray.ts b/composables/tray.ts index a5e1213..14a1d45 100644 --- a/composables/tray.ts +++ b/composables/tray.ts @@ -25,11 +25,11 @@ export async function useTray(init: boolean = false, beforExit: Function) { id: DEFAULT_TRAY_NAME, menu: await Menu.new({ id: "main", - items: await generateMenuItem(beforExit) + items: await generateMenuItem(beforExit), }), - action: async e => { + action: async (e) => { toggleVisibility(); - } + }, }); } } catch (error) { @@ -43,7 +43,7 @@ export async function useTray(init: boolean = false, beforExit: Function) { tray.setMenu( await Menu.new({ id: "main", - items: await generateMenuItem(beforExit) + items: await generateMenuItem(beforExit), }) ); } @@ -52,7 +52,7 @@ export async function useTray(init: boolean = false, beforExit: Function) { } export async function generateMenuItem(beforExit: Function) { - return [await MenuItemExit("退出", beforExit), await PredefinedMenuItem.new({ item: "Separator" }), await MenuItemShow("显示 / 隐藏")]; + return [await MenuItemShow("显示 / 隐藏"), await PredefinedMenuItem.new({ item: "Separator" }), await MenuItemExit("退出", beforExit)]; } export async function MenuItemExit(text: string, beforExit: Function) { @@ -64,7 +64,7 @@ export async function MenuItemExit(text: string, beforExit: Function) { await beforExit(); } await getCurrentWindow().close(); - } + }, }); } @@ -74,7 +74,7 @@ export async function MenuItemShow(text: string) { text, action: async () => { await toggleVisibility(); - } + }, }); } diff --git a/package.json b/package.json index 7b46d05..863fb98 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.0", + "version": "1.1.1", "scripts": { "dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0", "build": "nuxt generate --dotenv env/.env.prod" diff --git a/pages/advance.vue b/pages/advance.vue index b6bb1a0..e217bd0 100644 --- a/pages/advance.vue +++ b/pages/advance.vue @@ -13,7 +13,7 @@