mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
优化文本,提升使用体验,房间配置管理增加删除按钮
+ tauri相关包更新到最新
This commit is contained in:
+16
-8
@@ -10,7 +10,7 @@
|
||||
}
|
||||
} */
|
||||
html {
|
||||
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
@@ -51,16 +51,24 @@ html.dark body {
|
||||
}
|
||||
|
||||
.el-table {
|
||||
font-size: 12px!important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.el-select-dropdown__wrap {
|
||||
max-height: 138px!important;
|
||||
max-height: 138px !important;
|
||||
}
|
||||
|
||||
.el-popper:not(.is-pure) {
|
||||
font-size: 10px!important;
|
||||
line-height: 1.2em!important;
|
||||
padding: 5px!important;
|
||||
font-weight: lighter!important;
|
||||
}
|
||||
font-size: 10px !important;
|
||||
line-height: 1.2em !important;
|
||||
padding: 5px !important;
|
||||
font-weight: lighter !important;
|
||||
}
|
||||
|
||||
.el-message-box__content + .el-message-box__btns {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row-reverse;
|
||||
gap: 0 10px;
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
"@nuxtjs/tailwindcss": "6.13.1",
|
||||
"@pinia/nuxt": "0.9.0",
|
||||
"@tauri-apps/api": "^2.2.0",
|
||||
"@tauri-apps/cli": "2.2.5",
|
||||
"@tauri-apps/cli": "2.2.7",
|
||||
"@tauri-apps/plugin-cli": "^2.2.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.2.0",
|
||||
"@tauri-apps/plugin-dialog": "2.2.0",
|
||||
@@ -31,7 +31,7 @@
|
||||
"element-plus": "2.9.3",
|
||||
"less": "4.2.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "3.15.2",
|
||||
"nuxt": "3.15.3",
|
||||
"pinia": "^2.3.0",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"postcss": "^8.4.38",
|
||||
|
||||
+46
-6
@@ -593,7 +593,7 @@
|
||||
:close-on-press-escape="false"
|
||||
title="房间配置管理"
|
||||
>
|
||||
<div class="flex items-center gap-[0_4px]">
|
||||
<div class="flex items-center">
|
||||
<ElButton
|
||||
@click="openConfigAdminDir"
|
||||
size="small"
|
||||
@@ -608,6 +608,20 @@
|
||||
>
|
||||
刷新
|
||||
</ElButton>
|
||||
<ElTooltip
|
||||
placement="top-start"
|
||||
:offset="2"
|
||||
:show-arrow="false"
|
||||
content="删除选中配置"
|
||||
>
|
||||
<ElButton
|
||||
class="!ml-auto"
|
||||
:icon="Delete"
|
||||
@click="handleDeleteAdminConfig"
|
||||
type="danger"
|
||||
size="small"
|
||||
></ElButton>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
<div class="mt-[5px]">
|
||||
<ElSelect
|
||||
@@ -621,15 +635,19 @@
|
||||
:key="item.path"
|
||||
:value="item.path"
|
||||
:label="item.name"
|
||||
>
|
||||
</ElOption>
|
||||
></ElOption>
|
||||
</ElSelect>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="text-right">
|
||||
<div class="mb-[5px]">
|
||||
<ElAlert show-icon type="warning" title="打开目录删除文件即可删除配置"></ElAlert>
|
||||
<ElAlert
|
||||
show-icon
|
||||
type="warning"
|
||||
title="打开目录删除文件即可删除配置"
|
||||
></ElAlert>
|
||||
</div>
|
||||
|
||||
<ElButton
|
||||
size="small"
|
||||
@click="handleExchangeAdminConfig"
|
||||
@@ -640,7 +658,7 @@
|
||||
<ElButton
|
||||
size="small"
|
||||
@click="configAdminData.visible = false"
|
||||
type="danger"
|
||||
plain
|
||||
>
|
||||
关闭
|
||||
</ElButton>
|
||||
@@ -678,7 +696,7 @@
|
||||
import { getAllWebviewWindows, WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import etWindows from "@/composables/windows";
|
||||
import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path";
|
||||
import { readDir, exists, mkdir, BaseDirectory, readTextFile, readFile, writeFile } from "@tauri-apps/plugin-fs";
|
||||
import { readDir, exists, mkdir, BaseDirectory, readTextFile, readFile, writeFile, remove as removeFile } from "@tauri-apps/plugin-fs";
|
||||
import { updateConfigJson } from "~/composables/configJson";
|
||||
import { writeText, readText } from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { sortedUniq, uniq } from "lodash-es";
|
||||
@@ -1510,6 +1528,8 @@
|
||||
confirmButtonText: "保存",
|
||||
cancelButtonText: "取消",
|
||||
inputPlaceholder: "请输入2个字以上的存储名",
|
||||
closeOnPressEscape: false,
|
||||
closeOnClickModal: false,
|
||||
inputValidator: (value: string) => {
|
||||
const result = isValidWindowsFileName(value);
|
||||
if (result) {
|
||||
@@ -1553,6 +1573,26 @@
|
||||
}
|
||||
};
|
||||
|
||||
const handleDeleteAdminConfig = async () => {
|
||||
const path = configAdminData.fileName;
|
||||
if (!path) return ElMessage.warning("请选择配置");
|
||||
const [err] = await ElConfirmDanger("确定{action}选中的配置吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
action: "删除"
|
||||
});
|
||||
if (err) return;
|
||||
try {
|
||||
await removeFile(path, { baseDir: BaseDirectory.Resource });
|
||||
ElMessage.success("删除成功");
|
||||
configAdminData.fileName = "";
|
||||
await handleStartCommand("config_admin");
|
||||
} catch (err) {
|
||||
ElMessage.error("删除配置失败");
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
|
||||
const handleExchangeAdminConfig = async () => {
|
||||
const path = configAdminData.fileName;
|
||||
if (!path) return ElMessage.warning("请选择配置");
|
||||
|
||||
Generated
+293
-474
File diff suppressed because it is too large
Load Diff
Generated
+128
-7
@@ -1161,7 +1161,16 @@ version = "5.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
||||
dependencies = [
|
||||
"dirs-sys",
|
||||
"dirs-sys 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
|
||||
dependencies = [
|
||||
"dirs-sys 0.5.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1172,10 +1181,22 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"option-ext",
|
||||
"redox_users",
|
||||
"redox_users 0.4.6",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"option-ext",
|
||||
"redox_users 0.5.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dispatch"
|
||||
version = "0.2.0"
|
||||
@@ -1774,8 +1795,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2093,6 +2116,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tower-service",
|
||||
"webpki-roots",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3607,6 +3631,58 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn"
|
||||
version = "0.11.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"pin-project-lite",
|
||||
"quinn-proto",
|
||||
"quinn-udp",
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
"socket2",
|
||||
"thiserror 2.0.10",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.2.15",
|
||||
"rand 0.8.5",
|
||||
"ring",
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
"rustls-pki-types",
|
||||
"slab",
|
||||
"thiserror 2.0.10",
|
||||
"tinyvec",
|
||||
"tracing",
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn-udp"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
|
||||
dependencies = [
|
||||
"cfg_aliases 0.2.1",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.38"
|
||||
@@ -3749,6 +3825,17 @@ dependencies = [
|
||||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
|
||||
dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
"libredox",
|
||||
"thiserror 2.0.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.11.1"
|
||||
@@ -3814,7 +3901,10 @@ dependencies = [
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"quinn",
|
||||
"rustls",
|
||||
"rustls-pemfile",
|
||||
"rustls-pki-types",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
@@ -3822,6 +3912,7 @@ dependencies = [
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-rustls",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-service",
|
||||
@@ -3830,6 +3921,7 @@ dependencies = [
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams",
|
||||
"web-sys",
|
||||
"webpki-roots",
|
||||
"windows-registry",
|
||||
]
|
||||
|
||||
@@ -3922,6 +4014,12 @@ version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
@@ -3951,6 +4049,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
"rustls-webpki",
|
||||
"subtle",
|
||||
@@ -3971,6 +4070,9 @@ name = "rustls-pki-types"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
|
||||
dependencies = [
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
@@ -4628,13 +4730,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.2.3"
|
||||
version = "2.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78f6efc261c7905839b4914889a5b25df07f0ff89c63fb4afd6ff8c96af15e4d"
|
||||
checksum = "58a998b6be84104ca05c7e9a21f2180ddec020c8b84ea59a8fc8530a2a19588d"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
"dirs",
|
||||
"dirs 6.0.0",
|
||||
"dunce",
|
||||
"embed_plist",
|
||||
"futures-util",
|
||||
@@ -4685,7 +4787,7 @@ checksum = "8e950124f6779c6cf98e3260c7a6c8488a74aa6350dd54c6950fdaa349bca2df"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
"dirs",
|
||||
"dirs 5.0.1",
|
||||
"glob",
|
||||
"heck 0.5.0",
|
||||
"json-patch",
|
||||
@@ -5319,7 +5421,7 @@ checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
|
||||
dependencies = [
|
||||
"core-graphics 0.24.0",
|
||||
"crossbeam-channel",
|
||||
"dirs",
|
||||
"dirs 5.0.1",
|
||||
"libappindicator",
|
||||
"muda",
|
||||
"objc2",
|
||||
@@ -5715,6 +5817,16 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-time"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webkit2gtk"
|
||||
version = "2.0.1"
|
||||
@@ -5759,6 +5871,15 @@ dependencies = [
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.26.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webview2-com"
|
||||
version = "0.34.0"
|
||||
|
||||
@@ -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.3", features = [
|
||||
tauri = { version = "2.2.5", features = [
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
"image-ico",
|
||||
|
||||
Reference in New Issue
Block a user