mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-10 19:50:28 +08:00
Merge branches 'smart_core' and 'smart_core' of https://github.com/mihomo-party-org/clash-party into smart_core
This commit is contained in:
commit
30f87b8439
@ -41,7 +41,7 @@
|
|||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"i18next": "^25.6.2",
|
"i18next": "^25.6.2",
|
||||||
"iconv-lite": "^0.7.1",
|
"iconv-lite": "^0.7.1",
|
||||||
"sysproxy-rs": "file:sysproxy-rs",
|
"sysproxy-rs": "file:src/native/sysproxy",
|
||||||
"webdav": "^5.8.0",
|
"webdav": "^5.8.0",
|
||||||
"ws": "^8.18.3",
|
"ws": "^8.18.3",
|
||||||
"yaml": "^2.8.1"
|
"yaml": "^2.8.1"
|
||||||
@ -107,5 +107,5 @@
|
|||||||
"vite": "^7.2.2",
|
"vite": "^7.2.2",
|
||||||
"vite-plugin-monaco-editor": "^1.1.0"
|
"vite-plugin-monaco-editor": "^1.1.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.22.0"
|
"packageManager": "pnpm@10.27.0"
|
||||||
}
|
}
|
||||||
|
|||||||
29
pnpm-lock.yaml
generated
29
pnpm-lock.yaml
generated
@ -36,8 +36,8 @@ importers:
|
|||||||
specifier: ^0.7.1
|
specifier: ^0.7.1
|
||||||
version: 0.7.1
|
version: 0.7.1
|
||||||
sysproxy-rs:
|
sysproxy-rs:
|
||||||
specifier: file:sysproxy-rs
|
specifier: file:src/native/sysproxy
|
||||||
version: file:sysproxy-rs
|
version: file:src/native/sysproxy
|
||||||
webdav:
|
webdav:
|
||||||
specifier: ^5.8.0
|
specifier: ^5.8.0
|
||||||
version: 5.8.0
|
version: 5.8.0
|
||||||
@ -1918,67 +1918,56 @@ packages:
|
|||||||
resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==}
|
resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.54.0':
|
'@rollup/rollup-linux-arm-musleabihf@4.54.0':
|
||||||
resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==}
|
resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.54.0':
|
'@rollup/rollup-linux-arm64-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==}
|
resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.54.0':
|
'@rollup/rollup-linux-arm64-musl@4.54.0':
|
||||||
resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==}
|
resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-loong64-gnu@4.54.0':
|
'@rollup/rollup-linux-loong64-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==}
|
resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==}
|
||||||
cpu: [loong64]
|
cpu: [loong64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-ppc64-gnu@4.54.0':
|
'@rollup/rollup-linux-ppc64-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==}
|
resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==}
|
||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.54.0':
|
'@rollup/rollup-linux-riscv64-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==}
|
resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-musl@4.54.0':
|
'@rollup/rollup-linux-riscv64-musl@4.54.0':
|
||||||
resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==}
|
resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.54.0':
|
'@rollup/rollup-linux-s390x-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==}
|
resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.54.0':
|
'@rollup/rollup-linux-x64-gnu@4.54.0':
|
||||||
resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==}
|
resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.54.0':
|
'@rollup/rollup-linux-x64-musl@4.54.0':
|
||||||
resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==}
|
resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-openharmony-arm64@4.54.0':
|
'@rollup/rollup-openharmony-arm64@4.54.0':
|
||||||
resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==}
|
resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==}
|
||||||
@ -2057,28 +2046,24 @@ packages:
|
|||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.18':
|
'@tailwindcss/oxide-linux-arm64-musl@4.1.18':
|
||||||
resolution: {integrity: sha512-1px92582HkPQlaaCkdRcio71p8bc8i/ap5807tPRDK/uw953cauQBT8c5tVGkOwrHMfc2Yh6UuxaH4vtTjGvHg==}
|
resolution: {integrity: sha512-1px92582HkPQlaaCkdRcio71p8bc8i/ap5807tPRDK/uw953cauQBT8c5tVGkOwrHMfc2Yh6UuxaH4vtTjGvHg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.18':
|
'@tailwindcss/oxide-linux-x64-gnu@4.1.18':
|
||||||
resolution: {integrity: sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==}
|
resolution: {integrity: sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@tailwindcss/oxide-linux-x64-musl@4.1.18':
|
'@tailwindcss/oxide-linux-x64-musl@4.1.18':
|
||||||
resolution: {integrity: sha512-bhJ2y2OQNlcRwwgOAGMY0xTFStt4/wyU6pvI6LSuZpRgKQwxTec0/3Scu91O8ir7qCR3AuepQKLU/kX99FouqQ==}
|
resolution: {integrity: sha512-bhJ2y2OQNlcRwwgOAGMY0xTFStt4/wyU6pvI6LSuZpRgKQwxTec0/3Scu91O8ir7qCR3AuepQKLU/kX99FouqQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@tailwindcss/oxide-wasm32-wasi@4.1.18':
|
'@tailwindcss/oxide-wasm32-wasi@4.1.18':
|
||||||
resolution: {integrity: sha512-LffYTvPjODiP6PT16oNeUQJzNVyJl1cjIebq/rWWBF+3eDst5JGEFSc5cWxyRCJ0Mxl+KyIkqRxk1XPEs9x8TA==}
|
resolution: {integrity: sha512-LffYTvPjODiP6PT16oNeUQJzNVyJl1cjIebq/rWWBF+3eDst5JGEFSc5cWxyRCJ0Mxl+KyIkqRxk1XPEs9x8TA==}
|
||||||
@ -3821,28 +3806,24 @@ packages:
|
|||||||
engines: {node: '>= 12.0.0'}
|
engines: {node: '>= 12.0.0'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
lightningcss-linux-arm64-musl@1.30.2:
|
lightningcss-linux-arm64-musl@1.30.2:
|
||||||
resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==}
|
resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==}
|
||||||
engines: {node: '>= 12.0.0'}
|
engines: {node: '>= 12.0.0'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
lightningcss-linux-x64-gnu@1.30.2:
|
lightningcss-linux-x64-gnu@1.30.2:
|
||||||
resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==}
|
resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==}
|
||||||
engines: {node: '>= 12.0.0'}
|
engines: {node: '>= 12.0.0'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
lightningcss-linux-x64-musl@1.30.2:
|
lightningcss-linux-x64-musl@1.30.2:
|
||||||
resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==}
|
resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==}
|
||||||
engines: {node: '>= 12.0.0'}
|
engines: {node: '>= 12.0.0'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
lightningcss-win32-arm64-msvc@1.30.2:
|
lightningcss-win32-arm64-msvc@1.30.2:
|
||||||
resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==}
|
resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==}
|
||||||
@ -4850,8 +4831,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==}
|
resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
|
|
||||||
sysproxy-rs@file:sysproxy-rs:
|
sysproxy-rs@file:src/native/sysproxy:
|
||||||
resolution: {directory: sysproxy-rs, type: directory}
|
resolution: {directory: src/native/sysproxy, type: directory}
|
||||||
|
|
||||||
tailwind-merge@3.4.0:
|
tailwind-merge@3.4.0:
|
||||||
resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==}
|
resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==}
|
||||||
@ -11220,7 +11201,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@pkgr/core': 0.2.9
|
'@pkgr/core': 0.2.9
|
||||||
|
|
||||||
sysproxy-rs@file:sysproxy-rs: {}
|
sysproxy-rs@file:src/native/sysproxy: {}
|
||||||
|
|
||||||
tailwind-merge@3.4.0: {}
|
tailwind-merge@3.4.0: {}
|
||||||
|
|
||||||
|
|||||||
@ -46,10 +46,10 @@ function getBindingName() {
|
|||||||
function loadBinding() {
|
function loadBinding() {
|
||||||
const bindingName = getBindingName()
|
const bindingName = getBindingName()
|
||||||
|
|
||||||
// 查找项目根目录的 extra/sidecar
|
// 查找项目根目录的 sidecar
|
||||||
let currentDir = __dirname
|
let currentDir = __dirname
|
||||||
while (currentDir !== require('path').dirname(currentDir)) {
|
while (currentDir !== require('path').dirname(currentDir)) {
|
||||||
const sidecarPath = join(currentDir, 'extra', 'sidecar', bindingName)
|
const sidecarPath = join(currentDir, 'sidecar', bindingName)
|
||||||
if (existsSync(sidecarPath)) {
|
if (existsSync(sidecarPath)) {
|
||||||
try {
|
try {
|
||||||
nativeBinding = require(sidecarPath)
|
nativeBinding = require(sidecarPath)
|
||||||
|
|||||||
@ -342,6 +342,8 @@
|
|||||||
"actions.version.title": "App Version",
|
"actions.version.title": "App Version",
|
||||||
"theme.editor.title": "Edit Theme",
|
"theme.editor.title": "Edit Theme",
|
||||||
"proxies.title": "Proxy Groups & Nodes",
|
"proxies.title": "Proxy Groups & Nodes",
|
||||||
|
"proxies.hideUnavailable.enabled": "Show Unavailable Proxies",
|
||||||
|
"proxies.hideUnavailable.disabled": "Hide Unavailable Proxies",
|
||||||
"proxies.card.title": "ProxyGrp",
|
"proxies.card.title": "ProxyGrp",
|
||||||
"proxies.delay.test": "Test",
|
"proxies.delay.test": "Test",
|
||||||
"proxies.delay.timeout": "Timeout",
|
"proxies.delay.timeout": "Timeout",
|
||||||
|
|||||||
@ -318,6 +318,8 @@
|
|||||||
"actions.version.title": "نسخه برنامه",
|
"actions.version.title": "نسخه برنامه",
|
||||||
"theme.editor.title": "ویرایش پوسته",
|
"theme.editor.title": "ویرایش پوسته",
|
||||||
"proxies.title": "گروههای پراکسی و گرهها",
|
"proxies.title": "گروههای پراکسی و گرهها",
|
||||||
|
"proxies.hideUnavailable.enabled": "نمایش گرههای غیرفعال",
|
||||||
|
"proxies.hideUnavailable.disabled": "پنهان کردن گرههای غیرفعال",
|
||||||
"proxies.card.title": "گروهپراکسی",
|
"proxies.card.title": "گروهپراکسی",
|
||||||
"proxies.delay.test": "تست",
|
"proxies.delay.test": "تست",
|
||||||
"proxies.delay.timeout": "وقفه",
|
"proxies.delay.timeout": "وقفه",
|
||||||
|
|||||||
@ -318,6 +318,8 @@
|
|||||||
"actions.version.title": "Версия приложения",
|
"actions.version.title": "Версия приложения",
|
||||||
"theme.editor.title": "Редактор темы",
|
"theme.editor.title": "Редактор темы",
|
||||||
"proxies.title": "Прокси группы и узлы",
|
"proxies.title": "Прокси группы и узлы",
|
||||||
|
"proxies.hideUnavailable.enabled": "Показать недоступные узлы",
|
||||||
|
"proxies.hideUnavailable.disabled": "Скрыть недоступные узлы",
|
||||||
"proxies.card.title": "Прокси группы",
|
"proxies.card.title": "Прокси группы",
|
||||||
"proxies.delay.test": "Тест",
|
"proxies.delay.test": "Тест",
|
||||||
"proxies.delay.timeout": "Таймаут",
|
"proxies.delay.timeout": "Таймаут",
|
||||||
|
|||||||
@ -342,6 +342,8 @@
|
|||||||
"actions.version.title": "应用版本",
|
"actions.version.title": "应用版本",
|
||||||
"theme.editor.title": "编辑主题",
|
"theme.editor.title": "编辑主题",
|
||||||
"proxies.title": "代理组与节点",
|
"proxies.title": "代理组与节点",
|
||||||
|
"proxies.hideUnavailable.enabled": "显示不可用节点",
|
||||||
|
"proxies.hideUnavailable.disabled": "隐藏不可用节点",
|
||||||
"proxies.card.title": "代理组",
|
"proxies.card.title": "代理组",
|
||||||
"proxies.delay.test": "测试",
|
"proxies.delay.test": "测试",
|
||||||
"proxies.delay.timeout": "超时",
|
"proxies.delay.timeout": "超时",
|
||||||
|
|||||||
@ -342,6 +342,8 @@
|
|||||||
"actions.version.title": "應用程式版本",
|
"actions.version.title": "應用程式版本",
|
||||||
"theme.editor.title": "編輯主題",
|
"theme.editor.title": "編輯主題",
|
||||||
"proxies.title": "代理組與節點",
|
"proxies.title": "代理組與節點",
|
||||||
|
"proxies.hideUnavailable.enabled": "顯示不可用節點",
|
||||||
|
"proxies.hideUnavailable.disabled": "隱藏不可用節點",
|
||||||
"proxies.card.title": "代理組",
|
"proxies.card.title": "代理組",
|
||||||
"proxies.delay.test": "測試",
|
"proxies.delay.test": "測試",
|
||||||
"proxies.delay.timeout": "逾時",
|
"proxies.delay.timeout": "逾時",
|
||||||
|
|||||||
@ -11,11 +11,11 @@ import { CgDetailsLess, CgDetailsMore } from 'react-icons/cg'
|
|||||||
import { TbCircleLetterD } from 'react-icons/tb'
|
import { TbCircleLetterD } from 'react-icons/tb'
|
||||||
import { FaLocationCrosshairs } from 'react-icons/fa6'
|
import { FaLocationCrosshairs } from 'react-icons/fa6'
|
||||||
import { RxLetterCaseCapitalize } from 'react-icons/rx'
|
import { RxLetterCaseCapitalize } from 'react-icons/rx'
|
||||||
|
import { MdVisibilityOff, MdDoubleArrow, MdOutlineSpeed } from 'react-icons/md'
|
||||||
import { useEffect, useMemo, useRef, useState, useCallback } from 'react'
|
import { useEffect, useMemo, useRef, useState, useCallback } from 'react'
|
||||||
import { GroupedVirtuoso, GroupedVirtuosoHandle } from 'react-virtuoso'
|
import { GroupedVirtuoso, GroupedVirtuosoHandle } from 'react-virtuoso'
|
||||||
import ProxyItem from '@renderer/components/proxies/proxy-item'
|
import ProxyItem from '@renderer/components/proxies/proxy-item'
|
||||||
import { IoIosArrowBack } from 'react-icons/io'
|
import { IoIosArrowBack } from 'react-icons/io'
|
||||||
import { MdDoubleArrow, MdOutlineSpeed } from 'react-icons/md'
|
|
||||||
import { useGroups } from '@renderer/hooks/use-groups'
|
import { useGroups } from '@renderer/hooks/use-groups'
|
||||||
import CollapseInput from '@renderer/components/base/collapse-input'
|
import CollapseInput from '@renderer/components/base/collapse-input'
|
||||||
import { includesIgnoreCase } from '@renderer/utils/includes'
|
import { includesIgnoreCase } from '@renderer/utils/includes'
|
||||||
@ -160,9 +160,25 @@ const Proxies: React.FC = () => {
|
|||||||
|
|
||||||
groups.forEach((group, index) => {
|
groups.forEach((group, index) => {
|
||||||
if (isOpen[index]) {
|
if (isOpen[index]) {
|
||||||
const filtered = group.all.filter(
|
const filtered = group.all.filter((proxy) => {
|
||||||
(proxy) => proxy && includesIgnoreCase(proxy.name, searchValue[index])
|
if (!includesIgnoreCase(proxy.name, searchValue[index])) {
|
||||||
)
|
return false
|
||||||
|
}
|
||||||
|
if (appConfig?.hideUnavailableProxies) {
|
||||||
|
const isGroup = 'all' in proxy
|
||||||
|
if (isGroup) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (!proxy.history || proxy.history.length === 0) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const lastDelay = proxy.history[proxy.history.length - 1].delay
|
||||||
|
if (lastDelay === 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
const sorted = sortProxies(filtered, proxyDisplayOrder)
|
const sorted = sortProxies(filtered, proxyDisplayOrder)
|
||||||
const count = Math.ceil(sorted.length / cols)
|
const count = Math.ceil(sorted.length / cols)
|
||||||
groupCounts.push(count)
|
groupCounts.push(count)
|
||||||
@ -173,7 +189,15 @@ const Proxies: React.FC = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
return { groupCounts, allProxies }
|
return { groupCounts, allProxies }
|
||||||
}, [groups, isOpen, proxyDisplayOrder, cols, searchValue, sortProxies])
|
}, [
|
||||||
|
groups,
|
||||||
|
isOpen,
|
||||||
|
proxyDisplayOrder,
|
||||||
|
cols,
|
||||||
|
searchValue,
|
||||||
|
sortProxies,
|
||||||
|
appConfig?.hideUnavailableProxies
|
||||||
|
])
|
||||||
|
|
||||||
const onChangeProxy = useCallback(
|
const onChangeProxy = useCallback(
|
||||||
async (group: string, proxy: string): Promise<void> => {
|
async (group: string, proxy: string): Promise<void> => {
|
||||||
@ -509,6 +533,26 @@ const Proxies: React.FC = () => {
|
|||||||
title={t('proxies.title')}
|
title={t('proxies.title')}
|
||||||
header={
|
header={
|
||||||
<>
|
<>
|
||||||
|
<Button
|
||||||
|
size="sm"
|
||||||
|
isIconOnly
|
||||||
|
variant="light"
|
||||||
|
className="app-nodrag"
|
||||||
|
onPress={() => {
|
||||||
|
patchAppConfig({
|
||||||
|
hideUnavailableProxies: !appConfig?.hideUnavailableProxies
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdVisibilityOff
|
||||||
|
className={`text-lg ${appConfig?.hideUnavailableProxies ? 'text-warning' : 'text-foreground-500'}`}
|
||||||
|
title={
|
||||||
|
appConfig?.hideUnavailableProxies
|
||||||
|
? t('proxies.hideUnavailable.enabled')
|
||||||
|
: t('proxies.hideUnavailable.disabled')
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
isIconOnly
|
isIconOnly
|
||||||
|
|||||||
1
src/shared/types.d.ts
vendored
1
src/shared/types.d.ts
vendored
@ -229,6 +229,7 @@ interface IAppConfig {
|
|||||||
profileDisplayDate?: 'expire' | 'update'
|
profileDisplayDate?: 'expire' | 'update'
|
||||||
envType?: ('bash' | 'cmd' | 'powershell')[]
|
envType?: ('bash' | 'cmd' | 'powershell')[]
|
||||||
proxyCols: 'auto' | '1' | '2' | '3' | '4'
|
proxyCols: 'auto' | '1' | '2' | '3' | '4'
|
||||||
|
hideUnavailableProxies?: boolean
|
||||||
connectionDirection: 'asc' | 'desc'
|
connectionDirection: 'asc' | 'desc'
|
||||||
connectionOrderBy: 'time' | 'upload' | 'download' | 'uploadSpeed' | 'downloadSpeed'
|
connectionOrderBy: 'time' | 'upload' | 'download' | 'uploadSpeed' | 'downloadSpeed'
|
||||||
connectionViewMode?: 'list' | 'table'
|
connectionViewMode?: 'list' | 'table'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user