From d0d35da2f16a076b0b2bae6bcc71728c79222d30 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:39:10 +0800 Subject: [PATCH 1/6] fix(editor): update theme mode for MonacoEditor to use 'light' instead of 'vs' in multiple components #5440 --- src/components/profile/editor-viewer.tsx | 2 +- src/components/profile/groups-editor-viewer.tsx | 2 +- src/components/profile/proxies-editor-viewer.tsx | 2 +- src/components/profile/rules-editor-viewer.tsx | 2 +- src/components/setting/mods/dns-viewer.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/profile/editor-viewer.tsx b/src/components/profile/editor-viewer.tsx index bc95531cc..186815ed1 100644 --- a/src/components/profile/editor-viewer.tsx +++ b/src/components/profile/editor-viewer.tsx @@ -192,7 +192,7 @@ export const EditorViewer = (props: Props) => { > { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/profile/proxies-editor-viewer.tsx b/src/components/profile/proxies-editor-viewer.tsx index 61811e49a..e8d4fe3b4 100644 --- a/src/components/profile/proxies-editor-viewer.tsx +++ b/src/components/profile/proxies-editor-viewer.tsx @@ -473,7 +473,7 @@ export const ProxiesEditorViewer = (props: Props) => { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 10524e977..9ece10982 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -789,7 +789,7 @@ export const RulesEditorViewer = (props: Props) => { height="100%" language="yaml" value={currData} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} options={{ tabSize: 2, // 根据语言类型设置缩进大小 minimap: { diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index 41a227b4a..0b0f520d2 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -1040,7 +1040,7 @@ export function DnsViewer({ ref }: { ref?: Ref }) { height="100vh" language="yaml" value={yamlContent} - theme={themeMode === "light" ? "vs" : "vs-dark"} + theme={themeMode === "light" ? "light" : "vs-dark"} className="flex-grow" options={{ tabSize: 2, From 9c24b3089cb5866aab0ce35af1f57881a8492112 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 13 Nov 2025 09:42:03 +0800 Subject: [PATCH 2/6] fix(editor): update editorRef initialization and handleChange logic for better type safety #5442 --- src/components/profile/editor-viewer.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/profile/editor-viewer.tsx b/src/components/profile/editor-viewer.tsx index 186815ed1..64f2e1675 100644 --- a/src/components/profile/editor-viewer.tsx +++ b/src/components/profile/editor-viewer.tsx @@ -103,7 +103,7 @@ export const EditorViewer = (props: Props) => { [initialData], ); - const editorRef = useRef(null); + const editorRef = useRef(undefined); const prevData = useRef(""); const currData = useRef(""); @@ -126,8 +126,9 @@ export const EditorViewer = (props: Props) => { }); }; - const handleChange = useLockFn(async (value: string | undefined) => { + const handleChange = useLockFn(async (_value?: string) => { try { + const value = editorRef.current?.getValue(); currData.current = value; onChange?.(prevData.current, currData.current); } catch (err) { @@ -138,6 +139,7 @@ export const EditorViewer = (props: Props) => { const handleSave = useLockFn(async () => { try { if (!readOnly) { + currData.current = editorRef.current?.getValue(); onSave?.(prevData.current, currData.current); } onClose(); @@ -175,12 +177,12 @@ export const EditorViewer = (props: Props) => { return () => { unlistenResized.then((fn) => fn()); editorRef.current?.dispose(); - editorRef.current = null; + editorRef.current = undefined; }; }, [editorResize]); return ( - + {resolvedTitle} Date: Thu, 13 Nov 2025 10:20:51 +0800 Subject: [PATCH 3/6] chore(deps): update npm dependencies (#5441) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 8 +- pnpm-lock.yaml | 336 ++++++++++++++++++++++++------------------------- 2 files changed, 172 insertions(+), 172 deletions(-) diff --git a/package.json b/package.json index 13523de0b..bef54bc9d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "dayjs": "1.11.19", "foxact": "^0.2.49", "i18next": "^25.6.2", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "json-schema": "^0.4.0", "lodash-es": "^4.17.21", "monaco-editor": "^0.54.0", @@ -71,7 +71,7 @@ "react-dom": "19.2.0", "react-error-boundary": "6.0.0", "react-hook-form": "^7.66.0", - "react-i18next": "16.3.0", + "react-i18next": "16.3.1", "react-markdown": "10.1.0", "react-router": "^7.9.5", "react-virtuoso": "^4.14.1", @@ -81,13 +81,13 @@ }, "devDependencies": { "@actions/github": "^6.0.1", - "@eslint-react/eslint-plugin": "^2.3.4", + "@eslint-react/eslint-plugin": "^2.3.5", "@eslint/js": "^9.39.1", "@tauri-apps/cli": "2.9.4", "@types/js-yaml": "^4.0.9", "@types/lodash-es": "^4.17.12", "@types/node": "^24.10.1", - "@types/react": "19.2.3", + "@types/react": "19.2.4", "@types/react-dom": "19.2.3", "@vitejs/plugin-legacy": "^7.2.1", "@vitejs/plugin-react-swc": "^4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2bb098a6..517d6ebfe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,10 +19,10 @@ importers: version: 3.2.2(react@19.2.0) '@emotion/react': specifier: ^11.14.0 - version: 11.14.0(@types/react@19.2.3)(react@19.2.0) + version: 11.14.0(@types/react@19.2.4)(react@19.2.0) '@emotion/styled': specifier: ^11.14.1 - version: 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) + version: 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) '@juggle/resize-observer': specifier: ^3.4.0 version: 3.4.0 @@ -31,16 +31,16 @@ importers: version: 4.7.0(monaco-editor@0.54.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@mui/icons-material': specifier: ^7.3.5 - version: 7.3.5(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) + version: 7.3.5(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) '@mui/lab': specifier: 7.0.0-beta.17 - version: 7.0.0-beta.17(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + version: 7.0.0-beta.17(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@mui/material': specifier: ^7.3.5 - version: 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + version: 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@mui/x-data-grid': specifier: ^8.17.0 - version: 8.17.0(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + version: 8.17.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tauri-apps/api': specifier: 2.9.0 version: 2.9.0 @@ -84,8 +84,8 @@ importers: specifier: ^25.6.2 version: 25.6.2(typescript@5.9.3) js-yaml: - specifier: ^4.1.0 - version: 4.1.0 + specifier: ^4.1.1 + version: 4.1.1 json-schema: specifier: ^0.4.0 version: 0.4.0 @@ -114,11 +114,11 @@ importers: specifier: ^7.66.0 version: 7.66.0(react@19.2.0) react-i18next: - specifier: 16.3.0 - version: 16.3.0(i18next@25.6.2(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(typescript@5.9.3) + specifier: 16.3.1 + version: 16.3.1(i18next@25.6.2(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(typescript@5.9.3) react-markdown: specifier: 10.1.0 - version: 10.1.0(@types/react@19.2.3)(react@19.2.0) + version: 10.1.0(@types/react@19.2.4)(react@19.2.0) react-router: specifier: ^7.9.5 version: 7.9.5(react-dom@19.2.0(react@19.2.0))(react@19.2.0) @@ -139,8 +139,8 @@ importers: specifier: ^6.0.1 version: 6.0.1 '@eslint-react/eslint-plugin': - specifier: ^2.3.4 - version: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + specifier: ^2.3.5 + version: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@eslint/js': specifier: ^9.39.1 version: 9.39.1 @@ -157,11 +157,11 @@ importers: specifier: ^24.10.1 version: 24.10.1 '@types/react': - specifier: 19.2.3 - version: 19.2.3 + specifier: 19.2.4 + version: 19.2.4 '@types/react-dom': specifier: 19.2.3 - version: 19.2.3(@types/react@19.2.3) + version: 19.2.3(@types/react@19.2.4) '@vitejs/plugin-legacy': specifier: ^7.2.1 version: 7.2.1(terser@5.44.1)(vite@7.2.2(@types/node@24.10.1)(jiti@2.6.1)(sass@1.94.0)(terser@5.44.1)(yaml@2.8.1)) @@ -1010,31 +1010,31 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-react/ast@2.3.4': - resolution: {integrity: sha512-wueu2vBRwKqnrgOuz1JmEefhn5dgfa1NgvFtDMfefePfICTYFtwkTuOJNGJI77TUnqV9inp9ZNDB1nyAMmlZMg==} + '@eslint-react/ast@2.3.5': + resolution: {integrity: sha512-gTnLEdQ82Kcy2Yn8fLe6ks/yQx1kI3OYuWgYNb4D1XSAOYvL1Cj+UIx2/+ew9vMBLMO3NJr90EMPUr0yVOhC7w==} engines: {node: '>=20.19.0'} - '@eslint-react/core@2.3.4': - resolution: {integrity: sha512-1ve3pSjAhd4PKcTpZd0bQwkAgWOAJjfgAixTfOvJ7QhWi3gPKq0Wn0vi78XcFO8K0IL3EcOfX2g2JhZJzSRnWQ==} + '@eslint-react/core@2.3.5': + resolution: {integrity: sha512-6+/3bMmkxIk4vlMwfxw4lU6y7/Z1cjGURPsooAULitbBS4+s0M0N1UjWaPpDwT4FR0SVVqjOp1yUcI66uQvQKg==} engines: {node: '>=20.19.0'} - '@eslint-react/eff@2.3.4': - resolution: {integrity: sha512-/SXI23DpQCutSXPdAPdSvErfsBFYwaqbgQy5dLmnde4wHivk/eD9O/rA/Xu1c4j9tLJG/sZBQ9DzN/UXHizjag==} + '@eslint-react/eff@2.3.5': + resolution: {integrity: sha512-F2bj6v7Q1hgLn+N28pkJyYvBiTaUFh0qOEz3IXUupkqqnu9zGxmh3P7c0l//8AlR2CvRTCmSVBBhem4BhoSczw==} engines: {node: '>=20.19.0'} - '@eslint-react/eslint-plugin@2.3.4': - resolution: {integrity: sha512-fcLZNQRbzjBK510a2oqLcsvdCSMK169x3CGfi1E3JvdMPyLICM+KZ8wNnhULZPey7BnEFVWC7dQfz5Dct60C7g==} + '@eslint-react/eslint-plugin@2.3.5': + resolution: {integrity: sha512-5VTcKcbyDNGrpXj3y5wfYKogA8g1aVPcyupSL9/URyxLhnv14tfSNAJ64qTh0NBunETU69n7T81e4ZYJS2ctGw==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 - '@eslint-react/shared@2.3.4': - resolution: {integrity: sha512-FN3X4jA0kksFO9cjXwRaFHA6wbc7AgHjYkczdfwm0dOr/uUVv3Sc/F3kUNJ6KFOSoDCfNGybRCICu9DZbanhWA==} + '@eslint-react/shared@2.3.5': + resolution: {integrity: sha512-k65W/X2MeiDX21HPwtcPaFHciYVRYrzE+EZ2ok2BVQWcl24GQUEckAfdMzKQ6cS19OgjQm9k0juHjpUcyHj29g==} engines: {node: '>=20.19.0'} - '@eslint-react/var@2.3.4': - resolution: {integrity: sha512-hT2TvusBcEfFLFGfwZRstkQv9lp+079DEba5F6Dr53g3f+gBvLNDcayb5zDgwNP5+hQRd8lY8goEOfA8PWyaJQ==} + '@eslint-react/var@2.3.5': + resolution: {integrity: sha512-BDq9o4kUu4h0Lvv29AY+N9LFh69tgICRNDmr5GnRmRFaYZ6/fq+UbO18K47ccb2tj2TI8V6VJFpkPx1fK7lYeQ==} engines: {node: '>=20.19.0'} '@eslint/config-array@0.21.1': @@ -1850,8 +1850,8 @@ packages: peerDependencies: '@types/react': '*' - '@types/react@19.2.3': - resolution: {integrity: sha512-k5dJVszUiNr1DSe8Cs+knKR6IrqhqdhpUwzqhkS8ecQTSf3THNtbfIp/umqHMpX2bv+9dkx3fwDv/86LcSfvSg==} + '@types/react@19.2.4': + resolution: {integrity: sha512-tBFxBp9Nfyy5rsmefN+WXc1JeW/j2BpBHFdLZbEVfs9wn3E3NRFxwV0pJg8M1qQAexFpvz73hJXFofV0ZAu92A==} '@types/unist@2.0.11': resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} @@ -2613,18 +2613,18 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-react-dom@2.3.4: - resolution: {integrity: sha512-xAetOWwrfYnqU0Vd6LjEQi1paAwU7Tgoa+jHUb7QCKxdILDV618yPrMigWpY+438cg6oXTYE/awFI/Rv+dOFCw==} + eslint-plugin-react-dom@2.3.5: + resolution: {integrity: sha512-SsIF5HbsXLJcbEoFbzgabqA7DOnfGd0BhD7QzZd5tqgz4gL2j2mUGCBbQjQIE0BMbKtOihbhuceQfQ/QxoJJIg==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 - eslint-plugin-react-hooks-extra@2.3.4: - resolution: {integrity: sha512-widwgbMP3cC3sjmHidryg2McYqnzoIWcpsQ4JYnaXmRMMTem+Sp7a3+fkWvAUfWQBQIbigPT9O2+VhlvC+xlPg==} + eslint-plugin-react-hooks-extra@2.3.5: + resolution: {integrity: sha512-IxPs6O/XCpm8FAv38TyJKcHkeS/qNb97PdbH1OqHbf4BAT/QTInWweNEpePiyydQ0YuLvHqTo1dreY8Jj6Re3A==} engines: {node: '>=20.0.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 eslint-plugin-react-hooks@7.0.1: @@ -2633,11 +2633,11 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-naming-convention@2.3.4: - resolution: {integrity: sha512-KP6d3WxiLmTnm245VK1lLI4Pzu/tkJLNOsmAetDm0kPfamD71msZMerp4VYFsFtqk0km9rbRKE7Cdd27tL43Ow==} + eslint-plugin-react-naming-convention@2.3.5: + resolution: {integrity: sha512-sjKvdJq90HWNYRBtwia7C/N8NXdg+k8O7ikQqf6QsOuTUHGLgFWGtxx1AktfizlSusCdb96w5LJ4MSi+KsuVZg==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 eslint-plugin-react-refresh@0.4.24: @@ -2645,18 +2645,18 @@ packages: peerDependencies: eslint: '>=8.40' - eslint-plugin-react-web-api@2.3.4: - resolution: {integrity: sha512-NQMVDVIOiU+vJ98hkrIZeNdIwmO54UOjB8EfiHkgDWk69QBJrBtrn5AguFBuUlBUdZR/9vp4yKdQFtzBbRcDTw==} + eslint-plugin-react-web-api@2.3.5: + resolution: {integrity: sha512-wY/hNWQxshTZ2niuu8QcARQuDg5w+cEA2OYtnrnPDjhy0qxikAaYA4NUx7HTAXoMC1Kxl78+NbQBBXnlwoMAZA==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 - eslint-plugin-react-x@2.3.4: - resolution: {integrity: sha512-6rW/CALxGCO9M2wuIUMNKuepSf5uW+Sg+AaQtLpsfs+B6fmDVHFrxIgg9wYk2aRrI6MMQcjDUMEYPUX9eOg2wQ==} + eslint-plugin-react-x@2.3.5: + resolution: {integrity: sha512-Yj+6e2ds6Gg3KRPgNdifincu3cuxDYPcboCXc5EGHC//6JZXRgtqQ3N5uP9RVHnCHmKF2EiZ76XyPDnp4hMgEg==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^9.38.0 + eslint: ^9.39.1 typescript: ^5.9.3 eslint-plugin-unused-imports@4.3.0: @@ -3151,8 +3151,8 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + js-yaml@4.1.1: + resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true jsesc@3.0.2: @@ -3634,8 +3634,8 @@ packages: peerDependencies: react: ^16.8.0 || ^17 || ^18 || ^19 - react-i18next@16.3.0: - resolution: {integrity: sha512-XGYIVU6gCOL4UQsfp87WbbvBc2WvgdkEDI8r4TwACzFg1bXY8pd1d9Cw6u9WJ2soTKHKaF1xQEyWA3/dUvtAGw==} + react-i18next@16.3.1: + resolution: {integrity: sha512-HbYaBeA58Hg38OzdEvJp4kLIvk10rp9F9Jq+wNkqtqxDXObtdYMSsQnegWgdUVcpZjZuK9ZxehM+Z9BW2Vqgqw==} peerDependencies: i18next: '>= 25.6.2' react: '>= 16.8.0' @@ -5077,7 +5077,7 @@ snapshots: '@emotion/memoize@0.9.0': {} - '@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0)': + '@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@emotion/babel-plugin': 11.13.5 @@ -5089,7 +5089,7 @@ snapshots: hoist-non-react-statics: 3.3.2 react: 19.2.0 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 transitivePeerDependencies: - supports-color @@ -5103,18 +5103,18 @@ snapshots: '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0)': + '@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@emotion/babel-plugin': 11.13.5 '@emotion/is-prop-valid': 1.3.1 - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) '@emotion/serialize': 1.3.3 '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.0) '@emotion/utils': 1.4.2 react: 19.2.0 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 transitivePeerDependencies: - supports-color @@ -5212,9 +5212,9 @@ snapshots: '@eslint-community/regexpp@4.12.1': {} - '@eslint-react/ast@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@eslint-react/ast@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-react/eff': 2.3.4 + '@eslint-react/eff': 2.3.5 '@typescript-eslint/types': 8.46.4 '@typescript-eslint/typescript-estree': 8.46.4(typescript@5.9.3) '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -5224,12 +5224,12 @@ snapshots: - supports-color - typescript - '@eslint-react/core@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@eslint-react/core@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/types': 8.46.4 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -5240,30 +5240,30 @@ snapshots: - supports-color - typescript - '@eslint-react/eff@2.3.4': {} + '@eslint-react/eff@2.3.5': {} - '@eslint-react/eslint-plugin@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@eslint-react/eslint-plugin@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/type-utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/types': 8.46.4 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.1(jiti@2.6.1) - eslint-plugin-react-dom: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-react-hooks-extra: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-react-naming-convention: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-react-web-api: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - eslint-plugin-react-x: 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-react-dom: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-react-hooks-extra: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-react-naming-convention: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-react-web-api: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-react-x: 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) ts-api-utils: 2.1.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@eslint-react/shared@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@eslint-react/shared@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-react/eff': 2.3.4 + '@eslint-react/eff': 2.3.5 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) ts-pattern: 5.9.0 zod: 4.1.12 @@ -5272,10 +5272,10 @@ snapshots: - supports-color - typescript - '@eslint-react/var@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': + '@eslint-react/var@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/types': 8.46.4 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -5309,7 +5309,7 @@ snapshots: globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.1 - js-yaml: 4.1.0 + js-yaml: 4.1.1 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -5397,39 +5397,39 @@ snapshots: '@mui/core-downloads-tracker@7.3.5': {} - '@mui/icons-material@7.3.5(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.3)(react@19.2.0)': + '@mui/icons-material@7.3.5(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) react: 19.2.0 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@mui/lab@7.0.0-beta.17(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/lab@7.0.0-beta.17(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@mui/types': 7.4.8(@types/react@19.2.3) - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) + '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@mui/types': 7.4.8(@types/react@19.2.4) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) clsx: 2.1.1 prop-types: 15.8.1 react: 19.2.0 react-dom: 19.2.0(react@19.2.0) optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@types/react': 19.2.3 + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@types/react': 19.2.4 - '@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@mui/core-downloads-tracker': 7.3.5 - '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@mui/types': 7.4.8(@types/react@19.2.3) - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) + '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@mui/types': 7.4.8(@types/react@19.2.4) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) '@popperjs/core': 2.11.8 - '@types/react-transition-group': 4.4.12(@types/react@19.2.3) + '@types/react-transition-group': 4.4.12(@types/react@19.2.4) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 @@ -5438,20 +5438,20 @@ snapshots: react-is: 19.2.0 react-transition-group: 4.4.5(react-dom@19.2.0(react@19.2.0))(react@19.2.0) optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@types/react': 19.2.3 + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@types/react': 19.2.4 - '@mui/private-theming@7.3.5(@types/react@19.2.3)(react@19.2.0)': + '@mui/private-theming@7.3.5(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) prop-types: 15.8.1 react: 19.2.0 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@mui/styled-engine@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(react@19.2.0)': + '@mui/styled-engine@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@emotion/cache': 11.14.0 @@ -5461,77 +5461,77 @@ snapshots: prop-types: 15.8.1 react: 19.2.0 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) - '@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0)': + '@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/private-theming': 7.3.5(@types/react@19.2.3)(react@19.2.0) - '@mui/styled-engine': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(react@19.2.0) - '@mui/types': 7.4.8(@types/react@19.2.3) - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) + '@mui/private-theming': 7.3.5(@types/react@19.2.4)(react@19.2.0) + '@mui/styled-engine': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(react@19.2.0) + '@mui/types': 7.4.8(@types/react@19.2.4) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 react: 19.2.0 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@types/react': 19.2.3 + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@types/react': 19.2.4 - '@mui/types@7.4.8(@types/react@19.2.3)': + '@mui/types@7.4.8(@types/react@19.2.4)': dependencies: '@babel/runtime': 7.28.4 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@mui/utils@7.3.5(@types/react@19.2.3)(react@19.2.0)': + '@mui/utils@7.3.5(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/types': 7.4.8(@types/react@19.2.3) + '@mui/types': 7.4.8(@types/react@19.2.4) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 react: 19.2.0 react-is: 19.2.0 optionalDependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@mui/x-data-grid@8.17.0(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/x-data-grid@8.17.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) - '@mui/x-internals': 8.17.0(@types/react@19.2.3)(react@19.2.0) - '@mui/x-virtualizer': 0.2.7(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) + '@mui/x-internals': 8.17.0(@types/react@19.2.4)(react@19.2.0) + '@mui/x-virtualizer': 0.2.7(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) clsx: 2.1.1 prop-types: 15.8.1 react: 19.2.0 react-dom: 19.2.0(react@19.2.0) use-sync-external-store: 1.6.0(react@19.2.0) optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.3)(react@19.2.0) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.3)(react@19.2.0))(@types/react@19.2.3)(react@19.2.0) + '@emotion/react': 11.14.0(@types/react@19.2.4)(react@19.2.0) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) transitivePeerDependencies: - '@types/react' - '@mui/x-internals@8.17.0(@types/react@19.2.3)(react@19.2.0)': + '@mui/x-internals@8.17.0(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) react: 19.2.0 reselect: 5.1.1 use-sync-external-store: 1.6.0(react@19.2.0) transitivePeerDependencies: - '@types/react' - '@mui/x-virtualizer@0.2.7(@types/react@19.2.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/x-virtualizer@0.2.7(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 - '@mui/utils': 7.3.5(@types/react@19.2.3)(react@19.2.0) - '@mui/x-internals': 8.17.0(@types/react@19.2.3)(react@19.2.0) + '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) + '@mui/x-internals': 8.17.0(@types/react@19.2.4)(react@19.2.0) react: 19.2.0 react-dom: 19.2.0(react@19.2.0) transitivePeerDependencies: @@ -6007,15 +6007,15 @@ snapshots: '@types/prop-types@15.7.15': {} - '@types/react-dom@19.2.3(@types/react@19.2.3)': + '@types/react-dom@19.2.3(@types/react@19.2.4)': dependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@types/react-transition-group@4.4.12(@types/react@19.2.3)': + '@types/react-transition-group@4.4.12(@types/react@19.2.4)': dependencies: - '@types/react': 19.2.3 + '@types/react': 19.2.4 - '@types/react@19.2.3': + '@types/react@19.2.4': dependencies: csstype: 3.1.3 @@ -6546,7 +6546,7 @@ snapshots: cosmiconfig@8.3.6(typescript@5.9.3): dependencies: import-fresh: 3.3.1 - js-yaml: 4.1.0 + js-yaml: 4.1.1 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: @@ -6927,13 +6927,13 @@ snapshots: optionalDependencies: eslint-config-prettier: 10.1.8(eslint@9.39.1(jiti@2.6.1)) - eslint-plugin-react-dom@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-react-dom@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/core': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/core': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/types': 8.46.4 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -6945,13 +6945,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks-extra@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-react-hooks-extra@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/core': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/core': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/type-utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/types': 8.46.4 @@ -6974,13 +6974,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-naming-convention@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-react-naming-convention@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/core': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/core': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/type-utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/types': 8.46.4 @@ -6996,13 +6996,13 @@ snapshots: dependencies: eslint: 9.39.1(jiti@2.6.1) - eslint-plugin-react-web-api@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-react-web-api@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/core': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/core': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/types': 8.46.4 '@typescript-eslint/utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -7013,13 +7013,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-x@2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-react-x@2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@eslint-react/ast': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/core': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/eff': 2.3.4 - '@eslint-react/shared': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - '@eslint-react/var': 2.3.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/ast': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/core': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/eff': 2.3.5 + '@eslint-react/shared': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + '@eslint-react/var': 2.3.5(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/type-utils': 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/types': 8.46.4 @@ -7586,7 +7586,7 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@4.1.0: + js-yaml@4.1.1: dependencies: argparse: 2.0.1 @@ -8200,7 +8200,7 @@ snapshots: dependencies: react: 19.2.0 - react-i18next@16.3.0(i18next@25.6.2(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(typescript@5.9.3): + react-i18next@16.3.1(i18next@25.6.2(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(typescript@5.9.3): dependencies: '@babel/runtime': 7.28.4 html-parse-stringify: 3.0.1 @@ -8215,11 +8215,11 @@ snapshots: react-is@19.2.0: {} - react-markdown@10.1.0(@types/react@19.2.3)(react@19.2.0): + react-markdown@10.1.0(@types/react@19.2.4)(react@19.2.0): dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - '@types/react': 19.2.3 + '@types/react': 19.2.4 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.6 html-url-attributes: 3.0.1 From 1125dc0562da947fcd7c1db83cc305479498256e Mon Sep 17 00:00:00 2001 From: oomeow Date: Thu, 13 Nov 2025 19:50:23 +0800 Subject: [PATCH 4/6] feat: support closed connections (#5244) * feat: support closed connections * fix: clear closed connections * feat: show footer * feat: show closed connection detail * docs: update Changelog.md * chore: update --- Changelog.md | 1 + .../connection/connection-detail.tsx | 41 +++-- src/components/connection/connection-item.tsx | 23 +-- .../connection/connection-table.tsx | 1 - .../home/enhanced-traffic-stats.tsx | 2 +- src/hooks/use-connection-data.ts | 63 +++++-- src/locales/ar/connections.json | 2 + src/locales/de/connections.json | 2 + src/locales/en/connections.json | 2 + src/locales/es/connections.json | 2 + src/locales/fa/connections.json | 2 + src/locales/id/connections.json | 2 + src/locales/jp/connections.json | 2 + src/locales/ko/connections.json | 2 + src/locales/ru/connections.json | 2 + src/locales/tr/connections.json | 2 + src/locales/tt/connections.json | 2 + src/locales/zh/connections.json | 2 + src/locales/zhtw/connections.json | 2 + src/pages/connections.tsx | 154 +++++++++--------- src/types/generated/i18n-keys.ts | 2 + src/types/generated/i18n-resources.ts | 2 + 22 files changed, 195 insertions(+), 120 deletions(-) diff --git a/Changelog.md b/Changelog.md index 91ec1ed5e..082960a0b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ - **Mihomo(Meta) 内核升级至 v1.19.16** - 支持连接页面各个项目的排序 - 实现可选的自动备份 +- 连接页面支持查看已关闭的连接(最近最多 500 个已关闭连接) diff --git a/src/components/connection/connection-detail.tsx b/src/components/connection/connection-detail.tsx index 7e5bc8737..766f400be 100644 --- a/src/components/connection/connection-detail.tsx +++ b/src/components/connection/connection-detail.tsx @@ -8,19 +8,21 @@ import { closeConnections } from "tauri-plugin-mihomo-api"; import parseTraffic from "@/utils/parse-traffic"; export interface ConnectionDetailRef { - open: (detail: IConnectionsItem) => void; + open: (detail: IConnectionsItem, closed: boolean) => void; } export function ConnectionDetail({ ref }: { ref?: Ref }) { const [open, setOpen] = useState(false); const [detail, setDetail] = useState(null!); + const [closed, setClosed] = useState(false); const theme = useTheme(); useImperativeHandle(ref, () => ({ - open: (detail: IConnectionsItem) => { + open: (detail: IConnectionsItem, closed: boolean) => { if (open) return; setOpen(true); setDetail(detail); + setClosed(closed); }, })); @@ -42,7 +44,11 @@ export function ConnectionDetail({ ref }: { ref?: Ref }) { }} message={ detail ? ( - + ) : null } /> @@ -51,10 +57,11 @@ export function ConnectionDetail({ ref }: { ref?: Ref }) { interface InnerProps { data: IConnectionsItem; + closed: boolean; onClose?: () => void; } -const InnerConnectionDetail = ({ data, onClose }: InnerProps) => { +const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => { const { t } = useTranslation(); const { metadata, rulePayload } = data; const theme = useTheme(); @@ -134,18 +141,20 @@ const InnerConnectionDetail = ({ data, onClose }: InnerProps) => { ))} - - - + {!closed && ( + + + + )} ); }; diff --git a/src/components/connection/connection-item.tsx b/src/components/connection/connection-item.tsx index d978733da..7288fc257 100644 --- a/src/components/connection/connection-item.tsx +++ b/src/components/connection/connection-item.tsx @@ -27,11 +27,12 @@ const Tag = styled("span")(({ theme }) => ({ interface Props { value: IConnectionsItem; + closed: boolean; onShowDetail?: () => void; } export const ConnectionItem = (props: Props) => { - const { value, onShowDetail } = props; + const { value, closed, onShowDetail } = props; const { id, metadata, chains, start, curUpload, curDownload } = value; const { t } = useTranslation(); @@ -44,15 +45,17 @@ export const ConnectionItem = (props: Props) => { dense sx={{ borderBottom: "1px solid var(--divider-color)" }} secondaryAction={ - - - + !closed && ( + + + + ) } > { > onShowDetail(e.row.connectionData)} diff --git a/src/components/home/enhanced-traffic-stats.tsx b/src/components/home/enhanced-traffic-stats.tsx index 589c287cc..a725b542a 100644 --- a/src/components/home/enhanced-traffic-stats.tsx +++ b/src/components/home/enhanced-traffic-stats.tsx @@ -187,7 +187,7 @@ export const EnhancedTrafficStats = () => { uploadTotalUnit, downloadTotal, downloadTotalUnit, - connectionsCount: connections?.connections.length, + connectionsCount: connections?.activeConnections.length, }; }, [traffic, memory, connections]); diff --git a/src/hooks/use-connection-data.ts b/src/hooks/use-connection-data.ts index f599882b5..a4a103a00 100644 --- a/src/hooks/use-connection-data.ts +++ b/src/hooks/use-connection-data.ts @@ -4,12 +4,22 @@ import { mutate } from "swr"; import useSWRSubscription from "swr/subscription"; import { MihomoWebSocket } from "tauri-plugin-mihomo-api"; -export const initConnData: IConnections = { +export const initConnData: ConnectionMonitorData = { uploadTotal: 0, downloadTotal: 0, - connections: [], + activeConnections: [], + closedConnections: [], }; +export interface ConnectionMonitorData { + uploadTotal: number; + downloadTotal: number; + activeConnections: IConnectionsItem[]; + closedConnections: IConnectionsItem[]; +} + +const MAX_CLOSED_CONNS_NUM = 500; + export const useConnectionData = () => { const [date, setDate] = useLocalStorage("mihomo_connection_date", Date.now()); const subscriptKey = `getClashConnection-${date}`; @@ -18,7 +28,11 @@ export const useConnectionData = () => { const wsFirstConnection = useRef(true); const timeoutRef = useRef>(null); - const response = useSWRSubscription( + const response = useSWRSubscription< + ConnectionMonitorData, + any, + string | null + >( subscriptKey, (_key, { next }) => { const reconnect = async () => { @@ -41,28 +55,44 @@ export const useConnectionData = () => { } else { const data = JSON.parse(msg.data) as IConnections; next(null, (old = initConnData) => { - const oldConn = old.connections; + const oldConn = old.activeConnections; const maxLen = data.connections?.length; - const connections: IConnectionsItem[] = []; + const activeConns: IConnectionsItem[] = []; const rest = (data.connections || []).filter((each) => { const index = oldConn.findIndex((o) => o.id === each.id); if (index >= 0 && index < maxLen) { const old = oldConn[index]; each.curUpload = each.upload - old.upload; each.curDownload = each.download - old.download; - connections[index] = each; + activeConns[index] = each; return false; } return true; }); for (let i = 0; i < maxLen; ++i) { - if (!connections[i] && rest.length > 0) { - connections[i] = rest.shift()!; - connections[i].curUpload = 0; - connections[i].curDownload = 0; + if (!activeConns[i] && rest.length > 0) { + activeConns[i] = rest.shift()!; + activeConns[i].curUpload = 0; + activeConns[i].curDownload = 0; } } - return { ...data, connections }; + const currentClosedConns = oldConn.filter((each) => { + const index = activeConns.findIndex( + (o) => o.id === each.id, + ); + return index < 0; + }); + let closedConns = + old.closedConnections.concat(currentClosedConns); + if (closedConns.length > 500) { + closedConns = closedConns.slice(-MAX_CLOSED_CONNS_NUM); + } + return { + uploadTotal: data.uploadTotal, + downloadTotal: data.downloadTotal, + activeConnections: activeConns, + closedConnections: closedConns, + }; }); } } @@ -109,5 +139,14 @@ export const useConnectionData = () => { setDate(Date.now()); }; - return { response, refreshGetClashConnection }; + const clearClosedConnections = () => { + mutate(`$sub$${subscriptKey}`, { + uploadTotal: response.data?.uploadTotal ?? 0, + downloadTotal: response.data?.downloadTotal ?? 0, + activeConnections: response.data?.activeConnections ?? [], + closedConnections: [], + }); + }; + + return { response, refreshGetClashConnection, clearClosedConnections }; }; diff --git a/src/locales/ar/connections.json b/src/locales/ar/connections.json index be0db7d6e..c5bcd0057 100644 --- a/src/locales/ar/connections.json +++ b/src/locales/ar/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "سرعة التنزيل" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "إغلاق الاتصال" }, "columnManager": { diff --git a/src/locales/de/connections.json b/src/locales/de/connections.json index 65d032fcf..57f8bc1bb 100644 --- a/src/locales/de/connections.json +++ b/src/locales/de/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Download-Geschwindigkeit" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Verbindung schließen" }, "columnManager": { diff --git a/src/locales/en/connections.json b/src/locales/en/connections.json index 713a8d114..82b3cebac 100644 --- a/src/locales/en/connections.json +++ b/src/locales/en/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Download Speed" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Close Connection" }, "columnManager": { diff --git a/src/locales/es/connections.json b/src/locales/es/connections.json index d398d03fe..1b49bc17c 100644 --- a/src/locales/es/connections.json +++ b/src/locales/es/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Velocidad de descarga" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Cerrar conexión" }, "columnManager": { diff --git a/src/locales/fa/connections.json b/src/locales/fa/connections.json index 3f7d62f18..a8c8687e7 100644 --- a/src/locales/fa/connections.json +++ b/src/locales/fa/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "سرعت دانلود" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "بستن اتصال" }, "columnManager": { diff --git a/src/locales/id/connections.json b/src/locales/id/connections.json index 6b515227a..29748ccf9 100644 --- a/src/locales/id/connections.json +++ b/src/locales/id/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Kecepatan Unduh" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Tutup Koneksi" }, "columnManager": { diff --git a/src/locales/jp/connections.json b/src/locales/jp/connections.json index 6cde1afbd..25fb84e8a 100644 --- a/src/locales/jp/connections.json +++ b/src/locales/jp/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "ダウンロード速度" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "接続を閉じる" }, "columnManager": { diff --git a/src/locales/ko/connections.json b/src/locales/ko/connections.json index 036fa5853..88173f6ac 100644 --- a/src/locales/ko/connections.json +++ b/src/locales/ko/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "다운로드 속도" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "연결 닫기" }, "columnManager": { diff --git a/src/locales/ru/connections.json b/src/locales/ru/connections.json index 24c706fbe..6aadd293d 100644 --- a/src/locales/ru/connections.json +++ b/src/locales/ru/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Скорость скачивания" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Закрыть соединение" }, "columnManager": { diff --git a/src/locales/tr/connections.json b/src/locales/tr/connections.json index 040cae012..9bcd349de 100644 --- a/src/locales/tr/connections.json +++ b/src/locales/tr/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "İndirme Hızı" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Bağlantıyı Kapat" }, "columnManager": { diff --git a/src/locales/tt/connections.json b/src/locales/tt/connections.json index 27a2476a9..48a28d4b8 100644 --- a/src/locales/tt/connections.json +++ b/src/locales/tt/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "Йөкләү тизлеге" }, "actions": { + "active": "Active", + "closed": "Closed", "closeConnection": "Тоташуны ябу" }, "columnManager": { diff --git a/src/locales/zh/connections.json b/src/locales/zh/connections.json index 2e498493f..33a447813 100644 --- a/src/locales/zh/connections.json +++ b/src/locales/zh/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "下载速度" }, "actions": { + "active": "活跃", + "closed": "已关闭", "closeConnection": "关闭连接" }, "columnManager": { diff --git a/src/locales/zhtw/connections.json b/src/locales/zhtw/connections.json index e2dca70c1..520f3a855 100644 --- a/src/locales/zhtw/connections.json +++ b/src/locales/zhtw/connections.json @@ -22,6 +22,8 @@ "downloadSpeed": "下載速度" }, "actions": { + "active": "活躍", + "closed": "已關閉", "closeConnection": "關閉連線" }, "columnManager": { diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx index 4d2dce6ae..52475813e 100644 --- a/src/pages/connections.tsx +++ b/src/pages/connections.tsx @@ -1,10 +1,17 @@ import { - PauseCircleOutlineRounded, - PlayCircleOutlineRounded, + DeleteForeverRounded, TableChartRounded, TableRowsRounded, } from "@mui/icons-material"; -import { Box, Button, IconButton, MenuItem } from "@mui/material"; +import { + Box, + Button, + ButtonGroup, + Fab, + IconButton, + MenuItem, + Zoom, +} from "@mui/material"; import { useLockFn } from "ahooks"; import { useCallback, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -21,16 +28,9 @@ import { import { ConnectionItem } from "@/components/connection/connection-item"; import { ConnectionTable } from "@/components/connection/connection-table"; import { useConnectionData } from "@/hooks/use-connection-data"; -import { useVisibility } from "@/hooks/use-visibility"; import { useConnectionSetting } from "@/services/states"; import parseTraffic from "@/utils/parse-traffic"; -const initConn: IConnections = { - uploadTotal: 0, - downloadTotal: 0, - connections: [], -}; - type OrderFunc = (list: IConnectionsItem[]) => IConnectionsItem[]; const ORDER_OPTIONS = [ @@ -70,61 +70,42 @@ const orderFunctionMap = ORDER_OPTIONS.reduce>( const ConnectionsPage = () => { const { t } = useTranslation(); - const pageVisible = useVisibility(); const [match, setMatch] = useState<(input: string) => boolean>( () => () => true, ); const [curOrderOpt, setCurOrderOpt] = useState("default"); + const [connectionsType, setConnectionsType] = useState<"active" | "closed">( + "active", + ); const { response: { data: connections }, + clearClosedConnections, } = useConnectionData(); const [setting, setSetting] = useConnectionSetting(); const isTableLayout = setting.layout === "table"; - const [isPaused, setIsPaused] = useState(false); - const [frozenData, setFrozenData] = useState(null); const [isColumnManagerOpen, setIsColumnManagerOpen] = useState(false); - // 使用全局连接数据 - const displayData = useMemo(() => { - if (!pageVisible) return initConn; - - if (isPaused) { - return ( - frozenData ?? { - uploadTotal: connections?.uploadTotal, - downloadTotal: connections?.downloadTotal, - connections: connections?.connections, - } - ); - } - - return { - uploadTotal: connections?.uploadTotal, - downloadTotal: connections?.downloadTotal, - connections: connections?.connections, - }; - }, [isPaused, frozenData, connections, pageVisible]); - const [filterConn] = useMemo(() => { const orderFunc = orderFunctionMap[curOrderOpt]; - let conns: IConnectionsItem[] = (displayData.connections ?? []).filter( - (conn) => { - const { host, destinationIP, process } = conn.metadata; - return ( - match(host || "") || - match(destinationIP || "") || - match(process || "") - ); - }, - ); - if (orderFunc) conns = orderFunc(conns); + const conns = + (connectionsType === "active" + ? connections?.activeConnections + : connections?.closedConnections) ?? []; + let matchConns = conns.filter((conn) => { + const { host, destinationIP, process } = conn.metadata; + return ( + match(host || "") || match(destinationIP || "") || match(process || "") + ); + }); - return [conns]; - }, [displayData, match, curOrderOpt]); + if (orderFunc) matchConns = orderFunc(matchConns ?? []); + + return [matchConns]; + }, [connections, connectionsType, match, curOrderOpt]); const onCloseAll = useLockFn(closeAllConnections); @@ -134,21 +115,6 @@ const ConnectionsPage = () => { setMatch(() => match); }, []); - const handlePauseToggle = useCallback(() => { - setIsPaused((prev) => { - if (!prev) { - setFrozenData({ - uploadTotal: connections?.uploadTotal ?? 0, - downloadTotal: connections?.downloadTotal ?? 0, - connections: connections?.connections ?? [], - }); - } else { - setFrozenData(null); - } - return !prev; - }); - }, [connections]); - const hasTableData = filterConn.length > 0; return ( @@ -170,11 +136,11 @@ const ConnectionsPage = () => { {t("shared.labels.downloaded")}:{" "} - {parseTraffic(displayData.downloadTotal)} + {parseTraffic(connections?.downloadTotal)} {t("shared.labels.uploaded")}:{" "} - {parseTraffic(displayData.uploadTotal)} + {parseTraffic(connections?.uploadTotal)} { )} - - {isPaused ? ( - - ) : ( - - )} - + + {!isTableLayout && ( { ) : isTableLayout ? ( detailRef.current?.open(detail)} + onShowDetail={(detail) => + detailRef.current?.open(detail, connectionsType === "closed") + } columnManagerOpen={isTableLayout && isColumnManagerOpen} onOpenColumnManager={() => setIsColumnManagerOpen(true)} onCloseColumnManager={() => setIsColumnManagerOpen(false)} @@ -276,12 +248,34 @@ const ConnectionsPage = () => { itemContent={(_, item) => ( detailRef.current?.open(item)} + closed={connectionsType === "closed"} + onShowDetail={() => + detailRef.current?.open(item, connectionsType === "closed") + } /> )} /> )} + 0} + unmountOnExit + > + clearClosedConnections()} + > + + {t("shared.actions.clear")} + + ); }; diff --git a/src/types/generated/i18n-keys.ts b/src/types/generated/i18n-keys.ts index 99abd3fe6..ed28c0e8a 100644 --- a/src/types/generated/i18n-keys.ts +++ b/src/types/generated/i18n-keys.ts @@ -17,6 +17,8 @@ export const translationKeys = [ "connections.components.order.default", "connections.components.order.uploadSpeed", "connections.components.order.downloadSpeed", + "connections.components.actions.active", + "connections.components.actions.closed", "connections.components.actions.closeConnection", "connections.components.columnManager.title", "connections.components.columnManager.dragHandle", diff --git a/src/types/generated/i18n-resources.ts b/src/types/generated/i18n-resources.ts index 3c23476eb..e64659cea 100644 --- a/src/types/generated/i18n-resources.ts +++ b/src/types/generated/i18n-resources.ts @@ -6,7 +6,9 @@ export interface TranslationResources { connections: { components: { actions: { + active: string; closeConnection: string; + closed: string; }; columnManager: { dragHandle: string; From 0e2e919a5879bb60de8cab021b46acb651187365 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 19:53:41 +0800 Subject: [PATCH 5/6] chore(deps): update dependency @mui/x-data-grid to ^8.18.0 (#5452) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index bef54bc9d..fb97a286d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@mui/icons-material": "^7.3.5", "@mui/lab": "7.0.0-beta.17", "@mui/material": "^7.3.5", - "@mui/x-data-grid": "^8.17.0", + "@mui/x-data-grid": "^8.18.0", "@tauri-apps/api": "2.9.0", "@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-dialog": "^2.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 517d6ebfe..58c073041 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^7.3.5 version: 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@mui/x-data-grid': - specifier: ^8.17.0 - version: 8.17.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + specifier: ^8.18.0 + version: 8.18.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tauri-apps/api': specifier: 2.9.0 version: 2.9.0 @@ -1249,8 +1249,8 @@ packages: '@types/react': optional: true - '@mui/x-data-grid@8.17.0': - resolution: {integrity: sha512-eIzYM700Er5AKGS7T9NxQfpFNGpGP0NYpJ6RiQWSv904CkzAY0mbMZ6/XKldavbhSwzHVUfv37GK9mFeUl7I5g==} + '@mui/x-data-grid@8.18.0': + resolution: {integrity: sha512-g8y5EI3TNqrimHpH/Hv6u6i04cbvsqh39Tg4bZEhGq+SDxWp42iABlUvB7p+gtXfyd+IbmpfzUQ1hOCsHlTMZw==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.9.0 @@ -1265,14 +1265,14 @@ packages: '@emotion/styled': optional: true - '@mui/x-internals@8.17.0': - resolution: {integrity: sha512-KvmR0PPX1j2i44y0DXwzs45jIPMu/YZYXYy7xvzo+ZNdYebbW5LbVeG4zdEUnKHyOG02oHdI7MM9AxcZE16TBw==} + '@mui/x-internals@8.18.0': + resolution: {integrity: sha512-iM2SJALLo4kNqxTel8lfjIymYV9MgTa6021/rAlfdh/vwPMglaKyXQHrxkkWs2Eu/JFKkCKr5Fd34Gsdp63wIg==} engines: {node: '>=14.0.0'} peerDependencies: react: ^17.0.0 || ^18.0.0 || ^19.0.0 - '@mui/x-virtualizer@0.2.7': - resolution: {integrity: sha512-xcdo+lvlfwuLE2FVAQtOEg078liB/aiVGjEuiyPv02Vzp8Y50qNH0EtV9lk/E/d/lbkkMGnapnk+JFT5HlUB0w==} + '@mui/x-virtualizer@0.2.8': + resolution: {integrity: sha512-hCkhTg3BLLbf0SIw9Cx/NHTCUmbna+P5F2V+Bcv/9XiYhfzzmhYnm68+V6vOOhKVbV3j8JKsUEqcTC9K2Jpu8A==} engines: {node: '>=14.0.0'} peerDependencies: react: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -5498,14 +5498,14 @@ snapshots: optionalDependencies: '@types/react': 19.2.4 - '@mui/x-data-grid@8.17.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/x-data-grid@8.18.0(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@mui/material@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/system@7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@mui/material': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@mui/system': 7.3.5(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0))(@types/react@19.2.4)(react@19.2.0) '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) - '@mui/x-internals': 8.17.0(@types/react@19.2.4)(react@19.2.0) - '@mui/x-virtualizer': 0.2.7(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@mui/x-internals': 8.18.0(@types/react@19.2.4)(react@19.2.0) + '@mui/x-virtualizer': 0.2.8(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) clsx: 2.1.1 prop-types: 15.8.1 react: 19.2.0 @@ -5517,7 +5517,7 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@mui/x-internals@8.17.0(@types/react@19.2.4)(react@19.2.0)': + '@mui/x-internals@8.18.0(@types/react@19.2.4)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) @@ -5527,11 +5527,11 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@mui/x-virtualizer@0.2.7(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + '@mui/x-virtualizer@0.2.8(@types/react@19.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.4 '@mui/utils': 7.3.5(@types/react@19.2.4)(react@19.2.0) - '@mui/x-internals': 8.17.0(@types/react@19.2.4)(react@19.2.0) + '@mui/x-internals': 8.18.0(@types/react@19.2.4)(react@19.2.0) react: 19.2.0 react-dom: 19.2.0(react@19.2.0) transitivePeerDependencies: From 18b3db46b03385b467ed0532b83dc9591da3c404 Mon Sep 17 00:00:00 2001 From: oomeow Date: Thu, 13 Nov 2025 20:24:24 +0800 Subject: [PATCH 6/6] chore: update tauri-plugin-mihomo deps --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src-tauri/Cargo.lock | 18 ++++-------------- .../connection/connection-detail.tsx | 4 ++-- src/components/connection/connection-item.tsx | 4 ++-- src/hooks/use-proxy-selection.ts | 4 ++-- 6 files changed, 16 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index fb97a286d..db4e538b0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "react-router": "^7.9.5", "react-virtuoso": "^4.14.1", "swr": "^2.3.6", - "tauri-plugin-mihomo-api": "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo", + "tauri-plugin-mihomo-api": "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#main", "types-pac": "^1.0.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 58c073041..314a64ef5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,8 +129,8 @@ importers: specifier: ^2.3.6 version: 2.3.6(react@19.2.0) tauri-plugin-mihomo-api: - specifier: git+https://github.com/clash-verge-rev/tauri-plugin-mihomo - version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39 + specifier: git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#main + version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65 types-pac: specifier: ^1.0.3 version: 1.0.3 @@ -3978,8 +3978,8 @@ packages: resolution: {integrity: sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==} engines: {node: '>=18'} - tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39: - resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39} + tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65: + resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65} version: 0.1.0 terser@5.44.1: @@ -8629,7 +8629,7 @@ snapshots: minizlib: 3.1.0 yallist: 5.0.0 - tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/d0f00b33cea294cc693e177441fc897426ecbc39: + tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1e2ada19e20c5504a2a8cef367e87c667806dd65: dependencies: '@tauri-apps/api': 2.9.0 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ced4d66ba..bebb20d2a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3289,7 +3289,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -3395,7 +3395,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.1", "system-configuration", "tokio", "tower-service", @@ -5830,7 +5830,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.5.10", + "socket2 0.6.1", "thiserror 2.0.17", "tokio", "tracing", @@ -5867,7 +5867,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2 0.6.1", "tracing", "windows-sys 0.60.2", ] @@ -7058,16 +7058,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.1" diff --git a/src/components/connection/connection-detail.tsx b/src/components/connection/connection-detail.tsx index 766f400be..33fd23a8a 100644 --- a/src/components/connection/connection-detail.tsx +++ b/src/components/connection/connection-detail.tsx @@ -3,7 +3,7 @@ import { useLockFn } from "ahooks"; import dayjs from "dayjs"; import { useImperativeHandle, useState, type Ref } from "react"; import { useTranslation } from "react-i18next"; -import { closeConnections } from "tauri-plugin-mihomo-api"; +import { closeConnection } from "tauri-plugin-mihomo-api"; import parseTraffic from "@/utils/parse-traffic"; @@ -123,7 +123,7 @@ const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => { }, ]; - const onDelete = useLockFn(async () => closeConnections(data.id)); + const onDelete = useLockFn(async () => closeConnection(data.id)); return ( diff --git a/src/components/connection/connection-item.tsx b/src/components/connection/connection-item.tsx index 7288fc257..6512b5a5a 100644 --- a/src/components/connection/connection-item.tsx +++ b/src/components/connection/connection-item.tsx @@ -10,7 +10,7 @@ import { import { useLockFn } from "ahooks"; import dayjs from "dayjs"; import { useTranslation } from "react-i18next"; -import { closeConnections } from "tauri-plugin-mihomo-api"; +import { closeConnection } from "tauri-plugin-mihomo-api"; import parseTraffic from "@/utils/parse-traffic"; @@ -37,7 +37,7 @@ export const ConnectionItem = (props: Props) => { const { id, metadata, chains, start, curUpload, curDownload } = value; const { t } = useTranslation(); - const onDelete = useLockFn(async () => closeConnections(id)); + const onDelete = useLockFn(async () => closeConnection(id)); const showTraffic = curUpload! >= 100 || curDownload! >= 100; return ( diff --git a/src/hooks/use-proxy-selection.ts b/src/hooks/use-proxy-selection.ts index b6457ce3d..8d2a2df42 100644 --- a/src/hooks/use-proxy-selection.ts +++ b/src/hooks/use-proxy-selection.ts @@ -1,7 +1,7 @@ import { useLockFn } from "ahooks"; import { useCallback, useMemo } from "react"; import { - closeConnections, + closeConnection, getConnections, selectNodeForGroup, } from "tauri-plugin-mihomo-api"; @@ -16,7 +16,7 @@ const cleanupConnections = async (previousProxy: string) => { const { connections } = await getConnections(); const cleanupPromises = (connections ?? []) .filter((conn) => conn.chains.includes(previousProxy)) - .map((conn) => closeConnections(conn.id)); + .map((conn) => closeConnection(conn.id)); if (cleanupPromises.length > 0) { await Promise.allSettled(cleanupPromises);