(() => {
+ if (!data.coreVersion) return false;
+ const releaseLatestVersion = data?.releaseList?.[0]?.[0];
+ if (!releaseLatestVersion) return false;
+ const version = `v${/(\d+\.\d+\.\d+)/g.exec(data.coreVersion || "")?.[1]}`;
+ // console.log(version, releaseLatestVersion)
+ if (releaseLatestVersion != version) {
+ return true;
+ }
+ return false;
+ });
+
const checkUpdate = async () => {
// const latestVersionFileName = data.releaseList?.[0]?.[0]?.[1] as string;
let [downloadUrl, versionFileName] = (coreManagementData.data as string).split("<>");
@@ -993,7 +1021,7 @@
const handleCoreManagement = async () => {
coreManagementData.visible = true;
- await getReleaseList();
+ // await getReleaseList();
};
const handleInstallCore = async () => {
@@ -1160,14 +1188,14 @@
mountedShow(); // 不需要await
closePrevent();
data.hasNewVersion = await checkNewVersion();
- window.addEventListener("storage", () => {
- mainStore.$hydrate();
+ dataSubscribe(async () => {
if (mainStore.createConfigInEasytier) {
b(async () => {
await updateConfigJson(data.configJsonSeverUrl);
});
}
});
+ getReleaseList();
});
onBeforeUnmount(() => {
@@ -1550,6 +1578,27 @@
}
}
}
+
+ if (command === "game_start_config") {
+ await etWindows(
+ "gameList",
+ {
+ title: "本地游戏列表",
+ width: 800,
+ height: 400,
+ minWidth: 800,
+ minHeight: 400,
+ resizable: true,
+ url: "#/gameList"
+ },
+ (_, appWindow) => {
+ data.gameListVisible = true;
+ },
+ () => {
+ data.gameListVisible = false;
+ }
+ );
+ }
};
const handleDeleteAdminConfig = async () => {
diff --git a/pages/tool.vue b/pages/tool.vue
index cab7e96..9b14f21 100644
--- a/pages/tool.vue
+++ b/pages/tool.vue
@@ -42,7 +42,7 @@
方案2
diff --git a/public/default.png b/public/default.png
new file mode 100644
index 0000000..b6c4810
Binary files /dev/null and b/public/default.png differ
diff --git a/public/icon.png b/public/icon.png
deleted file mode 100644
index 23be565..0000000
Binary files a/public/icon.png and /dev/null differ
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index a07a7d7..a6c0f21 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1290,7 +1290,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "easytier-game"
-version = "1.3.9"
+version = "1.4.0"
dependencies = [
"hashbrown 0.15.2",
"log",
@@ -2075,6 +2075,12 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "http-range"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
+
[[package]]
name = "httparse"
version = "1.9.5"
@@ -4745,6 +4751,7 @@ dependencies = [
"gtk",
"heck 0.5.0",
"http",
+ "http-range",
"image",
"jni",
"libc",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 2aa445f..f28e4b2 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "easytier-game"
-version = "1.3.9"
+version = "1.4.0"
homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasytierGame"
description = "A simple network initiator based on Easytier"
@@ -25,7 +25,7 @@ tauri-build = { version = "2.0.5", features = [] }
serde_json = "1.0.137"
serde = { version = "1.0.217", features = ["derive"] }
log = "0.4.25"
-tauri = { version = "2.2.5", features = [
+tauri = { version = "2.2.5", features = [ "protocol-asset",
"tray-icon",
"image-png",
"image-ico",
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index 54f774c..6240e6e 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -2,7 +2,7 @@
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "enables the default permissions",
- "windows": ["main", "log", "member", "cidr", "advance", "tool", "server"],
+ "windows": ["main", "log", "member", "cidr", "advance", "tool", "server", "gameList"],
"permissions": [
"core:default",
"core:window:allow-minimize",
diff --git a/src-tauri/easytier/easytier-cli.exe b/src-tauri/easytier/easytier-cli.exe
index 90034f1..b10fc21 100644
Binary files a/src-tauri/easytier/easytier-cli.exe and b/src-tauri/easytier/easytier-cli.exe differ
diff --git a/src-tauri/easytier/easytier-core.exe b/src-tauri/easytier/easytier-core.exe
index b3f3edd..07e44e2 100644
Binary files a/src-tauri/easytier/easytier-core.exe and b/src-tauri/easytier/easytier-core.exe differ
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index dcb30f5..d367c69 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "easytier-game",
- "version": "1.3.9",
+ "version": "1.4.0",
"identifier": "com.tauri.easytier-game",
"build": {
@@ -12,7 +12,7 @@
"app": {
"windows": [
{
- "title": "easytier-game 1.3.9",
+ "title": "easytier-game 1.4.0",
"label": "main",
"minWidth": 340,
"width": 340,
@@ -30,7 +30,11 @@
}
],
"security": {
- "csp": null
+ "csp": null,
+ "assetProtocol": {
+ "enable": true,
+ "scope": ["**"]
+ }
}
},
"plugins": {
diff --git a/stores/index.ts b/stores/index.ts
index c7aeebc..18d8471 100644
--- a/stores/index.ts
+++ b/stores/index.ts
@@ -57,7 +57,7 @@ const store = defineStore("main", {
configPath: "", //配置文件路径
winIpBcAutoStart: true,
createConfigInEasytier: false, //在easytier目录生成config.json文件吗
- githubFastUrl: "https://ghproxy.cc/",
+ githubFastUrl: "https://ghfast.top/",
// forceBindIp配置
forceBindIpBit: "64",
@@ -66,7 +66,9 @@ const store = defineStore("main", {
forceBindFile: "",
winipBcPid: 0,
- winipBcStart: false
+ winipBcStart: false,
+
+ gameList: [] as Array<{name: string, exePath: string, id: string, coverImg: string; showImg: string}>, // 游戏列表
};
},
persist: {
@@ -133,7 +135,9 @@ const store = defineStore("main", {
"forceBindIpBit",
"delayInjectDll",
"forceBindInput",
- "forceBindFile"
+ "forceBindFile",
+
+ "gameList"
]
// // 除了这些,其他都要存下来
// omit: ["winipBcPid", "winipBcStart"]
diff --git a/typings/index.d.ts b/typings/index.d.ts
index 4d085e1..f89978b 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -4,6 +4,7 @@ interface ImportMetaEnv {
readonly VITE_LOG_PATH: string;
readonly VITE_CACHE_PATH: string;
readonly VITE_AUTO_START_SERVICE_NAME: string;
+ readonly VITE_GAME_LIST_PATH: string;
}
interface ImportMeta {