Refactor imports across multiple components for consistency and clarity
- Reorganized import statements in various components to ensure consistent ordering and grouping. - Removed unnecessary imports and added missing ones where applicable. - Improved readability and maintainability of the codebase by standardizing import styles.
This commit is contained in:
@@ -40,6 +40,11 @@ export default defineConfig([
|
|||||||
react: {
|
react: {
|
||||||
version: "detect",
|
version: "detect",
|
||||||
},
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
typescript: {
|
||||||
|
project: "./tsconfig.json",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
"cross-env": "^10.0.0",
|
"cross-env": "^10.0.0",
|
||||||
"eslint": "^9.35.0",
|
"eslint": "^9.35.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-prettier": "^5.5.4",
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
|
|||||||
312
pnpm-lock.yaml
generated
312
pnpm-lock.yaml
generated
@@ -180,9 +180,12 @@ importers:
|
|||||||
eslint-config-prettier:
|
eslint-config-prettier:
|
||||||
specifier: ^10.1.8
|
specifier: ^10.1.8
|
||||||
version: 10.1.8(eslint@9.35.0(jiti@2.5.1))
|
version: 10.1.8(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
eslint-import-resolver-typescript:
|
||||||
|
specifier: ^4.4.4
|
||||||
|
version: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1))
|
||||||
eslint-plugin-import:
|
eslint-plugin-import:
|
||||||
specifier: ^2.32.0
|
specifier: ^2.32.0
|
||||||
version: 2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))
|
version: 2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1))
|
||||||
eslint-plugin-prettier:
|
eslint-plugin-prettier:
|
||||||
specifier: ^5.5.4
|
specifier: ^5.5.4
|
||||||
version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1))(prettier@3.6.2)
|
version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1))(prettier@3.6.2)
|
||||||
@@ -785,6 +788,15 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: '>=16.8.0'
|
react: '>=16.8.0'
|
||||||
|
|
||||||
|
'@emnapi/core@1.5.0':
|
||||||
|
resolution: {integrity: sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==}
|
||||||
|
|
||||||
|
'@emnapi/runtime@1.5.0':
|
||||||
|
resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==}
|
||||||
|
|
||||||
|
'@emnapi/wasi-threads@1.1.0':
|
||||||
|
resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==}
|
||||||
|
|
||||||
'@emotion/babel-plugin@11.13.5':
|
'@emotion/babel-plugin@11.13.5':
|
||||||
resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==}
|
resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==}
|
||||||
|
|
||||||
@@ -1230,6 +1242,9 @@ packages:
|
|||||||
react: ^17.0.0 || ^18.0.0 || ^19.0.0
|
react: ^17.0.0 || ^18.0.0 || ^19.0.0
|
||||||
react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0
|
react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0
|
||||||
|
|
||||||
|
'@napi-rs/wasm-runtime@0.2.12':
|
||||||
|
resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}
|
||||||
|
|
||||||
'@nodelib/fs.scandir@2.1.5':
|
'@nodelib/fs.scandir@2.1.5':
|
||||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>= 8'}
|
||||||
@@ -1657,6 +1672,9 @@ packages:
|
|||||||
'@tauri-apps/plugin-updater@2.9.0':
|
'@tauri-apps/plugin-updater@2.9.0':
|
||||||
resolution: {integrity: sha512-j++sgY8XpeDvzImTrzWA08OqqGqgkNyxczLD7FjNJJx/uXxMZFz5nDcfkyoI/rCjYuj2101Tci/r/HFmOmoxCg==}
|
resolution: {integrity: sha512-j++sgY8XpeDvzImTrzWA08OqqGqgkNyxczLD7FjNJJx/uXxMZFz5nDcfkyoI/rCjYuj2101Tci/r/HFmOmoxCg==}
|
||||||
|
|
||||||
|
'@tybys/wasm-util@0.10.1':
|
||||||
|
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||||
|
|
||||||
'@types/babel__core@7.20.5':
|
'@types/babel__core@7.20.5':
|
||||||
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
|
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
|
||||||
|
|
||||||
@@ -1795,6 +1813,101 @@ packages:
|
|||||||
'@ungap/structured-clone@1.3.0':
|
'@ungap/structured-clone@1.3.0':
|
||||||
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
|
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
||||||
|
resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [android]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-android-arm64@1.11.1':
|
||||||
|
resolution: {integrity: sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [android]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-darwin-arm64@1.11.1':
|
||||||
|
resolution: {integrity: sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [darwin]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-darwin-x64@1.11.1':
|
||||||
|
resolution: {integrity: sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [darwin]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-freebsd-x64@1.11.1':
|
||||||
|
resolution: {integrity: sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [freebsd]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1':
|
||||||
|
resolution: {integrity: sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm-musleabihf@1.11.1':
|
||||||
|
resolution: {integrity: sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm64-gnu@1.11.1':
|
||||||
|
resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm64-musl@1.11.1':
|
||||||
|
resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-ppc64-gnu@1.11.1':
|
||||||
|
resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==}
|
||||||
|
cpu: [ppc64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-gnu@1.11.1':
|
||||||
|
resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==}
|
||||||
|
cpu: [riscv64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-musl@1.11.1':
|
||||||
|
resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==}
|
||||||
|
cpu: [riscv64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-s390x-gnu@1.11.1':
|
||||||
|
resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==}
|
||||||
|
cpu: [s390x]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-x64-gnu@1.11.1':
|
||||||
|
resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-x64-musl@1.11.1':
|
||||||
|
resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-wasm32-wasi@1.11.1':
|
||||||
|
resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==}
|
||||||
|
engines: {node: '>=14.0.0'}
|
||||||
|
cpu: [wasm32]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-arm64-msvc@1.11.1':
|
||||||
|
resolution: {integrity: sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-ia32-msvc@1.11.1':
|
||||||
|
resolution: {integrity: sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==}
|
||||||
|
cpu: [ia32]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-x64-msvc@1.11.1':
|
||||||
|
resolution: {integrity: sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
'@vitejs/plugin-legacy@7.2.1':
|
'@vitejs/plugin-legacy@7.2.1':
|
||||||
resolution: {integrity: sha512-CaXb/y0mlfu7jQRELEJJc2/5w2bX2m1JraARgFnvSB2yfvnCNJVWWlqAo6WjnKoepOwKx8gs0ugJThPLKCOXIg==}
|
resolution: {integrity: sha512-CaXb/y0mlfu7jQRELEJJc2/5w2bX2m1JraARgFnvSB2yfvnCNJVWWlqAo6WjnKoepOwKx8gs0ugJThPLKCOXIg==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
@@ -2251,9 +2364,31 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '>=7.0.0'
|
eslint: '>=7.0.0'
|
||||||
|
|
||||||
|
eslint-import-context@0.1.9:
|
||||||
|
resolution: {integrity: sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==}
|
||||||
|
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||||
|
peerDependencies:
|
||||||
|
unrs-resolver: ^1.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
unrs-resolver:
|
||||||
|
optional: true
|
||||||
|
|
||||||
eslint-import-resolver-node@0.3.9:
|
eslint-import-resolver-node@0.3.9:
|
||||||
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||||
|
|
||||||
|
eslint-import-resolver-typescript@4.4.4:
|
||||||
|
resolution: {integrity: sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==}
|
||||||
|
engines: {node: ^16.17.0 || >=18.6.0}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: '*'
|
||||||
|
eslint-plugin-import: '*'
|
||||||
|
eslint-plugin-import-x: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
eslint-plugin-import:
|
||||||
|
optional: true
|
||||||
|
eslint-plugin-import-x:
|
||||||
|
optional: true
|
||||||
|
|
||||||
eslint-module-utils@2.12.1:
|
eslint-module-utils@2.12.1:
|
||||||
resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}
|
resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
@@ -2504,6 +2639,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}
|
resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
get-tsconfig@4.10.1:
|
||||||
|
resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==}
|
||||||
|
|
||||||
glob-parent@5.1.2:
|
glob-parent@5.1.2:
|
||||||
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
@@ -2644,6 +2782,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==}
|
resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
is-bun-module@2.0.0:
|
||||||
|
resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==}
|
||||||
|
|
||||||
is-callable@1.2.7:
|
is-callable@1.2.7:
|
||||||
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
|
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -3045,6 +3186,11 @@ packages:
|
|||||||
engines: {node: ^18 || >=20}
|
engines: {node: ^18 || >=20}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
napi-postinstall@0.3.3:
|
||||||
|
resolution: {integrity: sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==}
|
||||||
|
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
natural-compare@1.4.0:
|
natural-compare@1.4.0:
|
||||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||||
|
|
||||||
@@ -3344,6 +3490,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
|
|
||||||
|
resolve-pkg-maps@1.0.0:
|
||||||
|
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||||
|
|
||||||
resolve@1.22.10:
|
resolve@1.22.10:
|
||||||
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -3465,6 +3614,10 @@ packages:
|
|||||||
space-separated-tokens@2.0.2:
|
space-separated-tokens@2.0.2:
|
||||||
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
|
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
|
||||||
|
|
||||||
|
stable-hash-x@0.2.0:
|
||||||
|
resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==}
|
||||||
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
||||||
stop-iteration-iterator@1.1.0:
|
stop-iteration-iterator@1.1.0:
|
||||||
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
|
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -3673,6 +3826,9 @@ packages:
|
|||||||
universal-user-agent@6.0.1:
|
universal-user-agent@6.0.1:
|
||||||
resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==}
|
resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==}
|
||||||
|
|
||||||
|
unrs-resolver@1.11.1:
|
||||||
|
resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==}
|
||||||
|
|
||||||
update-browserslist-db@1.1.3:
|
update-browserslist-db@1.1.3:
|
||||||
resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==}
|
resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -4555,6 +4711,22 @@ snapshots:
|
|||||||
react: 19.1.1
|
react: 19.1.1
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
|
|
||||||
|
'@emnapi/core@1.5.0':
|
||||||
|
dependencies:
|
||||||
|
'@emnapi/wasi-threads': 1.1.0
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@emnapi/runtime@1.5.0':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@emnapi/wasi-threads@1.1.0':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@emotion/babel-plugin@11.13.5':
|
'@emotion/babel-plugin@11.13.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/helper-module-imports': 7.27.1
|
'@babel/helper-module-imports': 7.27.1
|
||||||
@@ -4956,6 +5128,13 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/react'
|
- '@types/react'
|
||||||
|
|
||||||
|
'@napi-rs/wasm-runtime@0.2.12':
|
||||||
|
dependencies:
|
||||||
|
'@emnapi/core': 1.5.0
|
||||||
|
'@emnapi/runtime': 1.5.0
|
||||||
|
'@tybys/wasm-util': 0.10.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@nodelib/fs.scandir@2.1.5':
|
'@nodelib/fs.scandir@2.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nodelib/fs.stat': 2.0.5
|
'@nodelib/fs.stat': 2.0.5
|
||||||
@@ -5310,6 +5489,11 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@tauri-apps/api': 2.8.0
|
'@tauri-apps/api': 2.8.0
|
||||||
|
|
||||||
|
'@tybys/wasm-util@0.10.1':
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.8.1
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@types/babel__core@7.20.5':
|
'@types/babel__core@7.20.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/parser': 7.28.3
|
'@babel/parser': 7.28.3
|
||||||
@@ -5482,6 +5666,65 @@ snapshots:
|
|||||||
|
|
||||||
'@ungap/structured-clone@1.3.0': {}
|
'@ungap/structured-clone@1.3.0': {}
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-android-arm64@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-darwin-arm64@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-darwin-x64@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-freebsd-x64@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm-musleabihf@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm64-gnu@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-arm64-musl@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-ppc64-gnu@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-gnu@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-musl@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-s390x-gnu@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-x64-gnu@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-linux-x64-musl@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-wasm32-wasi@1.11.1':
|
||||||
|
dependencies:
|
||||||
|
'@napi-rs/wasm-runtime': 0.2.12
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-arm64-msvc@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-ia32-msvc@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@unrs/resolver-binding-win32-x64-msvc@1.11.1':
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@vitejs/plugin-legacy@7.2.1(terser@5.44.0)(vite@7.1.5(jiti@2.5.1)(sass@1.92.1)(terser@5.44.0)(yaml@2.7.1))':
|
'@vitejs/plugin-legacy@7.2.1(terser@5.44.0)(vite@7.1.5(jiti@2.5.1)(sass@1.92.1)(terser@5.44.0)(yaml@2.7.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.3
|
'@babel/core': 7.28.3
|
||||||
@@ -6081,6 +6324,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.35.0(jiti@2.5.1)
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
|
||||||
|
eslint-import-context@0.1.9(unrs-resolver@1.11.1):
|
||||||
|
dependencies:
|
||||||
|
get-tsconfig: 4.10.1
|
||||||
|
stable-hash-x: 0.2.0
|
||||||
|
optionalDependencies:
|
||||||
|
unrs-resolver: 1.11.1
|
||||||
|
|
||||||
eslint-import-resolver-node@0.3.9:
|
eslint-import-resolver-node@0.3.9:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
@@ -6089,17 +6339,33 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@9.35.0(jiti@2.5.1)):
|
eslint-import-resolver-typescript@4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)):
|
||||||
|
dependencies:
|
||||||
|
debug: 4.4.1
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
eslint-import-context: 0.1.9(unrs-resolver@1.11.1)
|
||||||
|
get-tsconfig: 4.10.1
|
||||||
|
is-bun-module: 2.0.0
|
||||||
|
stable-hash-x: 0.2.0
|
||||||
|
tinyglobby: 0.2.15
|
||||||
|
unrs-resolver: 1.11.1
|
||||||
|
optionalDependencies:
|
||||||
|
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
|
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@typescript-eslint/parser': 8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)
|
'@typescript-eslint/parser': 8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)
|
||||||
eslint: 9.35.0(jiti@2.5.1)
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
|
eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1)):
|
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rtsao/scc': 1.1.0
|
'@rtsao/scc': 1.1.0
|
||||||
array-includes: 3.1.9
|
array-includes: 3.1.9
|
||||||
@@ -6110,7 +6376,7 @@ snapshots:
|
|||||||
doctrine: 2.1.0
|
doctrine: 2.1.0
|
||||||
eslint: 9.35.0(jiti@2.5.1)
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@9.35.0(jiti@2.5.1))
|
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1))
|
||||||
hasown: 2.0.2
|
hasown: 2.0.2
|
||||||
is-core-module: 2.16.1
|
is-core-module: 2.16.1
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
@@ -6387,6 +6653,10 @@ snapshots:
|
|||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
get-intrinsic: 1.3.0
|
get-intrinsic: 1.3.0
|
||||||
|
|
||||||
|
get-tsconfig@4.10.1:
|
||||||
|
dependencies:
|
||||||
|
resolve-pkg-maps: 1.0.0
|
||||||
|
|
||||||
glob-parent@5.1.2:
|
glob-parent@5.1.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
@@ -6541,6 +6811,10 @@ snapshots:
|
|||||||
call-bound: 1.0.4
|
call-bound: 1.0.4
|
||||||
has-tostringtag: 1.0.2
|
has-tostringtag: 1.0.2
|
||||||
|
|
||||||
|
is-bun-module@2.0.0:
|
||||||
|
dependencies:
|
||||||
|
semver: 7.7.2
|
||||||
|
|
||||||
is-callable@1.2.7: {}
|
is-callable@1.2.7: {}
|
||||||
|
|
||||||
is-core-module@2.16.1:
|
is-core-module@2.16.1:
|
||||||
@@ -7053,6 +7327,8 @@ snapshots:
|
|||||||
|
|
||||||
nanoid@5.1.5: {}
|
nanoid@5.1.5: {}
|
||||||
|
|
||||||
|
napi-postinstall@0.3.3: {}
|
||||||
|
|
||||||
natural-compare@1.4.0: {}
|
natural-compare@1.4.0: {}
|
||||||
|
|
||||||
next-tick@1.1.0: {}
|
next-tick@1.1.0: {}
|
||||||
@@ -7372,6 +7648,8 @@ snapshots:
|
|||||||
|
|
||||||
resolve-from@4.0.0: {}
|
resolve-from@4.0.0: {}
|
||||||
|
|
||||||
|
resolve-pkg-maps@1.0.0: {}
|
||||||
|
|
||||||
resolve@1.22.10:
|
resolve@1.22.10:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-core-module: 2.16.1
|
is-core-module: 2.16.1
|
||||||
@@ -7531,6 +7809,8 @@ snapshots:
|
|||||||
|
|
||||||
space-separated-tokens@2.0.2: {}
|
space-separated-tokens@2.0.2: {}
|
||||||
|
|
||||||
|
stable-hash-x@0.2.0: {}
|
||||||
|
|
||||||
stop-iteration-iterator@1.1.0:
|
stop-iteration-iterator@1.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
@@ -7799,6 +8079,30 @@ snapshots:
|
|||||||
|
|
||||||
universal-user-agent@6.0.1: {}
|
universal-user-agent@6.0.1: {}
|
||||||
|
|
||||||
|
unrs-resolver@1.11.1:
|
||||||
|
dependencies:
|
||||||
|
napi-postinstall: 0.3.3
|
||||||
|
optionalDependencies:
|
||||||
|
'@unrs/resolver-binding-android-arm-eabi': 1.11.1
|
||||||
|
'@unrs/resolver-binding-android-arm64': 1.11.1
|
||||||
|
'@unrs/resolver-binding-darwin-arm64': 1.11.1
|
||||||
|
'@unrs/resolver-binding-darwin-x64': 1.11.1
|
||||||
|
'@unrs/resolver-binding-freebsd-x64': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-arm-gnueabihf': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-arm-musleabihf': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-arm64-gnu': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-arm64-musl': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-ppc64-gnu': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-gnu': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-riscv64-musl': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-s390x-gnu': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-x64-gnu': 1.11.1
|
||||||
|
'@unrs/resolver-binding-linux-x64-musl': 1.11.1
|
||||||
|
'@unrs/resolver-binding-wasm32-wasi': 1.11.1
|
||||||
|
'@unrs/resolver-binding-win32-arm64-msvc': 1.11.1
|
||||||
|
'@unrs/resolver-binding-win32-ia32-msvc': 1.11.1
|
||||||
|
'@unrs/resolver-binding-win32-x64-msvc': 1.11.1
|
||||||
|
|
||||||
update-browserslist-db@1.1.3(browserslist@4.25.1):
|
update-browserslist-db@1.1.3(browserslist@4.25.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.25.1
|
browserslist: 4.25.1
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { Typography, Stack, Divider } from "@mui/material";
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
|
|
||||||
import { useClash } from "@/hooks/use-clash";
|
import { useClash } from "@/hooks/use-clash";
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
// 将毫秒转换为时:分:秒格式的函数
|
// 将毫秒转换为时:分:秒格式的函数
|
||||||
const formatUptime = (uptimeMs: number) => {
|
const formatUptime = (uptimeMs: number) => {
|
||||||
const hours = Math.floor(uptimeMs / 3600000);
|
const hours = Math.floor(uptimeMs / 3600000);
|
||||||
|
|||||||
@@ -20,11 +20,6 @@ import { ReactNode } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import {
|
|
||||||
EnhancedCanvasTrafficGraph,
|
|
||||||
type EnhancedCanvasTrafficGraphRef,
|
|
||||||
} from "./enhanced-canvas-traffic-graph";
|
|
||||||
|
|
||||||
import { TrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
import { TrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
||||||
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
@@ -33,6 +28,11 @@ import { useAppData } from "@/providers/app-data-provider";
|
|||||||
import { isDebugEnabled, gc } from "@/services/cmds";
|
import { isDebugEnabled, gc } from "@/services/cmds";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
|
import {
|
||||||
|
EnhancedCanvasTrafficGraph,
|
||||||
|
type EnhancedCanvasTrafficGraphRef,
|
||||||
|
} from "./enhanced-canvas-traffic-graph";
|
||||||
|
|
||||||
interface StatCardProps {
|
interface StatCardProps {
|
||||||
icon: ReactNode;
|
icon: ReactNode;
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ import { useMemo, useCallback, useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
import { openWebUrl, updateProfile } from "@/services/cmds";
|
import { openWebUrl, updateProfile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
// 定义旋转动画
|
// 定义旋转动画
|
||||||
const round = keyframes`
|
const round = keyframes`
|
||||||
from { transform: rotate(0deg); }
|
from { transform: rotate(0deg); }
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import { Box, Typography, Button, Skeleton, IconButton } from "@mui/material";
|
|||||||
import { useState, useEffect, useCallback, memo } from "react";
|
import { useState, useEffect, useCallback, memo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
|
|
||||||
import { getIpInfo } from "@/services/api";
|
import { getIpInfo } from "@/services/api";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
// 定义刷新时间(秒)
|
// 定义刷新时间(秒)
|
||||||
const IP_REFRESH_SECONDS = 300;
|
const IP_REFRESH_SECONDS = 300;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { version as appVersion } from "@root/package.json";
|
|
||||||
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
@@ -22,13 +21,14 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
|
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
import { getSystemInfo } from "@/services/cmds";
|
import { getSystemInfo } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { version as appVersion } from "@root/package.json";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
export const SystemInfoCard = () => {
|
export const SystemInfoCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import { nanoid } from "nanoid";
|
|||||||
import { useEffect, useRef, useMemo, useCallback } from "react";
|
import { useEffect, useRef, useMemo, useCallback } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
|
|
||||||
// test icons
|
// test icons
|
||||||
import apple from "@/assets/image/test/apple.svg?raw";
|
import apple from "@/assets/image/test/apple.svg?raw";
|
||||||
import github from "@/assets/image/test/github.svg?raw";
|
import github from "@/assets/image/test/github.svg?raw";
|
||||||
@@ -25,6 +23,8 @@ import { TestItem } from "@/components/test/test-item";
|
|||||||
import { TestViewer, TestViewerRef } from "@/components/test/test-viewer";
|
import { TestViewer, TestViewerRef } from "@/components/test/test-viewer";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
// 自定义滚动条样式
|
// 自定义滚动条样式
|
||||||
const ScrollBox = styled(Box)(({ theme }) => ({
|
const ScrollBox = styled(Box)(({ theme }) => ({
|
||||||
maxHeight: "180px",
|
maxHeight: "180px",
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import { useEffect, useRef } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { TrafficGraph, type TrafficRef } from "./traffic-graph";
|
|
||||||
|
|
||||||
import { LightweightTrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
import { LightweightTrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
||||||
@@ -18,6 +16,8 @@ import { useVisibility } from "@/hooks/use-visibility";
|
|||||||
import { isDebugEnabled, gc, startTrafficService } from "@/services/cmds";
|
import { isDebugEnabled, gc, startTrafficService } from "@/services/cmds";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
|
import { TrafficGraph, type TrafficRef } from "./traffic-graph";
|
||||||
|
|
||||||
// setup the traffic
|
// setup the traffic
|
||||||
export const LayoutTraffic = () => {
|
export const LayoutTraffic = () => {
|
||||||
const { data: isDebug } = useSWR(
|
const { data: isDebug } = useSWR(
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { check } from "@tauri-apps/plugin-updater";
|
|||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
|
||||||
import { DialogRef } from "../base";
|
import { DialogRef } from "../base";
|
||||||
import { UpdateViewer } from "../setting/mods/update-viewer";
|
import { UpdateViewer } from "../setting/mods/update-viewer";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import MonacoEditor from "react-monaco-editor";
|
import MonacoEditor from "react-monaco-editor";
|
||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
|
|
||||||
import { Switch } from "@/components/base";
|
import { Switch } from "@/components/base";
|
||||||
import { GroupItem } from "@/components/profile/group-item";
|
import { GroupItem } from "@/components/profile/group-item";
|
||||||
import {
|
import {
|
||||||
@@ -55,6 +53,8 @@ import { showNotice } from "@/services/noticeService";
|
|||||||
import { useThemeMode } from "@/services/states";
|
import { useThemeMode } from "@/services/states";
|
||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
|
import { BaseSearchBox } from "../base/base-search-box";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
proxiesUid: string;
|
proxiesUid: string;
|
||||||
mergeUid: string;
|
mergeUid: string;
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ import { useEffect, useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { mutate } from "swr";
|
import { mutate } from "swr";
|
||||||
|
|
||||||
import { ProfileBox } from "./profile-box";
|
|
||||||
import { ProxiesEditorViewer } from "./proxies-editor-viewer";
|
|
||||||
|
|
||||||
import { ConfirmViewer } from "@/components/profile/confirm-viewer";
|
import { ConfirmViewer } from "@/components/profile/confirm-viewer";
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
import { GroupsEditorViewer } from "@/components/profile/groups-editor-viewer";
|
import { GroupsEditorViewer } from "@/components/profile/groups-editor-viewer";
|
||||||
@@ -35,6 +32,9 @@ import {
|
|||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import { useLoadingCache, useSetLoadingCache } from "@/services/states";
|
import { useLoadingCache, useSetLoadingCache } from "@/services/states";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
|
import { ProfileBox } from "./profile-box";
|
||||||
|
import { ProxiesEditorViewer } from "./proxies-editor-viewer";
|
||||||
const round = keyframes`
|
const round = keyframes`
|
||||||
from { transform: rotate(0deg); }
|
from { transform: rotate(0deg); }
|
||||||
to { transform: rotate(360deg); }
|
to { transform: rotate(360deg); }
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ import { useLockFn } from "ahooks";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { LogViewer } from "./log-viewer";
|
|
||||||
import { ProfileBox } from "./profile-box";
|
|
||||||
|
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
import { viewProfile, readProfileFile, saveProfileFile } from "@/services/cmds";
|
import { viewProfile, readProfileFile, saveProfileFile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { LogViewer } from "./log-viewer";
|
||||||
|
import { ProfileBox } from "./profile-box";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
logInfo?: [string, string][];
|
logInfo?: [string, string][];
|
||||||
id: "Merge" | "Script";
|
id: "Merge" | "Script";
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
styled,
|
styled,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { version } from "@root/package.json";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import {
|
import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
@@ -20,12 +19,13 @@ import {
|
|||||||
import { useForm, Controller } from "react-hook-form";
|
import { useForm, Controller } from "react-hook-form";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { FileInput } from "./file-input";
|
|
||||||
|
|
||||||
import { BaseDialog, Switch } from "@/components/base";
|
import { BaseDialog, Switch } from "@/components/base";
|
||||||
import { useProfiles } from "@/hooks/use-profiles";
|
import { useProfiles } from "@/hooks/use-profiles";
|
||||||
import { createProfile, patchProfile } from "@/services/cmds";
|
import { createProfile, patchProfile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { version } from "@root/package.json";
|
||||||
|
|
||||||
|
import { FileInput } from "./file-input";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onChange: (isActivating?: boolean) => void;
|
onChange: (isActivating?: boolean) => void;
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import MonacoEditor from "react-monaco-editor";
|
import MonacoEditor from "react-monaco-editor";
|
||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
|
|
||||||
import { ProxyItem } from "@/components/profile/proxy-item";
|
import { ProxyItem } from "@/components/profile/proxy-item";
|
||||||
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
@@ -43,6 +41,8 @@ import { useThemeMode } from "@/services/states";
|
|||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
import parseUri from "@/utils/uri-parser";
|
import parseUri from "@/utils/uri-parser";
|
||||||
|
|
||||||
|
import { BaseSearchBox } from "../base/base-search-box";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
profileUid: string;
|
profileUid: string;
|
||||||
property: string;
|
property: string;
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import MonacoEditor from "react-monaco-editor";
|
import MonacoEditor from "react-monaco-editor";
|
||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
|
|
||||||
import { Switch } from "@/components/base";
|
import { Switch } from "@/components/base";
|
||||||
import { RuleItem } from "@/components/profile/rule-item";
|
import { RuleItem } from "@/components/profile/rule-item";
|
||||||
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
||||||
@@ -45,6 +43,8 @@ import { showNotice } from "@/services/noticeService";
|
|||||||
import { useThemeMode } from "@/services/states";
|
import { useThemeMode } from "@/services/states";
|
||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
|
import { BaseSearchBox } from "../base/base-search-box";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
groupsUid: string;
|
groupsUid: string;
|
||||||
mergeUid: string;
|
mergeUid: string;
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import { useRef, useState, useEffect, useCallback } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
|
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
|
||||||
|
|
||||||
|
import { useProxySelection } from "@/hooks/use-proxy-selection";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { providerHealthCheck, getGroupProxyDelays } from "@/services/cmds";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
import { BaseEmpty } from "../base";
|
import { BaseEmpty } from "../base";
|
||||||
import { ScrollTopButton } from "../layout/scroll-top-button";
|
import { ScrollTopButton } from "../layout/scroll-top-button";
|
||||||
|
|
||||||
@@ -11,11 +16,6 @@ import { ProxyChain } from "./proxy-chain";
|
|||||||
import { ProxyRender } from "./proxy-render";
|
import { ProxyRender } from "./proxy-render";
|
||||||
import { useRenderList } from "./use-render-list";
|
import { useRenderList } from "./use-render-list";
|
||||||
|
|
||||||
import { useProxySelection } from "@/hooks/use-proxy-selection";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { providerHealthCheck, getGroupProxyDelays } from "@/services/cmds";
|
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mode: string;
|
mode: string;
|
||||||
isChainMode?: boolean;
|
isChainMode?: boolean;
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ import { Box, IconButton, TextField, SxProps } from "@mui/material";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import type { ProxySortType } from "./use-filter-sort";
|
|
||||||
import type { HeadState } from "./use-head-state";
|
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import delayManager from "@/services/delay";
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
|
import type { ProxySortType } from "./use-filter-sort";
|
||||||
|
import type { HeadState } from "./use-head-state";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
sx?: SxProps;
|
sx?: SxProps;
|
||||||
url?: string;
|
url?: string;
|
||||||
|
|||||||
@@ -17,16 +17,16 @@ import { convertFileSrc } from "@tauri-apps/api/core";
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { downloadIconCache } from "@/services/cmds";
|
||||||
|
import { useThemeMode } from "@/services/states";
|
||||||
|
|
||||||
import { ProxyHead } from "./proxy-head";
|
import { ProxyHead } from "./proxy-head";
|
||||||
import { ProxyItem } from "./proxy-item";
|
import { ProxyItem } from "./proxy-item";
|
||||||
import { ProxyItemMini } from "./proxy-item-mini";
|
import { ProxyItemMini } from "./proxy-item-mini";
|
||||||
import { HeadState } from "./use-head-state";
|
import { HeadState } from "./use-head-state";
|
||||||
import type { IRenderItem } from "./use-render-list";
|
import type { IRenderItem } from "./use-render-list";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { downloadIconCache } from "@/services/cmds";
|
|
||||||
import { useThemeMode } from "@/services/states";
|
|
||||||
|
|
||||||
interface RenderProps {
|
interface RenderProps {
|
||||||
item: IRenderItem;
|
item: IRenderItem;
|
||||||
indent: boolean;
|
indent: boolean;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
|
||||||
import { ProxySortType } from "./use-filter-sort";
|
|
||||||
|
|
||||||
import { useProfiles } from "@/hooks/use-profiles";
|
import { useProfiles } from "@/hooks/use-profiles";
|
||||||
|
|
||||||
|
import { ProxySortType } from "./use-filter-sort";
|
||||||
|
|
||||||
export interface HeadState {
|
export interface HeadState {
|
||||||
open?: boolean;
|
open?: boolean;
|
||||||
showType: boolean;
|
showType: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { useEffect, useMemo } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { getRuntimeConfig } from "@/services/cmds";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
import { filterSort } from "./use-filter-sort";
|
import { filterSort } from "./use-filter-sort";
|
||||||
import {
|
import {
|
||||||
useHeadStateNew,
|
useHeadStateNew,
|
||||||
@@ -9,11 +14,6 @@ import {
|
|||||||
} from "./use-head-state";
|
} from "./use-head-state";
|
||||||
import { useWindowWidth } from "./use-window-width";
|
import { useWindowWidth } from "./use-window-width";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import { getRuntimeConfig } from "@/services/cmds";
|
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
|
|
||||||
// 定义代理项接口
|
// 定义代理项接口
|
||||||
interface IProxyItem {
|
interface IProxyItem {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ import {
|
|||||||
} from "react";
|
} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
|
import { BaseLoadingOverlay } from "@/components/base";
|
||||||
|
import { listWebDavBackup } from "@/services/cmds";
|
||||||
|
|
||||||
import { BackupConfigViewer } from "./backup-config-viewer";
|
import { BackupConfigViewer } from "./backup-config-viewer";
|
||||||
import {
|
import {
|
||||||
BackupTableViewer,
|
BackupTableViewer,
|
||||||
BackupFile,
|
BackupFile,
|
||||||
DEFAULT_ROWS_PER_PAGE,
|
DEFAULT_ROWS_PER_PAGE,
|
||||||
} from "./backup-table-viewer";
|
} from "./backup-table-viewer";
|
||||||
|
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
|
||||||
import { BaseLoadingOverlay } from "@/components/base";
|
|
||||||
import { listWebDavBackup } from "@/services/cmds";
|
|
||||||
dayjs.extend(customParseFormat);
|
dayjs.extend(customParseFormat);
|
||||||
|
|
||||||
const DATE_FORMAT = "YYYY-MM-DD_HH-mm-ss";
|
const DATE_FORMAT = "YYYY-MM-DD_HH-mm-ss";
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import { useLockFn } from "ahooks";
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { HotkeyInput } from "./hotkey-input";
|
|
||||||
|
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { HotkeyInput } from "./hotkey-input";
|
||||||
|
|
||||||
const ItemWrapper = styled("div")`
|
const ItemWrapper = styled("div")`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import { exists } from "@tauri-apps/plugin-fs";
|
|||||||
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { GuardState } from "./guard-state";
|
|
||||||
|
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
@@ -24,6 +22,8 @@ import { copyIconFile, getAppDir } from "@/services/cmds";
|
|||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
|
import { GuardState } from "./guard-state";
|
||||||
|
|
||||||
const OS = getSystem();
|
const OS = getSystem();
|
||||||
|
|
||||||
const getIcons = async (icon_dir: string, name: string) => {
|
const getIcons = async (icon_dir: string, name: string) => {
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ import { useLockFn } from "ahooks";
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { StackModeSwitch } from "./stack-mode-switch";
|
|
||||||
|
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
import { useClash } from "@/hooks/use-clash";
|
import { useClash } from "@/hooks/use-clash";
|
||||||
import { enhanceProfiles } from "@/services/cmds";
|
import { enhanceProfiles } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
|
import { StackModeSwitch } from "./stack-mode-switch";
|
||||||
|
|
||||||
const OS = getSystem();
|
const OS = getSystem();
|
||||||
|
|
||||||
export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import { useLockFn } from "ahooks";
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { WebUIItem } from "./web-ui-item";
|
|
||||||
|
|
||||||
import { BaseDialog, BaseEmpty, DialogRef } from "@/components/base";
|
import { BaseDialog, BaseEmpty, DialogRef } from "@/components/base";
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { openWebUrl } from "@/services/cmds";
|
import { openWebUrl } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { WebUIItem } from "./web-ui-item";
|
||||||
|
|
||||||
export const WebUIViewer = forwardRef<DialogRef>((props, ref) => {
|
export const WebUIViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,15 @@ import { useLockFn } from "ahooks";
|
|||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { DialogRef, Switch } from "@/components/base";
|
||||||
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
|
import { useClash } from "@/hooks/use-clash";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { invoke_uwp_tool } from "@/services/cmds";
|
||||||
|
import { updateGeoData } from "@/services/cmds";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
import { ClashCoreViewer } from "./mods/clash-core-viewer";
|
import { ClashCoreViewer } from "./mods/clash-core-viewer";
|
||||||
import { ClashPortViewer } from "./mods/clash-port-viewer";
|
import { ClashPortViewer } from "./mods/clash-port-viewer";
|
||||||
import { ControllerViewer } from "./mods/controller-viewer";
|
import { ControllerViewer } from "./mods/controller-viewer";
|
||||||
@@ -15,15 +24,6 @@ import { NetworkInterfaceViewer } from "./mods/network-interface-viewer";
|
|||||||
import { SettingItem, SettingList } from "./mods/setting-comp";
|
import { SettingItem, SettingList } from "./mods/setting-comp";
|
||||||
import { WebUIViewer } from "./mods/web-ui-viewer";
|
import { WebUIViewer } from "./mods/web-ui-viewer";
|
||||||
|
|
||||||
import { DialogRef, Switch } from "@/components/base";
|
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
|
||||||
import { useClash } from "@/hooks/use-clash";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { invoke_uwp_tool } from "@/services/cmds";
|
|
||||||
import { updateGeoData } from "@/services/cmds";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
|
|
||||||
const isWIN = getSystem() === "windows";
|
const isWIN = getSystem() === "windows";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -4,11 +4,6 @@ import React, { useRef } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { mutate } from "swr";
|
import { mutate } from "swr";
|
||||||
|
|
||||||
import { GuardState } from "./mods/guard-state";
|
|
||||||
import { SettingList, SettingItem } from "./mods/setting-comp";
|
|
||||||
import { SysproxyViewer } from "./mods/sysproxy-viewer";
|
|
||||||
import { TunViewer } from "./mods/tun-viewer";
|
|
||||||
|
|
||||||
import { DialogRef, Switch } from "@/components/base";
|
import { DialogRef, Switch } from "@/components/base";
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
||||||
@@ -16,6 +11,11 @@ import { useSystemState } from "@/hooks/use-system-state";
|
|||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { GuardState } from "./mods/guard-state";
|
||||||
|
import { SettingList, SettingItem } from "./mods/setting-comp";
|
||||||
|
import { SysproxyViewer } from "./mods/sysproxy-viewer";
|
||||||
|
import { TunViewer } from "./mods/tun-viewer";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError?: (err: Error) => void;
|
onError?: (err: Error) => void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
import { ContentCopyRounded } from "@mui/icons-material";
|
import { ContentCopyRounded } from "@mui/icons-material";
|
||||||
import { Typography } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
import { version } from "@root/package.json";
|
|
||||||
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
||||||
import { useCallback, useRef } from "react";
|
import { useCallback, useRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { BackupViewer } from "./mods/backup-viewer";
|
|
||||||
import { ConfigViewer } from "./mods/config-viewer";
|
|
||||||
import { HotkeyViewer } from "./mods/hotkey-viewer";
|
|
||||||
import { LayoutViewer } from "./mods/layout-viewer";
|
|
||||||
import { LiteModeViewer } from "./mods/lite-mode-viewer";
|
|
||||||
import { MiscViewer } from "./mods/misc-viewer";
|
|
||||||
import { SettingList, SettingItem } from "./mods/setting-comp";
|
|
||||||
import { ThemeViewer } from "./mods/theme-viewer";
|
|
||||||
import { UpdateViewer } from "./mods/update-viewer";
|
|
||||||
|
|
||||||
import { DialogRef } from "@/components/base";
|
import { DialogRef } from "@/components/base";
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
import {
|
import {
|
||||||
@@ -26,6 +15,17 @@ import {
|
|||||||
exportDiagnosticInfo,
|
exportDiagnosticInfo,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { version } from "@root/package.json";
|
||||||
|
|
||||||
|
import { BackupViewer } from "./mods/backup-viewer";
|
||||||
|
import { ConfigViewer } from "./mods/config-viewer";
|
||||||
|
import { HotkeyViewer } from "./mods/hotkey-viewer";
|
||||||
|
import { LayoutViewer } from "./mods/layout-viewer";
|
||||||
|
import { LiteModeViewer } from "./mods/lite-mode-viewer";
|
||||||
|
import { MiscViewer } from "./mods/misc-viewer";
|
||||||
|
import { SettingList, SettingItem } from "./mods/setting-comp";
|
||||||
|
import { ThemeViewer } from "./mods/theme-viewer";
|
||||||
|
import { UpdateViewer } from "./mods/update-viewer";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError?: (err: Error) => void;
|
onError?: (err: Error) => void;
|
||||||
|
|||||||
@@ -4,6 +4,15 @@ import { open } from "@tauri-apps/plugin-dialog";
|
|||||||
import { useCallback, useRef } from "react";
|
import { useCallback, useRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { DialogRef } from "@/components/base";
|
||||||
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { routers } from "@/pages/_routers";
|
||||||
|
import { copyClashEnv } from "@/services/cmds";
|
||||||
|
import { supportedLanguages } from "@/services/i18n";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
import { BackupViewer } from "./mods/backup-viewer";
|
import { BackupViewer } from "./mods/backup-viewer";
|
||||||
import { ConfigViewer } from "./mods/config-viewer";
|
import { ConfigViewer } from "./mods/config-viewer";
|
||||||
import { GuardState } from "./mods/guard-state";
|
import { GuardState } from "./mods/guard-state";
|
||||||
@@ -15,15 +24,6 @@ import { ThemeModeSwitch } from "./mods/theme-mode-switch";
|
|||||||
import { ThemeViewer } from "./mods/theme-viewer";
|
import { ThemeViewer } from "./mods/theme-viewer";
|
||||||
import { UpdateViewer } from "./mods/update-viewer";
|
import { UpdateViewer } from "./mods/update-viewer";
|
||||||
|
|
||||||
import { DialogRef } from "@/components/base";
|
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { routers } from "@/pages/_routers";
|
|
||||||
import { copyClashEnv } from "@/services/cmds";
|
|
||||||
import { supportedLanguages } from "@/services/i18n";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError?: (err: Error) => void;
|
onError?: (err: Error) => void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import { useLockFn } from "ahooks";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { TestBox } from "./test-box";
|
|
||||||
|
|
||||||
import { BaseLoading } from "@/components/base";
|
import { BaseLoading } from "@/components/base";
|
||||||
import { useListen } from "@/hooks/use-listen";
|
import { useListen } from "@/hooks/use-listen";
|
||||||
import { cmdTestDelay, downloadIconCache } from "@/services/cmds";
|
import { cmdTestDelay, downloadIconCache } from "@/services/cmds";
|
||||||
import delayManager from "@/services/delay";
|
import delayManager from "@/services/delay";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { TestBox } from "./test-box";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
id: string;
|
id: string;
|
||||||
itemData: IVergeTestItem;
|
itemData: IVergeTestItem;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { useState, useCallback } from "react";
|
import { useState, useCallback } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { useVerge } from "./use-verge";
|
|
||||||
|
|
||||||
import { changeLanguage, supportedLanguages } from "@/services/i18n";
|
import { changeLanguage, supportedLanguages } from "@/services/i18n";
|
||||||
|
|
||||||
|
import { useVerge } from "./use-verge";
|
||||||
|
|
||||||
export const useI18n = () => {
|
export const useI18n = () => {
|
||||||
const { i18n, t } = useTranslation();
|
const { i18n, t } = useTranslation();
|
||||||
const { patchVerge } = useVerge();
|
const { patchVerge } = useVerge();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
|
|
||||||
import { useSystemState } from "./use-system-state";
|
|
||||||
|
|
||||||
import { restartCore, stopCore, uninstallService } from "@/services/cmds";
|
import { restartCore, stopCore, uninstallService } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
import { useSystemState } from "./use-system-state";
|
||||||
|
|
||||||
const executeWithErrorHandling = async (
|
const executeWithErrorHandling = async (
|
||||||
operation: () => Promise<void>,
|
operation: () => Promise<void>,
|
||||||
loadingMessage: string,
|
loadingMessage: string,
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useLocation, useRoutes, useNavigate } from "react-router-dom";
|
import { useLocation, useRoutes, useNavigate } from "react-router-dom";
|
||||||
import { SWRConfig, mutate } from "swr";
|
import { SWRConfig, mutate } from "swr";
|
||||||
|
|
||||||
import { routers } from "./_routers";
|
|
||||||
|
|
||||||
import iconDark from "@/assets/image/icon_dark.svg?react";
|
import iconDark from "@/assets/image/icon_dark.svg?react";
|
||||||
import iconLight from "@/assets/image/icon_light.svg?react";
|
import iconLight from "@/assets/image/icon_light.svg?react";
|
||||||
import LogoSvg from "@/assets/image/logo.svg?react";
|
import LogoSvg from "@/assets/image/logo.svg?react";
|
||||||
@@ -25,6 +23,8 @@ import { forceRefreshClashConfig } from "@/services/cmds";
|
|||||||
import { useThemeMode, useEnableLog } from "@/services/states";
|
import { useThemeMode, useEnableLog } from "@/services/states";
|
||||||
import getSystem from "@/utils/get-system";
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
|
import { routers } from "./_routers";
|
||||||
|
|
||||||
import "dayjs/locale/ru";
|
import "dayjs/locale/ru";
|
||||||
import "dayjs/locale/zh-cn";
|
import "dayjs/locale/zh-cn";
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,6 @@ import SettingsRoundedIcon from "@mui/icons-material/SettingsRounded";
|
|||||||
import SubjectRoundedIcon from "@mui/icons-material/SubjectRounded";
|
import SubjectRoundedIcon from "@mui/icons-material/SubjectRounded";
|
||||||
import WifiRoundedIcon from "@mui/icons-material/WifiRounded";
|
import WifiRoundedIcon from "@mui/icons-material/WifiRounded";
|
||||||
|
|
||||||
import ConnectionsPage from "./connections";
|
|
||||||
import HomePage from "./home";
|
|
||||||
import LogsPage from "./logs";
|
|
||||||
import ProfilesPage from "./profiles";
|
|
||||||
import ProxiesPage from "./proxies";
|
|
||||||
import RulesPage from "./rules";
|
|
||||||
import SettingsPage from "./settings";
|
|
||||||
import UnlockPage from "./unlock";
|
|
||||||
|
|
||||||
import ConnectionsSvg from "@/assets/image/itemicon/connections.svg?react";
|
import ConnectionsSvg from "@/assets/image/itemicon/connections.svg?react";
|
||||||
import HomeSvg from "@/assets/image/itemicon/home.svg?react";
|
import HomeSvg from "@/assets/image/itemicon/home.svg?react";
|
||||||
import LogsSvg from "@/assets/image/itemicon/logs.svg?react";
|
import LogsSvg from "@/assets/image/itemicon/logs.svg?react";
|
||||||
@@ -26,6 +17,15 @@ import SettingsSvg from "@/assets/image/itemicon/settings.svg?react";
|
|||||||
import UnlockSvg from "@/assets/image/itemicon/unlock.svg?react";
|
import UnlockSvg from "@/assets/image/itemicon/unlock.svg?react";
|
||||||
import { BaseErrorBoundary } from "@/components/base";
|
import { BaseErrorBoundary } from "@/components/base";
|
||||||
|
|
||||||
|
import ConnectionsPage from "./connections";
|
||||||
|
import HomePage from "./home";
|
||||||
|
import LogsPage from "./logs";
|
||||||
|
import ProfilesPage from "./profiles";
|
||||||
|
import ProxiesPage from "./proxies";
|
||||||
|
import RulesPage from "./rules";
|
||||||
|
import SettingsPage from "./settings";
|
||||||
|
import UnlockPage from "./unlock";
|
||||||
|
|
||||||
export const routers = [
|
export const routers = [
|
||||||
{
|
{
|
||||||
label: "Label-Home",
|
label: "Label-Home",
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
|
PauseCircleOutlineRounded,
|
||||||
|
PlayCircleOutlineRounded,
|
||||||
TableChartRounded,
|
TableChartRounded,
|
||||||
TableRowsRounded,
|
TableRowsRounded,
|
||||||
PlayCircleOutlineRounded,
|
|
||||||
PauseCircleOutlineRounded,
|
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { Box, Button, IconButton, MenuItem } from "@mui/material";
|
import { Box, Button, IconButton, MenuItem } from "@mui/material";
|
||||||
import { useTheme } from "@mui/material/styles";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { useMemo, useRef, useState, useCallback } from "react";
|
import { useCallback, useMemo, useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
@@ -37,8 +36,6 @@ type OrderFunc = (list: IConnectionsItem[]) => IConnectionsItem[];
|
|||||||
const ConnectionsPage = () => {
|
const ConnectionsPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const pageVisible = useVisibility();
|
const pageVisible = useVisibility();
|
||||||
const theme = useTheme();
|
|
||||||
const _isDark = theme.palette.mode === "dark";
|
|
||||||
const [match, setMatch] = useState(() => (_: string) => true);
|
const [match, setMatch] = useState(() => (_: string) => true);
|
||||||
const [curOrderOpt, setOrderOpt] = useState("Default");
|
const [curOrderOpt, setOrderOpt] = useState("Default");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { cmdGetProxyDelay } from "./cmds";
|
import { cmdGetProxyDelay } from "@/services/cmds";
|
||||||
|
|
||||||
const hashKey = (name: string, group: string) => `${group ?? ""}::${name}`;
|
const hashKey = (name: string, group: string) => `${group ?? ""}::${name}`;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ export const loadLanguage = async (language: string) => {
|
|||||||
const module = await import(`@/locales/${language}.json`);
|
const module = await import(`@/locales/${language}.json`);
|
||||||
return module.default;
|
return module.default;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(`Failed to load language ${language}, fallback to zh`);
|
console.warn(
|
||||||
|
`Failed to load language ${language}, fallback to zh, ${error}`,
|
||||||
|
);
|
||||||
const fallback = await import("@/locales/zh.json");
|
const fallback = await import("@/locales/zh.json");
|
||||||
return fallback.default;
|
return fallback.default;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export function recordTrafficError(error: Error, component: string) {
|
|||||||
*/
|
*/
|
||||||
function getMemoryUsage(): number {
|
function getMemoryUsage(): number {
|
||||||
if ("memory" in performance) {
|
if ("memory" in performance) {
|
||||||
// @ts-ignore - 某些浏览器支持
|
// @@ts-expect-error - 某些浏览器支持
|
||||||
const memory = (performance as any).memory;
|
const memory = (performance as any).memory;
|
||||||
if (memory && memory.usedJSHeapSize) {
|
if (memory && memory.usedJSHeapSize) {
|
||||||
return memory.usedJSHeapSize / 1024 / 1024; // 转换为MB
|
return memory.usedJSHeapSize / 1024 / 1024; // 转换为MB
|
||||||
|
|||||||
@@ -506,9 +506,11 @@ function URI_VLESS(line: string): IProxyVlessConfig {
|
|||||||
parsed = /^(.*?)@(.*?):(\d+)\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!;
|
parsed = /^(.*?)@(.*?):(\d+)\/?(\?(.*?))?(?:#(.*?))?$/.exec(line)!;
|
||||||
isShadowrocket = true;
|
isShadowrocket = true;
|
||||||
}
|
}
|
||||||
let [__, uuid, server, portStr, ___, addons = "", name] = parsed;
|
const [, uuidRaw, server, portStr, , addons = "", nameRaw] = parsed;
|
||||||
|
let uuid = uuidRaw;
|
||||||
|
let name = nameRaw;
|
||||||
if (isShadowrocket) {
|
if (isShadowrocket) {
|
||||||
uuid = uuid.replace(/^.*?:/g, "");
|
uuid = uuidRaw.replace(/^.*?:/g, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = parseInt(portStr, 10);
|
const port = parseInt(portStr, 10);
|
||||||
@@ -598,6 +600,7 @@ function URI_VLESS(line: string): IProxyVlessConfig {
|
|||||||
proxy.network = "grpc";
|
proxy.network = "grpc";
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user