Compare commits

..
2 Commits
Author SHA1 Message Date
leizi97 3adf64e251 增加标题版本号,系统托盘按钮顺序切换 2024-11-03 23:09:13 +08:00
leizi97 4e4ebf1246 UAC开机自启版本回退 2024-11-03 22:17:59 +08:00
8 changed files with 22 additions and 27 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
+9 -11
View File
@@ -226,7 +226,7 @@
强制中转
</ElCheckbox>
<ElCheckbox
@change="handleAutoStartByTask"
@change="handleAutoStart"
:model-value="config.autoStart"
size="small"
>
@@ -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();
}
@@ -595,18 +595,16 @@
const compatibleInitAutoStart = async () => {
try {
const is_enable = await tauriAutoStart.isEnabled();
if (is_enable) {
await tauriAutoStart.disable();
await invoke("spawn_autostart", { enabled: true });
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
config.autoStart = is_enable_by_task;
} else {
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
config.autoStart = is_enable_by_task;
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
if (is_enable_by_task) {
await tauriAutoStart.enable();
await invoke("spawn_autostart", { enabled: false });
}
const is_enable = await tauriAutoStart.isEnabled();
config.autoStart = is_enable;
} catch (err) {
await invoke("spawn_autostart", { enabled: false });
await tauriAutoStart.disable();
config.autoStart = false;
}
};
+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,