增加标题版本号,系统托盘按钮顺序切换

This commit is contained in:
leizi97
2024-11-03 23:09:13 +08:00
parent 4e4ebf1246
commit 3adf64e251
8 changed files with 14 additions and 17 deletions
+7 -7
View File
@@ -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();
}
},
});
}
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -13,7 +13,7 @@
<div>
<ElCheckbox v-model="mainStore.config.relayAllPeerrpc">转发所有对等节点的RPC数据包即使对等节点不在转发网络白名单内</ElCheckbox>
</div>
<div class="flex items-center gap-[5px] flex-nowrap">
<div class="flex items-center gap-[15px] flex-nowrap">
<ElCheckbox v-model="mainStore.config.saveErrorLog">输出日志到本地</ElCheckbox>
<div class="w-[140px]">
<ElSelect
+1 -1
View File
@@ -389,7 +389,7 @@
appWindow.onCloseRequested(async event => {
// console.log(appWindow.label);
if (!is_close) {
console.log(1);
// console.log(1);
event.preventDefault();
appWindow.hide();
}
+1 -1
View File
@@ -1109,7 +1109,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "easytier-game"
version = "1.1.0"
version = "1.1.1"
dependencies = [
"log",
"planif",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "easytier-game"
version = "1.1.0"
version = "1.1.1"
homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasytierGame"
description = "A simple network initiator based on Easytier"
+1 -4
View File
@@ -20,7 +20,4 @@ network_secret = ""
uri = "tcp://public.easytier.top:11010"
[[peer]]
uri = "udp://public.easytier.top:11010"
[[proxy_network]]
cidr = "192.168.1.0/24"
uri = "udp://public.easytier.top:11010"
+1 -1
View File
@@ -13,7 +13,7 @@
"app": {
"windows": [
{
"title": "easytier-game",
"title": "easytier-game 1.1.1",
"width": 335,
"height": 305,
"resizable": false,