Compare commits

...
34 Commits
Author SHA1 Message Date
MystiPanda 84027cbae1 Release 1.6.6 2024-06-12 10:33:20 +08:00
MystiPanda 5343040ef3 fix: start param error 2024-06-12 10:19:23 +08:00
MystiPanda 75cd7dd4b9 chore: update & fmt & clippy 2024-06-12 10:00:22 +08:00
dongchengjie fb6ffd8e09 chore: missing locale 2024-06-11 16:19:25 +08:00
dongchengjie aca9e61f39 chore: locale "Invalid Bypass Format" 2024-06-09 20:02:20 +08:00
MystiPanda 56078098a4 fix: start param error 2024-06-09 20:00:17 +08:00
MystiPanda 1f197965e0 feat: check bypass format 2024-06-09 13:37:47 +08:00
MystiPanda 183f0f6c42 feat: keep default bypass 2024-06-09 12:45:57 +08:00
dongchengjie 76624c7d83 chore: missing locale 2024-06-09 11:16:13 +08:00
dongchengjie ab47c56ec5 chore: locale reorganization 2024-06-09 09:12:14 +08:00
Eric Huang ad35ed96c8 feat(settings page): add loading state (#1157)
* feat(settings page): add loading state

* fix: type
2024-06-09 06:26:07 +08:00
wonfen 97bd51cf5f chore: update ci with apple notarization 2024-06-09 02:01:33 +08:00
MystiPanda f4a110cfd7 ci: fix error 2024-06-08 20:58:57 +08:00
MystiPanda e9ed06adfd ci: update 2024-06-08 20:45:28 +08:00
MystiPanda bc5eaf34fe feat: add download button on updater dialog
#1129
2024-06-08 20:35:23 +08:00
MystiPanda 3e8b891dd0 fix: run app as normal user 2024-06-08 20:20:47 +08:00
MystiPanda 3f2ea4bc64 build: update depends 2024-06-08 20:02:25 +08:00
MystiPanda ae81b37c1d build: remove appimage 2024-06-08 19:36:58 +08:00
MystiPanda b4349afb1b ci: codesign 2024-06-08 18:52:34 +08:00
dongchengjie 0cffe8e3f7 chore: disbale Meta+Q on macOS 2024-06-08 13:12:24 +08:00
Sukka 7a1f4f9abe refactor: simplify useConnectionSetting (#1141) 2024-06-07 17:23:53 +08:00
wonfen 5768b01786 fix: apple sign error again 2024-06-07 17:19:44 +08:00
MystiPanda 7e9079467f fix: sign error 2024-06-07 16:39:06 +08:00
MystiPanda 615e96922e fix: sign error 2024-06-07 16:37:58 +08:00
Eric Huang 8b94c452fb feat: make SettingItem clickable (#1138)
* feat: make `SettingItem` clickable

* clean up
2024-06-07 15:51:51 +08:00
Sukka 66dd510acc refactor: replace recoil (#1137) 2024-06-07 12:27:37 +08:00
wonfen 96e044566c Style: modify proxy pages 2024-06-07 10:32:27 +08:00
MystiPanda 726ad84d7f fix: sign error 2024-06-06 16:06:58 +08:00
wonfen 4fc422f880 chore: apple developer sign test 2024-06-06 15:21:53 +08:00
dongchengjie 1938024ab3 chore: test_delay trace 2024-06-05 19:17:43 +08:00
dongchengjie 05b1de6fd5 chore: theme colors to uppercase 2024-06-05 14:20:24 +08:00
dongchengjie 0bf8807b50 build: no legacy chunks 2024-06-05 09:04:08 +08:00
Sukka 23668ee74e fix(#1126): add Object.hasOwn polyfill (#1127) 2024-06-05 00:12:06 +08:00
dongchengjie 6bc5c5a808 fix: csp missing asset: 2024-06-04 15:26:39 +08:00
65 changed files with 2290 additions and 2213 deletions
+2 -5
View File
@@ -1,8 +1,5 @@
pnpm install pnpm install
pnpm check $INPUT_TARGET pnpm check $INPUT_TARGET
sed -i "s/#openssl/openssl={version=\"0.10\",features=[\"vendored\"]}/g" src-tauri/Cargo.toml sed -i "s/#openssl/openssl={version=\"0.10\",features=[\"vendored\"]}/g" src-tauri/Cargo.toml
if [ "$INPUT_TARGET" = "x86_64-unknown-linux-gnu" ]; then
cargo tauri build --target $INPUT_TARGET cargo tauri build --target $INPUT_TARGET
else
cargo tauri build --target $INPUT_TARGET -b deb,rpm
fi
+17 -18
View File
@@ -43,15 +43,17 @@ jobs:
with: with:
workspaces: src-tauri workspaces: src-tauri
- name: Install Tauri CLI
run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
- name: Install Node - name: Install Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install and check - name: Pnpm install and check
@@ -66,13 +68,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with: with:
tagName: alpha tagName: alpha
releaseName: "Clash Verge Rev Alpha" releaseName: "Clash Verge Rev Alpha"
releaseBody: "More new features are now supported." releaseBody: "More new features are now supported."
releaseDraft: false releaseDraft: false
prerelease: true prerelease: true
tauriScript: pnpm tauriScript: cargo tauri
args: --target ${{ matrix.target }} args: --target ${{ matrix.target }}
- name: Portable Bundle - name: Portable Bundle
@@ -115,17 +123,6 @@ jobs:
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
- name: Upload Release
if: startsWith(matrix.target, 'x86_64')
uses: softprops/action-gh-release@v2
with:
tag_name: alpha
name: "Clash Verge Rev Alpha"
body: "More new features are now supported."
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
- name: Upload Release - name: Upload Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
@@ -165,15 +162,17 @@ jobs:
with: with:
workspaces: src-tauri workspaces: src-tauri
- name: Install Tauri CLI
run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
- name: Install Node - name: Install Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install and check - name: Pnpm install and check
@@ -197,7 +196,7 @@ jobs:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with: with:
tauriScript: pnpm tauriScript: cargo tauri
args: --target ${{ matrix.target }} args: --target ${{ matrix.target }}
- name: Rename - name: Rename
@@ -250,7 +249,7 @@ jobs:
- MacOS apple M芯片: aarch64.dmg - MacOS apple M芯片: aarch64.dmg
### Linux ### Linux
- Linux 64位: amd64.AppImage/amd64.deb/amd64.rpm - Linux 64位: amd64.deb/amd64.rpm
- Linux 32位: i386.deb/i386.rpm - Linux 32位: i386.deb/i386.rpm
- Linux arm64架构: arm64.deb/aarch64.rpm - Linux arm64架构: arm64.deb/aarch64.rpm
- Linux armv7架构: armhf.deb/armhfp.rpm - Linux armv7架构: armhf.deb/armhfp.rpm
+10 -18
View File
@@ -45,10 +45,9 @@ jobs:
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install and check - name: Pnpm install and check
@@ -63,6 +62,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with: with:
tagName: v__VERSION__ tagName: v__VERSION__
releaseName: "Clash Verge Rev v__VERSION__" releaseName: "Clash Verge Rev v__VERSION__"
@@ -109,16 +114,6 @@ jobs:
sudo apt-get install jq sudo apt-get install jq
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
- name: Upload Release
if: startsWith(matrix.target, 'x86_64')
uses: softprops/action-gh-release@v2
with:
tag_name: v${{env.VERSION}}
name: "Clash Verge Rev v${{env.VERSION}}"
body: "More new features are now supported."
token: ${{ secrets.GITHUB_TOKEN }}
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
- name: Upload Release - name: Upload Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
@@ -162,10 +157,9 @@ jobs:
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v3 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install and check - name: Pnpm install and check
@@ -224,10 +218,9 @@ jobs:
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install - name: Pnpm install
@@ -250,10 +243,9 @@ jobs:
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install - name: Pnpm install
+3 -5
View File
@@ -7,17 +7,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Install Node - name: Install Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install - name: Pnpm install
@@ -39,10 +38,9 @@ jobs:
with: with:
node-version: "20" node-version: "20"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
name: Install pnpm name: Install pnpm
with: with:
version: 9
run_install: false run_install: false
- name: Pnpm install - name: Pnpm install
+17
View File
@@ -1,3 +1,20 @@
## v1.6.6
### Features
- MacOS 应用签名
- 删除 AppImage
- 应用更新对话框添加下载按钮
- 设置系统代理绕过时保留默认值
- 系统代理绕过设置输入格式检查
### Bugs Fixes
- MacOS 代理组图标无法显示
- RPM 包依赖缺失
---
## v1.6.5 ## v1.6.5
### Features ### Features
+11 -10
View File
@@ -1,6 +1,6 @@
{ {
"name": "clash-verge", "name": "clash-verge",
"version": "1.6.5", "version": "1.6.6",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"scripts": { "scripts": {
"dev": "tauri dev", "dev": "tauri dev",
@@ -27,17 +27,18 @@
"@mui/icons-material": "^5.15.19", "@mui/icons-material": "^5.15.19",
"@mui/lab": "5.0.0-alpha.149", "@mui/lab": "5.0.0-alpha.149",
"@mui/material": "^5.15.19", "@mui/material": "^5.15.19",
"@mui/x-data-grid": "^6.20.0", "@mui/x-data-grid": "^6.20.1",
"@tauri-apps/api": "^1.5.6", "@tauri-apps/api": "^1.5.6",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"ahooks": "^3.8.0", "ahooks": "^3.8.0",
"axios": "^1.7.2", "axios": "^1.7.2",
"dayjs": "1.11.5", "dayjs": "1.11.5",
"foxact": "^0.2.35",
"i18next": "^23.11.5", "i18next": "^23.11.5",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"meta-json-schema": "1.18.5-alpha4", "meta-json-schema": "1.18.5-alpha4",
"monaco-editor": "^0.49.0", "monaco-editor": "^0.49.0",
"monaco-yaml": "^5.1.1", "monaco-yaml": "^5.2.0",
"nanoid": "^5.0.7", "nanoid": "^5.0.7",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
@@ -48,7 +49,6 @@
"react-router-dom": "^6.23.1", "react-router-dom": "^6.23.1",
"react-transition-group": "^4.4.5", "react-transition-group": "^4.4.5",
"react-virtuoso": "^4.7.11", "react-virtuoso": "^4.7.11",
"recoil": "^0.7.7",
"swr": "^1.3.0", "swr": "^1.3.0",
"tar": "^6.2.1", "tar": "^6.2.1",
"types-pac": "^1.0.2" "types-pac": "^1.0.2"
@@ -63,8 +63,8 @@
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/react-transition-group": "^4.4.10", "@types/react-transition-group": "^4.4.10",
"@vitejs/plugin-legacy": "^5.4.1", "@vitejs/plugin-legacy": "^5.4.1",
"@vitejs/plugin-react": "^4.3.0", "@vitejs/plugin-react": "^4.3.1",
"adm-zip": "^0.5.13", "adm-zip": "^0.5.14",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
@@ -72,10 +72,10 @@
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"pretty-quick": "^3.3.1", "pretty-quick": "^3.3.1",
"sass": "^1.77.4", "sass": "^1.77.5",
"terser": "^5.31.0", "terser": "^5.31.1",
"typescript": "^5.4.5", "typescript": "^5.4.5",
"vite": "^5.2.12", "vite": "^5.2.13",
"vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-svgr": "^4.2.0" "vite-plugin-svgr": "^4.2.0"
}, },
@@ -84,5 +84,6 @@
"semi": true, "semi": true,
"singleQuote": false, "singleQuote": false,
"endOfLine": "lf" "endOfLine": "lf"
} },
"packageManager": "pnpm@9.1.4"
} }
+930 -858
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -41,6 +41,7 @@ async function resolveUpdater() {
"windows-x86_64": { signature: "", url: "" }, "windows-x86_64": { signature: "", url: "" },
"windows-aarch64": { signature: "", url: "" }, "windows-aarch64": { signature: "", url: "" },
"windows-x86": { signature: "", url: "" }, "windows-x86": { signature: "", url: "" },
"windows-i686": { signature: "", url: "" },
}, },
}; };
@@ -60,11 +61,13 @@ async function resolveUpdater() {
// win32 url // win32 url
if (name.endsWith("x86_fixed_webview2-setup.nsis.zip")) { if (name.endsWith("x86_fixed_webview2-setup.nsis.zip")) {
updateData.platforms["windows-x86"].url = browser_download_url; updateData.platforms["windows-x86"].url = browser_download_url;
updateData.platforms["windows-i686"].url = browser_download_url;
} }
// win32 signature // win32 signature
if (name.endsWith("x86_fixed_webview2-setup.nsis.zip.sig")) { if (name.endsWith("x86_fixed_webview2-setup.nsis.zip.sig")) {
const sig = await getSignature(browser_download_url); const sig = await getSignature(browser_download_url);
updateData.platforms["windows-x86"].signature = sig; updateData.platforms["windows-x86"].signature = sig;
updateData.platforms["windows-i686"].signature = sig;
} }
// win arm url // win arm url
+12 -15
View File
@@ -46,11 +46,13 @@ async function resolveUpdater() {
"darwin-x86_64": { signature: "", url: "" }, "darwin-x86_64": { signature: "", url: "" },
"linux-x86_64": { signature: "", url: "" }, "linux-x86_64": { signature: "", url: "" },
"linux-x86": { signature: "", url: "" }, "linux-x86": { signature: "", url: "" },
"linux-i686": { signature: "", url: "" },
"linux-aarch64": { signature: "", url: "" }, "linux-aarch64": { signature: "", url: "" },
"linux-armv7": { signature: "", url: "" }, "linux-armv7": { signature: "", url: "" },
"windows-x86_64": { signature: "", url: "" }, "windows-x86_64": { signature: "", url: "" },
"windows-aarch64": { signature: "", url: "" }, "windows-aarch64": { signature: "", url: "" },
"windows-x86": { signature: "", url: "" }, "windows-x86": { signature: "", url: "" },
"windows-i686": { signature: "", url: "" },
}, },
}; };
@@ -72,11 +74,13 @@ async function resolveUpdater() {
// win32 url // win32 url
if (name.endsWith("x64-setup.nsis.zip")) { if (name.endsWith("x64-setup.nsis.zip")) {
updateData.platforms["windows-x86"].url = browser_download_url; updateData.platforms["windows-x86"].url = browser_download_url;
updateData.platforms["windows-i686"].url = browser_download_url;
} }
// win32 signature // win32 signature
if (name.endsWith("x64-setup.nsis.zip.sig")) { if (name.endsWith("x64-setup.nsis.zip.sig")) {
const sig = await getSignature(browser_download_url); const sig = await getSignature(browser_download_url);
updateData.platforms["windows-x86"].signature = sig; updateData.platforms["windows-x86"].signature = sig;
updateData.platforms["windows-i686"].signature = sig;
} }
// win arm url // win arm url
@@ -106,29 +110,22 @@ async function resolveUpdater() {
// darwin url (aarch) // darwin url (aarch)
if (name.endsWith("aarch64.app.tar.gz")) { if (name.endsWith("aarch64.app.tar.gz")) {
updateData.platforms["darwin-aarch64"].url = browser_download_url; updateData.platforms["darwin-aarch64"].url = browser_download_url;
// 使linux可以检查更新
updateData.platforms.linux.url = browser_download_url;
updateData.platforms["linux-x86_64"].url = browser_download_url;
updateData.platforms["linux-x86"].url = browser_download_url;
updateData.platforms["linux-i686"].url = browser_download_url;
updateData.platforms["linux-aarch64"].url = browser_download_url;
updateData.platforms["linux-armv7"].url = browser_download_url;
} }
// darwin signature (aarch) // darwin signature (aarch)
if (name.endsWith("aarch64.app.tar.gz.sig")) { if (name.endsWith("aarch64.app.tar.gz.sig")) {
const sig = await getSignature(browser_download_url); const sig = await getSignature(browser_download_url);
updateData.platforms["darwin-aarch64"].signature = sig; updateData.platforms["darwin-aarch64"].signature = sig;
}
// linux x64 url
if (name.endsWith("amd64.AppImage.tar.gz")) {
updateData.platforms.linux.url = browser_download_url;
updateData.platforms["linux-x86_64"].url = browser_download_url;
updateData.platforms["linux-x86"].url = browser_download_url;
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage
updateData.platforms["linux-aarch64"].url = browser_download_url;
updateData.platforms["linux-armv7"].url = browser_download_url;
}
// linux x64 signature
if (name.endsWith("amd64.AppImage.tar.gz.sig")) {
const sig = await getSignature(browser_download_url);
updateData.platforms.linux.signature = sig; updateData.platforms.linux.signature = sig;
updateData.platforms["linux-x86_64"].signature = sig; updateData.platforms["linux-x86_64"].signature = sig;
updateData.platforms["linux-x86"].url = browser_download_url; updateData.platforms["linux-x86"].url = browser_download_url;
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage updateData.platforms["linux-i686"].url = browser_download_url;
updateData.platforms["linux-aarch64"].signature = sig; updateData.platforms["linux-aarch64"].signature = sig;
updateData.platforms["linux-armv7"].signature = sig; updateData.platforms["linux-armv7"].signature = sig;
} }
+96 -124
View File
@@ -123,9 +123,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]] [[package]]
name = "async-broadcast" name = "async-broadcast"
version = "0.7.0" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e"
dependencies = [ dependencies = [
"event-listener 5.3.0", "event-listener 5.3.0",
"event-listener-strategy", "event-listener-strategy",
@@ -214,9 +214,9 @@ dependencies = [
[[package]] [[package]]
name = "async-io" name = "async-io"
version = "2.3.2" version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964"
dependencies = [ dependencies = [
"async-lock 3.4.0", "async-lock 3.4.0",
"cfg-if", "cfg-if",
@@ -224,7 +224,7 @@ dependencies = [
"futures-io", "futures-io",
"futures-lite 2.3.0", "futures-lite 2.3.0",
"parking", "parking",
"polling 3.7.0", "polling 3.7.1",
"rustix 0.38.34", "rustix 0.38.34",
"slab", "slab",
"tracing", "tracing",
@@ -281,12 +281,12 @@ dependencies = [
[[package]] [[package]]
name = "async-process" name = "async-process"
version = "2.2.2" version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a"
dependencies = [ dependencies = [
"async-channel 2.3.1", "async-channel 2.3.1",
"async-io 2.3.2", "async-io 2.3.3",
"async-lock 3.4.0", "async-lock 3.4.0",
"async-signal", "async-signal",
"async-task", "async-task",
@@ -312,11 +312,11 @@ dependencies = [
[[package]] [[package]]
name = "async-signal" name = "async-signal"
version = "0.2.7" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d"
dependencies = [ dependencies = [
"async-io 2.3.2", "async-io 2.3.3",
"async-lock 3.4.0", "async-lock 3.4.0",
"atomic-waker", "atomic-waker",
"cfg-if", "cfg-if",
@@ -714,9 +714,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.98" version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695"
[[package]] [[package]]
name = "cesu8" name = "cesu8"
@@ -783,7 +783,7 @@ dependencies = [
[[package]] [[package]]
name = "clash-verge" name = "clash-verge"
version = "1.6.5" version = "1.6.6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"auto-launch", "auto-launch",
@@ -797,7 +797,7 @@ dependencies = [
"log4rs", "log4rs",
"nanoid", "nanoid",
"once_cell", "once_cell",
"open 5.1.3", "open 5.1.4",
"parking_lot", "parking_lot",
"percent-encoding", "percent-encoding",
"port_scanner", "port_scanner",
@@ -1341,9 +1341,9 @@ checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653"
[[package]] [[package]]
name = "dtoa-short" name = "dtoa-short"
version = "0.3.4" version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
dependencies = [ dependencies = [
"dtoa", "dtoa",
] ]
@@ -1369,7 +1369,7 @@ dependencies = [
"cc", "cc",
"memchr", "memchr",
"rustc_version 0.4.0", "rustc_version 0.4.0",
"toml 0.8.13", "toml 0.8.14",
"vswhom", "vswhom",
"winreg 0.52.0", "winreg 0.52.0",
] ]
@@ -1397,9 +1397,9 @@ checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
[[package]] [[package]]
name = "enumflags2" name = "enumflags2"
version = "0.7.9" version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d"
dependencies = [ dependencies = [
"enumflags2_derive", "enumflags2_derive",
"serde", "serde",
@@ -1407,9 +1407,9 @@ dependencies = [
[[package]] [[package]]
name = "enumflags2_derive" name = "enumflags2_derive"
version = "0.7.9" version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -1985,8 +1985,8 @@ dependencies = [
"aho-corasick 1.1.3", "aho-corasick 1.1.3",
"bstr", "bstr",
"log 0.4.21", "log 0.4.21",
"regex-automata 0.4.6", "regex-automata 0.4.7",
"regex-syntax 0.8.3", "regex-syntax 0.8.4",
] ]
[[package]] [[package]]
@@ -2249,12 +2249,12 @@ dependencies = [
[[package]] [[package]]
name = "http-body-util" name = "http-body-util"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-core", "futures-util",
"http 1.1.0", "http 1.1.0",
"http-body 1.0.0", "http-body 1.0.0",
"pin-project-lite", "pin-project-lite",
@@ -2268,9 +2268,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
[[package]] [[package]]
name = "httparse" name = "httparse"
version = "1.8.0" version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545"
[[package]] [[package]]
name = "httpdate" name = "httpdate"
@@ -2286,9 +2286,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.14.28" version = "0.14.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-channel", "futures-channel",
@@ -2301,7 +2301,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa 1.0.11", "itoa 1.0.11",
"pin-project-lite", "pin-project-lite",
"socket2 0.4.10", "socket2 0.5.7",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -2352,7 +2352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [ dependencies = [
"bytes", "bytes",
"hyper 0.14.28", "hyper 0.14.29",
"native-tls", "native-tls",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
@@ -2563,12 +2563,14 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.5.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed"
dependencies = [ dependencies = [
"unicode-bidi", "icu_normalizer",
"unicode-normalization", "icu_properties",
"smallvec",
"utf8_iter",
] ]
[[package]] [[package]]
@@ -2581,7 +2583,7 @@ dependencies = [
"globset", "globset",
"log 0.4.21", "log 0.4.21",
"memchr", "memchr",
"regex-automata 0.4.6", "regex-automata 0.4.7",
"same-file", "same-file",
"walkdir", "walkdir",
"winapi-util", "winapi-util",
@@ -2711,7 +2713,7 @@ checksum = "c416c05ba2a10240e022887617af3128fccdbf69713214da0fc81a5690d00df7"
dependencies = [ dependencies = [
"ahash", "ahash",
"once_cell", "once_cell",
"regex 1.10.4", "regex 1.10.5",
] ]
[[package]] [[package]]
@@ -3615,9 +3617,9 @@ dependencies = [
[[package]] [[package]]
name = "open" name = "open"
version = "5.1.3" version = "5.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb49fbd5616580e9974662cb96a3463da4476e649a7e4b258df0de065db0657" checksum = "b5ca541f22b1c46d4bb9801014f234758ab4297e7870b904b6a8415b980a7388"
dependencies = [ dependencies = [
"is-wsl", "is-wsl",
"libc", "libc",
@@ -3695,9 +3697,9 @@ dependencies = [
[[package]] [[package]]
name = "os_pipe" name = "os_pipe"
version = "1.1.5" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" checksum = "29d73ba8daf8fac13b0501d1abeddcfe21ba7401ada61a819144b6c2a4f32209"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.52.0",
@@ -4056,9 +4058,9 @@ dependencies = [
[[package]] [[package]]
name = "polling" name = "polling"
version = "3.7.0" version = "3.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
@@ -4156,9 +4158,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.84" version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@@ -4338,14 +4340,14 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.10.4" version = "1.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
dependencies = [ dependencies = [
"aho-corasick 1.1.3", "aho-corasick 1.1.3",
"memchr", "memchr",
"regex-automata 0.4.6", "regex-automata 0.4.7",
"regex-syntax 0.8.3", "regex-syntax 0.8.4",
] ]
[[package]] [[package]]
@@ -4359,13 +4361,13 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.4.6" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [ dependencies = [
"aho-corasick 1.1.3", "aho-corasick 1.1.3",
"memchr", "memchr",
"regex-syntax 0.8.3", "regex-syntax 0.8.4",
] ]
[[package]] [[package]]
@@ -4385,9 +4387,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.8.3" version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]] [[package]]
name = "regress" name = "regress"
@@ -4413,7 +4415,7 @@ dependencies = [
"h2 0.3.26", "h2 0.3.26",
"http 0.2.12", "http 0.2.12",
"http-body 0.4.6", "http-body 0.4.6",
"hyper 0.14.28", "hyper 0.14.29",
"hyper-tls 0.5.0", "hyper-tls 0.5.0",
"ipnet", "ipnet",
"js-sys", "js-sys",
@@ -5291,7 +5293,7 @@ dependencies = [
"cfg-expr 0.15.8", "cfg-expr 0.15.8",
"heck 0.5.0", "heck 0.5.0",
"pkg-config", "pkg-config",
"toml 0.8.13", "toml 0.8.14",
"version-compare 0.2.0", "version-compare 0.2.0",
] ]
@@ -5363,9 +5365,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]] [[package]]
name = "tar" name = "tar"
version = "0.4.40" version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909"
dependencies = [ dependencies = [
"filetime", "filetime",
"libc", "libc",
@@ -5381,7 +5383,7 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "1.6.7" version = "1.6.7"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.21.7", "base64 0.21.7",
@@ -5414,7 +5416,7 @@ dependencies = [
"png", "png",
"rand 0.8.5", "rand 0.8.5",
"raw-window-handle", "raw-window-handle",
"regex 1.10.4", "regex 1.10.5",
"reqwest 0.11.27", "reqwest 0.11.27",
"rfd", "rfd",
"semver 1.0.23", "semver 1.0.23",
@@ -5444,7 +5446,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "1.5.2" version = "1.5.2"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@@ -5462,7 +5464,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "1.4.3" version = "1.4.3"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"base64 0.21.7", "base64 0.21.7",
"brotli", "brotli",
@@ -5472,7 +5474,7 @@ dependencies = [
"png", "png",
"proc-macro2", "proc-macro2",
"quote", "quote",
"regex 1.10.4", "regex 1.10.5",
"semver 1.0.23", "semver 1.0.23",
"serde", "serde",
"serde_json", "serde_json",
@@ -5487,7 +5489,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "1.4.4" version = "1.4.4"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
@@ -5500,7 +5502,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "0.14.3" version = "0.14.3"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"gtk", "gtk",
"http 0.2.12", "http 0.2.12",
@@ -5520,7 +5522,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "0.14.8" version = "0.14.8"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"arboard", "arboard",
"cocoa 0.24.1", "cocoa 0.24.1",
@@ -5540,7 +5542,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "1.5.4" version = "1.5.4"
source = "git+https://github.com/Pylogmon/tauri?branch=1.x#9c0b64965560b28c3d06963494a3e0d2e1bae9f4" source = "git+https://github.com/tauri-apps/tauri?branch=1.x#d2786bf699ffca1d5e9c234a3b1b4d5ec173af87"
dependencies = [ dependencies = [
"brotli", "brotli",
"ctor", "ctor",
@@ -5651,7 +5653,7 @@ dependencies = [
"num-derive", "num-derive",
"num-traits", "num-traits",
"ordered-float", "ordered-float",
"regex 1.10.4", "regex 1.10.5",
"semver 0.11.0", "semver 0.11.0",
"sha2 0.9.9", "sha2 0.9.9",
"signal-hook", "signal-hook",
@@ -5780,21 +5782,6 @@ dependencies = [
"zerovec", "zerovec",
] ]
[[package]]
name = "tinyvec"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.38.0" version = "1.38.0"
@@ -5894,14 +5881,14 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.8.13" version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335"
dependencies = [ dependencies = [
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
"toml_edit 0.22.13", "toml_edit 0.22.14",
] ]
[[package]] [[package]]
@@ -5939,15 +5926,15 @@ dependencies = [
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
version = "0.22.13" version = "0.22.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38"
dependencies = [ dependencies = [
"indexmap 2.2.6", "indexmap 2.2.6",
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
"winnow 0.6.9", "winnow 0.6.13",
] ]
[[package]] [[package]]
@@ -6030,7 +6017,7 @@ dependencies = [
"matchers", "matchers",
"nu-ansi-term", "nu-ansi-term",
"once_cell", "once_cell",
"regex 1.10.4", "regex 1.10.5",
"sharded-slab", "sharded-slab",
"smallvec", "smallvec",
"thread_local 1.1.8", "thread_local 1.1.8",
@@ -6125,27 +6112,12 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "unicode-bidi"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.12" version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
dependencies = [
"tinyvec",
]
[[package]] [[package]]
name = "unicode-segmentation" name = "unicode-segmentation"
version = "1.11.0" version = "1.11.0"
@@ -6175,9 +6147,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]] [[package]]
name = "url" name = "url"
version = "2.5.0" version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna", "idna",
@@ -6221,9 +6193,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]] [[package]]
name = "utf8parse" name = "utf8parse"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "uuid" name = "uuid"
@@ -6329,7 +6301,7 @@ dependencies = [
"futures-util", "futures-util",
"headers", "headers",
"http 0.2.12", "http 0.2.12",
"hyper 0.14.28", "hyper 0.14.29",
"log 0.4.21", "log 0.4.21",
"mime", "mime",
"mime_guess", "mime_guess",
@@ -6570,9 +6542,9 @@ dependencies = [
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.26.1" version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3"
dependencies = [ dependencies = [
"rustls-pki-types", "rustls-pki-types",
] ]
@@ -6606,7 +6578,7 @@ version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7"
dependencies = [ dependencies = [
"regex 1.10.4", "regex 1.10.5",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
@@ -6803,9 +6775,9 @@ checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278"
[[package]] [[package]]
name = "windows-result" name = "windows-result"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [ dependencies = [
"windows-targets 0.52.5", "windows-targets 0.52.5",
] ]
@@ -7092,9 +7064,9 @@ dependencies = [
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.6.9" version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@@ -7255,12 +7227,12 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"
[[package]] [[package]]
name = "xdg-home" name = "xdg-home"
version = "1.1.0" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8"
dependencies = [ dependencies = [
"libc", "libc",
"winapi", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@@ -7296,9 +7268,9 @@ dependencies = [
"async-broadcast", "async-broadcast",
"async-executor", "async-executor",
"async-fs 2.1.2", "async-fs 2.1.2",
"async-io 2.3.2", "async-io 2.3.3",
"async-lock 3.4.0", "async-lock 3.4.0",
"async-process 2.2.2", "async-process 2.2.3",
"async-recursion", "async-recursion",
"async-task", "async-task",
"async-trait", "async-trait",
+3 -3
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "clash-verge" name = "clash-verge"
version = "1.6.5" version = "1.6.6"
description = "clash verge" description = "clash verge"
authors = ["zzzgydi", "wonfen", "MystiPanda"] authors = ["zzzgydi", "wonfen", "MystiPanda"]
license = "GPL-3.0-only" license = "GPL-3.0-only"
@@ -10,7 +10,7 @@ edition = "2021"
build = "build.rs" build = "build.rs"
[build-dependencies] [build-dependencies]
tauri-build = { git="https://github.com/Pylogmon/tauri",branch = "1.x", features = [] } tauri-build = { git="https://github.com/tauri-apps/tauri",branch = "1.x", features = [] }
[dependencies] [dependencies]
warp = "0.3" warp = "0.3"
@@ -37,7 +37,7 @@ serde = { version = "1.0", features = ["derive"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"] } reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" } sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" }
auto-launch = { git="https://github.com/zzzgydi/auto-launch", branch = "main" } auto-launch = { git="https://github.com/zzzgydi/auto-launch", branch = "main" }
tauri = { git="https://github.com/Pylogmon/tauri",branch = "1.x", features = [ "fs-read-file", "fs-exists", "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "icon-ico", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all", "devtools"] } tauri = { git="https://github.com/tauri-apps/tauri",branch = "1.x", features = [ "fs-read-file", "fs-exists", "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "icon-ico", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all", "devtools"] }
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
runas = "=1.2.0" runas = "=1.2.0"
deelevate = "0.2.0" deelevate = "0.2.0"
+1 -1
View File
@@ -327,7 +327,7 @@ pub fn copy_icon_file(path: String, name: String) -> CmdResult<String> {
Err(err) => Err(err.to_string()), Err(err) => Err(err.to_string()),
} }
} else { } else {
return Err("file not found".to_string()); Err("file not found".to_string())
} }
} }
+1
View File
@@ -1,4 +1,5 @@
mod clash; mod clash;
#[allow(clippy::module_inception)]
mod config; mod config;
mod draft; mod draft;
mod prfitem; mod prfitem;
+6 -3
View File
@@ -103,7 +103,9 @@ impl PrfOption {
a.user_agent = b.user_agent.or(a.user_agent); a.user_agent = b.user_agent.or(a.user_agent);
a.with_proxy = b.with_proxy.or(a.with_proxy); a.with_proxy = b.with_proxy.or(a.with_proxy);
a.self_proxy = b.self_proxy.or(a.self_proxy); a.self_proxy = b.self_proxy.or(a.self_proxy);
a.danger_accept_invalid_certs = b.danger_accept_invalid_certs.or(a.danger_accept_invalid_certs); a.danger_accept_invalid_certs = b
.danger_accept_invalid_certs
.or(a.danger_accept_invalid_certs);
a.update_interval = b.update_interval.or(a.update_interval); a.update_interval = b.update_interval.or(a.update_interval);
Some(a) Some(a)
} }
@@ -182,7 +184,8 @@ impl PrfItem {
let opt_ref = option.as_ref(); let opt_ref = option.as_ref();
let with_proxy = opt_ref.map_or(false, |o| o.with_proxy.unwrap_or(false)); let with_proxy = opt_ref.map_or(false, |o| o.with_proxy.unwrap_or(false));
let self_proxy = opt_ref.map_or(false, |o| o.self_proxy.unwrap_or(false)); let self_proxy = opt_ref.map_or(false, |o| o.self_proxy.unwrap_or(false));
let accept_invalid_certs = opt_ref.map_or(false, |o| o.danger_accept_invalid_certs.unwrap_or(false)); let accept_invalid_certs =
opt_ref.map_or(false, |o| o.danger_accept_invalid_certs.unwrap_or(false));
let user_agent = opt_ref.and_then(|o| o.user_agent.clone()); let user_agent = opt_ref.and_then(|o| o.user_agent.clone());
let update_interval = opt_ref.and_then(|o| o.update_interval); let update_interval = opt_ref.and_then(|o| o.update_interval);
@@ -300,7 +303,7 @@ impl PrfItem {
Some(value) => { Some(value) => {
let str_value = value.to_str().unwrap_or(""); let str_value = value.to_str().unwrap_or("");
Some(str_value.to_string()) Some(str_value.to_string())
}, }
None => None, None => None,
}; };
+4 -4
View File
@@ -116,12 +116,12 @@ impl CoreManager {
// 服务模式启动失败就直接运行sidecar // 服务模式启动失败就直接运行sidecar
log::debug!(target: "app", "try to run core in service mode"); log::debug!(target: "app", "try to run core in service mode");
match (|| async { let res = async {
service::check_service().await?; service::check_service().await?;
service::run_core_by_service(&config_path).await service::run_core_by_service(&config_path).await
})() }
.await .await;
{ match res {
Ok(_) => return Ok(()), Ok(_) => return Ok(()),
Err(err) => { Err(err) => {
// 修改这个值,免得stop出错 // 修改这个值,免得stop出错
+2 -2
View File
@@ -43,7 +43,7 @@ impl Hotkey {
} }
} }
} }
*self.current.lock() = hotkeys.clone(); self.current.lock().clone_from(hotkeys);
} }
Ok(()) Ok(())
@@ -142,7 +142,7 @@ impl Hotkey {
}); });
new_map.iter().for_each(|(&key, &func)| { new_map.iter().for_each(|(&key, &func)| {
if old_map.get(key).is_none() { if !old_map.contains_key(key) {
add_list.push((key, func)); add_list.push((key, func));
} }
}); });
+2 -1
View File
@@ -22,7 +22,8 @@ pub fn grant_permission(core: String) -> anyhow::Result<()> {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
let output = { let output = {
let path = path.replace(' ', "\\ "); // 避免路径中有空格 let path = path.replace(' ', "\\ "); // 避免路径中有空格
let shell = format!("setcap cap_net_bind_service,cap_net_admin,cap_dac_override=+ep {path}"); let shell =
format!("setcap cap_net_bind_service,cap_net_admin,cap_dac_override=+ep {path}");
let sudo = match Command::new("which").arg("pkexec").output() { let sudo = match Command::new("which").arg("pkexec").output() {
Ok(output) => { Ok(output) => {
+2 -1
View File
@@ -1,13 +1,14 @@
pub mod clash_api; pub mod clash_api;
#[allow(clippy::module_inception)]
mod core; mod core;
pub mod handle; pub mod handle;
pub mod hotkey; pub mod hotkey;
pub mod logger; pub mod logger;
pub mod manager; pub mod manager;
pub mod service;
pub mod sysopt; pub mod sysopt;
pub mod timer; pub mod timer;
pub mod tray; pub mod tray;
pub mod service;
pub mod win_uwp; pub mod win_uwp;
pub use self::core::*; pub use self::core::*;
+45 -48
View File
@@ -41,6 +41,34 @@ static DEFAULT_BYPASS: &str = "localhost,127.0.0.1,192.168.0.0/16,10.0.0.0/8,172
static DEFAULT_BYPASS: &str = static DEFAULT_BYPASS: &str =
"127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.crashlytics.com,<local>"; "127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.crashlytics.com,<local>";
fn get_bypass() -> String {
let bypass = DEFAULT_BYPASS.to_string();
let res = {
let verge = Config::verge();
let verge = verge.latest();
verge.system_proxy_bypass.clone()
};
let custom_bypass = match res {
Some(bypass) => bypass,
None => "".to_string(),
};
#[cfg(target_os = "windows")]
let bypass = if custom_bypass.is_empty() {
bypass
} else {
format!("{};{}", bypass, custom_bypass)
};
#[cfg(not(target_os = "windows"))]
let bypass = if custom_bypass.is_empty() {
bypass
} else {
format!("{},{}", bypass, custom_bypass)
};
bypass
}
impl Sysopt { impl Sysopt {
pub fn global() -> &'static Sysopt { pub fn global() -> &'static Sysopt {
static SYSOPT: OnceCell<Sysopt> = OnceCell::new(); static SYSOPT: OnceCell<Sysopt> = OnceCell::new();
@@ -63,12 +91,11 @@ impl Sysopt {
.unwrap_or(Config::clash().data().get_mixed_port()); .unwrap_or(Config::clash().data().get_mixed_port());
let pac_port = IVerge::get_singleton_port(); let pac_port = IVerge::get_singleton_port();
let (enable, bypass, pac) = { let (enable, pac) = {
let verge = Config::verge(); let verge = Config::verge();
let verge = verge.latest(); let verge = verge.latest();
( (
verge.enable_system_proxy.unwrap_or(false), verge.enable_system_proxy.unwrap_or(false),
verge.system_proxy_bypass.clone(),
verge.proxy_auto_config.unwrap_or(false), verge.proxy_auto_config.unwrap_or(false),
) )
}; };
@@ -76,16 +103,7 @@ impl Sysopt {
enable, enable,
host: String::from("127.0.0.1"), host: String::from("127.0.0.1"),
port, port,
bypass: match bypass { bypass: get_bypass(),
Some(bypass) => {
if bypass.is_empty() {
DEFAULT_BYPASS.into()
} else {
bypass
}
}
None => DEFAULT_BYPASS.into(),
},
}; };
let mut auto = Autoproxy { let mut auto = Autoproxy {
enable, enable,
@@ -127,28 +145,26 @@ impl Sysopt {
let mut cur_autoproxy = self.cur_autoproxy.lock(); let mut cur_autoproxy = self.cur_autoproxy.lock();
let old_autoproxy = self.old_autoproxy.lock(); let old_autoproxy = self.old_autoproxy.lock();
let (enable, bypass, pac) = { let (enable, pac) = {
let verge = Config::verge(); let verge = Config::verge();
let verge = verge.latest(); let verge = verge.latest();
( (
verge.enable_system_proxy.unwrap_or(false), verge.enable_system_proxy.unwrap_or(false),
verge.system_proxy_bypass.clone(),
verge.proxy_auto_config.unwrap_or(false), verge.proxy_auto_config.unwrap_or(false),
) )
}; };
if pac { if pac && (cur_autoproxy.is_none() || old_autoproxy.is_none()) {
if cur_autoproxy.is_none() || old_autoproxy.is_none() { drop(cur_autoproxy);
drop(cur_autoproxy); drop(old_autoproxy);
drop(old_autoproxy); return self.init_sysproxy();
return self.init_sysproxy();
}
} else {
if cur_sysproxy.is_none() || old_sysproxy.is_none() {
drop(cur_sysproxy);
drop(old_sysproxy);
return self.init_sysproxy();
}
} }
if !pac && (cur_sysproxy.is_none() || old_sysproxy.is_none()) {
drop(cur_sysproxy);
drop(old_sysproxy);
return self.init_sysproxy();
}
let port = Config::verge() let port = Config::verge()
.latest() .latest()
.verge_mixed_port .verge_mixed_port
@@ -156,16 +172,7 @@ impl Sysopt {
let pac_port = IVerge::get_singleton_port(); let pac_port = IVerge::get_singleton_port();
let mut sysproxy = cur_sysproxy.take().unwrap(); let mut sysproxy = cur_sysproxy.take().unwrap();
sysproxy.bypass = match bypass { sysproxy.bypass = get_bypass();
Some(bypass) => {
if bypass.is_empty() {
DEFAULT_BYPASS.into()
} else {
bypass
}
}
None => DEFAULT_BYPASS.into(),
};
sysproxy.port = port; sysproxy.port = port;
let mut autoproxy = cur_autoproxy.take().unwrap(); let mut autoproxy = cur_autoproxy.take().unwrap();
@@ -349,14 +356,13 @@ impl Sysopt {
loop { loop {
sleep(Duration::from_secs(wait_secs)).await; sleep(Duration::from_secs(wait_secs)).await;
let (enable, guard, guard_duration, bypass, pac) = { let (enable, guard, guard_duration, pac) = {
let verge = Config::verge(); let verge = Config::verge();
let verge = verge.latest(); let verge = verge.latest();
( (
verge.enable_system_proxy.unwrap_or(false), verge.enable_system_proxy.unwrap_or(false),
verge.enable_proxy_guard.unwrap_or(false), verge.enable_proxy_guard.unwrap_or(false),
verge.proxy_guard_duration.unwrap_or(10), verge.proxy_guard_duration.unwrap_or(10),
verge.system_proxy_bypass.clone(),
verge.proxy_auto_config.unwrap_or(false), verge.proxy_auto_config.unwrap_or(false),
) )
}; };
@@ -389,16 +395,7 @@ impl Sysopt {
enable: true, enable: true,
host: "127.0.0.1".into(), host: "127.0.0.1".into(),
port, port,
bypass: match bypass { bypass: get_bypass(),
Some(bypass) => {
if bypass.is_empty() {
DEFAULT_BYPASS.into()
} else {
bypass
}
}
None => DEFAULT_BYPASS.into(),
},
}; };
log_err!(sysproxy.set_system_proxy()); log_err!(sysproxy.set_system_proxy());
+1 -1
View File
@@ -88,7 +88,7 @@ impl Tray {
), ),
)) ))
.add_native_item(SystemTrayMenuItem::Separator) .add_native_item(SystemTrayMenuItem::Separator)
.add_item(CustomMenuItem::new("quit", t!("Quit", "退出")).accelerator("CmdOrControl+Q")) .add_item(CustomMenuItem::new("quit", t!("Quit", "退出")))
} }
pub fn update_systray(app_handle: &AppHandle) -> Result<()> { pub fn update_systray(app_handle: &AppHandle) -> Result<()> {
+7 -7
View File
@@ -88,13 +88,13 @@ impl ChainItem {
impl ChainSupport { impl ChainSupport {
pub fn is_support(&self, core: Option<&String>) -> bool { pub fn is_support(&self, core: Option<&String>) -> bool {
match core { match core {
Some(core) => match (self, core.as_str()) { Some(core) => matches!(
(ChainSupport::All, _) => true, (self, core.as_str()),
(ChainSupport::Clash, "clash") => true, (ChainSupport::All, _)
(ChainSupport::ClashMeta, "clash-meta") => true, | (ChainSupport::Clash, "clash")
(ChainSupport::ClashMetaAlpha, "clash-meta-alpha") => true, | (ChainSupport::ClashMeta, "clash-meta")
_ => false, | (ChainSupport::ClashMetaAlpha, "clash-meta-alpha")
}, ),
None => true, None => true,
} }
} }
+1 -5
View File
@@ -60,11 +60,7 @@ pub fn use_sort(config: Mapping) -> Mapping {
let supported_keys: HashSet<&str> = HANDLE_FIELDS.into_iter().chain(DEFAULT_FIELDS).collect(); let supported_keys: HashSet<&str> = HANDLE_FIELDS.into_iter().chain(DEFAULT_FIELDS).collect();
let config_keys: HashSet<&str> = config let config_keys: HashSet<&str> = config.keys().filter_map(|e| e.as_str()).collect();
.keys()
.filter_map(|e| e.as_str())
.into_iter()
.collect();
config_keys.difference(&supported_keys).for_each(|&key| { config_keys.difference(&supported_keys).for_each(|&key| {
let key = Value::from(key); let key = Value::from(key);
+1 -1
View File
@@ -12,7 +12,7 @@ const MERGE_FIELDS: [&str; 6] = [
fn deep_merge(a: &mut Value, b: &Value) { fn deep_merge(a: &mut Value, b: &Value) {
match (a, b) { match (a, b) {
(&mut Value::Mapping(ref mut a), &Value::Mapping(ref b)) => { (&mut Value::Mapping(ref mut a), Value::Mapping(b)) => {
for (k, v) in b { for (k, v) in b {
deep_merge(a.entry(k.clone()).or_insert(Value::Null), v); deep_merge(a.entry(k.clone()).or_insert(Value::Null), v);
} }
+4 -6
View File
@@ -136,17 +136,15 @@ pub fn enhance() -> (Mapping, Vec<String>, HashMap<String, ResultLog>) {
.map(|(_, c)| c) .map(|(_, c)| c)
.for_each(|item| { .for_each(|item| {
log::debug!(target: "app", "run builtin script {}", item.uid); log::debug!(target: "app", "run builtin script {}", item.uid);
if let ChainType::Script(script) = item.data {
match item.data { match use_script(script, config.to_owned()) {
ChainType::Script(script) => match use_script(script, config.to_owned()) {
Ok((res_config, _)) => { Ok((res_config, _)) => {
config = res_config; config = res_config;
} }
Err(err) => { Err(err) => {
log::error!(target: "app", "builtin script error `{err}`"); log::error!(target: "app", "builtin script error `{err}`");
} }
}, }
_ => {}
} }
}); });
} }
@@ -155,7 +153,7 @@ pub fn enhance() -> (Mapping, Vec<String>, HashMap<String, ResultLog>) {
config = use_sort(config); config = use_sort(config);
let mut exists_set = HashSet::new(); let mut exists_set = HashSet::new();
exists_set.extend(exists_keys.into_iter()); exists_set.extend(exists_keys);
exists_keys = exists_set.into_iter().collect(); exists_keys = exists_set.into_iter().collect();
(config, exists_keys, result_map) (config, exists_keys, result_map)
+1 -1
View File
@@ -16,7 +16,7 @@ pub fn use_script(script: String, config: Mapping) -> Result<(Mapping, Vec<(Stri
2, 2,
NativeFunction::from_closure( NativeFunction::from_closure(
move |_: &JsValue, args: &[JsValue], context: &mut Context| { move |_: &JsValue, args: &[JsValue], context: &mut Context| {
let level = args.get(0).unwrap().to_string(context)?; let level = args.first().unwrap().to_string(context)?;
let level = level.to_std_string().unwrap(); let level = level.to_std_string().unwrap();
let data = args.get(1).unwrap().to_string(context)?; let data = args.get(1).unwrap().to_string(context)?;
let data = data.to_std_string().unwrap(); let data = data.to_std_string().unwrap();
+20 -10
View File
@@ -106,7 +106,7 @@ pub fn toggle_tun_mode() {
pub async fn patch_clash(patch: Mapping) -> Result<()> { pub async fn patch_clash(patch: Mapping) -> Result<()> {
Config::clash().draft().patch_config(patch.clone()); Config::clash().draft().patch_config(patch.clone());
match { let res = {
let redir_port = patch.get("redir-port"); let redir_port = patch.get("redir-port");
let tproxy_port = patch.get("tproxy-port"); let tproxy_port = patch.get("tproxy-port");
let mixed_port = patch.get("mixed-port"); let mixed_port = patch.get("mixed-port");
@@ -156,7 +156,8 @@ pub async fn patch_clash(patch: Mapping) -> Result<()> {
Config::runtime().latest().patch_config(patch); Config::runtime().latest().patch_config(patch);
<Result<()>>::Ok(()) <Result<()>>::Ok(())
} { };
match res {
Ok(()) => { Ok(()) => {
Config::clash().apply(); Config::clash().apply();
Config::clash().data().save_config()?; Config::clash().data().save_config()?;
@@ -193,7 +194,7 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
let tproxy_enabled = patch.verge_tproxy_enabled; let tproxy_enabled = patch.verge_tproxy_enabled;
let socks_enabled = patch.verge_socks_enabled; let socks_enabled = patch.verge_socks_enabled;
let http_enabled = patch.verge_http_enabled; let http_enabled = patch.verge_http_enabled;
match { let res = {
let service_mode = patch.enable_service_mode; let service_mode = patch.enable_service_mode;
if service_mode.is_some() { if service_mode.is_some() {
@@ -255,7 +256,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
} }
<Result<()>>::Ok(()) <Result<()>>::Ok(())
} { };
match res {
Ok(()) => { Ok(()) => {
Config::verge().apply(); Config::verge().apply();
Config::verge().data().save_file()?; Config::verge().data().save_file()?;
@@ -385,11 +387,19 @@ pub async fn test_delay(url: String) -> Result<u32> {
.get(url).header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"); .get(url).header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0");
let start = Instant::now(); let start = Instant::now();
let response = request.send().await?; let response = request.send().await;
if response.status().is_success() { match response {
let delay = start.elapsed().as_millis() as u32; Ok(response) => {
Ok(delay) log::trace!(target: "app", "test_delay response: {:#?}", response);
} else { if response.status().is_success() {
Ok(10000u32) Ok(start.elapsed().as_millis() as u32)
} else {
Ok(10000u32)
}
}
Err(err) => {
log::trace!(target: "app", "test_delay error: {:#?}", err);
Err(err.into())
}
} }
} }
+3 -3
View File
@@ -137,7 +137,7 @@ pub fn delete_log() -> Result<()> {
} }
let service_log_dir = log_dir.join("service"); let service_log_dir = log_dir.join("service");
for file in fs::read_dir(&service_log_dir)?.flatten() { for file in fs::read_dir(service_log_dir)?.flatten() {
let _ = process_file(file); let _ = process_file(file);
} }
@@ -318,11 +318,11 @@ pub fn startup_script() -> Result<()> {
Some(dir) => { Some(dir) => {
let _ = Command::new(shell) let _ = Command::new(shell)
.current_dir(dir.to_path_buf()) .current_dir(dir.to_path_buf())
.args(&[path]) .args([path])
.output()?; .output()?;
} }
None => { None => {
let _ = Command::new(shell).args(&[path]).output()?; let _ = Command::new(shell).args([path]).output()?;
} }
} }
} }
+6 -4
View File
@@ -99,9 +99,12 @@ pub fn resolve_setup(app: &mut App) {
let argvs: Vec<String> = std::env::args().collect(); let argvs: Vec<String> = std::env::args().collect();
if argvs.len() > 1 { if argvs.len() > 1 {
tauri::async_runtime::block_on(async { let param = argvs[1].as_str();
resolve_scheme(argvs[1].to_owned()).await; if param.starts_with("clash:") {
}); tauri::async_runtime::block_on(async {
resolve_scheme(argvs[1].to_owned()).await;
});
}
} }
} }
@@ -205,7 +208,6 @@ pub fn create_window(app_handle: &AppHandle) {
} }
Err(_) => { Err(_) => {
log::error!("failed to create window"); log::error!("failed to create window");
return;
} }
} }
} }
+8 -6
View File
@@ -28,12 +28,14 @@ pub fn check_singleton() -> Result<()> {
let argvs: Vec<String> = std::env::args().collect(); let argvs: Vec<String> = std::env::args().collect();
if argvs.len() > 1 { if argvs.len() > 1 {
let param = argvs[1].as_str(); let param = argvs[1].as_str();
reqwest::get(format!( if param.starts_with("clash:") {
"http://127.0.0.1:{port}/commands/scheme?param={param}" reqwest::get(format!(
)) "http://127.0.0.1:{port}/commands/scheme?param={param}"
.await? ))
.text() .await?
.await?; .text()
.await?;
}
} else { } else {
reqwest::get(format!("http://127.0.0.1:{port}/commands/visible")) reqwest::get(format!("http://127.0.0.1:{port}/commands/visible"))
.await? .await?
+2 -2
View File
@@ -2,7 +2,7 @@
"$schema": "../node_modules/@tauri-apps/cli/schema.json", "$schema": "../node_modules/@tauri-apps/cli/schema.json",
"package": { "package": {
"productName": "Clash Verge", "productName": "Clash Verge",
"version": "1.6.5" "version": "1.6.6"
}, },
"build": { "build": {
"distDir": "../dist", "distDir": "../dist",
@@ -75,7 +75,7 @@
}, },
"windows": [], "windows": [],
"security": { "security": {
"csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self';" "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: asset: 'unsafe-eval' 'unsafe-inline' 'self';"
} }
} }
} }
+1 -1
View File
@@ -6,7 +6,7 @@
}, },
"bundle": { "bundle": {
"identifier": "io.github.clash-verge-rev.clash-verge-rev", "identifier": "io.github.clash-verge-rev.clash-verge-rev",
"targets": ["deb", "rpm", "appimage", "updater"], "targets": ["deb", "rpm"],
"deb": { "deb": {
"depends": ["openssl"], "depends": ["openssl"],
"desktopTemplate": "./template/clash-verge.desktop", "desktopTemplate": "./template/clash-verge.desktop",
+1 -1
View File
@@ -12,7 +12,7 @@
"frameworks": [], "frameworks": [],
"minimumSystemVersion": "10.15", "minimumSystemVersion": "10.15",
"exceptionDomain": "", "exceptionDomain": "",
"signingIdentity": "-", "signingIdentity": null,
"entitlements": null "entitlements": null
} }
} }
+7 -2
View File
@@ -323,10 +323,15 @@ Var AppStartMenuFolder
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(createDesktop)" !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(createDesktop)"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut !define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut
; Show run app after installation. ; Show run app after installation.
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAINBINARYNAME}.exe" !define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION RunMainBinary
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
Function RunMainBinary
nsis_tauri_utils::RunAsUser "$INSTDIR\${MAINBINARYNAME}.exe" ""
FunctionEnd
; Uninstaller Pages ; Uninstaller Pages
; 1. Confirm uninstall page ; 1. Confirm uninstall page
Var DeleteAppDataCheckbox Var DeleteAppDataCheckbox
@@ -729,7 +734,7 @@ Function .onInstSuccess
${GetOptions} $CMDLINE "/R" $R0 ${GetOptions} $CMDLINE "/R" $R0
IfErrors run_done 0 IfErrors run_done 0
${GetOptions} $CMDLINE "/ARGS" $R0 ${GetOptions} $CMDLINE "/ARGS" $R0
Exec '"$INSTDIR\${MAINBINARYNAME}.exe" $R0' nsis_tauri_utils::RunAsUser "$INSTDIR\${MAINBINARYNAME}.exe" "$R0"
run_done: run_done:
FunctionEnd FunctionEnd
+38
View File
@@ -0,0 +1,38 @@
import React from "react";
import { Box, styled } from "@mui/material";
type Props = {
label: string;
fontSize?: string;
width?: string;
padding?: string;
children?: React.ReactNode;
};
export const BaseFieldset: React.FC<Props> = (props: Props) => {
const Fieldset = styled(Box)(() => ({
position: "relative",
border: "1px solid #bbb",
borderRadius: "5px",
width: props.width ?? "auto",
padding: props.padding ?? "15px",
}));
const Label = styled("legend")(({ theme }) => ({
position: "absolute",
top: "-10px",
left: props.padding ?? "15px",
backgroundColor: theme.palette.background.paper,
backgroundImage:
"linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16))",
color: theme.palette.text.primary,
fontSize: props.fontSize ?? "1em",
}));
return (
<Fieldset component="fieldset">
<Label>{props.label}</Label>
{props.children}
</Fieldset>
);
};
+3 -3
View File
@@ -1,8 +1,7 @@
import { useEffect, useMemo } from "react"; import { useEffect, useMemo } from "react";
import { useRecoilState } from "recoil";
import { alpha, createTheme, Shadows, Theme } from "@mui/material"; import { alpha, createTheme, Shadows, Theme } from "@mui/material";
import { appWindow } from "@tauri-apps/api/window"; import { appWindow } from "@tauri-apps/api/window";
import { atomThemeMode } from "@/services/states"; import { useSetThemeMode, useThemeMode } from "@/services/states";
import { defaultTheme, defaultDarkTheme } from "@/pages/_theme"; import { defaultTheme, defaultDarkTheme } from "@/pages/_theme";
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
@@ -12,7 +11,8 @@ import { useVerge } from "@/hooks/use-verge";
export const useCustomTheme = () => { export const useCustomTheme = () => {
const { verge } = useVerge(); const { verge } = useVerge();
const { theme_mode, theme_setting } = verge ?? {}; const { theme_mode, theme_setting } = verge ?? {};
const [mode, setMode] = useRecoilState(atomThemeMode); const mode = useThemeMode();
const setMode = useSetThemeMode();
useEffect(() => { useEffect(() => {
const themeMode = ["light", "dark", "system"].includes(theme_mode!) const themeMode = ["light", "dark", "system"].includes(theme_mode!)
+3 -4
View File
@@ -1,9 +1,8 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useEffect } from "react"; import { useEffect } from "react";
import { useRecoilValue, useSetRecoilState } from "recoil";
import { getClashLogs } from "@/services/cmds"; import { getClashLogs } from "@/services/cmds";
import { useClashInfo } from "@/hooks/use-clash"; import { useClashInfo } from "@/hooks/use-clash";
import { atomEnableLog, atomLogData } from "@/services/states"; import { useEnableLog, useSetLogData } from "@/services/states";
import { useWebsocket } from "@/hooks/use-websocket"; import { useWebsocket } from "@/hooks/use-websocket";
const MAX_LOG_NUM = 1000; const MAX_LOG_NUM = 1000;
@@ -12,8 +11,8 @@ const MAX_LOG_NUM = 1000;
export const useLogSetup = () => { export const useLogSetup = () => {
const { clashInfo } = useClashInfo(); const { clashInfo } = useClashInfo();
const enableLog = useRecoilValue(atomEnableLog); const [enableLog] = useEnableLog();
const setLogData = useSetRecoilState(atomLogData); const setLogData = useSetLogData();
const { connect, disconnect } = useWebsocket((event) => { const { connect, disconnect } = useWebsocket((event) => {
const data = JSON.parse(event.data) as ILogItem; const data = JSON.parse(event.data) as ILogItem;
+2 -3
View File
@@ -1,6 +1,5 @@
import { ReactNode, useEffect, useRef } from "react"; import { ReactNode, useEffect, useRef } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useRecoilValue } from "recoil";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
Button, Button,
@@ -9,7 +8,7 @@ import {
DialogContent, DialogContent,
DialogTitle, DialogTitle,
} from "@mui/material"; } from "@mui/material";
import { atomThemeMode } from "@/services/states"; import { useThemeMode } from "@/services/states";
import { readProfileFile, saveProfileFile } from "@/services/cmds"; import { readProfileFile, saveProfileFile } from "@/services/cmds";
import { Notice } from "@/components/base"; import { Notice } from "@/components/base";
import { nanoid } from "nanoid"; import { nanoid } from "nanoid";
@@ -90,7 +89,7 @@ export const EditorViewer = (props: Props) => {
const { t } = useTranslation(); const { t } = useTranslation();
const editorRef = useRef<any>(); const editorRef = useRef<any>();
const instanceRef = useRef<editor.IStandaloneCodeEditor | null>(null); const instanceRef = useRef<editor.IStandaloneCodeEditor | null>(null);
const themeMode = useRecoilValue(atomThemeMode); const themeMode = useThemeMode();
useEffect(() => { useEffect(() => {
if (!open) return; if (!open) return;
+4 -3
View File
@@ -2,7 +2,6 @@ import dayjs from "dayjs";
import { mutate } from "swr"; import { mutate } from "swr";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useRecoilState } from "recoil";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSortable } from "@dnd-kit/sortable"; import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities"; import { CSS } from "@dnd-kit/utilities";
@@ -17,7 +16,7 @@ import {
CircularProgress, CircularProgress,
} from "@mui/material"; } from "@mui/material";
import { RefreshRounded, DragIndicator } from "@mui/icons-material"; import { RefreshRounded, DragIndicator } from "@mui/icons-material";
import { atomLoadingCache } from "@/services/states"; import { useLoadingCache, useSetLoadingCache } from "@/services/states";
import { updateProfile, deleteProfile, viewProfile } from "@/services/cmds"; import { updateProfile, deleteProfile, viewProfile } from "@/services/cmds";
import { Notice } from "@/components/base"; import { Notice } from "@/components/base";
import { EditorViewer } from "@/components/profile/editor-viewer"; import { EditorViewer } from "@/components/profile/editor-viewer";
@@ -47,7 +46,8 @@ export const ProfileItem = (props: Props) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [anchorEl, setAnchorEl] = useState<any>(null); const [anchorEl, setAnchorEl] = useState<any>(null);
const [position, setPosition] = useState({ left: 0, top: 0 }); const [position, setPosition] = useState({ left: 0, top: 0 });
const [loadingCache, setLoadingCache] = useRecoilState(atomLoadingCache); const loadingCache = useLoadingCache();
const setLoadingCache = useSetLoadingCache();
const { uid, name = "Profile", extra, updated = 0 } = itemData; const { uid, name = "Profile", extra, updated = 0 } = itemData;
@@ -278,6 +278,7 @@ export const ProfileItem = (props: Props) => {
{/* only if has url can it be updated */} {/* only if has url can it be updated */}
{hasUrl && ( {hasUrl && (
<IconButton <IconButton
title={t("Refresh")}
sx={{ sx={{
position: "absolute", position: "absolute",
p: "3px", p: "3px",
+2 -2
View File
@@ -69,7 +69,7 @@ export const ProviderButton = () => {
sx={{ textTransform: "capitalize" }} sx={{ textTransform: "capitalize" }}
onClick={() => setOpen(true)} onClick={() => setOpen(true)}
> >
{t("Provider")} {t("Proxy Provider")}
</Button> </Button>
<BaseDialog <BaseDialog
@@ -171,7 +171,7 @@ export const ProviderButton = () => {
<IconButton <IconButton
size="small" size="small"
color="inherit" color="inherit"
title="Update Provider" title={`${t("Update")}${t("Proxy Provider")}`}
onClick={() => handleUpdate(key, index)} onClick={() => handleUpdate(key, index)}
sx={{ sx={{
animation: updating[index] animation: updating[index]
+2 -3
View File
@@ -17,8 +17,7 @@ import { ProxyItem } from "./proxy-item";
import { ProxyItemMini } from "./proxy-item-mini"; import { ProxyItemMini } from "./proxy-item-mini";
import type { IRenderItem } from "./use-render-list"; import type { IRenderItem } from "./use-render-list";
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
import { useRecoilState } from "recoil"; import { useThemeMode } from "@/services/states";
import { atomThemeMode } from "@/services/states";
import { useEffect, useMemo, useState } from "react"; import { useEffect, useMemo, useState } from "react";
import { convertFileSrc } from "@tauri-apps/api/tauri"; import { convertFileSrc } from "@tauri-apps/api/tauri";
import { downloadIconCache } from "@/services/cmds"; import { downloadIconCache } from "@/services/cmds";
@@ -38,7 +37,7 @@ export const ProxyRender = (props: RenderProps) => {
const { type, group, headState, proxy, proxyCol } = item; const { type, group, headState, proxy, proxyCol } = item;
const { verge } = useVerge(); const { verge } = useVerge();
const enable_group_icon = verge?.enable_group_icon ?? true; const enable_group_icon = verge?.enable_group_icon ?? true;
const [mode] = useRecoilState(atomThemeMode); const mode = useThemeMode();
const isDark = mode === "light" ? false : true; const isDark = mode === "light" ? false : true;
const itembackgroundcolor = isDark ? "#282A36" : "#ffffff"; const itembackgroundcolor = isDark ? "#282A36" : "#ffffff";
const [iconCachePath, setIconCachePath] = useState(""); const [iconCachePath, setIconCachePath] = useState("");
+2 -2
View File
@@ -67,7 +67,7 @@ export const ProviderButton = () => {
sx={{ textTransform: "capitalize" }} sx={{ textTransform: "capitalize" }}
onClick={() => setOpen(true)} onClick={() => setOpen(true)}
> >
{t("Provider")} {t("Rule Provider")}
</Button> </Button>
<BaseDialog <BaseDialog
@@ -145,7 +145,7 @@ export const ProviderButton = () => {
<IconButton <IconButton
size="small" size="small"
color="inherit" color="inherit"
title="Update Provider" title={`${t("Update")}${t("Rule Provider")}`}
onClick={() => handleUpdate(key, index)} onClick={() => handleUpdate(key, index)}
sx={{ sx={{
animation: updating[index] animation: updating[index]
+34 -9
View File
@@ -1,34 +1,59 @@
import React, { ReactNode } from "react"; import React, { ReactNode, useState } from "react";
import { import {
Box, Box,
List, List,
ListItem, ListItem,
ListItemButton,
ListItemText, ListItemText,
ListSubheader, ListSubheader,
} from "@mui/material"; } from "@mui/material";
import { ChevronRightRounded } from "@mui/icons-material";
import CircularProgress from "@mui/material/CircularProgress";
import isAsyncFunction from "@/utils/is-async-function";
interface ItemProps { interface ItemProps {
label: ReactNode; label: ReactNode;
extra?: ReactNode; extra?: ReactNode;
children?: ReactNode; children?: ReactNode;
secondary?: ReactNode; secondary?: ReactNode;
onClick?: () => void | Promise<any>;
} }
export const SettingItem: React.FC<ItemProps> = (props) => { export const SettingItem: React.FC<ItemProps> = (props) => {
const { label, extra, children, secondary } = props; const { label, extra, children, secondary, onClick } = props;
const clickable = !!onClick;
const primary = !extra ? ( const primary = (
<Box sx={{ display: "flex", alignItems: "center", fontSize: "14px" }}> <Box sx={{ display: "flex", alignItems: "center", fontSize: "14px" }}>
<span>{label}</span> <span>{label}</span>
</Box> {extra ? extra : null}
) : (
<Box sx={{ display: "flex", alignItems: "center", fontSize: "14px" }}>
<span>{label}</span>
{extra}
</Box> </Box>
); );
return ( const [isLoading, setIsLoading] = useState(false);
const handleClick = () => {
if (onClick) {
if (isAsyncFunction(onClick)) {
setIsLoading(true);
onClick()!.finally(() => setIsLoading(false));
} else {
onClick();
}
}
};
return clickable ? (
<ListItem disablePadding>
<ListItemButton onClick={handleClick} disabled={isLoading}>
<ListItemText primary={primary} secondary={secondary} />
{isLoading ? (
<CircularProgress color="inherit" size={20} />
) : (
<ChevronRightRounded />
)}
</ListItemButton>
</ListItem>
) : (
<ListItem sx={{ pt: "5px", pb: "5px" }}> <ListItem sx={{ pt: "5px", pb: "5px" }}>
<ListItemText primary={primary} secondary={secondary} /> <ListItemText primary={primary} secondary={secondary} />
{children} {children}
+76 -64
View File
@@ -1,8 +1,9 @@
import { forwardRef, useImperativeHandle, useState } from "react"; import { forwardRef, useImperativeHandle, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Box, IconButton, Tooltip } from "@mui/material";
import { InfoRounded } from "@mui/icons-material";
import { import {
Box,
InputAdornment, InputAdornment,
List, List,
ListItem, ListItem,
@@ -17,12 +18,22 @@ import { getSystemProxy, getAutotemProxy } from "@/services/cmds";
import { BaseDialog, DialogRef, Notice, Switch } from "@/components/base"; import { BaseDialog, DialogRef, Notice, Switch } from "@/components/base";
import { Edit } from "@mui/icons-material"; import { Edit } from "@mui/icons-material";
import { EditorViewer } from "@/components/profile/editor-viewer"; import { EditorViewer } from "@/components/profile/editor-viewer";
import { BaseFieldset } from "@/components/base/base-fieldset";
import getSystem from "@/utils/get-system";
const DEFAULT_PAC = `function FindProxyForURL(url, host) { const DEFAULT_PAC = `function FindProxyForURL(url, host) {
return "PROXY 127.0.0.1:%mixed-port%; SOCKS5 127.0.0.1:%mixed-port%; DIRECT;"; return "PROXY 127.0.0.1:%mixed-port%; SOCKS5 127.0.0.1:%mixed-port%; DIRECT;";
}`; }`;
export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => { export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
const { t } = useTranslation(); const { t } = useTranslation();
let validReg;
if (getSystem() === "windows") {
validReg =
/^(\*?\w+(\.\w+)*|\d{1,3}(\.\d{1,3}){0,2}\.\*|\d{1,3}(\.\d{1,3}){3})(;(\*?\w+(\.\w+)*|\d{1,3}(\.\d{1,3}){0,2}\.\*|\d{1,3}(\.\d{1,3}){3}))*$/;
} else {
validReg =
/^((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?)(,((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?))*$/;
}
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [editorOpen, setEditorOpen] = useState(false); const [editorOpen, setEditorOpen] = useState(false);
@@ -90,7 +101,10 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
if (value.pac_content !== pac_file_content) { if (value.pac_content !== pac_file_content) {
patch.pac_file_content = value.pac_content; patch.pac_file_content = value.pac_content;
} }
if (value.bypass && !validReg.test(value.bypass)) {
Notice.error(t("Invalid Bypass Format"));
return;
}
try { try {
await patchVerge(patch); await patchVerge(patch);
setOpen(false); setOpen(false);
@@ -103,7 +117,7 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
<BaseDialog <BaseDialog
open={open} open={open}
title={t("System Proxy Setting")} title={t("System Proxy Setting")}
contentSx={{ width: 450, maxHeight: 300 }} contentSx={{ width: 450, maxHeight: 565 }}
okBtn={t("Save")} okBtn={t("Save")}
cancelBtn={t("Cancel")} cancelBtn={t("Cancel")}
onClose={() => setOpen(false)} onClose={() => setOpen(false)}
@@ -111,6 +125,36 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
onOk={onSave} onOk={onSave}
> >
<List> <List>
<BaseFieldset label={t("Current System Proxy")} padding="15px 10px">
<FlexBox>
<Typography className="label">{t("Enable status")}</Typography>
<Typography className="value">
{value.pac
? autoproxy?.enable
? t("Enabled")
: t("Disabled")
: sysproxy?.enable
? t("Enabled")
: t("Disabled")}
</Typography>
</FlexBox>
{!value.pac && (
<>
<FlexBox>
<Typography className="label">{t("Server Addr")}</Typography>
<Typography className="value">
{sysproxy?.server ? sysproxy.server : t("Not available")}
</Typography>
</FlexBox>
</>
)}
{value.pac && (
<FlexBox>
<Typography className="label">{t("PAC URL")}</Typography>
<Typography className="value">{autoproxy?.url || "-"}</Typography>
</FlexBox>
)}
</BaseFieldset>
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Use PAC Mode")} /> <ListItemText primary={t("Use PAC Mode")} />
<Switch <Switch
@@ -120,8 +164,17 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
onChange={(_, e) => setValue((v) => ({ ...v, pac: e }))} onChange={(_, e) => setValue((v) => ({ ...v, pac: e }))}
/> />
</ListItem> </ListItem>
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Proxy Guard")} /> <ListItemText primary={t("Proxy Guard")} />
<Tooltip title={t("Proxy Guard Info")}>
<IconButton color="inherit" size="small">
<InfoRounded
fontSize="inherit"
style={{ cursor: "pointer", opacity: 0.75 }}
/>
</IconButton>
</Tooltip>
<Switch <Switch
edge="end" edge="end"
disabled={!enabled} disabled={!enabled}
@@ -150,27 +203,32 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
</ListItem> </ListItem>
{!value.pac && ( {!value.pac && (
<> <>
<ListItem sx={{ padding: "5px 2px", alignItems: "start" }}> <ListItemText primary={t("Proxy Bypass")} />
<ListItemText <TextField
primary={t("Proxy Bypass")} error={value.bypass ? !validReg.test(value.bypass) : false}
sx={{ padding: "3px 0" }} disabled={!enabled}
/> size="small"
</ListItem> autoComplete="off"
<ListItem sx={{ padding: "5px 2px" }}> multiline
rows={4}
sx={{ width: "100%" }}
value={value.bypass}
onChange={(e) => {
setValue((v) => ({ ...v, bypass: e.target.value }));
}}
/>
<ListItemText primary={t("Bypass")} />
<FlexBox>
<TextField <TextField
disabled={!enabled} disabled={true}
size="small" size="small"
autoComplete="off" autoComplete="off"
multiline multiline
rows={4} rows={4}
sx={{ width: "100%" }} sx={{ width: "100%" }}
value={value.bypass} value={sysproxy?.bypass || "-"}
placeholder={sysproxy?.bypass || `-`}
onChange={(e) =>
setValue((v) => ({ ...v, bypass: e.target.value }))
}
/> />
</ListItem> </FlexBox>
</> </>
)} )}
{value.pac && ( {value.pac && (
@@ -210,52 +268,6 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
</> </>
)} )}
</List> </List>
<Box sx={{ mt: 2.5 }}>
<Typography variant="body1" sx={{ fontSize: "18px", mb: 1 }}>
{t("Current System Proxy")}
</Typography>
<FlexBox>
<Typography className="label">{t("Enable status")}</Typography>
<Typography className="value">
{value.pac
? (!!autoproxy?.enable).toString()
: (!!sysproxy?.enable).toString()}
</Typography>
</FlexBox>
{!value.pac && (
<>
<FlexBox>
<Typography className="label">{t("Server Addr")}</Typography>
<Typography className="value">
{sysproxy?.server || "-"}
</Typography>
</FlexBox>
<FlexBox>
<Typography className="label">{t("Bypass")}</Typography>
</FlexBox>
<FlexBox>
<TextField
disabled={true}
size="small"
autoComplete="off"
multiline
rows={4}
sx={{ width: "100%" }}
value={sysproxy?.bypass || "-"}
/>
</FlexBox>
</>
)}
{value.pac && (
<FlexBox>
<Typography className="label">{t("PAC URL")}</Typography>
<Typography className="value">{autoproxy?.url || "-"}</Typography>
</FlexBox>
)}
</Box>
</BaseDialog> </BaseDialog>
); );
}); });
@@ -266,6 +278,6 @@ const FlexBox = styled("div")`
.label { .label {
flex: none; flex: none;
width: 85px; //width: 85px;
} }
`; `;
+1 -1
View File
@@ -81,7 +81,7 @@ export const ThemeViewer = forwardRef<DialogRef>((props, ref) => {
title={t("Theme Setting")} title={t("Theme Setting")}
okBtn={t("Save")} okBtn={t("Save")}
cancelBtn={t("Cancel")} cancelBtn={t("Cancel")}
contentSx={{ width: 400, maxHeight: 300, overflow: "auto", pb: 0 }} contentSx={{ width: 400, maxHeight: 505, overflow: "auto", pb: 0 }}
onClose={() => setOpen(false)} onClose={() => setOpen(false)}
onCancel={() => setOpen(false)} onCancel={() => setOpen(false)}
onOk={onSave} onOk={onSave}
+24 -5
View File
@@ -1,15 +1,15 @@
import useSWR from "swr"; import useSWR from "swr";
import { forwardRef, useImperativeHandle, useState, useMemo } from "react"; import { forwardRef, useImperativeHandle, useState, useMemo } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { Box, LinearProgress } from "@mui/material"; import { Box, LinearProgress, Button } from "@mui/material";
import { useRecoilState } from "recoil";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { relaunch } from "@tauri-apps/api/process"; import { relaunch } from "@tauri-apps/api/process";
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater"; import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
import { BaseDialog, DialogRef, Notice } from "@/components/base"; import { BaseDialog, DialogRef, Notice } from "@/components/base";
import { atomUpdateState } from "@/services/states"; import { useUpdateState, useSetUpdateState } from "@/services/states";
import { listen, Event, UnlistenFn } from "@tauri-apps/api/event"; import { listen, Event, UnlistenFn } from "@tauri-apps/api/event";
import { portableFlag } from "@/pages/_layout"; import { portableFlag } from "@/pages/_layout";
import { open as openUrl } from "@tauri-apps/api/shell";
import ReactMarkdown from "react-markdown"; import ReactMarkdown from "react-markdown";
let eventListener: UnlistenFn | null = null; let eventListener: UnlistenFn | null = null;
@@ -18,7 +18,9 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [updateState, setUpdateState] = useRecoilState(atomUpdateState);
const updateState = useUpdateState();
const setUpdateState = useSetUpdateState();
const { data: updateInfo } = useSWR("checkUpdate", checkUpdate, { const { data: updateInfo } = useSWR("checkUpdate", checkUpdate, {
errorRetryCount: 2, errorRetryCount: 2,
@@ -75,7 +77,24 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
return ( return (
<BaseDialog <BaseDialog
open={open} open={open}
title={`New Version v${updateInfo?.manifest?.version}`} title={
<Box display="flex" justifyContent="space-between">
{`New Version v${updateInfo?.manifest?.version}`}
<Box>
<Button
variant="contained"
size="small"
onClick={() => {
openUrl(
`https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/v${updateInfo?.manifest?.version}`
);
}}
>
{t("Go to Release Page")}
</Button>
</Box>
</Box>
}
contentSx={{ minWidth: 360, maxWidth: 400, height: "50vh" }} contentSx={{ minWidth: 360, maxWidth: 400, height: "50vh" }}
okBtn={t("Update")} okBtn={t("Update")}
cancelBtn={t("Cancel")} cancelBtn={t("Cancel")}
+8 -6
View File
@@ -13,6 +13,7 @@ import {
EditRounded, EditRounded,
OpenInNewRounded, OpenInNewRounded,
} from "@mui/icons-material"; } from "@mui/icons-material";
import { useTranslation } from "react-i18next";
interface Props { interface Props {
value?: string; value?: string;
@@ -35,6 +36,7 @@ export const WebUIItem = (props: Props) => {
const [editing, setEditing] = useState(false); const [editing, setEditing] = useState(false);
const [editValue, setEditValue] = useState(value); const [editValue, setEditValue] = useState(value);
const { t } = useTranslation();
if (editing || onlyEdit) { if (editing || onlyEdit) {
return ( return (
@@ -45,12 +47,12 @@ export const WebUIItem = (props: Props) => {
size="small" size="small"
value={editValue} value={editValue}
onChange={(e) => setEditValue(e.target.value)} onChange={(e) => setEditValue(e.target.value)}
placeholder={`Support %host %port %secret`} placeholder={t("Support %host, %port, %secret")}
autoComplete="off" autoComplete="off"
/> />
<IconButton <IconButton
size="small" size="small"
title="Save" title={t("Save")}
color="inherit" color="inherit"
onClick={() => { onClick={() => {
onChange(editValue); onChange(editValue);
@@ -61,7 +63,7 @@ export const WebUIItem = (props: Props) => {
</IconButton> </IconButton>
<IconButton <IconButton
size="small" size="small"
title="Cancel" title={t("Cancel")}
color="inherit" color="inherit"
onClick={() => { onClick={() => {
onCancel?.(); onCancel?.();
@@ -100,7 +102,7 @@ export const WebUIItem = (props: Props) => {
/> />
<IconButton <IconButton
size="small" size="small"
title="Open URL" title={t("Open URL")}
color="inherit" color="inherit"
onClick={() => onOpenUrl?.(value)} onClick={() => onOpenUrl?.(value)}
> >
@@ -108,7 +110,7 @@ export const WebUIItem = (props: Props) => {
</IconButton> </IconButton>
<IconButton <IconButton
size="small" size="small"
title="Edit" title={t("Edit")}
color="inherit" color="inherit"
onClick={() => { onClick={() => {
setEditing(true); setEditing(true);
@@ -119,7 +121,7 @@ export const WebUIItem = (props: Props) => {
</IconButton> </IconButton>
<IconButton <IconButton
size="small" size="small"
title="Delete" title={t("Delete")}
color="inherit" color="inherit"
onClick={onDelete} onClick={onDelete}
> >
@@ -105,10 +105,10 @@ export const WebUIViewer = forwardRef<DialogRef>((props, ref) => {
> >
{!editing && webUIList.length === 0 && ( {!editing && webUIList.length === 0 && (
<BaseEmpty <BaseEmpty
text="Empty List" text="Empty"
extra={ extra={
<Typography mt={2} sx={{ fontSize: "12px" }}> <Typography mt={2} sx={{ fontSize: "12px" }}>
Replace host, port, secret with "%host" "%port" "%secret" {t("Replace host, port, secret with %host, %port, %secret")}
</Typography> </Typography>
} }
/> />
+14 -44
View File
@@ -9,7 +9,7 @@ import {
IconButton, IconButton,
Tooltip, Tooltip,
} from "@mui/material"; } from "@mui/material";
import { ArrowForward, Settings, Shuffle } from "@mui/icons-material"; import { Settings, Shuffle } from "@mui/icons-material";
import { DialogRef, Notice, Switch } from "@/components/base"; import { DialogRef, Notice, Switch } from "@/components/base";
import { useClash } from "@/hooks/use-clash"; import { useClash } from "@/hooks/use-clash";
import { GuardState } from "./mods/guard-state"; import { GuardState } from "./mods/guard-state";
@@ -51,14 +51,14 @@ const SettingClash = ({ onError }: Props) => {
const onChangeVerge = (patch: Partial<IVergeConfig>) => { const onChangeVerge = (patch: Partial<IVergeConfig>) => {
mutateVerge({ ...verge, ...patch }, false); mutateVerge({ ...verge, ...patch }, false);
}; };
const onUpdateGeo = useLockFn(async () => { const onUpdateGeo = async () => {
try { try {
await updateGeoData(); await updateGeoData();
Notice.success(t("GeoData Updated")); Notice.success(t("GeoData Updated"));
} catch (err: any) { } catch (err: any) {
Notice.error(err?.response.data.message || err.toString()); Notice.error(err?.response.data.message || err.toString());
} }
}); };
return ( return (
<SettingList title={t("Clash Setting")}> <SettingList title={t("Clash Setting")}>
@@ -120,7 +120,10 @@ const SettingClash = ({ onError }: Props) => {
color={enable_random_port ? "primary" : "inherit"} color={enable_random_port ? "primary" : "inherit"}
size="small" size="small"
onClick={() => { onClick={() => {
Notice.success(t("Restart Application to Apply Modifications"), 1000); Notice.success(
t("Restart Application to Apply Modifications"),
1000
);
onChangeVerge({ enable_random_port: !enable_random_port }); onChangeVerge({ enable_random_port: !enable_random_port });
patchVerge({ enable_random_port: !enable_random_port }); patchVerge({ enable_random_port: !enable_random_port });
}} }}
@@ -146,27 +149,12 @@ const SettingClash = ({ onError }: Props) => {
/> />
</SettingItem> </SettingItem>
<SettingItem label={t("External")}> <SettingItem
<IconButton onClick={() => ctrlRef.current?.open()}
color="inherit" label={t("External")}
size="small" />
sx={{ my: "2px" }}
onClick={() => ctrlRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Web UI")}> <SettingItem onClick={() => webRef.current?.open()} label={t("Web UI")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={() => webRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem <SettingItem
label={t("Clash Core")} label={t("Clash Core")}
@@ -187,28 +175,10 @@ const SettingClash = ({ onError }: Props) => {
</SettingItem> </SettingItem>
{isWIN && ( {isWIN && (
<SettingItem label={t("Open UWP tool")}> <SettingItem onClick={invoke_uwp_tool} label={t("Open UWP tool")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={invoke_uwp_tool}
>
<ArrowForward />
</IconButton>
</SettingItem>
)} )}
<SettingItem label={t("Update GeoData")}> <SettingItem onClick={onUpdateGeo} label={t("Update GeoData")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={onUpdateGeo}
>
<ArrowForward />
</IconButton>
</SettingItem>
</SettingList> </SettingList>
); );
}; };
+20 -10
View File
@@ -123,16 +123,26 @@ const SettingSystem = ({ onError }: Props) => {
<SettingItem <SettingItem
label={t("System Proxy")} label={t("System Proxy")}
extra={ extra={
<IconButton <>
color="inherit" <Tooltip title={t("System Proxy Info")} placement="top">
size="small" <IconButton color="inherit" size="small">
onClick={() => sysproxyRef.current?.open()} <InfoRounded
> fontSize="inherit"
<Settings style={{ cursor: "pointer", opacity: 0.75 }}
fontSize="inherit" />
style={{ cursor: "pointer", opacity: 0.75 }} </IconButton>
/> </Tooltip>
</IconButton> <IconButton
color="inherit"
size="small"
onClick={() => sysproxyRef.current?.open()}
>
<Settings
fontSize="inherit"
style={{ cursor: "pointer", opacity: 0.75 }}
/>
</IconButton>
</>
} }
> >
<GuardState <GuardState
+35 -123
View File
@@ -2,14 +2,7 @@ import { useRef } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { open } from "@tauri-apps/api/dialog"; import { open } from "@tauri-apps/api/dialog";
import { import { Button, MenuItem, Select, Input, Typography } from "@mui/material";
Button,
IconButton,
MenuItem,
Select,
Input,
Typography,
} from "@mui/material";
import { import {
exitApp, exitApp,
openAppDir, openAppDir,
@@ -17,7 +10,6 @@ import {
openLogsDir, openLogsDir,
openDevTools, openDevTools,
} from "@/services/cmds"; } from "@/services/cmds";
import { ArrowForward } from "@mui/icons-material";
import { checkUpdate } from "@tauri-apps/api/updater"; import { checkUpdate } from "@tauri-apps/api/updater";
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
import { version } from "@root/package.json"; import { version } from "@root/package.json";
@@ -63,7 +55,7 @@ const SettingVerge = ({ onError }: Props) => {
mutateVerge({ ...verge, ...patch }, false); mutateVerge({ ...verge, ...patch }, false);
}; };
const onCheckUpdate = useLockFn(async () => { const onCheckUpdate = async () => {
try { try {
const info = await checkUpdate(); const info = await checkUpdate();
if (!info?.shouldUpdate) { if (!info?.shouldUpdate) {
@@ -74,7 +66,7 @@ const SettingVerge = ({ onError }: Props) => {
} catch (err: any) { } catch (err: any) {
Notice.error(err.message || err.toString()); Notice.error(err.message || err.toString());
} }
}); };
return ( return (
<SettingList title={t("Verge Setting")}> <SettingList title={t("Verge Setting")}>
@@ -213,128 +205,48 @@ const SettingVerge = ({ onError }: Props) => {
></Input> ></Input>
</GuardState> </GuardState>
</SettingItem> </SettingItem>
<SettingItem label={t("Theme Setting")}>
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={() => themeRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Layout Setting")}> <SettingItem
<IconButton onClick={() => themeRef.current?.open()}
color="inherit" label={t("Theme Setting")}
size="small" />
sx={{ my: "2px" }}
onClick={() => layoutRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Miscellaneous")}> <SettingItem
<IconButton onClick={() => layoutRef.current?.open()}
color="inherit" label={t("Layout Setting")}
size="small" />
sx={{ my: "2px" }}
onClick={() => miscRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Hotkey Setting")}> <SettingItem
<IconButton onClick={() => miscRef.current?.open()}
color="inherit" label={t("Miscellaneous")}
size="small" />
sx={{ my: "2px" }}
onClick={() => hotkeyRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Runtime Config")}> <SettingItem
<IconButton onClick={() => hotkeyRef.current?.open()}
color="inherit" label={t("Hotkey Setting")}
size="small" />
sx={{ my: "2px" }}
onClick={() => configRef.current?.open()}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Open App Dir")}> <SettingItem
<IconButton onClick={() => configRef.current?.open()}
color="inherit" label={t("Runtime Config")}
size="small" />
sx={{ my: "2px" }}
onClick={openAppDir}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Open Core Dir")}> <SettingItem onClick={openAppDir} label={t("Open App Dir")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={openCoreDir}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Open Logs Dir")}> <SettingItem onClick={openCoreDir} label={t("Open Core Dir")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={openLogsDir}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Check for Updates")}> <SettingItem onClick={openLogsDir} label={t("Open Logs Dir")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={onCheckUpdate}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Open Dev Tools")}> <SettingItem onClick={onCheckUpdate} label={t("Check for Updates")} />
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={openDevTools}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Exit")}> <SettingItem onClick={openDevTools} label={t("Open Dev Tools")} />
<IconButton
color="inherit" <SettingItem
size="small" onClick={() => {
sx={{ my: "2px" }} exitApp();
onClick={() => { }}
exitApp(); label={t("Exit")}
}} />
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Verge Version")}> <SettingItem label={t("Verge Version")}>
<Typography sx={{ py: "7px", pr: 1 }}>v{version}</Typography> <Typography sx={{ py: "7px", pr: 1 }}>v{version}</Typography>
+1 -1
View File
@@ -175,7 +175,7 @@ export const TestItem = (props: Props) => {
":hover": { bgcolor: alpha(palette.primary.main, 0.15) }, ":hover": { bgcolor: alpha(palette.primary.main, 0.15) },
})} })}
> >
Check {t("Test")}
</Widget> </Widget>
)} )}
+175 -167
View File
@@ -1,60 +1,33 @@
{ {
"Back": "Back",
"Close": "Close",
"Cancel": "Cancel",
"Confirm": "Confirm",
"New": "New",
"Edit": "Edit",
"Save": "Save",
"Delete": "Delete",
"Enable": "Enable",
"Disable": "Disable",
"Label-Proxies": "Proxies", "Label-Proxies": "Proxies",
"Label-Test": "Test",
"Label-Profiles": "Profiles", "Label-Profiles": "Profiles",
"Label-Connections": "Connections", "Label-Connections": "Connections",
"Label-Logs": "Logs",
"Label-Rules": "Rules", "Label-Rules": "Rules",
"Label-Logs": "Logs",
"Label-Test": "Test",
"Label-Settings": "Settings", "Label-Settings": "Settings",
"Connections": "Connections",
"Logs": "Logs",
"Clear": "Clear",
"Proxies": "Proxies", "Proxies": "Proxies",
"Proxy Groups": "Proxy Groups", "Proxy Groups": "Proxy Groups",
"Test": "Test", "Proxy Provider": "Proxy Provider",
"Update All": "Update All",
"Update At": "Update At",
"rule": "rule", "rule": "rule",
"global": "global", "global": "global",
"direct": "direct", "direct": "direct",
"script": "script", "script": "script",
"Create Test": "Create Test",
"Edit Test": "Edit Test",
"Edit": "Edit",
"Icon": "Icon",
"Test URL": "Test URL",
"Test All": "Test All",
"Paste": "Paste",
"Profiles": "Profiles",
"Profile URL": "Profile URL",
"Import": "Import",
"New": "New",
"Create Profile": "Create Profile",
"Edit Profile": "Edit Profile",
"Choose File": "Choose File",
"Close": "Close",
"Close All": "Close All",
"Home": "Home",
"Select": "Select",
"Edit Info": "Edit Info",
"Edit File": "Edit File",
"Open File": "Open File",
"Update": "Update",
"Update(Proxy)": "Update(Proxy)",
"Delete": "Delete",
"Enable": "Enable",
"Disable": "Disable",
"Refresh": "Refresh",
"To Top": "To Top",
"To End": "To End",
"Update All Profiles": "Update All Profiles",
"View Runtime Config": "View Runtime Config",
"Reactivate Profiles": "Reactivate Profiles",
"Confirm deletion": "Confirm deletion",
"This operation is not reversible": "This operation is not reversible",
"Script Console": "Script Console",
"Location": "Location", "Location": "Location",
"Delay check": "Delay check", "Delay check": "Delay check",
"Sort by default": "Sort by default", "Sort by default": "Sort by default",
@@ -64,13 +37,46 @@
"Delay check to cancel fixed": "Delay check to cancel fixed", "Delay check to cancel fixed": "Delay check to cancel fixed",
"Proxy basic": "Proxy basic", "Proxy basic": "Proxy basic",
"Proxy detail": "Proxy detail", "Proxy detail": "Proxy detail",
"Filter": "Filter",
"Filter conditions": "Filter conditions",
"Refresh profiles": "Refresh profiles",
"Rules": "Rules",
"Update All": "Update All",
"Update At": "Update At",
"Profiles": "Profiles",
"Update All Profiles": "Update All Profiles",
"View Runtime Config": "View Runtime Config",
"Reactivate Profiles": "Reactivate Profiles",
"Paste": "Paste",
"Profile URL": "Profile URL",
"Import": "Import",
"Create Profile": "Create Profile",
"Edit Profile": "Edit Profile",
"Type": "Type",
"Name": "Name",
"Descriptions": "Descriptions",
"Subscription URL": "Subscription URL",
"Update Interval": "Update Interval",
"Choose File": "Choose File",
"Use System Proxy": "Use System Proxy",
"Use Clash Proxy": "Use Clash Proxy",
"Accept Invalid Certs (Danger)": "Allows Invalid Certificates (Danger)",
"Refresh": "Refresh",
"Home": "Home",
"Select": "Select",
"Edit Info": "Edit Info",
"Edit File": "Edit File",
"Open File": "Open File",
"Update": "Update",
"Update(Proxy)": "Update(Proxy)",
"Confirm deletion": "Confirm deletion",
"This operation is not reversible": "This operation is not reversible",
"Script Console": "Script Console",
"To Top": "To Top",
"To End": "To End",
"Connections": "Connections",
"Table View": "Table View",
"List View": "List View",
"Close All": "Close All",
"Default": "Default",
"Download Speed": "Download Speed",
"Upload Speed": "Upload Speed",
"Host": "Host", "Host": "Host",
"Downloaded": "Downloaded", "Downloaded": "Downloaded",
"Uploaded": "Uploaded", "Uploaded": "Uploaded",
@@ -84,88 +90,98 @@
"Destination IP": "Destination IP", "Destination IP": "Destination IP",
"Close Connection": "Close Connection", "Close Connection": "Close Connection",
"Type": "Type", "Rules": "Rules",
"Name": "Name", "Rule Provider": "Rule Provider",
"Descriptions": "Descriptions",
"Subscription URL": "Subscription URL", "Logs": "Logs",
"Update Interval": "Update Interval", "Pause": "Pause",
"Use System Proxy": "Use System Proxy", "Clear": "Clear",
"Use Clash Proxy": "Use Clash Proxy",
"Accept Invalid Certs (Danger)": "Allows Invalid Certificates (Danger)", "Test": "Test",
"Test All": "Test All",
"Create Test": "Create Test",
"Edit Test": "Edit Test",
"Icon": "Icon",
"Test URL": "Test URL",
"Settings": "Settings", "Settings": "Settings",
"Clash Setting": "Clash Setting",
"System Setting": "System Setting", "System Setting": "System Setting",
"Verge Setting": "Verge Setting", "Tun Mode": "Tun Mode",
"Reset to Default": "Reset to Default",
"Tun Mode Info": "The Tun mode requires granting core-related permissions. Please enable service mode before using it",
"Stack": "Tun Stack",
"System and Mixed Can Only be Used in Service Mode": "System and Mixed Can Only be Used in Service Mode",
"Device": "Device Name",
"Auto Route": "Auto Route",
"Strict Route": "Strict Route",
"Auto Detect Interface": "Auto Detect Interface",
"DNS Hijack": "DNS Hijack",
"MTU": "Max Transmission Unit",
"Service Mode": "Service Mode",
"Current State": "Current State",
"pending": "pending",
"installed": "installed",
"uninstall": "uninstalled",
"active": "active",
"unknown": "unknown",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Information: Please make sure that the Clash Verge Service is installed and enabled",
"Install": "Install",
"Uninstall": "Uninstall",
"Disable Service Mode": "Disable Service Mode",
"System Proxy": "System Proxy",
"System Proxy Info": "Enable to modify the operating system's proxy settings. If enabling fails, modify the operating system's proxy settings manually",
"System Proxy Setting": "System Proxy Setting",
"Current System Proxy": "Current System Proxy",
"Enable status": "Enable Status:",
"Enabled": "Enabled",
"Disabled": "Disabled",
"Server Addr": "Server Addr: ",
"Not available": "Not available",
"Proxy Guard": "Proxy Guard",
"Proxy Guard Info": "Enable to prevent other software from modifying the operating system's proxy settings",
"Guard Duration": "Guard Duration",
"Proxy Bypass": "Proxy Bypass Settings: ",
"Bypass": "Bypass: ",
"Use PAC Mode": "Use PAC Mode",
"PAC Script Content": "PAC Script Content",
"PAC URL": "PAC URL: ",
"Auto Launch": "Auto Launch",
"Silent Start": "Silent Start",
"Clash Setting": "Clash Setting",
"Allow Lan": "Allow Lan", "Allow Lan": "Allow Lan",
"IPv6": "IPv6", "IPv6": "IPv6",
"Log Level": "Log Level", "Log Level": "Log Level",
"Port Config": "Port Config", "Port Config": "Port Config",
"Random Port": "Random Port", "Random Port": "Random Port",
"Restart Application to Apply Modifications": "Restart Application to Apply Modifications",
"External": "External", "External": "External",
"External Controller": "External Controller", "External Controller": "External Controller",
"Core Secret": "Core Secret", "Core Secret": "Core Secret",
"Recommended": "Recommended", "Recommended": "Recommended",
"Open URL": "Open URL",
"Replace host, port, secret with %host, %port, %secret": "Replace host, port, secret with %host, %port, %secret",
"Support %host, %port, %secret": "Support %host, %port, %secret",
"Clash Core": "Clash Core", "Clash Core": "Clash Core",
"Grant": "Grant", "Upgrade": "Upgrade",
"Restart": "Restart",
"Tun mode requires": "Tun mode requires", "Tun mode requires": "Tun mode requires",
"Tun Mode": "Tun Mode", "Grant": "Grant",
"Service Mode": "Service Mode",
"Auto Launch": "Auto Launch",
"Silent Start": "Silent Start",
"System Proxy": "System Proxy",
"System Proxy Setting": "System Proxy Setting",
"Open UWP tool": "Open UWP tool", "Open UWP tool": "Open UWP tool",
"Update GeoData": "Update GeoData", "Update GeoData": "Update GeoData",
"Use PAC Mode": "Use PAC Mode",
"PAC URL": "PAC URL", "Verge Setting": "Verge Setting",
"PAC Script Content": "PAC Script Content", "Language": "Language",
"Proxy Guard": "Proxy Guard",
"Guard Duration": "Guard Duration",
"Proxy Bypass": "Proxy Bypass",
"Current System Proxy": "Current System Proxy",
"Enable status": "Enable status",
"Server Addr": "Server Addr",
"Bypass": "Bypass",
"Theme Mode": "Theme Mode", "Theme Mode": "Theme Mode",
"theme.light": "Light",
"theme.dark": "Dark",
"theme.system": "System",
"Tray Click Event": "Tray Click Event", "Tray Click Event": "Tray Click Event",
"Show Main Window": "Show Main Window",
"Copy Env Type": "Copy Env Type", "Copy Env Type": "Copy Env Type",
"Start Page": "Start Page", "Start Page": "Start Page",
"Startup Script": "Startup Script", "Startup Script": "Startup Script",
"Browse": "Browse", "Browse": "Browse",
"Show Main Window": "Show Main Window",
"Theme Setting": "Theme Setting", "Theme Setting": "Theme Setting",
"Layout Setting": "Layout Setting",
"Miscellaneous": "Miscellaneous",
"Hotkey Setting": "Hotkey Setting",
"Traffic Graph": "Traffic Graph",
"Memory Usage": "Memory Usage",
"Proxy Group Icon": "Proxy Group Icon",
"Tray Icon": "Tray Icon",
"Menu Icon": "Menu Icon",
"Monochrome": "Monochrome",
"Colorful": "Colorful",
"Common Tray Icon": "Common Tray Icon",
"System Proxy Tray Icon": "System Proxy Tray Icon",
"Tun Tray Icon": "Tun Tray Icon",
"Language": "Language",
"Open App Dir": "Open App Dir",
"Open Core Dir": "Open Core Dir",
"Open Logs Dir": "Open Logs Dir",
"Check for Updates": "Check for Updates",
"Open Dev Tools": "Open Dev Tools",
"Verge Version": "Verge Version",
"theme.light": "Light",
"theme.dark": "Dark",
"theme.system": "System",
"Clash Field": "Clash Field",
"Runtime Config": "Runtime Config",
"ReadOnly": "ReadOnly",
"ReadOnlyMessage": "Cannot edit in read-only editor",
"Restart": "Restart",
"Upgrade": "Upgrade",
"Primary Color": "Primary Color", "Primary Color": "Primary Color",
"Secondary Color": "Secondary Color", "Secondary Color": "Secondary Color",
"Primary Text": "Primary Text", "Primary Text": "Primary Text",
@@ -176,82 +192,74 @@
"Success Color": "Success Color", "Success Color": "Success Color",
"Font Family": "Font Family", "Font Family": "Font Family",
"CSS Injection": "CSS Injection", "CSS Injection": "CSS Injection",
"Layout Setting": "Layout Setting",
"Back": "Back", "Traffic Graph": "Traffic Graph",
"Save": "Save", "Memory Usage": "Memory Usage",
"Cancel": "Cancel", "Proxy Group Icon": "Proxy Group Icon",
"Exit": "Exit", "Menu Icon": "Menu Icon",
"Confirm": "Confirm", "Monochrome": "Monochrome",
"Colorful": "Colorful",
"Default": "Default", "Tray Icon": "Tray Icon",
"Download Speed": "Download Speed", "Common Tray Icon": "Common Tray Icon",
"Upload Speed": "Upload Speed", "System Proxy Tray Icon": "System Proxy Tray Icon",
"Tun Tray Icon": "Tun Tray Icon",
"Miscellaneous": "Miscellaneous",
"App Log Level": "App Log Level",
"Auto Close Connections": "Auto Close Connections",
"Auto Check Update": "Auto Check Update",
"Enable Builtin Enhanced": "Enable Builtin Enhanced",
"Proxy Layout Column": "Proxy Layout Column",
"Auto Log Clean": "Auto Log Clean",
"Never Clean": "Never Clean",
"Retain 7 Days": "Retain 7 Days",
"Retain 30 Days": "Retain 30 Days",
"Retain 90 Days": "Retain 90 Days",
"Default Latency Test": "Default Latency Test",
"Default Latency Timeout": "Default Latency Timeout",
"Hotkey Setting": "Hotkey Setting",
"open_or_close_dashboard": "Open/Close Dashboard", "open_or_close_dashboard": "Open/Close Dashboard",
"clash_mode_rule": "Rule Mode", "clash_mode_rule": "Rule Mode",
"clash_mode_global": "Global Mode", "clash_mode_global": "Global Mode",
"clash_mode_direct": "Direct Mode", "clash_mode_direct": "Direct Mode",
"toggle_system_proxy": "Enable/Disable System Proxy", "toggle_system_proxy": "Enable/Disable System Proxy",
"toggle_tun_mode": "Enable/Disable Tun Mode", "toggle_tun_mode": "Enable/Disable Tun Mode",
"Runtime Config": "Runtime Config",
"App Log Level": "App Log Level", "Open App Dir": "Open App Dir",
"Auto Close Connections": "Auto Close Connections", "Open Core Dir": "Open Core Dir",
"Auto Check Update": "Auto Check Update", "Open Logs Dir": "Open Logs Dir",
"Enable Builtin Enhanced": "Enable Builtin Enhanced", "Check for Updates": "Check for Updates",
"Proxy Layout Column": "Proxy Layout Column", "Go to Release Page": "Go to Release Page",
"Default Latency Test": "Default Latency Test",
"Default Latency Timeout": "Default Latency Timeout",
"Auto Log Clean": "Auto Log Clean",
"Never Clean": "Never Clean",
"Retain 7 Days": "Retain 7 Days",
"Retain 30 Days": "Retain 30 Days",
"Retain 90 Days": "Retain 90 Days",
"Stack": "Tun Stack",
"Device": "Device Name",
"Auto Route": "Auto Route",
"Strict Route": "Strict Route",
"Auto Detect Interface": "Auto Detect Interface",
"DNS Hijack": "DNS Hijack",
"MTU": "Max Transmission Unit",
"Reset to Default": "Reset to Default",
"Current State": "Current State",
"pending": "pending",
"installed": "installed",
"uninstall": "uninstalled",
"active": "active",
"unknown": "unknown",
"Disable Service Mode": "Disable Service Mode",
"Install": "Install",
"Uninstall": "Uninstall",
"Portable Updater Error": "The portable version does not support in-app updates. Please manually download and replace it", "Portable Updater Error": "The portable version does not support in-app updates. Please manually download and replace it",
"Tun Mode Info": "The Tun mode requires granting core-related permissions. Please enable service mode before using it", "Open Dev Tools": "Open Dev Tools",
"System and Mixed Can Only be Used in Service Mode": "System and Mixed Can Only be Used in Service Mode", "Exit": "Exit",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Information: Please make sure that the Clash Verge Service is installed and enabled", "Verge Version": "Verge Version",
"ReadOnly": "ReadOnly",
"ReadOnlyMessage": "Cannot edit in read-only editor",
"Filter": "Filter",
"Filter conditions": "Filter conditions",
"Match Case": "Match Case", "Match Case": "Match Case",
"Match Whole Word": "Match Whole Word", "Match Whole Word": "Match Whole Word",
"Use Regular Expression": "Use Regular Expression", "Use Regular Expression": "Use Regular Expression",
"External Controller Address Modified": "External Controller Address Modified", "Profile Imported Successfully": "Profile Imported Successfully",
"Clash Port Modified": "Clash Port Modified", "Clash Config Updated": "Clash Config Updated",
"Currently on the Latest Version": "Currently on the Latest Version",
"Only YAML Files Supported": "Only YAML Files Supported",
"Port Conflict": "Port Conflict",
"Proxy Daemon Duration Cannot be Less than 1 Second": "Proxy Daemon Duration Cannot be Less than 1 Second",
"Profile Switched": "Profile Switched", "Profile Switched": "Profile Switched",
"Profile Reactivated": "Profile Reactivated", "Profile Reactivated": "Profile Reactivated",
"Clash Config Updated": "Clash Config Updated", "Only YAML Files Supported": "Only YAML Files Supported",
"Settings Applied": "Settings Applied", "Settings Applied": "Settings Applied",
"Service Installed Successfully": "Service Installed Successfully", "Service Installed Successfully": "Service Installed Successfully",
"Service Uninstalled Successfully": "Service Uninstalled Successfully", "Service Uninstalled Successfully": "Service Uninstalled Successfully",
"GeoData Updated": "GeoData Updated", "Proxy Daemon Duration Cannot be Less than 1 Second": "Proxy Daemon Duration Cannot be Less than 1 Second",
"Invalid Bypass Format": "Invalid Bypass Format",
"Clash Port Modified": "Clash Port Modified",
"Port Conflict": "Port Conflict",
"Restart Application to Apply Modifications": "Restart Application to Apply Modifications",
"External Controller Address Modified": "External Controller Address Modified",
"Permissions Granted Successfully for _clash Core": "Permissions Granted Successfully for {{core}} Core", "Permissions Granted Successfully for _clash Core": "Permissions Granted Successfully for {{core}} Core",
"Profile Imported Successfully": "Profile Imported Successfully", "Core Version Updated": "Core Version Updated",
"Clash Core Restarted": "Clash Core Restarted", "Clash Core Restarted": "Clash Core Restarted",
"Switched to _clash Core": "Switched to {{core}} Core", "Switched to _clash Core": "Switched to {{core}} Core",
"Core Version Updated": "Core Version Updated" "GeoData Updated": "GeoData Updated",
"Currently on the Latest Version": "Currently on the Latest Version"
} }
+175 -167
View File
@@ -1,60 +1,33 @@
{ {
"Back": "بازگشت",
"Close": "بستن",
"Cancel": "لغو",
"Confirm": "تأیید",
"New": "جدید",
"Edit": "ویرایش",
"Save": "ذخیره",
"Delete": "حذف",
"Enable": "فعال کردن",
"Disable": "غیرفعال کردن",
"Label-Proxies": "پراکسی‌ها", "Label-Proxies": "پراکسی‌ها",
"Label-Test": "آزمون",
"Label-Profiles": "پروفایل‌ها", "Label-Profiles": "پروفایل‌ها",
"Label-Connections": "اتصالات", "Label-Connections": "اتصالات",
"Label-Logs": "لاگ‌ها",
"Label-Rules": "قوانین", "Label-Rules": "قوانین",
"Label-Logs": "لاگ‌ها",
"Label-Test": "آزمون",
"Label-Settings": "تنظیمات", "Label-Settings": "تنظیمات",
"Connections": "اتصالات",
"Logs": "لاگ‌ها",
"Clear": "پاک کردن",
"Proxies": "پراکسی‌ها", "Proxies": "پراکسی‌ها",
"Proxy Groups": "گروه‌های پراکسی", "Proxy Groups": "گروه‌های پراکسی",
"Test": "آزمون", "Proxy Provider": "تأمین‌کننده پروکسی",
"Update All": "به‌روزرسانی همه",
"Update At": "به‌روزرسانی در",
"rule": "قانون", "rule": "قانون",
"global": "جهانی", "global": "جهانی",
"direct": "مستقیم", "direct": "مستقیم",
"script": "اسکریپت", "script": "اسکریپت",
"Create Test": "ایجاد آزمون",
"Edit Test": "ویرایش آزمون",
"Edit": "ویرایش",
"Icon": "آیکون",
"Test URL": "آدرس آزمون",
"Test All": "آزمون همه",
"Paste": "چسباندن",
"Profiles": "پروفایل‌ها",
"Profile URL": "آدرس پروفایل",
"Import": "وارد کردن",
"New": "جدید",
"Create Profile": "ایجاد پروفایل",
"Edit Profile": "ویرایش پروفایل",
"Choose File": "انتخاب فایل",
"Close": "بستن",
"Close All": "بستن همه",
"Home": "خانه",
"Select": "انتخاب",
"Edit Info": "ویرایش اطلاعات",
"Edit File": "ویرایش فایل",
"Open File": "باز کردن فایل",
"Update": "به‌روزرسانی",
"Update(Proxy)": "به‌روزرسانی (پراکسی)",
"Delete": "حذف",
"Enable": "فعال کردن",
"Disable": "غیرفعال کردن",
"Refresh": "بازنشانی",
"To Top": "به بالا",
"To End": "به پایان",
"Update All Profiles": "به‌روزرسانی همه پروفایل‌ها",
"View Runtime Config": "مشاهده پیکربندی زمان اجرا",
"Reactivate Profiles": "فعال‌سازی مجدد پروفایل‌ها",
"Confirm deletion": "تأیید حذف",
"This operation is not reversible": "این عملیات قابل برگشت نیست",
"Script Console": "کنسول اسکریپت",
"Location": "موقعیت", "Location": "موقعیت",
"Delay check": "بررسی تأخیر", "Delay check": "بررسی تأخیر",
"Sort by default": "مرتب‌سازی بر اساس پیش‌فرض", "Sort by default": "مرتب‌سازی بر اساس پیش‌فرض",
@@ -64,13 +37,46 @@
"Delay check to cancel fixed": "بررسی تأخیر برای لغو ثابت", "Delay check to cancel fixed": "بررسی تأخیر برای لغو ثابت",
"Proxy basic": "پراکسی پایه", "Proxy basic": "پراکسی پایه",
"Proxy detail": "جزئیات پراکسی", "Proxy detail": "جزئیات پراکسی",
"Filter": "فیلتر",
"Filter conditions": "شرایط فیلتر",
"Refresh profiles": "بازنشانی پروفایل‌ها",
"Rules": "قوانین",
"Update All": "به‌روزرسانی همه",
"Update At": "به‌روزرسانی در",
"Profiles": "پروفایل‌ها",
"Update All Profiles": "به‌روزرسانی همه پروفایل‌ها",
"View Runtime Config": "مشاهده پیکربندی زمان اجرا",
"Reactivate Profiles": "فعال‌سازی مجدد پروفایل‌ها",
"Paste": "چسباندن",
"Profile URL": "آدرس پروفایل",
"Import": "وارد کردن",
"Create Profile": "ایجاد پروفایل",
"Edit Profile": "ویرایش پروفایل",
"Type": "نوع",
"Name": "نام",
"Descriptions": "توضیحات",
"Subscription URL": "آدرس اشتراک",
"Update Interval": "فاصله زمانی به‌روزرسانی",
"Choose File": "انتخاب فایل",
"Use System Proxy": "استفاده از پراکسی سیستم",
"Use Clash Proxy": "استفاده از پراکسی Clash",
"Accept Invalid Certs (Danger)": "پذیرش گواهی‌نامه‌های نامعتبر (خطرناک)",
"Refresh": "بازنشانی",
"Home": "خانه",
"Select": "انتخاب",
"Edit Info": "ویرایش اطلاعات",
"Edit File": "ویرایش فایل",
"Open File": "باز کردن فایل",
"Update": "به‌روزرسانی",
"Update(Proxy)": "به‌روزرسانی (پراکسی)",
"Confirm deletion": "تأیید حذف",
"This operation is not reversible": "این عملیات قابل برگشت نیست",
"Script Console": "کنسول اسکریپت",
"To Top": "به بالا",
"To End": "به پایان",
"Connections": "اتصالات",
"Table View": "نمای جدولی",
"List View": "نمای لیستی",
"Close All": "بستن همه",
"Default": "پیش‌فرض",
"Download Speed": "سرعت دانلود",
"Upload Speed": "سرعت بارگذاری",
"Host": "میزبان", "Host": "میزبان",
"Downloaded": "دانلود شده", "Downloaded": "دانلود شده",
"Uploaded": "بارگذاری شده", "Uploaded": "بارگذاری شده",
@@ -84,88 +90,98 @@
"Destination IP": "آدرس IP مقصد", "Destination IP": "آدرس IP مقصد",
"Close Connection": "بستن اتصال", "Close Connection": "بستن اتصال",
"Type": "نوع", "Rules": "قوانین",
"Name": "نام", "Rule Provider": "تأمین‌کننده قانون",
"Descriptions": "توضیحات",
"Subscription URL": "آدرس اشتراک", "Logs": "لاگ‌ها",
"Update Interval": "فاصله زمانی به‌روزرسانی", "Pause": "توقف",
"Use System Proxy": "استفاده از پراکسی سیستم", "Clear": "پاک کردن",
"Use Clash Proxy": "استفاده از پراکسی Clash",
"Accept Invalid Certs (Danger)": "پذیرش گواهی‌نامه‌های نامعتبر (خطرناک)", "Test": "آزمون",
"Test All": "آزمون همه",
"Create Test": "ایجاد آزمون",
"Edit Test": "ویرایش آزمون",
"Icon": "آیکون",
"Test URL": "آدرس آزمون",
"Settings": "تنظیمات", "Settings": "تنظیمات",
"Clash Setting": "تنظیمات Clash",
"System Setting": "تنظیمات سیستم", "System Setting": "تنظیمات سیستم",
"Verge Setting": "تنظیمات Verge", "Tun Mode": "حالت Tun",
"Reset to Default": "بازنشانی به پیش‌فرض",
"Tun Mode Info": "حالت Tun نیاز به اعطای مجوزهای مربوط به هسته دارد. لطفاً قبل از استفاده، حالت سرویس را فعال کنید",
"Stack": "انباشته Tun",
"System and Mixed Can Only be Used in Service Mode": "سیستم و ترکیبی تنها می‌توانند در حالت سرویس استفاده شوند",
"Device": "نام دستگاه",
"Auto Route": "مسیر خودکار",
"Strict Route": "مسیر دقیق",
"Auto Detect Interface": "تشخیص خودکار رابط",
"DNS Hijack": "ربایش DNS",
"MTU": "واحد حداکثر انتقال",
"Service Mode": "حالت سرویس",
"Current State": "وضعیت فعلی",
"pending": "در انتظار",
"installed": "نصب شده",
"uninstall": "حذف شده",
"active": "فعال",
"unknown": "ناشناخته",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "اطلاعات: لطفاً مطمئن شوید که سرویس Clash Verge نصب و فعال شده است",
"Install": "نصب",
"Uninstall": "حذف نصب",
"Disable Service Mode": "غیرفعال کردن حالت سرویس",
"System Proxy": "پراکسی سیستم",
"System Proxy Info": "به امکانات تنظیم پروکسی سیستم عامل دسترسی پیدا کنید. اگر فعال‌سازی ناموفق بود، پروکسی سیستم عامل را به‌صورت دستی تغییر دهید",
"System Proxy Setting": "تنظیمات پراکسی سیستم",
"Current System Proxy": "پراکسی سیستم فعلی",
"Enable status": "وضعیت فعال",
"Enabled": "توانایی فعال شد",
"Disabled": "غیرفعال شد",
"Server Addr": "آدرس سرور: ",
"Not available": "غیر فعال شد",
"Proxy Guard": "محافظ پراکسی",
"Proxy Guard Info": "امکان جلوگیری از نرم‌افزارهای دیگر از تغییر تنظیمات پروکسی سیستم عامل را فعال کنید",
"Guard Duration": "مدت محافظت",
"Proxy Bypass": "دور زدن پراکسی: ",
"Bypass": "دور زدن: ",
"Use PAC Mode": "استفاده از حالت PAC",
"PAC Script Content": "محتوای اسکریپت PAC",
"PAC URL": "PAC URL: ",
"Auto Launch": "راه‌اندازی خودکار",
"Silent Start": "شروع بی‌صدا",
"Clash Setting": "تنظیمات Clash",
"Allow Lan": "اجازه LAN", "Allow Lan": "اجازه LAN",
"IPv6": "IPv6", "IPv6": "IPv6",
"Log Level": "سطح لاگ", "Log Level": "سطح لاگ",
"Port Config": "پیکربندی پورت", "Port Config": "پیکربندی پورت",
"Random Port": "پورت تصادفی", "Random Port": "پورت تصادفی",
"Restart Application to Apply Modifications": "راه‌اندازی مجدد برنامه برای اعمال تغییرات",
"External": "خارجی", "External": "خارجی",
"External Controller": "کنترل‌کننده خارجی", "External Controller": "کنترل‌کننده خارجی",
"Core Secret": "رمز اصلی", "Core Secret": "رمز اصلی",
"Recommended": "توصیه شده", "Recommended": "توصیه شده",
"Open URL": "باز کردن آدرس اینترنتی",
"Replace host, port, secret with %host, %port, %secret": "جایگزین کردن میزبان، پورت و رمز با %host، %port، %secret",
"Support %host, %port, %secret": "پشتیبانی از %host، %port و %secret",
"Clash Core": "هسته Clash", "Clash Core": "هسته Clash",
"Grant": "اعطا", "Upgrade": "ارتقاء",
"Restart": "راه‌اندازی مجدد",
"Tun mode requires": "Tun mode نیاز دارد", "Tun mode requires": "Tun mode نیاز دارد",
"Tun Mode": "حالت Tun", "Grant": "اعطا",
"Service Mode": "حالت سرویس",
"Auto Launch": "راه‌اندازی خودکار",
"Silent Start": "شروع بی‌صدا",
"System Proxy": "پراکسی سیستم",
"System Proxy Setting": "تنظیمات پراکسی سیستم",
"Open UWP tool": "باز کردن ابزار UWP", "Open UWP tool": "باز کردن ابزار UWP",
"Update GeoData": "به‌روزرسانی GeoData", "Update GeoData": "به‌روزرسانی GeoData",
"Use PAC Mode": "استفاده از حالت PAC",
"PAC URL": "PAC URL", "Verge Setting": "تنظیمات Verge",
"PAC Script Content": "محتوای اسکریپت PAC", "Language": "زبان",
"Proxy Guard": "محافظ پراکسی",
"Guard Duration": "مدت محافظت",
"Proxy Bypass": "دور زدن پراکسی",
"Current System Proxy": "پراکسی سیستم فعلی",
"Enable status": "وضعیت فعال",
"Server Addr": "آدرس سرور",
"Bypass": "دور زدن",
"Theme Mode": "حالت تم", "Theme Mode": "حالت تم",
"theme.light": "روشن",
"theme.dark": "تاریک",
"theme.system": "سیستم",
"Tray Click Event": "رویداد کلیک در سینی سیستم", "Tray Click Event": "رویداد کلیک در سینی سیستم",
"Show Main Window": "نمایش پنجره اصلی",
"Copy Env Type": "کپی نوع محیط", "Copy Env Type": "کپی نوع محیط",
"Start Page": "صفحه شروع", "Start Page": "صفحه شروع",
"Startup Script": "اسکریپت راه‌اندازی", "Startup Script": "اسکریپت راه‌اندازی",
"Browse": "مرور کردن", "Browse": "مرور کردن",
"Show Main Window": "نمایش پنجره اصلی",
"Theme Setting": "تنظیمات تم", "Theme Setting": "تنظیمات تم",
"Layout Setting": "تنظیمات چیدمان",
"Miscellaneous": "متفرقه",
"Hotkey Setting": "تنظیمات کلیدهای میانبر",
"Traffic Graph": "نمودار ترافیک",
"Memory Usage": "استفاده از حافظه",
"Proxy Group Icon": "آیکون گروه پراکسی",
"Tray Icon": "آیکون سینی سیستم",
"Menu Icon": "آیکون منو",
"Monochrome": "تک رنگ",
"Colorful": "رنگارنگ",
"Common Tray Icon": "آیکون مشترک سینی سیستم",
"System Proxy Tray Icon": "آیکون سینی پراکسی سیستم",
"Tun Tray Icon": "آیکون سینی Tun",
"Language": "زبان",
"Open App Dir": "باز کردن پوشه برنامه",
"Open Core Dir": "باز کردن پوشه هسته",
"Open Logs Dir": "باز کردن پوشه لاگ‌ها",
"Check for Updates": "بررسی برای به‌روزرسانی‌ها",
"Open Dev Tools": "باز کردن ابزارهای توسعه‌دهنده",
"Verge Version": "نسخه Verge",
"theme.light": "روشن",
"theme.dark": "تاریک",
"theme.system": "سیستم",
"Clash Field": "زمینه Clash",
"Runtime Config": "پیکربندی زمان اجرا",
"ReadOnly": "فقط خواندنی",
"ReadOnlyMessage": "نمی‌توان در ویرایشگر فقط خواندنی ویرایش کرد",
"Restart": "راه‌اندازی مجدد",
"Upgrade": "ارتقاء",
"Primary Color": "رنگ اصلی", "Primary Color": "رنگ اصلی",
"Secondary Color": "رنگ ثانویه", "Secondary Color": "رنگ ثانویه",
"Primary Text": "متن اصلی", "Primary Text": "متن اصلی",
@@ -176,82 +192,74 @@
"Success Color": "رنگ موفقیت", "Success Color": "رنگ موفقیت",
"Font Family": "خانواده فونت", "Font Family": "خانواده فونت",
"CSS Injection": "تزریق CSS", "CSS Injection": "تزریق CSS",
"Layout Setting": "تنظیمات چیدمان",
"Back": "بازگشت", "Traffic Graph": "نمودار ترافیک",
"Save": "ذخیره", "Memory Usage": "استفاده از حافظه",
"Cancel": "لغو", "Proxy Group Icon": "آیکون گروه پراکسی",
"Exit": "خروج", "Menu Icon": "آیکون منو",
"Confirm": "تأیید", "Monochrome": "تک رنگ",
"Colorful": "رنگارنگ",
"Default": "پیش‌فرض", "Tray Icon": "آیکون سینی سیستم",
"Download Speed": "سرعت دانلود", "Common Tray Icon": "آیکون مشترک سینی سیستم",
"Upload Speed": "سرعت بارگذاری", "System Proxy Tray Icon": "آیکون سینی پراکسی سیستم",
"Tun Tray Icon": "آیکون سینی Tun",
"Miscellaneous": "متفرقه",
"App Log Level": "سطح لاگ برنامه",
"Auto Close Connections": "بستن خودکار اتصالات",
"Auto Check Update": "بررسی خودکار به‌روزرسانی",
"Enable Builtin Enhanced": "فعال کردن تقویت داخلی",
"Proxy Layout Column": "ستون چیدمان پراکسی",
"Auto Log Clean": "پاکسازی خودکار لاگ",
"Never Clean": "هرگز پاک نکن",
"Retain 7 Days": "نگهداری به مدت 7 روز",
"Retain 30 Days": "نگهداری به مدت 30 روز",
"Retain 90 Days": "نگهداری به مدت 90 روز",
"Default Latency Test": "آزمون تأخیر پیش‌فرض",
"Default Latency Timeout": "زمان انتظار تأخیر پیش‌فرض",
"Hotkey Setting": "تنظیمات کلیدهای میانبر",
"open_or_close_dashboard": "باز/بستن داشبورد", "open_or_close_dashboard": "باز/بستن داشبورد",
"clash_mode_rule": "حالت قانون", "clash_mode_rule": "حالت قانون",
"clash_mode_global": "حالت جهانی", "clash_mode_global": "حالت جهانی",
"clash_mode_direct": "حالت مستقیم", "clash_mode_direct": "حالت مستقیم",
"toggle_system_proxy": "فعال/غیرفعال کردن پراکسی سیستم", "toggle_system_proxy": "فعال/غیرفعال کردن پراکسی سیستم",
"toggle_tun_mode": "فعال/غیرفعال کردن حالت Tun", "toggle_tun_mode": "فعال/غیرفعال کردن حالت Tun",
"Runtime Config": "پیکربندی زمان اجرا",
"App Log Level": "سطح لاگ برنامه", "Open App Dir": "باز کردن پوشه برنامه",
"Auto Close Connections": "بستن خودکار اتصالات", "Open Core Dir": "باز کردن پوشه هسته",
"Auto Check Update": "بررسی خودکار به‌روزرسانی", "Open Logs Dir": "باز کردن پوشه لاگ‌ها",
"Enable Builtin Enhanced": "فعال کردن تقویت داخلی", "Check for Updates": "بررسی برای به‌روزرسانی‌ها",
"Proxy Layout Column": "ستون چیدمان پراکسی", "Go to Release Page": "رفتن به صفحه انتشار",
"Default Latency Test": "آزمون تأخیر پیش‌فرض",
"Default Latency Timeout": "زمان انتظار تأخیر پیش‌فرض",
"Auto Log Clean": "پاکسازی خودکار لاگ",
"Never Clean": "هرگز پاک نکن",
"Retain 7 Days": "نگهداری به مدت 7 روز",
"Retain 30 Days": "نگهداری به مدت 30 روز",
"Retain 90 Days": "نگهداری به مدت 90 روز",
"Stack": "انباشته Tun",
"Device": "نام دستگاه",
"Auto Route": "مسیر خودکار",
"Strict Route": "مسیر دقیق",
"Auto Detect Interface": "تشخیص خودکار رابط",
"DNS Hijack": "ربایش DNS",
"MTU": "واحد حداکثر انتقال",
"Reset to Default": "بازنشانی به پیش‌فرض",
"Current State": "وضعیت فعلی",
"pending": "در انتظار",
"installed": "نصب شده",
"uninstall": "حذف شده",
"active": "فعال",
"unknown": "ناشناخته",
"Disable Service Mode": "غیرفعال کردن حالت سرویس",
"Install": "نصب",
"Uninstall": "حذف نصب",
"Portable Updater Error": "نسخه پرتابل از به‌روزرسانی درون برنامه‌ای پشتیبانی نمی‌کند. لطفاً به صورت دستی دانلود و جایگزین کنید", "Portable Updater Error": "نسخه پرتابل از به‌روزرسانی درون برنامه‌ای پشتیبانی نمی‌کند. لطفاً به صورت دستی دانلود و جایگزین کنید",
"Tun Mode Info": "حالت Tun نیاز به اعطای مجوزهای مربوط به هسته دارد. لطفاً قبل از استفاده، حالت سرویس را فعال کنید", "Open Dev Tools": "باز کردن ابزارهای توسعه‌دهنده",
"System and Mixed Can Only be Used in Service Mode": "سیستم و ترکیبی تنها می‌توانند در حالت سرویس استفاده شوند", "Exit": "خروج",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "اطلاعات: لطفاً مطمئن شوید که سرویس Clash Verge نصب و فعال شده است", "Verge Version": "نسخه Verge",
"ReadOnly": "فقط خواندنی",
"ReadOnlyMessage": "نمی‌توان در ویرایشگر فقط خواندنی ویرایش کرد",
"Filter": "فیلتر",
"Filter conditions": "شرایط فیلتر",
"Match Case": "تطبیق حروف کوچک و بزرگ", "Match Case": "تطبیق حروف کوچک و بزرگ",
"Match Whole Word": "تطبیق کل کلمه", "Match Whole Word": "تطبیق کل کلمه",
"Use Regular Expression": "استفاده از عبارت منظم", "Use Regular Expression": "استفاده از عبارت منظم",
"External Controller Address Modified": "آدرس کنترل‌کننده خارجی تغییر یافت", "Profile Imported Successfully": "پروفایل با موفقیت وارد شد",
"Clash Port Modified": "پورت Clash تغییر یافت", "Clash Config Updated": "پیکربندی Clash به‌روزرسانی شد",
"Currently on the Latest Version": "در حال حاضر در آخرین نسخه",
"Only YAML Files Supported": "فقط فایل‌های YAML پشتیبانی می‌شوند",
"Port Conflict": "تعارض پورت",
"Proxy Daemon Duration Cannot be Less than 1 Second": "مدت زمان دیمن پراکسی نمی‌تواند کمتر از 1 ثانیه باشد",
"Profile Switched": "پروفایل تغییر یافت", "Profile Switched": "پروفایل تغییر یافت",
"Profile Reactivated": "پروفایل مجدداً فعال شد", "Profile Reactivated": "پروفایل مجدداً فعال شد",
"Clash Config Updated": "پیکربندی Clash به‌روزرسانی شد", "Only YAML Files Supported": "فقط فایل‌های YAML پشتیبانی می‌شوند",
"Settings Applied": "تنظیمات اعمال شد", "Settings Applied": "تنظیمات اعمال شد",
"Service Installed Successfully": "سرویس با موفقیت نصب شد", "Service Installed Successfully": "سرویس با موفقیت نصب شد",
"Service Uninstalled Successfully": "سرویس با موفقیت حذف نصب شد", "Service Uninstalled Successfully": "سرویس با موفقیت حذف نصب شد",
"GeoData Updated": "GeoData به‌روزرسانی شد", "Proxy Daemon Duration Cannot be Less than 1 Second": "مدت زمان دیمن پراکسی نمی‌تواند کمتر از 1 ثانیه باشد",
"Invalid Bypass Format": "فرمت عبور نامعتبر است",
"Clash Port Modified": "پورت Clash تغییر یافت",
"Port Conflict": "تعارض پورت",
"Restart Application to Apply Modifications": "راه‌اندازی مجدد برنامه برای اعمال تغییرات",
"External Controller Address Modified": "آدرس کنترل‌کننده خارجی تغییر یافت",
"Permissions Granted Successfully for _clash Core": "مجوزها با موفقیت برای هسته {{core}} اعطا شد", "Permissions Granted Successfully for _clash Core": "مجوزها با موفقیت برای هسته {{core}} اعطا شد",
"Profile Imported Successfully": "پروفایل با موفقیت وارد شد", "Core Version Updated": "نسخه هسته به‌روزرسانی شد",
"Clash Core Restarted": "هسته Clash مجدداً راه‌اندازی شد", "Clash Core Restarted": "هسته Clash مجدداً راه‌اندازی شد",
"Switched to _clash Core": "تغییر به هسته {{core}}", "Switched to _clash Core": "تغییر به هسته {{core}}",
"Core Version Updated": "نسخه هسته به‌روزرسانی شد" "GeoData Updated": "GeoData به‌روزرسانی شد",
"Currently on the Latest Version": "در حال حاضر در آخرین نسخه"
} }
+175 -167
View File
@@ -1,60 +1,33 @@
{ {
"Back": "Назад",
"Close": "Закрыть",
"Cancel": "Отмена",
"Confirm": "Подтвердить",
"New": "Новый",
"Edit": "Редактировать",
"Save": "Сохранить",
"Delete": "Удалить",
"Enable": "Включить",
"Disable": "Отключить",
"Label-Proxies": "Прокси", "Label-Proxies": "Прокси",
"Label-Test": "Тест",
"Label-Profiles": "Профили", "Label-Profiles": "Профили",
"Label-Connections": "Соединения", "Label-Connections": "Соединения",
"Label-Logs": "Логи",
"Label-Rules": "Правила", "Label-Rules": "Правила",
"Label-Logs": "Логи",
"Label-Test": "Тест",
"Label-Settings": "Настройки", "Label-Settings": "Настройки",
"Connections": "Соединения",
"Logs": "Логи",
"Clear": "Очистить",
"Proxies": "Прокси", "Proxies": "Прокси",
"Proxy Groups": "Группы прокси", "Proxy Groups": "Группы прокси",
"Test": "Тест", "Proxy Provider": "Провайдер прокси",
"Update All": "Обновить все",
"Update At": "Обновлено в",
"rule": "правила", "rule": "правила",
"global": "глобальный", "global": "глобальный",
"direct": "прямой", "direct": "прямой",
"script": "скриптовый", "script": "скриптовый",
"Create Test": "Создать тест",
"Edit Test": "Редактировать тест",
"Edit": "Редактировать",
"Icon": "Икона",
"Test URL": "Тестовый URL",
"Test All": "Тест Все",
"Paste": "Вставить",
"Profiles": "Профили",
"Profile URL": "URL профиля",
"Import": "Импорт",
"New": "Новый",
"Create Profile": "Создать профиль",
"Edit Profile": "Изменить профиль",
"Choose File": "Выбрать файл",
"Close": "Закрыть",
"Close All": "Закрыть всё",
"Home": "Главная",
"Select": "Выбрать",
"Edit Info": "Изменить информацию",
"Edit File": "Изменить файл",
"Open File": "Открыть файл",
"Update": "Обновить",
"Update(Proxy)": "Обновить (прокси)",
"Delete": "Удалить",
"Enable": "Включить",
"Disable": "Отключить",
"Refresh": "Обновить",
"To Top": "Наверх",
"To End": "Вниз",
"Update All Profiles": "Обновить все профили",
"View Runtime Config": "Просмотреть используемый конфиг",
"Reactivate Profiles": "Реактивировать профили",
"Confirm deletion": "Подтвердите удаление",
"This operation is not reversible": "Эта операция необратима",
"Script Console": "Консоль скрипта",
"Location": "Местоположение", "Location": "Местоположение",
"Delay check": "Проверка задержки", "Delay check": "Проверка задержки",
"Sort by default": "Сортировать по умолчанию", "Sort by default": "Сортировать по умолчанию",
@@ -64,13 +37,46 @@
"Delay check to cancel fixed": "Проверка задержки для отмены фиксированного", "Delay check to cancel fixed": "Проверка задержки для отмены фиксированного",
"Proxy basic": "Резюме о прокси", "Proxy basic": "Резюме о прокси",
"Proxy detail": "Подробности о прокси", "Proxy detail": "Подробности о прокси",
"Filter": "Фильтр",
"Filter conditions": "Условия фильтрации",
"Refresh profiles": "Обновить профили",
"Rules": "Правила",
"Update All": "Обновить все",
"Update At": "Обновлено в",
"Profiles": "Профили",
"Update All Profiles": "Обновить все профили",
"View Runtime Config": "Просмотреть используемый конфиг",
"Reactivate Profiles": "Реактивировать профили",
"Paste": "Вставить",
"Profile URL": "URL профиля",
"Import": "Импорт",
"Create Profile": "Создать профиль",
"Edit Profile": "Изменить профиль",
"Type": "Тип",
"Name": "Название",
"Descriptions": "Описания",
"Subscription URL": "URL подписки",
"Update Interval": "Интервал обновления",
"Choose File": "Выбрать файл",
"Use System Proxy": "Использовать системный прокси для обновления",
"Use Clash Proxy": "Использовать прокси Clash для обновления",
"Accept Invalid Certs (Danger)": "Принимать недействительные сертификаты (Опасно)",
"Refresh": "Обновить",
"Home": "Главная",
"Select": "Выбрать",
"Edit Info": "Изменить информацию",
"Edit File": "Изменить файл",
"Open File": "Открыть файл",
"Update": "Обновить",
"Update(Proxy)": "Обновить (прокси)",
"Confirm deletion": "Подтвердите удаление",
"This operation is not reversible": "Эта операция необратима",
"Script Console": "Консоль скрипта",
"To Top": "Наверх",
"To End": "Вниз",
"Connections": "Соединения",
"Table View": "Tablichnyy vid",
"List View": "Spiskovyy vid",
"Close All": "Закрыть всё",
"Default": "По умолчанию",
"Download Speed": "Скорость загрузки",
"Upload Speed": "Скорость загрузки",
"Host": "Хост", "Host": "Хост",
"Downloaded": "Скачано", "Downloaded": "Скачано",
"Uploaded": "Загружено", "Uploaded": "Загружено",
@@ -84,88 +90,98 @@
"Destination IP": "IP-адрес назначения", "Destination IP": "IP-адрес назначения",
"Close Connection": "Закрыть соединение", "Close Connection": "Закрыть соединение",
"Type": "Тип", "Rules": "Правила",
"Name": "Название", "Rule Provider": "Провайдер правило",
"Descriptions": "Описания",
"Subscription URL": "URL подписки", "Logs": "Логи",
"Update Interval": "Интервал обновления", "Pause": "Пауза",
"Use System Proxy": "Использовать системный прокси для обновления", "Clear": "Очистить",
"Use Clash Proxy": "Использовать прокси Clash для обновления",
"Accept Invalid Certs (Danger)": "Принимать недействительные сертификаты (Опасно)", "Test": "Тест",
"Test All": "Тест Все",
"Create Test": "Создать тест",
"Edit Test": "Редактировать тест",
"Icon": "Икона",
"Test URL": "Тестовый URL",
"Settings": "Настройки", "Settings": "Настройки",
"Clash Setting": "Настройки Clash",
"System Setting": "Настройки системы", "System Setting": "Настройки системы",
"Verge Setting": "Настройки Verge", "Tun Mode": "Режим туннеля",
"Reset to Default": "Сбросить настройки по умолчанию",
"Tun Mode Info": "Режим туннеля требует предоставления разрешений, связанных с ядрам. Пожалуйста, включите сервисный режим перед его использованием",
"Stack": "Стек",
"System and Mixed Can Only be Used in Service Mode": "Система и смешанные могут использоваться только в сервисном режиме",
"Device": "Имя устройства",
"Auto Route": "Автоматическая маршрутизация",
"Strict Route": "Строгий маршрут",
"Auto Detect Interface": "Автоопределение интерфейса",
"DNS Hijack": "DNS-перехват",
"MTU": "Максимальная единица передачи",
"Service Mode": "Режим сервиса",
"Current State": "Текущее состояние",
"pending": "Ожидающий",
"installed": "Установленный",
"uninstall": "Не установленный",
"active": "Активированный",
"unknown": "неизвестный",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Информация: Пожалуйста, убедитесь, что сервис Clash Verge Service установлен и включен",
"Install": "Установить",
"Uninstall": "Удалить",
"Disable Service Mode": "Отключить режим обслуживания",
"System Proxy": "Системный прокси",
"System Proxy Info": "Разрешить изменение настроек прокси-сервера операционной системы. Если разрешение не удастся, измените настройки прокси-сервера операционной системы вручную",
"System Proxy Setting": "Настройка системного прокси",
"Current System Proxy": "Текущий системный прокси",
"Enable status": "Статус включения",
"Enabled": "Включено",
"Disabled": "Отключено",
"Server Addr": "Адрес сервера: ",
"Not available": "Недоступно",
"Proxy Guard": "Защита прокси",
"Proxy Guard Info": "Включите эту функцию чтобы предотвратить изменение настроек прокси-сервера операционной системы другим программным обеспечением",
"Guard Duration": "Период защиты",
"Proxy Bypass": "Игнорирование прокси: ",
"Bypass": "Игнорирование: ",
"Use PAC Mode": "Используйте режим PAC",
"PAC Script Content": "Содержание сценария PAC",
"PAC URL": "Адрес PAC: ",
"Auto Launch": "Автозапуск",
"Silent Start": "Тихий запуск",
"Clash Setting": "Настройки Clash",
"Allow Lan": "Разрешить локальную сеть", "Allow Lan": "Разрешить локальную сеть",
"IPv6": "IPv6", "IPv6": "IPv6",
"Log Level": "Уровень логов", "Log Level": "Уровень логов",
"Port Config": "Настройка порта", "Port Config": "Настройка порта",
"Random Port": "Случайный порт", "Random Port": "Случайный порт",
"Restart Application to Apply Modifications": "Чтобы изменения вступили в силу, необходимо перезапустить приложение",
"External": "Внешний", "External": "Внешний",
"External Controller": "Адрес прослушивания внешнего контроллера", "External Controller": "Адрес прослушивания внешнего контроллера",
"Core Secret": "Секрет", "Core Secret": "Секрет",
"Recommended": "Рекомендуется", "Recommended": "Рекомендуется",
"Open URL": "Открыть URL",
"Replace host, port, secret with %host, %port, %secret": "Замените хост, порт, секрет на %host, %port, %secret",
"Support %host, %port, %secret": "Поддержка %host, %port, %secret",
"Clash Core": "Ядра Clash", "Clash Core": "Ядра Clash",
"Grant": "Предоставить", "Upgrade": "Обновлять",
"Restart": "Перезапуск",
"Tun mode requires": "Требуется Режим туннеля", "Tun mode requires": "Требуется Режим туннеля",
"Tun Mode": "Режим туннеля", "Grant": "Предоставить",
"Service Mode": "Режим сервиса",
"Auto Launch": "Автозапуск",
"Silent Start": "Тихий запуск",
"System Proxy": "Системный прокси",
"System Proxy Setting": "Настройка системного прокси",
"Open UWP tool": "Открыть UWP инструмент", "Open UWP tool": "Открыть UWP инструмент",
"Update GeoData": "Обновление GeoData", "Update GeoData": "Обновление GeoData",
"Use PAC Mode": "Используйте режим PAC.",
"PAC URL": "Адрес PAC", "Verge Setting": "Настройки Verge",
"PAC Script Content": "Содержание сценария PAC", "Language": "Язык",
"Proxy Guard": "Защита прокси",
"Guard Duration": "Период защиты",
"Proxy Bypass": "Игнорирование прокси",
"Current System Proxy": "Текущий системный прокси",
"Enable status": "Статус включения",
"Server Addr": "Адрес сервера",
"Bypass": "Игнорирование",
"Theme Mode": "Режим темы", "Theme Mode": "Режим темы",
"theme.light": "Светлая",
"theme.dark": "Тёмная",
"theme.system": "Системная",
"Tray Click Event": "Событие щелчка в лотке", "Tray Click Event": "Событие щелчка в лотке",
"Show Main Window": "Показать главное окно",
"Copy Env Type": "Скопировать тип Env", "Copy Env Type": "Скопировать тип Env",
"Start Page": "Главная страница", "Start Page": "Главная страница",
"Startup Script": "Скрипт запуска", "Startup Script": "Скрипт запуска",
"Browse": "Просмотреть", "Browse": "Просмотреть",
"Show Main Window": "Показать главное окно",
"Theme Setting": "Настройки темы", "Theme Setting": "Настройки темы",
"Layout Setting": "Настройки раскладки",
"Miscellaneous": "Настройки Прочие",
"Hotkey Setting": "Настройки клавиатурных сокращений",
"Traffic Graph": "График трафика",
"Memory Usage": "Использование памяти",
"Proxy Group Icon": "Иконка Группы прокси",
"Tray Icon": "Иконка лотка",
"Menu Icon": "Иконка меню",
"Monochrome": "Монохромный",
"Colorful": "Полноцветный",
"Common Tray Icon": "Общий значок в лотке",
"System Proxy Tray Icon": "Значок системного прокси в лотке",
"Tun Tray Icon": "Значок туннеля в лотке",
"Language": "Язык",
"Open App Dir": "Открыть папку приложения",
"Open Core Dir": "Открыть папку ядра",
"Open Logs Dir": "Открыть папку логов",
"Check for Updates": "Проверить обновления",
"Open Dev Tools": "Открыть инструменты разработчика",
"Verge Version": "Версия Verge",
"theme.light": "Светлая",
"theme.dark": "Тёмная",
"theme.system": "Системная",
"Clash Field": "Используемые настройки Clash",
"Runtime Config": "Используемый конфиг",
"ReadOnly": "Только для чтения",
"ReadOnlyMessage": "Невозможно редактировать в режиме только для чтения",
"Restart": "Перезапуск",
"Upgrade": "Обновлять",
"Primary Color": "Основной цвет", "Primary Color": "Основной цвет",
"Secondary Color": "Вторичный цвет", "Secondary Color": "Вторичный цвет",
"Primary Text Color": "Основной текст", "Primary Text Color": "Основной текст",
@@ -176,82 +192,74 @@
"Success Color": "Цвет успеха", "Success Color": "Цвет успеха",
"Font Family": "Семейство шрифтов", "Font Family": "Семейство шрифтов",
"CSS Injection": "Внедрение CSS", "CSS Injection": "Внедрение CSS",
"Layout Setting": "Настройки раскладки",
"Back": "Назад", "Traffic Graph": "График трафика",
"Save": "Сохранить", "Memory Usage": "Использование памяти",
"Cancel": "Отмена", "Proxy Group Icon": "Иконка Группы прокси",
"Exit": "Выход", "Menu Icon": "Иконка меню",
"Confirm": "Подтвердить", "Monochrome": "Монохромный",
"Colorful": "Полноцветный",
"Default": "По умолчанию", "Tray Icon": "Иконка лотка",
"Download Speed": "Скорость загрузки", "Common Tray Icon": "Общий значок в лотке",
"Upload Speed": "Скорость загрузки", "System Proxy Tray Icon": "Значок системного прокси в лотке",
"Tun Tray Icon": "Значок туннеля в лотке",
"Miscellaneous": "Настройки Прочие",
"App Log Level": "Уровень журнала приложения",
"Auto Close Connections": "Автоматическое закрытие соединений",
"Auto Check Update": "Автоматическая проверка обновлений",
"Enable Builtin Enhanced": "Включить встроенные улучшения",
"Proxy Layout Column": "Количество столбцов в макете прокси",
"Auto Log Clean": "Автоматическая очистка журналов",
"Never Clean": "Никогда не очищать",
"Retain 7 Days": "Сохранять 7 дней",
"Retain 30 Days": "Сохранять 30 дней",
"Retain 90 Days": "Сохранять 90 дней",
"Default Latency Test": "Ссылка на тестирование задержки по умолчанию",
"Default Latency Timeout": "Таймаут задержки по умолчанию",
"Hotkey Setting": "Настройки клавиатурных сокращений",
"open_or_close_dashboard": "Открыть/Закрыть панель управления", "open_or_close_dashboard": "Открыть/Закрыть панель управления",
"clash_mode_rule": "Режим правил", "clash_mode_rule": "Режим правил",
"clash_mode_global": "Глобальный режим", "clash_mode_global": "Глобальный режим",
"clash_mode_direct": "Прямой режим", "clash_mode_direct": "Прямой режим",
"toggle_system_proxy": "Включить/Отключить системный прокси", "toggle_system_proxy": "Включить/Отключить системный прокси",
"toggle_tun_mode": "Включить/Отключить режим туннеля", "toggle_tun_mode": "Включить/Отключить режим туннеля",
"Runtime Config": "Используемый конфиг",
"App Log Level": "Уровень журнала приложения", "Open App Dir": "Открыть папку приложения",
"Auto Close Connections": "Автоматическое закрытие соединений", "Open Core Dir": "Открыть папку ядра",
"Auto Check Update": "Автоматическая проверка обновлений", "Open Logs Dir": "Открыть папку логов",
"Enable Builtin Enhanced": "Включить встроенные улучшения", "Check for Updates": "Проверить обновления",
"Proxy Layout Column": "Количество столбцов в макете прокси", "Go to Release Page": "Перейти на страницу релизов",
"Default Latency Test": "Ссылка на тестирование задержки по умолчанию",
"Default Latency Timeout": "Таймаут задержки по умолчанию",
"Auto Log Clean": "Автоматическая очистка журналов",
"Never Clean": "Никогда не очищать",
"Retain 7 Days": "Сохранять 7 дней",
"Retain 30 Days": "Сохранять 30 дней",
"Retain 90 Days": "Сохранять 90 дней",
"Stack": "Стек",
"Device": "Имя устройства",
"Auto Route": "Автоматическая маршрутизация",
"Strict Route": "Строгий маршрут",
"Auto Detect Interface": "Автоопределение интерфейса",
"DNS Hijack": "DNS-перехват",
"MTU": "Максимальная единица передачи",
"Reset to Default": "Сбросить настройки по умолчанию",
"Current State": "Текущее состояние",
"pending": "Ожидающий",
"installed": "Установленный",
"uninstall": "Не установленный",
"active": "Активированный",
"unknown": "неизвестный",
"Disable Service Mode": "Отключить режим обслуживания",
"Install": "Установить",
"Uninstall": "Удалить",
"Portable Updater Error": "Портативная версия не поддерживает обновление внутри приложения, пожалуйста, скачайте и замените вручную", "Portable Updater Error": "Портативная версия не поддерживает обновление внутри приложения, пожалуйста, скачайте и замените вручную",
"Tun Mode Info": "Режим туннеля требует предоставления разрешений, связанных с ядрам. Пожалуйста, включите сервисный режим перед его использованием", "Open Dev Tools": "Открыть инструменты разработчика",
"System and Mixed Can Only be Used in Service Mode": "Система и смешанные могут использоваться только в сервисном режиме", "Exit": "Выход",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Информация: Пожалуйста, убедитесь, что сервис Clash Verge Service установлен и включен", "Verge Version": "Версия Verge",
"ReadOnly": "Только для чтения",
"ReadOnlyMessage": "Невозможно редактировать в режиме только для чтения",
"Filter": "Фильтр",
"Filter conditions": "Условия фильтрации",
"Match Case": "Учитывать регистр", "Match Case": "Учитывать регистр",
"Match Whole Word": "Полное совпадение слова", "Match Whole Word": "Полное совпадение слова",
"Use Regular Expression": "Использовать регулярные выражения", "Use Regular Expression": "Использовать регулярные выражения",
"External Controller Address Modified": "Изменен адрес внешнего контроллера", "Profile Imported Successfully": "Профиль успешно импортирован",
"Clash Port Modified": "Clash порт изменен", "Clash Config Updated": "Clash конфигурация Обновлена",
"Currently on the Latest Version": "В настоящее время используется последняя версия",
"Only YAML Files Supported": "Поддерживаются только файлы YAML",
"Port Conflict": "Конфликт портов",
"Proxy Daemon Duration Cannot be Less than 1 Second": "Продолжительность работы прокси-демона не может быть меньше 1 секунды",
"Profile Switched": "Профиль изменен", "Profile Switched": "Профиль изменен",
"Profile Reactivated": "Профиль повторно активирован", "Profile Reactivated": "Профиль повторно активирован",
"Clash Config Updated": "Clash конфигурация Обновлена", "Only YAML Files Supported": "Поддерживаются только файлы YAML",
"Settings Applied": "Применены настройки", "Settings Applied": "Применены настройки",
"Service Installed Successfully": "Служба успешно установлена", "Service Installed Successfully": "Служба успешно установлена",
"Service Uninstalled Successfully": "Служба успешно удалена", "Service Uninstalled Successfully": "Служба успешно удалена",
"GeoData Updated": "GeoData Обновлена", "Proxy Daemon Duration Cannot be Less than 1 Second": "Продолжительность работы прокси-демона не может быть меньше 1 секунды",
"Invalid Bypass Format": "Неверный формат обхода",
"Clash Port Modified": "Clash порт изменен",
"Port Conflict": "Конфликт портов",
"Restart Application to Apply Modifications": "Чтобы изменения вступили в силу, необходимо перезапустить приложение",
"External Controller Address Modified": "Изменен адрес внешнего контроллера",
"Permissions Granted Successfully for _clash Core": "Разрешения успешно предоставлены для ядра {{core}}", "Permissions Granted Successfully for _clash Core": "Разрешения успешно предоставлены для ядра {{core}}",
"Profile Imported Successfully": "Профиль успешно импортирован", "Core Version Updated": "Обновлена версия ядра",
"Clash Core Restarted": "Clash ядра перезапущено", "Clash Core Restarted": "Clash ядра перезапущено",
"Switched to _clash Core": "Переключено на ядра {{core}}", "Switched to _clash Core": "Переключено на ядра {{core}}",
"Core Version Updated": "Обновлена версия ядра" "GeoData Updated": "GeoData Обновлена",
"Currently on the Latest Version": "В настоящее время используется последняя версия"
} }
+175 -167
View File
@@ -1,60 +1,33 @@
{ {
"Back": "返回",
"Close": "关闭",
"Cancel": "取消",
"Confirm": "确认",
"New": "新建",
"Edit": "编辑",
"Save": "保存",
"Delete": "删除",
"Enable": "启用",
"Disable": "禁用",
"Label-Proxies": "代 理", "Label-Proxies": "代 理",
"Label-Test": "测 试",
"Label-Profiles": "订 阅", "Label-Profiles": "订 阅",
"Label-Connections": "连 接", "Label-Connections": "连 接",
"Label-Logs": "日 志",
"Label-Rules": "规 则", "Label-Rules": "规 则",
"Label-Logs": "日 志",
"Label-Test": "测 试",
"Label-Settings": "设 置", "Label-Settings": "设 置",
"Connections": "连接",
"Logs": "日志",
"Clear": "清除",
"Proxies": "代理", "Proxies": "代理",
"Proxy Groups": "代理组", "Proxy Groups": "代理组",
"Test": "测试", "Proxy Provider": "代理集合",
"Update All": "更新全部",
"Update At": "更新于",
"rule": "规则", "rule": "规则",
"global": "全局", "global": "全局",
"direct": "直连", "direct": "直连",
"script": "脚本", "script": "脚本",
"Create Test": "新建测试",
"Edit Test": "编辑测试",
"Edit": "编辑",
"Icon": "图标",
"Test URL": "测试地址",
"Test All": "测试全部",
"Paste": "粘贴",
"Profiles": "订阅",
"Profile URL": "订阅文件链接",
"Import": "导入",
"New": "新建",
"Create Profile": "新建配置",
"Edit Profile": "编辑配置",
"Choose File": "选择文件",
"Close": "关闭",
"Close All": "关闭全部",
"Home": "首页",
"Select": "使用",
"Edit Info": "编辑信息",
"Edit File": "编辑文件",
"Open File": "打开文件",
"Update": "更新",
"Update(Proxy)": "更新(代理)",
"Delete": "删除",
"Enable": "启用",
"Disable": "禁用",
"Refresh": "刷新",
"To Top": "移到最前",
"To End": "移到末尾",
"Update All Profiles": "更新所有订阅",
"View Runtime Config": "查看运行时订阅",
"Reactivate Profiles": "重新激活订阅",
"Confirm deletion": "确认删除",
"This operation is not reversible": "此操作不可逆",
"Script Console": "脚本控制台输出",
"Location": "当前节点", "Location": "当前节点",
"Delay check": "延迟测试", "Delay check": "延迟测试",
"Sort by default": "默认排序", "Sort by default": "默认排序",
@@ -64,13 +37,46 @@
"Delay check to cancel fixed": "进行延迟测试,以取消固定", "Delay check to cancel fixed": "进行延迟测试,以取消固定",
"Proxy basic": "隐藏节点细节", "Proxy basic": "隐藏节点细节",
"Proxy detail": "展示节点细节", "Proxy detail": "展示节点细节",
"Filter": "过滤节点",
"Filter conditions": "过滤条件",
"Refresh profiles": "刷新订阅",
"Rules": "规则",
"Update All": "更新全部",
"Update At": "更新于",
"Profiles": "订阅",
"Update All Profiles": "更新所有订阅",
"View Runtime Config": "查看运行时订阅",
"Reactivate Profiles": "重新激活订阅",
"Paste": "粘贴",
"Profile URL": "订阅文件链接",
"Import": "导入",
"Create Profile": "新建配置",
"Edit Profile": "编辑配置",
"Type": "类型",
"Name": "名称",
"Descriptions": "描述",
"Subscription URL": "订阅链接",
"Update Interval": "更新间隔",
"Choose File": "选择文件",
"Use System Proxy": "使用系统代理更新",
"Use Clash Proxy": "使用 Clash 代理更新",
"Accept Invalid Certs (Danger)": "允许无效证书 (危险)",
"Refresh": "刷新",
"Home": "首页",
"Select": "使用",
"Edit Info": "编辑信息",
"Edit File": "编辑文件",
"Open File": "打开文件",
"Update": "更新",
"Update(Proxy)": "更新(代理)",
"Confirm deletion": "确认删除",
"This operation is not reversible": "此操作不可逆",
"Script Console": "脚本控制台输出",
"To Top": "移到最前",
"To End": "移到末尾",
"Connections": "连接",
"Table View": "表格视图",
"List View": "列表视图",
"Close All": "关闭全部",
"Default": "默认",
"Download Speed": "下载速度",
"Upload Speed": "上传速度",
"Host": "主机", "Host": "主机",
"Downloaded": "下载量", "Downloaded": "下载量",
"Uploaded": "上传量", "Uploaded": "上传量",
@@ -84,88 +90,98 @@
"Destination IP": "目标地址", "Destination IP": "目标地址",
"Close Connection": "关闭连接", "Close Connection": "关闭连接",
"Type": "类型", "Rules": "规则",
"Name": "名称", "Rule Provider": "规则集合",
"Descriptions": "描述",
"Subscription URL": "订阅链接", "Logs": "日志",
"Update Interval": "更新间隔", "Pause": "暂停",
"Use System Proxy": "使用系统代理更新", "Clear": "清除",
"Use Clash Proxy": "使用 Clash 代理更新",
"Accept Invalid Certs (Danger)": "允许无效证书 (危险)", "Test": "测试",
"Test All": "测试全部",
"Create Test": "新建测试",
"Edit Test": "编辑测试",
"Icon": "图标",
"Test URL": "测试地址",
"Settings": "设置", "Settings": "设置",
"Clash Setting": "Clash 设置",
"System Setting": "系统设置", "System Setting": "系统设置",
"Verge Setting": "Verge 设置", "Tun Mode": "Tun 模式",
"Reset to Default": "重置为默认值",
"Tun Mode Info": "Tun模式需要授予内核相关权限,使用前请先开启服务模式",
"Stack": "Tun 模式堆栈",
"System and Mixed Can Only be Used in Service Mode": "System 和 Mixed 只能在服务模式下使用",
"Device": "Tun 网卡名称",
"Auto Route": "自动设置全局路由",
"Strict Route": "严格路由",
"Auto Detect Interface": "自动选择流量出口接口",
"DNS Hijack": "DNS 劫持",
"MTU": "最大传输单元",
"Service Mode": "服务模式",
"Current State": "当前状态",
"pending": "等待中",
"installed": "已安装",
"uninstall": "未安装",
"active": "已激活",
"unknown": "未知",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "提示信息: 请确保 Clash Verge Service 已安装并启用",
"Install": "安装",
"Uninstall": "卸载",
"Disable Service Mode": "禁用服务模式",
"System Proxy": "系统代理",
"System Proxy Info": "打开此开关修改操作系统的代理设置,如果开启失败,可手动修改操作系统的代理设置",
"System Proxy Setting": "系统代理设置",
"Current System Proxy": "当前系统代理",
"Enable status": "开启状态:",
"Enabled": "已启用",
"Disabled": "未启用",
"Server Addr": "服务地址:",
"Not available": "不可用",
"Proxy Guard": "系统代理守卫",
"Proxy Guard Info": "开启以防止其他软件修改操作系统的代理设置",
"Guard Duration": "代理守卫间隔",
"Proxy Bypass": "代理绕过设置:",
"Bypass": "当前绕过:",
"Use PAC Mode": "使用PAC模式",
"PAC Script Content": "PAC脚本内容",
"PAC URL": "PAC地址:",
"Auto Launch": "开机自启",
"Silent Start": "静默启动",
"Clash Setting": "Clash 设置",
"Allow Lan": "局域网连接", "Allow Lan": "局域网连接",
"IPv6": "IPv6", "IPv6": "IPv6",
"Log Level": "日志等级", "Log Level": "日志等级",
"Port Config": "端口设置", "Port Config": "端口设置",
"Random Port": "随机端口", "Random Port": "随机端口",
"Restart Application to Apply Modifications": "重启应用程序以应用修改",
"External": "外部控制", "External": "外部控制",
"External Controller": "外部控制器监听地址", "External Controller": "外部控制器监听地址",
"Core Secret": "API 访问密钥", "Core Secret": "API 访问密钥",
"Recommended": "建议设置", "Recommended": "建议设置",
"Open URL": "打开链接",
"Replace host, port, secret with %host, %port, %secret": "使用 %host, %port, %secret 表示 主机, 端口, 访问密钥",
"Support %host, %port, %secret": "支持 %host, %port, %secret",
"Clash Core": "Clash 内核", "Clash Core": "Clash 内核",
"Grant": "授权", "Upgrade": "升级内核",
"Restart": "重启内核",
"Tun mode requires": "如需启用 Tun 模式需要授权", "Tun mode requires": "如需启用 Tun 模式需要授权",
"Tun Mode": "Tun 模式", "Grant": "授权",
"Service Mode": "服务模式",
"Auto Launch": "开机自启",
"Silent Start": "静默启动",
"System Proxy": "系统代理",
"System Proxy Setting": "系统代理设置",
"Open UWP tool": "UWP 工具", "Open UWP tool": "UWP 工具",
"Update GeoData": "更新 GeoData", "Update GeoData": "更新 GeoData",
"Use PAC Mode": "使用PAC模式",
"PAC URL": "PAC 地址", "Verge Setting": "Verge 设置",
"PAC Script Content": "PAC 脚本内容", "Language": "语言设置",
"Proxy Guard": "系统代理守卫",
"Guard Duration": "代理守卫间隔",
"Proxy Bypass": "代理绕过",
"Current System Proxy": "当前系统代理",
"Enable status": "开启状态:",
"Server Addr": "服务地址:",
"Bypass": "当前绕过:",
"Theme Mode": "主题模式", "Theme Mode": "主题模式",
"theme.light": "浅色",
"theme.dark": "深色",
"theme.system": "系统",
"Tray Click Event": "托盘点击事件", "Tray Click Event": "托盘点击事件",
"Show Main Window": "显示主窗口",
"Copy Env Type": "复制环境变量类型", "Copy Env Type": "复制环境变量类型",
"Start Page": "启动页面", "Start Page": "启动页面",
"Startup Script": "启动脚本", "Startup Script": "启动脚本",
"Browse": "浏览", "Browse": "浏览",
"Show Main Window": "显示主窗口",
"Theme Setting": "主题设置", "Theme Setting": "主题设置",
"Layout Setting": "界面设置",
"Miscellaneous": "杂项设置",
"Hotkey Setting": "热键设置",
"Traffic Graph": "流量图显",
"Memory Usage": "内存使用",
"Proxy Group Icon": "代理组图标",
"Tray Icon": "托盘图标",
"Menu Icon": "菜单图标",
"Monochrome": "单色图标",
"Colorful": "彩色图标",
"Common Tray Icon": "常规托盘图标",
"System Proxy Tray Icon": "系统代理托盘图标",
"Tun Tray Icon": "Tun 模式托盘图标",
"Language": "语言设置",
"Open App Dir": "应用目录",
"Open Core Dir": "内核目录",
"Open Logs Dir": "日志目录",
"Check for Updates": "检查更新",
"Open Dev Tools": "打开开发者工具",
"Verge Version": "Verge 版本",
"theme.light": "浅色",
"theme.dark": "深色",
"theme.system": "系统",
"Clash Field": "Clash 字段",
"Runtime Config": "当前配置",
"ReadOnly": "只读",
"ReadOnlyMessage": "无法在只读模式下编辑",
"Restart": "重启内核",
"Upgrade": "升级内核",
"Primary Color": "主要颜色", "Primary Color": "主要颜色",
"Secondary Color": "次要颜色", "Secondary Color": "次要颜色",
"Primary Text": "文本主要颜色", "Primary Text": "文本主要颜色",
@@ -176,82 +192,74 @@
"Success Color": "成功颜色", "Success Color": "成功颜色",
"Font Family": "字体系列", "Font Family": "字体系列",
"CSS Injection": "CSS 注入", "CSS Injection": "CSS 注入",
"Layout Setting": "界面设置",
"Back": "返回", "Traffic Graph": "流量图显",
"Save": "保存", "Memory Usage": "内存使用",
"Cancel": "取消", "Proxy Group Icon": "代理组图标",
"Exit": "退出", "Menu Icon": "菜单图标",
"Confirm": "确认", "Monochrome": "单色图标",
"Colorful": "彩色图标",
"Default": "默认", "Tray Icon": "托盘图标",
"Download Speed": "下载速度", "Common Tray Icon": "常规托盘图标",
"Upload Speed": "上传速度", "System Proxy Tray Icon": "系统代理托盘图标",
"Tun Tray Icon": "Tun 模式托盘图标",
"Miscellaneous": "杂项设置",
"App Log Level": "App日志等级",
"Auto Close Connections": "自动关闭连接",
"Auto Check Update": "自动检查更新",
"Enable Builtin Enhanced": "内置增强功能",
"Proxy Layout Column": "代理页布局列数",
"Auto Log Clean": "自动清理日志",
"Never Clean": "不清理",
"Retain 7 Days": "保留7天",
"Retain 30 Days": "保留30天",
"Retain 90 Days": "保留90天",
"Default Latency Test": "默认测试链接",
"Default Latency Timeout": "测试超时时间",
"Hotkey Setting": "热键设置",
"open_or_close_dashboard": "打开/关闭面板", "open_or_close_dashboard": "打开/关闭面板",
"clash_mode_rule": "规则模式", "clash_mode_rule": "规则模式",
"clash_mode_global": "全局模式", "clash_mode_global": "全局模式",
"clash_mode_direct": "直连模式", "clash_mode_direct": "直连模式",
"toggle_system_proxy": "打开/关闭系统代理", "toggle_system_proxy": "打开/关闭系统代理",
"toggle_tun_mode": "打开/关闭 Tun 模式", "toggle_tun_mode": "打开/关闭 Tun 模式",
"Runtime Config": "当前配置",
"App Log Level": "App日志等级", "Open App Dir": "应用目录",
"Auto Close Connections": "自动关闭连接", "Open Core Dir": "内核目录",
"Auto Check Update": "自动检查更新", "Open Logs Dir": "日志目录",
"Enable Builtin Enhanced": "开启内建增强功能", "Check for Updates": "检查更新",
"Proxy Layout Column": "代理页布局列数", "Go to Release Page": "前往发布页",
"Default Latency Test": "默认测试链接",
"Default Latency Timeout": "测试超时时间",
"Auto Log Clean": "自动清理日志",
"Never Clean": "不清理",
"Retain 7 Days": "保留7天",
"Retain 30 Days": "保留30天",
"Retain 90 Days": "保留90天",
"Stack": "Tun 模式堆栈",
"Device": "Tun 网卡名称",
"Auto Route": "自动设置全局路由",
"Strict Route": "严格路由",
"Auto Detect Interface": "自动选择流量出口接口",
"DNS Hijack": "DNS 劫持",
"MTU": "最大传输单元",
"Reset to Default": "重置为默认值",
"Current State": "当前状态",
"pending": "等待中",
"installed": "已安装",
"uninstall": "未安装",
"active": "已激活",
"unknown": "未知",
"Disable Service Mode": "禁用服务模式",
"Install": "安装",
"Uninstall": "卸载",
"Portable Updater Error": "便携版不支持应用内更新,请手动下载替换", "Portable Updater Error": "便携版不支持应用内更新,请手动下载替换",
"Tun Mode Info": "Tun模式需要授予内核相关权限,使用前请先开启服务模式", "Open Dev Tools": "打开开发者工具",
"System and Mixed Can Only be Used in Service Mode": "System 和 Mixed 只能在服务模式下使用", "Exit": "退出",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "提示信息: 请确保 Clash Verge Service 已安装并启用", "Verge Version": "Verge 版本",
"ReadOnly": "只读",
"ReadOnlyMessage": "无法在只读模式下编辑",
"Filter": "过滤节点",
"Filter conditions": "过滤条件",
"Match Case": "区分大小写", "Match Case": "区分大小写",
"Match Whole Word": "全字匹配", "Match Whole Word": "全字匹配",
"Use Regular Expression": "使用正则表达式", "Use Regular Expression": "使用正则表达式",
"External Controller Address Modified": "外部控制器监听地址已修改", "Profile Imported Successfully": "导入订阅成功",
"Clash Port Modified": "Clash 端口已修改", "Clash Config Updated": "Clash 配置已更新",
"Currently on the Latest Version": "当前已是最新版本",
"Only YAML Files Supported": "仅支持 YAML 文件",
"Port Conflict": "端口冲突",
"Proxy Daemon Duration Cannot be Less than 1 Second": "代理守护间隔时间不得低于1秒",
"Profile Switched": "订阅已切换", "Profile Switched": "订阅已切换",
"Profile Reactivated": "订阅已激活", "Profile Reactivated": "订阅已激活",
"Clash Config Updated": "Clash 配置已更新", "Only YAML Files Supported": "仅支持 YAML 文件",
"Settings Applied": "设置已应用", "Settings Applied": "设置已应用",
"Service Installed Successfully": "已成功安装服务", "Service Installed Successfully": "已成功安装服务",
"Service Uninstalled Successfully": "已成功卸载服务", "Service Uninstalled Successfully": "已成功卸载服务",
"GeoData Updated": "已更新 GeoData", "Proxy Daemon Duration Cannot be Less than 1 Second": "代理守护间隔时间不得低于1秒",
"Invalid Bypass Format": "无效的代理绕过格式",
"Clash Port Modified": "Clash 端口已修改",
"Port Conflict": "端口冲突",
"Restart Application to Apply Modifications": "重启应用程序以应用修改",
"External Controller Address Modified": "外部控制器监听地址已修改",
"Permissions Granted Successfully for _clash Core": "{{core}} 内核授权成功", "Permissions Granted Successfully for _clash Core": "{{core}} 内核授权成功",
"Profile Imported Successfully": "导入订阅成功", "Core Version Updated": "内核版本已更新",
"Clash Core Restarted": "已重启 Clash 内核", "Clash Core Restarted": "已重启 Clash 内核",
"Switched to _clash Core": "已切换至 {{core}} 内核", "Switched to _clash Core": "已切换至 {{core}} 内核",
"Core Version Updated": "内核版本已更新" "GeoData Updated": "已更新 GeoData",
"Currently on the Latest Version": "当前已是最新版本"
} }
+17 -4
View File
@@ -9,11 +9,17 @@ if (!window.ResizeObserver) {
import React from "react"; import React from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import { RecoilRoot } from "recoil"; import { ComposeContextProvider } from "foxact/compose-context-provider";
import { BrowserRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
import { BaseErrorBoundary } from "./components/base"; import { BaseErrorBoundary } from "./components/base";
import Layout from "./pages/_layout"; import Layout from "./pages/_layout";
import "./services/i18n"; import "./services/i18n";
import {
LoadingCacheProvider,
LogDataProvider,
ThemeModeProvider,
UpdateStateProvider,
} from "./services/states";
const mainElementId = "root"; const mainElementId = "root";
const container = document.getElementById(mainElementId); const container = document.getElementById(mainElementId);
@@ -31,20 +37,27 @@ document.addEventListener("keydown", (event) => {
} }
if ( if (
(event.ctrlKey || event.metaKey) && (event.ctrlKey || event.metaKey) &&
["F", "H", "P", "R", "U"].includes(event.key.toUpperCase()) ["F", "H", "P", "Q", "R", "U"].includes(event.key.toUpperCase())
) { ) {
event.preventDefault(); event.preventDefault();
} }
}); });
const contexts = [
<ThemeModeProvider />,
<LogDataProvider />,
<LoadingCacheProvider />,
<UpdateStateProvider />,
];
createRoot(container).render( createRoot(container).render(
<React.StrictMode> <React.StrictMode>
<RecoilRoot> <ComposeContextProvider contexts={contexts}>
<BaseErrorBoundary> <BaseErrorBoundary>
<BrowserRouter> <BrowserRouter>
<Layout /> <Layout />
</BrowserRouter> </BrowserRouter>
</BaseErrorBoundary> </BaseErrorBoundary>
</RecoilRoot> </ComposeContextProvider>
</React.StrictMode> </React.StrictMode>
); );
+2 -3
View File
@@ -14,8 +14,7 @@ import { useVerge } from "@/hooks/use-verge";
import LogoSvg from "@/assets/image/logo.svg?react"; import LogoSvg from "@/assets/image/logo.svg?react";
import iconLight from "@/assets/image/icon_light.svg?react"; import iconLight from "@/assets/image/icon_light.svg?react";
import iconDark from "@/assets/image/icon_dark.svg?react"; import iconDark from "@/assets/image/icon_dark.svg?react";
import { atomThemeMode } from "@/services/states"; import { useThemeMode } from "@/services/states";
import { useRecoilState } from "recoil";
import { Notice } from "@/components/base"; import { Notice } from "@/components/base";
import { LayoutItem } from "@/components/layout/layout-item"; import { LayoutItem } from "@/components/layout/layout-item";
import { LayoutControl } from "@/components/layout/layout-control"; import { LayoutControl } from "@/components/layout/layout-control";
@@ -36,7 +35,7 @@ dayjs.extend(relativeTime);
const OS = getSystem(); const OS = getSystem();
const Layout = () => { const Layout = () => {
const [mode] = useRecoilState(atomThemeMode); const mode = useThemeMode();
const isDark = mode === "light" ? false : true; const isDark = mode === "light" ? false : true;
const { t } = useTranslation(); const { t } = useTranslation();
const { theme } = useCustomTheme(); const { theme } = useCustomTheme();
+6 -6
View File
@@ -4,14 +4,14 @@ const OS = getSystem();
// default theme setting // default theme setting
export const defaultTheme = { export const defaultTheme = {
primary_color: "#007AFF", primary_color: "#007AFF",
secondary_color: "#fc9b76", secondary_color: "#FC9B76",
primary_text: "#000000", primary_text: "#000000",
secondary_text: "#3c3c4399", secondary_text: "#3C3C4399",
info_color: "#007AFF", info_color: "#007AFF",
error_color: "#FF3B30", error_color: "#FF3B30",
warning_color: "#FF9500", warning_color: "#FF9500",
success_color: "#06943D", success_color: "#06943D",
background_color: "#f5f5f5", background_color: "#F5F5F5",
font_family: `-apple-system, BlinkMacSystemFont,"Microsoft YaHei UI", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji"${ font_family: `-apple-system, BlinkMacSystemFont,"Microsoft YaHei UI", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji"${
OS === "windows" ? ", twemoji mozilla" : "" OS === "windows" ? ", twemoji mozilla" : ""
}`, }`,
@@ -22,9 +22,9 @@ export const defaultDarkTheme = {
...defaultTheme, ...defaultTheme,
primary_color: "#0A84FF", primary_color: "#0A84FF",
secondary_color: "#FF9F0A", secondary_color: "#FF9F0A",
primary_text: "#ffffff", primary_text: "#FFFFFF",
background_color: "#2e303d", background_color: "#2E303D",
secondary_text: "#ebebf599", secondary_text: "#EBEBF599",
info_color: "#0A84FF", info_color: "#0A84FF",
error_color: "#FF453A", error_color: "#FF453A",
warning_color: "#FF9F0A", warning_color: "#FF9F0A",
+9 -6
View File
@@ -1,12 +1,11 @@
import { useEffect, useMemo, useRef, useState } from "react"; import { useEffect, useMemo, useRef, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { Box, Button, IconButton, MenuItem } from "@mui/material"; import { Box, Button, IconButton, MenuItem } from "@mui/material";
import { useRecoilState } from "recoil";
import { Virtuoso } from "react-virtuoso"; import { Virtuoso } from "react-virtuoso";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { TableChartRounded, TableRowsRounded } from "@mui/icons-material"; import { TableChartRounded, TableRowsRounded } from "@mui/icons-material";
import { closeAllConnections } from "@/services/api"; import { closeAllConnections } from "@/services/api";
import { atomConnectionSetting } from "@/services/states"; import { useConnectionSetting } from "@/services/states";
import { useClashInfo } from "@/hooks/use-clash"; import { useClashInfo } from "@/hooks/use-clash";
import { BaseEmpty, BasePage } from "@/components/base"; import { BaseEmpty, BasePage } from "@/components/base";
import { useWebsocket } from "@/hooks/use-websocket"; import { useWebsocket } from "@/hooks/use-websocket";
@@ -34,7 +33,7 @@ const ConnectionsPage = () => {
const [curOrderOpt, setOrderOpt] = useState("Default"); const [curOrderOpt, setOrderOpt] = useState("Default");
const [connData, setConnData] = useState<IConnections>(initConn); const [connData, setConnData] = useState<IConnections>(initConn);
const [setting, setSetting] = useRecoilState(atomConnectionSetting); const [setting, setSetting] = useConnectionSetting();
const isTableLayout = setting.layout === "table"; const isTableLayout = setting.layout === "table";
@@ -137,16 +136,20 @@ const ConnectionsPage = () => {
size="small" size="small"
onClick={() => onClick={() =>
setSetting((o) => setSetting((o) =>
o.layout === "list" o?.layout !== "table"
? { ...o, layout: "table" } ? { ...o, layout: "table" }
: { ...o, layout: "list" } : { ...o, layout: "list" }
) )
} }
> >
{isTableLayout ? ( {isTableLayout ? (
<TableChartRounded fontSize="inherit" /> <span title={t("List View")}>
<TableRowsRounded fontSize="inherit" />
</span>
) : ( ) : (
<TableRowsRounded fontSize="inherit" /> <span title={t("Table View")}>
<TableChartRounded fontSize="inherit" />
</span>
)} )}
</IconButton> </IconButton>
+5 -4
View File
@@ -1,5 +1,4 @@
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { useRecoilState } from "recoil";
import { Box, Button, IconButton, MenuItem } from "@mui/material"; import { Box, Button, IconButton, MenuItem } from "@mui/material";
import { Virtuoso } from "react-virtuoso"; import { Virtuoso } from "react-virtuoso";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -7,7 +6,7 @@ import {
PlayCircleOutlineRounded, PlayCircleOutlineRounded,
PauseCircleOutlineRounded, PauseCircleOutlineRounded,
} from "@mui/icons-material"; } from "@mui/icons-material";
import { atomEnableLog, atomLogData } from "@/services/states"; import { useEnableLog, useLogData, useSetLogData } from "@/services/states";
import { BaseEmpty, BasePage } from "@/components/base"; import { BaseEmpty, BasePage } from "@/components/base";
import LogItem from "@/components/log/log-item"; import LogItem from "@/components/log/log-item";
import { useCustomTheme } from "@/components/layout/use-custom-theme"; import { useCustomTheme } from "@/components/layout/use-custom-theme";
@@ -16,8 +15,9 @@ import { BaseStyledSelect } from "@/components/base/base-styled-select";
const LogPage = () => { const LogPage = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const [logData, setLogData] = useRecoilState(atomLogData); const logData = useLogData();
const [enableLog, setEnableLog] = useRecoilState(atomEnableLog); const setLogData = useSetLogData();
const [enableLog, setEnableLog] = useEnableLog();
const { theme } = useCustomTheme(); const { theme } = useCustomTheme();
const isDark = theme.palette.mode === "dark"; const isDark = theme.palette.mode === "dark";
const [logState, setLogState] = useState("all"); const [logState, setLogState] = useState("all");
@@ -39,6 +39,7 @@ const LogPage = () => {
header={ header={
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}> <Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
<IconButton <IconButton
title={t("Pause")}
size="small" size="small"
color="inherit" color="inherit"
onClick={() => setEnableLog((e) => !e)} onClick={() => setEnableLog((e) => !e)}
+3 -6
View File
@@ -1,7 +1,6 @@
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
import { useEffect, useMemo, useRef, useState } from "react"; import { useEffect, useMemo, useRef, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useSetRecoilState } from "recoil";
import { Box, Button, Grid, IconButton, Stack, Divider } from "@mui/material"; import { Box, Button, Grid, IconButton, Stack, Divider } from "@mui/material";
import { import {
DndContext, DndContext,
@@ -35,7 +34,7 @@ import {
reorderProfile, reorderProfile,
createProfile, createProfile,
} from "@/services/cmds"; } from "@/services/cmds";
import { atomLoadingCache } from "@/services/states"; import { useSetLoadingCache, useThemeMode } from "@/services/states";
import { closeAllConnections } from "@/services/api"; import { closeAllConnections } from "@/services/api";
import { BasePage, DialogRef, Notice } from "@/components/base"; import { BasePage, DialogRef, Notice } from "@/components/base";
import { import {
@@ -47,8 +46,6 @@ import { ProfileMore } from "@/components/profile/profile-more";
import { useProfiles } from "@/hooks/use-profiles"; import { useProfiles } from "@/hooks/use-profiles";
import { ConfigViewer } from "@/components/setting/mods/config-viewer"; import { ConfigViewer } from "@/components/setting/mods/config-viewer";
import { throttle } from "lodash-es"; import { throttle } from "lodash-es";
import { useRecoilState } from "recoil";
import { atomThemeMode } from "@/services/states";
import { BaseStyledTextField } from "@/components/base/base-styled-text-field"; import { BaseStyledTextField } from "@/components/base/base-styled-text-field";
import { listen } from "@tauri-apps/api/event"; import { listen } from "@tauri-apps/api/event";
import { readTextFile } from "@tauri-apps/api/fs"; import { readTextFile } from "@tauri-apps/api/fs";
@@ -239,7 +236,7 @@ const ProfilePage = () => {
}); });
// 更新所有订阅 // 更新所有订阅
const setLoadingCache = useSetRecoilState(atomLoadingCache); const setLoadingCache = useSetLoadingCache();
const onUpdateAll = useLockFn(async () => { const onUpdateAll = useLockFn(async () => {
const throttleMutate = throttle(mutateProfiles, 2000, { const throttleMutate = throttle(mutateProfiles, 2000, {
trailing: true, trailing: true,
@@ -271,7 +268,7 @@ const ProfilePage = () => {
const text = await readText(); const text = await readText();
if (text) setUrl(text); if (text) setUrl(text);
}; };
const [mode] = useRecoilState(atomThemeMode); const mode = useThemeMode();
const islight = mode === "light" ? true : false; const islight = mode === "light" ? true : false;
const dividercolor = islight const dividercolor = islight
? "rgba(0, 0, 0, 0.06)" ? "rgba(0, 0, 0, 0.06)"
+2 -3
View File
@@ -7,8 +7,7 @@ import { openWebUrl } from "@/services/cmds";
import SettingVerge from "@/components/setting/setting-verge"; import SettingVerge from "@/components/setting/setting-verge";
import SettingClash from "@/components/setting/setting-clash"; import SettingClash from "@/components/setting/setting-clash";
import SettingSystem from "@/components/setting/setting-system"; import SettingSystem from "@/components/setting/setting-system";
import { atomThemeMode } from "@/services/states"; import { useThemeMode } from "@/services/states";
import { useRecoilState } from "recoil";
const SettingPage = () => { const SettingPage = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -25,7 +24,7 @@ const SettingPage = () => {
return openWebUrl("https://clash-verge-rev.github.io/guide/log.html"); return openWebUrl("https://clash-verge-rev.github.io/guide/log.html");
}); });
const [mode] = useRecoilState(atomThemeMode); const mode = useThemeMode();
const isDark = mode === "light" ? false : true; const isDark = mode === "light" ? false : true;
return ( return (
+38 -60
View File
@@ -1,73 +1,51 @@
import { atom } from "recoil"; import { createContextState } from "foxact/create-context-state";
import { useLocalStorage } from "foxact/use-local-storage";
export const atomThemeMode = atom<"light" | "dark">({ const [ThemeModeProvider, useThemeMode, useSetThemeMode] = createContextState<
key: "atomThemeMode", "light" | "dark"
default: "light", >("light");
});
export const atomLogData = atom<ILogItem[]>({ const [LogDataProvider, useLogData, useSetLogData] = createContextState<
key: "atomLogData", ILogItem[]
default: [], >([]);
});
export const atomEnableLog = atom<boolean>({ export const useEnableLog = () => useLocalStorage("enable-log", true);
key: "atomEnableLog",
effects: [
({ setSelf, onSet }) => {
const key = "enable-log";
try {
setSelf(localStorage.getItem(key) !== "false");
} catch {}
onSet((newValue, _, isReset) => {
try {
if (isReset) {
localStorage.removeItem(key);
} else {
localStorage.setItem(key, newValue.toString());
}
} catch {}
});
},
],
});
interface IConnectionSetting { interface IConnectionSetting {
layout: "table" | "list"; layout: "table" | "list";
} }
export const atomConnectionSetting = atom<IConnectionSetting>({ const defaultConnectionSetting: IConnectionSetting = { layout: "table" };
key: "atomConnectionSetting",
effects: [
({ setSelf, onSet }) => {
const key = "connections-setting";
try { export const useConnectionSetting = () =>
const value = localStorage.getItem(key); useLocalStorage<IConnectionSetting>(
const data = value == null ? { layout: "table" } : JSON.parse(value); "connections-setting",
setSelf(data); defaultConnectionSetting,
} catch { {
setSelf({ layout: "table" }); serializer: JSON.stringify,
} deserializer: JSON.parse,
}
onSet((newValue) => { );
try {
localStorage.setItem(key, JSON.stringify(newValue));
} catch {}
});
},
],
});
// save the state of each profile item loading // save the state of each profile item loading
export const atomLoadingCache = atom<Record<string, boolean>>({ const [LoadingCacheProvider, useLoadingCache, useSetLoadingCache] =
key: "atomLoadingCache", createContextState<Record<string, boolean>>({});
default: {},
});
// save update state // save update state
export const atomUpdateState = atom<boolean>({ const [UpdateStateProvider, useUpdateState, useSetUpdateState] =
key: "atomUpdateState", createContextState<boolean>(false);
default: false,
}); export {
ThemeModeProvider,
useThemeMode,
useSetThemeMode,
LogDataProvider,
useLogData,
useSetLogData,
LoadingCacheProvider,
useLoadingCache,
useSetLoadingCache,
UpdateStateProvider,
useUpdateState,
useSetUpdateState,
};
+3
View File
@@ -0,0 +1,3 @@
export default function isAsyncFunction(fn: Function): boolean {
return fn.constructor.name === "AsyncFunction";
}
+4 -2
View File
@@ -12,10 +12,12 @@ export default defineConfig({
svgr(), svgr(),
react(), react(),
legacy({ legacy({
targets: ["edge>=109", "safari>=13"], renderLegacyChunks: false,
modernTargets: ["edge>=109", "safari>=13"],
modernPolyfills: true, modernPolyfills: true,
polyfills: ["web.structured-clone"],
additionalModernPolyfills: [ additionalModernPolyfills: [
"core-js/modules/es.object.has-own.js",
"core-js/modules/web.structured-clone.js",
path.resolve("./src/polyfills/matchMedia.js"), path.resolve("./src/polyfills/matchMedia.js"),
path.resolve("./src/polyfills/WeakRef.js"), path.resolve("./src/polyfills/WeakRef.js"),
path.resolve("./src/polyfills/RegExp.js"), path.resolve("./src/polyfills/RegExp.js"),