Refactor imports and improve code organization across multiple components and hooks
- Consolidated and reordered imports in various files for better readability and maintainability. - Removed unused imports and ensured consistent import styles. - Enhanced the structure of components by grouping related imports together. - Updated the layout and organization of hooks to streamline functionality. - Improved the overall code quality by following best practices in import management.
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
- 重构并简化服务模式启动检测流程,消除重复检测
|
- 重构并简化服务模式启动检测流程,消除重复检测
|
||||||
- 重构并简化窗口创建流程
|
- 重构并简化窗口创建流程
|
||||||
|
- 优化前端资源占用
|
||||||
|
|
||||||
### 🐞 修复问题
|
### 🐞 修复问题
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import js from "@eslint/js";
|
import js from "@eslint/js";
|
||||||
|
import configPrettier from "eslint-config-prettier";
|
||||||
|
import pluginImport from "eslint-plugin-import";
|
||||||
|
import pluginPrettier from "eslint-plugin-prettier";
|
||||||
import pluginReact from "eslint-plugin-react";
|
import pluginReact from "eslint-plugin-react";
|
||||||
import pluginReactHooks from "eslint-plugin-react-hooks";
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
||||||
|
import pluginReactRefresh from "eslint-plugin-react-refresh";
|
||||||
|
import pluginUnusedImports from "eslint-plugin-unused-imports";
|
||||||
import { defineConfig } from "eslint/config";
|
import { defineConfig } from "eslint/config";
|
||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
@@ -8,17 +13,89 @@ import tseslint from "typescript-eslint";
|
|||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
{
|
{
|
||||||
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
||||||
|
|
||||||
plugins: {
|
plugins: {
|
||||||
js,
|
js,
|
||||||
|
react: pluginReact,
|
||||||
"react-hooks": pluginReactHooks,
|
"react-hooks": pluginReactHooks,
|
||||||
|
import: pluginImport,
|
||||||
|
"react-refresh": pluginReactRefresh,
|
||||||
|
"unused-imports": pluginUnusedImports,
|
||||||
|
prettier: pluginPrettier,
|
||||||
},
|
},
|
||||||
extends: ["js/recommended", tseslint.configs.recommended],
|
|
||||||
languageOptions: { globals: globals.browser },
|
extends: [
|
||||||
|
"js/recommended",
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
pluginReact.configs.flat.recommended,
|
||||||
|
pluginReact.configs.flat["jsx-runtime"],
|
||||||
|
configPrettier,
|
||||||
|
],
|
||||||
|
|
||||||
|
languageOptions: {
|
||||||
|
globals: globals.browser,
|
||||||
|
},
|
||||||
|
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
|
// React
|
||||||
"react-hooks/rules-of-hooks": "error",
|
"react-hooks/rules-of-hooks": "error",
|
||||||
"react-hooks/exhaustive-deps": "error",
|
"react-hooks/exhaustive-deps": "error",
|
||||||
|
"react-refresh/only-export-components": [
|
||||||
|
"warn",
|
||||||
|
{ allowConstantExport: true },
|
||||||
|
],
|
||||||
|
|
||||||
|
// TypeScript
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
|
||||||
|
// unused-imports 代替 no-unused-vars
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
|
"unused-imports/no-unused-imports": "error",
|
||||||
|
"unused-imports/no-unused-vars": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
vars: "all",
|
||||||
|
varsIgnorePattern: "^_+$",
|
||||||
|
args: "after-used",
|
||||||
|
argsIgnorePattern: "^_+$",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// Import
|
||||||
|
"import/no-unresolved": "error",
|
||||||
|
"import/order": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
groups: [
|
||||||
|
"builtin",
|
||||||
|
"external",
|
||||||
|
"internal",
|
||||||
|
"parent",
|
||||||
|
"sibling",
|
||||||
|
"index",
|
||||||
|
],
|
||||||
|
"newlines-between": "always",
|
||||||
|
alphabetize: {
|
||||||
|
order: "asc",
|
||||||
|
caseInsensitive: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// 其他常见
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"no-case-declarations": "error",
|
||||||
|
"no-fallthrough": "error",
|
||||||
|
"no-empty": ["warn", { allowEmptyCatch: true }],
|
||||||
|
|
||||||
|
// Prettier 格式化问题
|
||||||
|
"prettier/prettier": "warn",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pluginReact.configs.flat["jsx-runtime"],
|
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -87,8 +87,13 @@
|
|||||||
"commander": "^14.0.1",
|
"commander": "^14.0.1",
|
||||||
"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-plugin-import": "^2.32.0",
|
||||||
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
|
"eslint-plugin-unused-imports": "^4.2.0",
|
||||||
"glob": "^11.0.3",
|
"glob": "^11.0.3",
|
||||||
"globals": "^16.4.0",
|
"globals": "^16.4.0",
|
||||||
"https-proxy-agent": "^7.0.6",
|
"https-proxy-agent": "^7.0.6",
|
||||||
|
|||||||
255
pnpm-lock.yaml
generated
255
pnpm-lock.yaml
generated
@@ -177,12 +177,27 @@ importers:
|
|||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.35.0
|
specifier: ^9.35.0
|
||||||
version: 9.35.0(jiti@2.5.1)
|
version: 9.35.0(jiti@2.5.1)
|
||||||
|
eslint-config-prettier:
|
||||||
|
specifier: ^10.1.8
|
||||||
|
version: 10.1.8(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
eslint-plugin-import:
|
||||||
|
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))
|
||||||
|
eslint-plugin-prettier:
|
||||||
|
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)
|
||||||
eslint-plugin-react:
|
eslint-plugin-react:
|
||||||
specifier: ^7.37.5
|
specifier: ^7.37.5
|
||||||
version: 7.37.5(eslint@9.35.0(jiti@2.5.1))
|
version: 7.37.5(eslint@9.35.0(jiti@2.5.1))
|
||||||
eslint-plugin-react-hooks:
|
eslint-plugin-react-hooks:
|
||||||
specifier: ^5.2.0
|
specifier: ^5.2.0
|
||||||
version: 5.2.0(eslint@9.35.0(jiti@2.5.1))
|
version: 5.2.0(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
eslint-plugin-react-refresh:
|
||||||
|
specifier: ^0.4.20
|
||||||
|
version: 0.4.20(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
eslint-plugin-unused-imports:
|
||||||
|
specifier: ^4.2.0
|
||||||
|
version: 4.2.0(@typescript-eslint/eslint-plugin@8.44.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))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))
|
||||||
glob:
|
glob:
|
||||||
specifier: ^11.0.3
|
specifier: ^11.0.3
|
||||||
version: 11.0.3
|
version: 11.0.3
|
||||||
@@ -1357,6 +1372,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==}
|
resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==}
|
||||||
engines: {node: '>= 10.0.0'}
|
engines: {node: '>= 10.0.0'}
|
||||||
|
|
||||||
|
'@pkgr/core@0.2.9':
|
||||||
|
resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==}
|
||||||
|
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||||
|
|
||||||
'@popperjs/core@2.11.8':
|
'@popperjs/core@2.11.8':
|
||||||
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
|
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
|
||||||
|
|
||||||
@@ -1472,6 +1491,9 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
|
'@rtsao/scc@1.1.0':
|
||||||
|
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
|
||||||
|
|
||||||
'@svgr/babel-plugin-add-jsx-attribute@8.0.0':
|
'@svgr/babel-plugin-add-jsx-attribute@8.0.0':
|
||||||
resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==}
|
resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
@@ -1668,6 +1690,9 @@ packages:
|
|||||||
'@types/json-schema@7.0.15':
|
'@types/json-schema@7.0.15':
|
||||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||||
|
|
||||||
|
'@types/json5@0.0.29':
|
||||||
|
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||||
|
|
||||||
'@types/lodash-es@4.17.12':
|
'@types/lodash-es@4.17.12':
|
||||||
resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
|
resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
|
||||||
|
|
||||||
@@ -1842,6 +1867,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==}
|
resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
array.prototype.findlastindex@1.2.6:
|
||||||
|
resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==}
|
||||||
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
array.prototype.flat@1.3.3:
|
array.prototype.flat@1.3.3:
|
||||||
resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==}
|
resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -2074,6 +2103,14 @@ packages:
|
|||||||
dayjs@1.11.18:
|
dayjs@1.11.18:
|
||||||
resolution: {integrity: sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==}
|
resolution: {integrity: sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==}
|
||||||
|
|
||||||
|
debug@3.2.7:
|
||||||
|
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||||
|
peerDependencies:
|
||||||
|
supports-color: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
supports-color:
|
||||||
|
optional: true
|
||||||
|
|
||||||
debug@4.4.1:
|
debug@4.4.1:
|
||||||
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
|
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
|
||||||
engines: {node: '>=6.0'}
|
engines: {node: '>=6.0'}
|
||||||
@@ -2208,18 +2245,86 @@ packages:
|
|||||||
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
|
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
|
eslint-config-prettier@10.1.8:
|
||||||
|
resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
eslint: '>=7.0.0'
|
||||||
|
|
||||||
|
eslint-import-resolver-node@0.3.9:
|
||||||
|
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||||
|
|
||||||
|
eslint-module-utils@2.12.1:
|
||||||
|
resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}
|
||||||
|
engines: {node: '>=4'}
|
||||||
|
peerDependencies:
|
||||||
|
'@typescript-eslint/parser': '*'
|
||||||
|
eslint: '*'
|
||||||
|
eslint-import-resolver-node: '*'
|
||||||
|
eslint-import-resolver-typescript: '*'
|
||||||
|
eslint-import-resolver-webpack: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@typescript-eslint/parser':
|
||||||
|
optional: true
|
||||||
|
eslint:
|
||||||
|
optional: true
|
||||||
|
eslint-import-resolver-node:
|
||||||
|
optional: true
|
||||||
|
eslint-import-resolver-typescript:
|
||||||
|
optional: true
|
||||||
|
eslint-import-resolver-webpack:
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
eslint-plugin-import@2.32.0:
|
||||||
|
resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==}
|
||||||
|
engines: {node: '>=4'}
|
||||||
|
peerDependencies:
|
||||||
|
'@typescript-eslint/parser': '*'
|
||||||
|
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@typescript-eslint/parser':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
eslint-plugin-prettier@5.5.4:
|
||||||
|
resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==}
|
||||||
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
|
peerDependencies:
|
||||||
|
'@types/eslint': '>=8.0.0'
|
||||||
|
eslint: '>=8.0.0'
|
||||||
|
eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0'
|
||||||
|
prettier: '>=3.0.0'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@types/eslint':
|
||||||
|
optional: true
|
||||||
|
eslint-config-prettier:
|
||||||
|
optional: true
|
||||||
|
|
||||||
eslint-plugin-react-hooks@5.2.0:
|
eslint-plugin-react-hooks@5.2.0:
|
||||||
resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==}
|
resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
peerDependencies:
|
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: ^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-refresh@0.4.20:
|
||||||
|
resolution: {integrity: sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: '>=8.40'
|
||||||
|
|
||||||
eslint-plugin-react@7.37.5:
|
eslint-plugin-react@7.37.5:
|
||||||
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
|
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
||||||
|
|
||||||
|
eslint-plugin-unused-imports@4.2.0:
|
||||||
|
resolution: {integrity: sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==}
|
||||||
|
peerDependencies:
|
||||||
|
'@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0
|
||||||
|
eslint: ^9.0.0 || ^8.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@typescript-eslint/eslint-plugin':
|
||||||
|
optional: true
|
||||||
|
|
||||||
eslint-scope@8.4.0:
|
eslint-scope@8.4.0:
|
||||||
resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==}
|
resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
@@ -2284,6 +2389,9 @@ packages:
|
|||||||
fast-deep-equal@3.1.3:
|
fast-deep-equal@3.1.3:
|
||||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||||
|
|
||||||
|
fast-diff@1.3.0:
|
||||||
|
resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
|
||||||
|
|
||||||
fast-glob@3.3.3:
|
fast-glob@3.3.3:
|
||||||
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
|
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
|
||||||
engines: {node: '>=8.6.0'}
|
engines: {node: '>=8.6.0'}
|
||||||
@@ -2691,6 +2799,10 @@ packages:
|
|||||||
json-stable-stringify-without-jsonify@1.0.1:
|
json-stable-stringify-without-jsonify@1.0.1:
|
||||||
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
|
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
|
||||||
|
|
||||||
|
json5@1.0.2:
|
||||||
|
resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
json5@2.2.3:
|
json5@2.2.3:
|
||||||
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
|
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@@ -2882,6 +2994,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
|
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
|
||||||
engines: {node: '>=16 || 14 >=14.17'}
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
|
|
||||||
|
minimist@1.2.8:
|
||||||
|
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
|
||||||
|
|
||||||
minipass@7.1.2:
|
minipass@7.1.2:
|
||||||
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
|
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
|
||||||
engines: {node: '>=16 || 14 >=14.17'}
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
@@ -2978,6 +3093,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==}
|
resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
object.groupby@1.0.3:
|
||||||
|
resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==}
|
||||||
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
object.values@1.2.1:
|
object.values@1.2.1:
|
||||||
resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==}
|
resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -3060,6 +3179,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|
||||||
|
prettier-linter-helpers@1.0.0:
|
||||||
|
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
|
||||||
|
engines: {node: '>=6.0.0'}
|
||||||
|
|
||||||
prettier@3.6.2:
|
prettier@3.6.2:
|
||||||
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
|
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
@@ -3384,6 +3507,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
|
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
|
strip-bom@3.0.0:
|
||||||
|
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
|
||||||
|
engines: {node: '>=4'}
|
||||||
|
|
||||||
strip-json-comments@3.1.1:
|
strip-json-comments@3.1.1:
|
||||||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@@ -3413,6 +3540,10 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
||||||
|
|
||||||
|
synckit@0.11.11:
|
||||||
|
resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==}
|
||||||
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
|
|
||||||
systemjs@6.15.1:
|
systemjs@6.15.1:
|
||||||
resolution: {integrity: sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==}
|
resolution: {integrity: sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==}
|
||||||
|
|
||||||
@@ -3449,6 +3580,9 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.8.4'
|
typescript: '>=4.8.4'
|
||||||
|
|
||||||
|
tsconfig-paths@3.15.0:
|
||||||
|
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
|
||||||
|
|
||||||
tslib@2.8.1:
|
tslib@2.8.1:
|
||||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||||
|
|
||||||
@@ -4953,6 +5087,8 @@ snapshots:
|
|||||||
'@parcel/watcher-win32-x64': 2.5.1
|
'@parcel/watcher-win32-x64': 2.5.1
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
'@pkgr/core@0.2.9': {}
|
||||||
|
|
||||||
'@popperjs/core@2.11.8': {}
|
'@popperjs/core@2.11.8': {}
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.34': {}
|
'@rolldown/pluginutils@1.0.0-beta.34': {}
|
||||||
@@ -5025,6 +5161,8 @@ snapshots:
|
|||||||
'@rollup/rollup-win32-x64-msvc@4.46.2':
|
'@rollup/rollup-win32-x64-msvc@4.46.2':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
'@rtsao/scc@1.1.0': {}
|
||||||
|
|
||||||
'@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.28.3)':
|
'@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.28.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.3
|
'@babel/core': 7.28.3
|
||||||
@@ -5213,6 +5351,8 @@ snapshots:
|
|||||||
|
|
||||||
'@types/json-schema@7.0.15': {}
|
'@types/json-schema@7.0.15': {}
|
||||||
|
|
||||||
|
'@types/json5@0.0.29': {}
|
||||||
|
|
||||||
'@types/lodash-es@4.17.12':
|
'@types/lodash-es@4.17.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/lodash': 4.17.16
|
'@types/lodash': 4.17.16
|
||||||
@@ -5442,6 +5582,16 @@ snapshots:
|
|||||||
es-object-atoms: 1.1.1
|
es-object-atoms: 1.1.1
|
||||||
es-shim-unscopables: 1.1.0
|
es-shim-unscopables: 1.1.0
|
||||||
|
|
||||||
|
array.prototype.findlastindex@1.2.6:
|
||||||
|
dependencies:
|
||||||
|
call-bind: 1.0.8
|
||||||
|
call-bound: 1.0.4
|
||||||
|
define-properties: 1.2.1
|
||||||
|
es-abstract: 1.24.0
|
||||||
|
es-errors: 1.3.0
|
||||||
|
es-object-atoms: 1.1.1
|
||||||
|
es-shim-unscopables: 1.1.0
|
||||||
|
|
||||||
array.prototype.flat@1.3.3:
|
array.prototype.flat@1.3.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.8
|
call-bind: 1.0.8
|
||||||
@@ -5696,6 +5846,10 @@ snapshots:
|
|||||||
|
|
||||||
dayjs@1.11.18: {}
|
dayjs@1.11.18: {}
|
||||||
|
|
||||||
|
debug@3.2.7:
|
||||||
|
dependencies:
|
||||||
|
ms: 2.1.3
|
||||||
|
|
||||||
debug@4.4.1:
|
debug@4.4.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
ms: 2.1.3
|
ms: 2.1.3
|
||||||
@@ -5923,10 +6077,74 @@ snapshots:
|
|||||||
|
|
||||||
escape-string-regexp@4.0.0: {}
|
escape-string-regexp@4.0.0: {}
|
||||||
|
|
||||||
|
eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)):
|
||||||
|
dependencies:
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
|
||||||
|
eslint-import-resolver-node@0.3.9:
|
||||||
|
dependencies:
|
||||||
|
debug: 3.2.7
|
||||||
|
is-core-module: 2.16.1
|
||||||
|
resolve: 1.22.10
|
||||||
|
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@9.35.0(jiti@2.5.1)):
|
||||||
|
dependencies:
|
||||||
|
debug: 3.2.7
|
||||||
|
optionalDependencies:
|
||||||
|
'@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-import-resolver-node: 0.3.9
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- 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)):
|
||||||
|
dependencies:
|
||||||
|
'@rtsao/scc': 1.1.0
|
||||||
|
array-includes: 3.1.9
|
||||||
|
array.prototype.findlastindex: 1.2.6
|
||||||
|
array.prototype.flat: 1.3.3
|
||||||
|
array.prototype.flatmap: 1.3.3
|
||||||
|
debug: 3.2.7
|
||||||
|
doctrine: 2.1.0
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
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))
|
||||||
|
hasown: 2.0.2
|
||||||
|
is-core-module: 2.16.1
|
||||||
|
is-glob: 4.0.3
|
||||||
|
minimatch: 3.1.2
|
||||||
|
object.fromentries: 2.0.8
|
||||||
|
object.groupby: 1.0.3
|
||||||
|
object.values: 1.2.1
|
||||||
|
semver: 6.3.1
|
||||||
|
string.prototype.trimend: 1.0.9
|
||||||
|
tsconfig-paths: 3.15.0
|
||||||
|
optionalDependencies:
|
||||||
|
'@typescript-eslint/parser': 8.44.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- eslint-import-resolver-typescript
|
||||||
|
- eslint-import-resolver-webpack
|
||||||
|
- supports-color
|
||||||
|
|
||||||
|
eslint-plugin-prettier@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):
|
||||||
|
dependencies:
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
prettier: 3.6.2
|
||||||
|
prettier-linter-helpers: 1.0.0
|
||||||
|
synckit: 0.11.11
|
||||||
|
optionalDependencies:
|
||||||
|
eslint-config-prettier: 10.1.8(eslint@9.35.0(jiti@2.5.1))
|
||||||
|
|
||||||
eslint-plugin-react-hooks@5.2.0(eslint@9.35.0(jiti@2.5.1)):
|
eslint-plugin-react-hooks@5.2.0(eslint@9.35.0(jiti@2.5.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.35.0(jiti@2.5.1)
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
|
||||||
|
eslint-plugin-react-refresh@0.4.20(eslint@9.35.0(jiti@2.5.1)):
|
||||||
|
dependencies:
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
|
||||||
eslint-plugin-react@7.37.5(eslint@9.35.0(jiti@2.5.1)):
|
eslint-plugin-react@7.37.5(eslint@9.35.0(jiti@2.5.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes: 3.1.9
|
array-includes: 3.1.9
|
||||||
@@ -5949,6 +6167,12 @@ snapshots:
|
|||||||
string.prototype.matchall: 4.0.12
|
string.prototype.matchall: 4.0.12
|
||||||
string.prototype.repeat: 1.0.0
|
string.prototype.repeat: 1.0.0
|
||||||
|
|
||||||
|
eslint-plugin-unused-imports@4.2.0(@typescript-eslint/eslint-plugin@8.44.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))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1)):
|
||||||
|
dependencies:
|
||||||
|
eslint: 9.35.0(jiti@2.5.1)
|
||||||
|
optionalDependencies:
|
||||||
|
'@typescript-eslint/eslint-plugin': 8.44.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))(typescript@5.9.2)
|
||||||
|
|
||||||
eslint-scope@8.4.0:
|
eslint-scope@8.4.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
esrecurse: 4.3.0
|
esrecurse: 4.3.0
|
||||||
@@ -6042,6 +6266,8 @@ snapshots:
|
|||||||
|
|
||||||
fast-deep-equal@3.1.3: {}
|
fast-deep-equal@3.1.3: {}
|
||||||
|
|
||||||
|
fast-diff@1.3.0: {}
|
||||||
|
|
||||||
fast-glob@3.3.3:
|
fast-glob@3.3.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nodelib/fs.stat': 2.0.5
|
'@nodelib/fs.stat': 2.0.5
|
||||||
@@ -6450,6 +6676,10 @@ snapshots:
|
|||||||
|
|
||||||
json-stable-stringify-without-jsonify@1.0.1: {}
|
json-stable-stringify-without-jsonify@1.0.1: {}
|
||||||
|
|
||||||
|
json5@1.0.2:
|
||||||
|
dependencies:
|
||||||
|
minimist: 1.2.8
|
||||||
|
|
||||||
json5@2.2.3: {}
|
json5@2.2.3: {}
|
||||||
|
|
||||||
jsonc-parser@3.3.1: {}
|
jsonc-parser@3.3.1: {}
|
||||||
@@ -6772,6 +7002,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion: 2.0.2
|
brace-expansion: 2.0.2
|
||||||
|
|
||||||
|
minimist@1.2.8: {}
|
||||||
|
|
||||||
minipass@7.1.2: {}
|
minipass@7.1.2: {}
|
||||||
|
|
||||||
minizlib@3.0.2:
|
minizlib@3.0.2:
|
||||||
@@ -6872,6 +7104,12 @@ snapshots:
|
|||||||
es-abstract: 1.24.0
|
es-abstract: 1.24.0
|
||||||
es-object-atoms: 1.1.1
|
es-object-atoms: 1.1.1
|
||||||
|
|
||||||
|
object.groupby@1.0.3:
|
||||||
|
dependencies:
|
||||||
|
call-bind: 1.0.8
|
||||||
|
define-properties: 1.2.1
|
||||||
|
es-abstract: 1.24.0
|
||||||
|
|
||||||
object.values@1.2.1:
|
object.values@1.2.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.8
|
call-bind: 1.0.8
|
||||||
@@ -6960,6 +7198,10 @@ snapshots:
|
|||||||
|
|
||||||
prelude-ls@1.2.1: {}
|
prelude-ls@1.2.1: {}
|
||||||
|
|
||||||
|
prettier-linter-helpers@1.0.0:
|
||||||
|
dependencies:
|
||||||
|
fast-diff: 1.3.0
|
||||||
|
|
||||||
prettier@3.6.2: {}
|
prettier@3.6.2: {}
|
||||||
|
|
||||||
prop-types@15.8.1:
|
prop-types@15.8.1:
|
||||||
@@ -7363,6 +7605,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex: 6.1.0
|
ansi-regex: 6.1.0
|
||||||
|
|
||||||
|
strip-bom@3.0.0: {}
|
||||||
|
|
||||||
strip-json-comments@3.1.1: {}
|
strip-json-comments@3.1.1: {}
|
||||||
|
|
||||||
style-to-js@1.1.16:
|
style-to-js@1.1.16:
|
||||||
@@ -7389,6 +7633,10 @@ snapshots:
|
|||||||
react: 19.1.1
|
react: 19.1.1
|
||||||
use-sync-external-store: 1.5.0(react@19.1.1)
|
use-sync-external-store: 1.5.0(react@19.1.1)
|
||||||
|
|
||||||
|
synckit@0.11.11:
|
||||||
|
dependencies:
|
||||||
|
'@pkgr/core': 0.2.9
|
||||||
|
|
||||||
systemjs@6.15.1: {}
|
systemjs@6.15.1: {}
|
||||||
|
|
||||||
tar@7.4.3:
|
tar@7.4.3:
|
||||||
@@ -7429,6 +7677,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
typescript: 5.9.2
|
typescript: 5.9.2
|
||||||
|
|
||||||
|
tsconfig-paths@3.15.0:
|
||||||
|
dependencies:
|
||||||
|
'@types/json5': 0.0.29
|
||||||
|
json5: 1.0.2
|
||||||
|
minimist: 1.2.8
|
||||||
|
strip-bom: 3.0.0
|
||||||
|
|
||||||
tslib@2.8.1: {}
|
tslib@2.8.1: {}
|
||||||
|
|
||||||
tunnel@0.0.6: {}
|
tunnel@0.0.6: {}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { AppDataProvider } from "./providers/app-data-provider";
|
|
||||||
import Layout from "./pages/_layout";
|
import Layout from "./pages/_layout";
|
||||||
|
import { AppDataProvider } from "./providers/app-data-provider";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useSyncExternalStore } from "react";
|
|
||||||
import { Snackbar, Alert, IconButton, Box } from "@mui/material";
|
|
||||||
import { CloseRounded } from "@mui/icons-material";
|
import { CloseRounded } from "@mui/icons-material";
|
||||||
|
import { Snackbar, Alert, IconButton, Box } from "@mui/material";
|
||||||
|
import React, { useSyncExternalStore } from "react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
subscribeNotices,
|
subscribeNotices,
|
||||||
hideNotice,
|
hideNotice,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ReactNode } from "react";
|
import { LoadingButton } from "@mui/lab";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
type SxProps,
|
type SxProps,
|
||||||
type Theme,
|
type Theme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { LoadingButton } from "@mui/lab";
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: ReactNode;
|
title: ReactNode;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { alpha, Box, Typography } from "@mui/material";
|
|
||||||
import { InboxRounded } from "@mui/icons-material";
|
import { InboxRounded } from "@mui/icons-material";
|
||||||
|
import { alpha, Box, Typography } from "@mui/material";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
|
||||||
import { Box, styled } from "@mui/material";
|
import { Box, styled } from "@mui/material";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
|
||||||
import { Box, CircularProgress } from "@mui/material";
|
import { Box, CircularProgress } from "@mui/material";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
interface BaseLoadingOverlayProps {
|
interface BaseLoadingOverlayProps {
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { ReactNode } from "react";
|
|
||||||
import { Typography } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
import { BaseErrorBoundary } from "./base-error-boundary";
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
|
import React, { ReactNode } from "react";
|
||||||
|
|
||||||
|
import { BaseErrorBoundary } from "./base-error-boundary";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title?: React.ReactNode; // the page title
|
title?: React.ReactNode; // the page title
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { Box, SvgIcon, TextField, styled } from "@mui/material";
|
import { Box, SvgIcon, TextField, styled } from "@mui/material";
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import { ChangeEvent, useEffect, useMemo, useRef, useState } from "react";
|
import { ChangeEvent, useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import matchCaseIcon from "@/assets/image/component/match_case.svg?react";
|
import matchCaseIcon from "@/assets/image/component/match_case.svg?react";
|
||||||
import matchWholeWordIcon from "@/assets/image/component/match_whole_word.svg?react";
|
import matchWholeWordIcon from "@/assets/image/component/match_whole_word.svg?react";
|
||||||
import useRegularExpressionIcon from "@/assets/image/component/use_regular_expression.svg?react";
|
import useRegularExpressionIcon from "@/assets/image/component/use_regular_expression.svg?react";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
export type SearchState = {
|
export type SearchState = {
|
||||||
text: string;
|
text: string;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import { InfoRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
IconButton,
|
IconButton,
|
||||||
IconButtonProps,
|
IconButtonProps,
|
||||||
SvgIconProps,
|
SvgIconProps,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { InfoRounded } from "@mui/icons-material";
|
|
||||||
|
|
||||||
interface Props extends IconButtonProps {
|
interface Props extends IconButtonProps {
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { Component, ErrorInfo, ReactNode } from "react";
|
|
||||||
import { Box, Typography, Button, Alert, Collapse } from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
ErrorOutlineRounded,
|
ErrorOutlineRounded,
|
||||||
RefreshRounded,
|
RefreshRounded,
|
||||||
BugReportRounded,
|
BugReportRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import { Box, Typography, Button, Alert, Collapse } from "@mui/material";
|
||||||
|
import React, { Component, ErrorInfo, ReactNode } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import dayjs from "dayjs";
|
|
||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { Box, Button, Snackbar, useTheme } from "@mui/material";
|
import { Box, Button, Snackbar, useTheme } from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { t } from "i18next";
|
||||||
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
|
||||||
import { deleteConnection } from "@/services/cmds";
|
import { deleteConnection } from "@/services/cmds";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
import { t } from "i18next";
|
|
||||||
|
|
||||||
export interface ConnectionDetailRef {
|
export interface ConnectionDetailRef {
|
||||||
open: (detail: IConnectionsItem) => void;
|
open: (detail: IConnectionsItem) => void;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import dayjs from "dayjs";
|
import { CloseRounded } from "@mui/icons-material";
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import {
|
import {
|
||||||
styled,
|
styled,
|
||||||
ListItem,
|
ListItem,
|
||||||
@@ -8,7 +7,9 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
alpha,
|
alpha,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { CloseRounded } from "@mui/icons-material";
|
import { useLockFn } from "ahooks";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
import { deleteConnection } from "@/services/cmds";
|
import { deleteConnection } from "@/services/cmds";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import dayjs from "dayjs";
|
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { DataGrid, GridColDef, GridColumnResizeParams } from "@mui/x-data-grid";
|
import { DataGrid, GridColDef, GridColumnResizeParams } from "@mui/x-data-grid";
|
||||||
import { truncateStr } from "@/utils/truncate-str";
|
import dayjs from "dayjs";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
|
||||||
import { t } from "i18next";
|
|
||||||
import { useLocalStorage } from "foxact/use-local-storage";
|
import { useLocalStorage } from "foxact/use-local-storage";
|
||||||
|
import { t } from "i18next";
|
||||||
|
import { useMemo, useState } from "react";
|
||||||
|
|
||||||
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
import { truncateStr } from "@/utils/truncate-str";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
connections: IConnectionsItem[];
|
connections: IConnectionsItem[];
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Typography, Stack, Divider } from "@mui/material";
|
|
||||||
import { DeveloperBoardOutlined } from "@mui/icons-material";
|
import { DeveloperBoardOutlined } from "@mui/icons-material";
|
||||||
import { useClash } from "@/hooks/use-clash";
|
import { Typography, Stack, Divider } from "@mui/material";
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
|
import { useClash } from "@/hooks/use-clash";
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
|
||||||
// 将毫秒转换为时:分:秒格式的函数
|
// 将毫秒转换为时:分:秒格式的函数
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Box, Typography, Paper, Stack } from "@mui/material";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { closeAllConnections } from "@/services/cmds";
|
|
||||||
import { patchClashMode } from "@/services/cmds";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import {
|
import {
|
||||||
LanguageRounded,
|
LanguageRounded,
|
||||||
MultipleStopRounded,
|
MultipleStopRounded,
|
||||||
DirectionsRounded,
|
DirectionsRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import { Box, Typography, Paper, Stack } from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { closeAllConnections } from "@/services/cmds";
|
||||||
|
import { patchClashMode } from "@/services/cmds";
|
||||||
|
|
||||||
export const ClashModeCard = () => {
|
export const ClashModeCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import {
|
||||||
|
SignalWifi4Bar as SignalStrong,
|
||||||
|
SignalWifi3Bar as SignalGood,
|
||||||
|
SignalWifi2Bar as SignalMedium,
|
||||||
|
SignalWifi1Bar as SignalWeak,
|
||||||
|
SignalWifi0Bar as SignalNone,
|
||||||
|
WifiOff as SignalError,
|
||||||
|
ChevronRight,
|
||||||
|
SortRounded,
|
||||||
|
AccessTimeRounded,
|
||||||
|
SortByAlphaRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -15,23 +26,13 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useEffect, useState, useMemo, useCallback } from "react";
|
import { useEffect, useState, useMemo, useCallback } from "react";
|
||||||
import {
|
import { useTranslation } from "react-i18next";
|
||||||
SignalWifi4Bar as SignalStrong,
|
|
||||||
SignalWifi3Bar as SignalGood,
|
|
||||||
SignalWifi2Bar as SignalMedium,
|
|
||||||
SignalWifi1Bar as SignalWeak,
|
|
||||||
SignalWifi0Bar as SignalNone,
|
|
||||||
WifiOff as SignalError,
|
|
||||||
ChevronRight,
|
|
||||||
SortRounded,
|
|
||||||
AccessTimeRounded,
|
|
||||||
SortByAlphaRounded,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { EnhancedCard } from "@/components/home/enhanced-card";
|
import { EnhancedCard } from "@/components/home/enhanced-card";
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import { useProxySelection } from "@/hooks/use-proxy-selection";
|
import { useProxySelection } from "@/hooks/use-proxy-selection";
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
// 本地存储的键名
|
// 本地存储的键名
|
||||||
const STORAGE_KEY_GROUP = "clash-verge-selected-proxy-group";
|
const STORAGE_KEY_GROUP = "clash-verge-selected-proxy-group";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Box, useTheme } from "@mui/material";
|
||||||
import {
|
import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
useImperativeHandle,
|
useImperativeHandle,
|
||||||
@@ -8,13 +9,13 @@ import {
|
|||||||
useRef,
|
useRef,
|
||||||
memo,
|
memo,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { Box, useTheme } from "@mui/material";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
|
||||||
import {
|
import {
|
||||||
useTrafficGraphDataEnhanced,
|
useTrafficGraphDataEnhanced,
|
||||||
type ITrafficDataPoint,
|
type ITrafficDataPoint,
|
||||||
} from "@/hooks/use-traffic-monitor";
|
} from "@/hooks/use-traffic-monitor";
|
||||||
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
// 流量数据项接口
|
// 流量数据项接口
|
||||||
interface ITrafficItem {
|
interface ITrafficItem {
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
import { useRef, useCallback, memo, useMemo } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
|
||||||
Typography,
|
|
||||||
Paper,
|
|
||||||
alpha,
|
|
||||||
useTheme,
|
|
||||||
PaletteColor,
|
|
||||||
Grid,
|
|
||||||
Box,
|
|
||||||
} from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
ArrowUpwardRounded,
|
ArrowUpwardRounded,
|
||||||
ArrowDownwardRounded,
|
ArrowDownwardRounded,
|
||||||
@@ -17,19 +6,32 @@ import {
|
|||||||
CloudUploadRounded,
|
CloudUploadRounded,
|
||||||
CloudDownloadRounded,
|
CloudDownloadRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import {
|
||||||
|
Typography,
|
||||||
|
Paper,
|
||||||
|
alpha,
|
||||||
|
useTheme,
|
||||||
|
PaletteColor,
|
||||||
|
Grid,
|
||||||
|
Box,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useRef, useCallback, memo, useMemo } from "react";
|
||||||
|
import { ReactNode } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import useSWR from "swr";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EnhancedCanvasTrafficGraph,
|
EnhancedCanvasTrafficGraph,
|
||||||
type EnhancedCanvasTrafficGraphRef,
|
type EnhancedCanvasTrafficGraphRef,
|
||||||
} from "./enhanced-canvas-traffic-graph";
|
} from "./enhanced-canvas-traffic-graph";
|
||||||
import { useVisibility } from "@/hooks/use-visibility";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
|
||||||
import { isDebugEnabled, gc } from "@/services/cmds";
|
|
||||||
import { ReactNode } from "react";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
|
||||||
import { TrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
import { TrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
||||||
import useSWR from "swr";
|
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { useVisibility } from "@/hooks/use-visibility";
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { isDebugEnabled, gc } from "@/services/cmds";
|
||||||
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
interface StatCardProps {
|
interface StatCardProps {
|
||||||
icon: ReactNode;
|
icon: ReactNode;
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import {
|
||||||
|
CloudUploadOutlined,
|
||||||
|
StorageOutlined,
|
||||||
|
UpdateOutlined,
|
||||||
|
DnsOutlined,
|
||||||
|
SpeedOutlined,
|
||||||
|
EventOutlined,
|
||||||
|
LaunchOutlined,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -10,24 +18,18 @@ import {
|
|||||||
Link,
|
Link,
|
||||||
keyframes,
|
keyframes,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import {
|
|
||||||
CloudUploadOutlined,
|
|
||||||
StorageOutlined,
|
|
||||||
UpdateOutlined,
|
|
||||||
DnsOutlined,
|
|
||||||
SpeedOutlined,
|
|
||||||
EventOutlined,
|
|
||||||
LaunchOutlined,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
|
||||||
import { useMemo, useCallback, useState } from "react";
|
|
||||||
import { openWebUrl, updateProfile } from "@/services/cmds";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import dayjs from "dayjs";
|
||||||
|
import { useMemo, useCallback, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
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 { showNotice } from "@/services/noticeService";
|
||||||
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
// 定义旋转动画
|
// 定义旋转动画
|
||||||
const round = keyframes`
|
const round = keyframes`
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Box, Typography, Button, Skeleton, IconButton } from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
LocationOnOutlined,
|
LocationOnOutlined,
|
||||||
RefreshOutlined,
|
RefreshOutlined,
|
||||||
VisibilityOutlined,
|
VisibilityOutlined,
|
||||||
VisibilityOffOutlined,
|
VisibilityOffOutlined,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
import { Box, Typography, Button, Skeleton, IconButton } from "@mui/material";
|
||||||
import { getIpInfo } from "@/services/api";
|
|
||||||
import { useState, useEffect, useCallback, memo } from "react";
|
import { useState, useEffect, useCallback, memo } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
|
import { getIpInfo } from "@/services/api";
|
||||||
|
|
||||||
// 定义刷新时间(秒)
|
// 定义刷新时间(秒)
|
||||||
const IP_REFRESH_SECONDS = 300;
|
const IP_REFRESH_SECONDS = 300;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import {
|
||||||
|
ComputerRounded,
|
||||||
|
TroubleshootRounded,
|
||||||
|
HelpOutlineRounded,
|
||||||
|
SvgIconComponent,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -10,16 +15,12 @@ import {
|
|||||||
Fade,
|
Fade,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useState, useMemo, memo, FC } from "react";
|
import { useState, useMemo, memo, FC } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
||||||
import {
|
|
||||||
ComputerRounded,
|
|
||||||
TroubleshootRounded,
|
|
||||||
HelpOutlineRounded,
|
|
||||||
SvgIconComponent,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
|
||||||
import { useSystemProxyState } from "@/hooks/use-system-proxy-state";
|
import { useSystemProxyState } from "@/hooks/use-system-proxy-state";
|
||||||
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
const LOCAL_STORAGE_TAB_KEY = "clash-verge-proxy-active-tab";
|
const LOCAL_STORAGE_TAB_KEY = "clash-verge-proxy-active-tab";
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
|
||||||
Typography,
|
|
||||||
Stack,
|
|
||||||
Divider,
|
|
||||||
Chip,
|
|
||||||
IconButton,
|
|
||||||
Tooltip,
|
|
||||||
} from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
InfoOutlined,
|
InfoOutlined,
|
||||||
SettingsOutlined,
|
SettingsOutlined,
|
||||||
@@ -15,18 +6,29 @@ import {
|
|||||||
DnsOutlined,
|
DnsOutlined,
|
||||||
ExtensionOutlined,
|
ExtensionOutlined,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import {
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
Typography,
|
||||||
import useSWR from "swr";
|
Stack,
|
||||||
import { getSystemInfo } from "@/services/cmds";
|
Divider,
|
||||||
import { useNavigate } from "react-router-dom";
|
Chip,
|
||||||
|
IconButton,
|
||||||
|
Tooltip,
|
||||||
|
} from "@mui/material";
|
||||||
import { version as appVersion } from "@root/package.json";
|
import { version as appVersion } from "@root/package.json";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
||||||
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 { showNotice } from "@/services/noticeService";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
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 { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
|
import { getSystemInfo } from "@/services/cmds";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const SystemInfoCard = () => {
|
export const SystemInfoCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { useEffect, useRef, useMemo, useCallback } from "react";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { Box, IconButton, Tooltip, alpha, styled, Grid } from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@@ -10,13 +7,13 @@ import {
|
|||||||
DragEndEvent,
|
DragEndEvent,
|
||||||
} from "@dnd-kit/core";
|
} from "@dnd-kit/core";
|
||||||
import { SortableContext } from "@dnd-kit/sortable";
|
import { SortableContext } from "@dnd-kit/sortable";
|
||||||
|
import { Add, NetworkCheck } from "@mui/icons-material";
|
||||||
import { useTranslation } from "react-i18next";
|
import { Box, IconButton, Tooltip, alpha, styled, Grid } from "@mui/material";
|
||||||
import { TestViewer, TestViewerRef } from "@/components/test/test-viewer";
|
|
||||||
import { TestItem } from "@/components/test/test-item";
|
|
||||||
import { emit } from "@tauri-apps/api/event";
|
import { emit } from "@tauri-apps/api/event";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import { Add, NetworkCheck } from "@mui/icons-material";
|
import { useEffect, useRef, useMemo, useCallback } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
|
|
||||||
// test icons
|
// test icons
|
||||||
@@ -24,6 +21,9 @@ 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";
|
||||||
import google from "@/assets/image/test/google.svg?raw";
|
import google from "@/assets/image/test/google.svg?raw";
|
||||||
import youtube from "@/assets/image/test/youtube.svg?raw";
|
import youtube from "@/assets/image/test/youtube.svg?raw";
|
||||||
|
import { TestItem } from "@/components/test/test-item";
|
||||||
|
import { TestViewer, TestViewerRef } from "@/components/test/test-viewer";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
|
||||||
// 自定义滚动条样式
|
// 自定义滚动条样式
|
||||||
const ScrollBox = styled(Box)(({ theme }) => ({
|
const ScrollBox = styled(Box)(({ theme }) => ({
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
ListItemIcon,
|
ListItemIcon,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useMatch, useResolvedPath, useNavigate } from "react-router-dom";
|
import { useMatch, useResolvedPath, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
interface Props {
|
interface Props {
|
||||||
to: string;
|
to: string;
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
import { useEffect, useRef } from "react";
|
|
||||||
import { Box, Typography } from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
ArrowDownwardRounded,
|
ArrowDownwardRounded,
|
||||||
ArrowUpwardRounded,
|
ArrowUpwardRounded,
|
||||||
MemoryRounded,
|
MemoryRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
import { Box, Typography } from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useEffect, useRef } from "react";
|
||||||
import { TrafficGraph, type TrafficRef } from "./traffic-graph";
|
|
||||||
import { useVisibility } from "@/hooks/use-visibility";
|
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { isDebugEnabled, gc, startTrafficService } from "@/services/cmds";
|
|
||||||
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
|
||||||
import { LightweightTrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
|
import { TrafficGraph, type TrafficRef } from "./traffic-graph";
|
||||||
|
|
||||||
|
import { LightweightTrafficErrorBoundary } from "@/components/common/traffic-error-boundary";
|
||||||
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
|
import { useTrafficDataEnhanced } from "@/hooks/use-traffic-monitor";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { useVisibility } from "@/hooks/use-visibility";
|
||||||
|
import { isDebugEnabled, gc, startTrafficService } from "@/services/cmds";
|
||||||
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
// setup the traffic
|
// setup the traffic
|
||||||
export const LayoutTraffic = () => {
|
export const LayoutTraffic = () => {
|
||||||
const { data: isDebug } = useSWR(
|
const { data: isDebug } = useSWR(
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { IconButton, Fade, SxProps, Theme } from "@mui/material";
|
|
||||||
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
||||||
|
import { IconButton, Fade, SxProps, Theme } from "@mui/material";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
|
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
||||||
|
|
||||||
const maxPoint = 30;
|
const maxPoint = 30;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import useSWR from "swr";
|
|
||||||
import { useRef } from "react";
|
|
||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import { check } from "@tauri-apps/plugin-updater";
|
import { check } from "@tauri-apps/plugin-updater";
|
||||||
import { UpdateViewer } from "../setting/mods/update-viewer";
|
import { useRef } from "react";
|
||||||
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { DialogRef } from "../base";
|
import { DialogRef } from "../base";
|
||||||
|
import { UpdateViewer } from "../setting/mods/update-viewer";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { defaultDarkTheme, defaultTheme } from "@/pages/_theme";
|
|
||||||
import { useSetThemeMode, useThemeMode } from "@/services/states";
|
|
||||||
import { alpha, createTheme, Theme as MuiTheme, Shadows } from "@mui/material";
|
import { alpha, createTheme, Theme as MuiTheme, Shadows } from "@mui/material";
|
||||||
import {
|
import {
|
||||||
arSD as arXDataGrid,
|
arSD as arXDataGrid,
|
||||||
@@ -17,6 +14,10 @@ import { Theme as TauriOsTheme } from "@tauri-apps/api/window";
|
|||||||
import { useEffect, useMemo } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { defaultDarkTheme, defaultTheme } from "@/pages/_theme";
|
||||||
|
import { useSetThemeMode, useThemeMode } from "@/services/states";
|
||||||
|
|
||||||
const languagePackMap: Record<string, any> = {
|
const languagePackMap: Record<string, any> = {
|
||||||
zh: { ...zhXDataGrid },
|
zh: { ...zhXDataGrid },
|
||||||
fa: { ...faXDataGrid },
|
fa: { ...faXDataGrid },
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { styled, Box } from "@mui/material";
|
import { styled, Box } from "@mui/material";
|
||||||
|
|
||||||
import { SearchState } from "@/components/base/base-search-box";
|
import { SearchState } from "@/components/base/base-search-box";
|
||||||
|
|
||||||
const Item = styled(Box)(({ theme: { palette, typography } }) => ({
|
const Item = styled(Box)(({ theme: { palette, typography } }) => ({
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { useEffect } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
@@ -7,6 +5,8 @@ import {
|
|||||||
DialogContent,
|
DialogContent,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { ReactNode, useEffect, useRef, useState } from "react";
|
import {
|
||||||
import { useLockFn } from "ahooks";
|
FormatPaintRounded,
|
||||||
import { useTranslation } from "react-i18next";
|
OpenInFullRounded,
|
||||||
|
CloseFullscreenRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
ButtonGroup,
|
ButtonGroup,
|
||||||
@@ -10,25 +12,23 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
IconButton,
|
IconButton,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import {
|
|
||||||
FormatPaintRounded,
|
|
||||||
OpenInFullRounded,
|
|
||||||
CloseFullscreenRounded,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import { useThemeMode } from "@/services/states";
|
|
||||||
import { nanoid } from "nanoid";
|
|
||||||
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
|
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { useLockFn } from "ahooks";
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import debounce from "@/utils/debounce";
|
|
||||||
|
|
||||||
import * as monaco from "monaco-editor";
|
|
||||||
import MonacoEditor from "react-monaco-editor";
|
|
||||||
import { configureMonacoYaml } from "monaco-yaml";
|
|
||||||
import { type JSONSchema7 } from "json-schema";
|
import { type JSONSchema7 } from "json-schema";
|
||||||
import metaSchema from "meta-json-schema/schemas/meta-json-schema.json";
|
|
||||||
import mergeSchema from "meta-json-schema/schemas/clash-verge-merge-json-schema.json";
|
import mergeSchema from "meta-json-schema/schemas/clash-verge-merge-json-schema.json";
|
||||||
|
import metaSchema from "meta-json-schema/schemas/meta-json-schema.json";
|
||||||
|
import * as monaco from "monaco-editor";
|
||||||
|
import { configureMonacoYaml } from "monaco-yaml";
|
||||||
|
import { nanoid } from "nanoid";
|
||||||
|
import { ReactNode, useEffect, useRef, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import MonacoEditor from "react-monaco-editor";
|
||||||
import pac from "types-pac/pac.d.ts?raw";
|
import pac from "types-pac/pac.d.ts?raw";
|
||||||
|
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useThemeMode } from "@/services/states";
|
||||||
|
import debounce from "@/utils/debounce";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
const appWindow = getCurrentWebviewWindow();
|
const appWindow = getCurrentWebviewWindow();
|
||||||
|
|
||||||
type Language = "yaml" | "javascript" | "css";
|
type Language = "yaml" | "javascript" | "css";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRef, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Box, Button, Typography } from "@mui/material";
|
import { Box, Button, Typography } from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import { useRef, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onChange: (file: File, value: string) => void;
|
onChange: (file: File, value: string) => void;
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
|
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
IconButton,
|
IconButton,
|
||||||
@@ -6,12 +9,10 @@ import {
|
|||||||
alpha,
|
alpha,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
|
||||||
import { downloadIconCache } from "@/services/cmds";
|
|
||||||
import { convertFileSrc } from "@tauri-apps/api/core";
|
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
import { downloadIconCache } from "@/services/cmds";
|
||||||
interface Props {
|
interface Props {
|
||||||
type: "prepend" | "original" | "delete" | "append";
|
type: "prepend" | "original" | "delete" | "append";
|
||||||
group: IProxyGroupConfig;
|
group: IProxyGroupConfig;
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@@ -15,6 +11,10 @@ import {
|
|||||||
SortableContext,
|
SortableContext,
|
||||||
sortableKeyboardCoordinates,
|
sortableKeyboardCoordinates,
|
||||||
} from "@dnd-kit/sortable";
|
} from "@dnd-kit/sortable";
|
||||||
|
import {
|
||||||
|
VerticalAlignTopRounded,
|
||||||
|
VerticalAlignBottomRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Autocomplete,
|
Autocomplete,
|
||||||
Box,
|
Box,
|
||||||
@@ -30,28 +30,30 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
import {
|
import {
|
||||||
VerticalAlignTopRounded,
|
requestIdleCallback,
|
||||||
VerticalAlignBottomRounded,
|
cancelIdleCallback,
|
||||||
} from "@mui/icons-material";
|
} from "foxact/request-idle-callback";
|
||||||
|
import yaml from "js-yaml";
|
||||||
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import MonacoEditor from "react-monaco-editor";
|
||||||
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
|
import { BaseSearchBox } from "../base/base-search-box";
|
||||||
|
|
||||||
|
import { Switch } from "@/components/base";
|
||||||
import { GroupItem } from "@/components/profile/group-item";
|
import { GroupItem } from "@/components/profile/group-item";
|
||||||
import {
|
import {
|
||||||
getNetworkInterfaces,
|
getNetworkInterfaces,
|
||||||
readProfileFile,
|
readProfileFile,
|
||||||
saveProfileFile,
|
saveProfileFile,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import { Switch } from "@/components/base";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
import { Virtuoso } from "react-virtuoso";
|
|
||||||
import MonacoEditor from "react-monaco-editor";
|
|
||||||
import { useThemeMode } from "@/services/states";
|
|
||||||
import { Controller, useForm } from "react-hook-form";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import {
|
import { useThemeMode } from "@/services/states";
|
||||||
requestIdleCallback,
|
import getSystem from "@/utils/get-system";
|
||||||
cancelIdleCallback,
|
|
||||||
} from "foxact/request-idle-callback";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
proxiesUid: string;
|
proxiesUid: string;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Fragment } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Chip,
|
Chip,
|
||||||
@@ -10,6 +8,9 @@ import {
|
|||||||
Divider,
|
Divider,
|
||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { Fragment } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { BaseEmpty } from "@/components/base";
|
import { BaseEmpty } from "@/components/base";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import dayjs from "dayjs";
|
|
||||||
import { mutate } from "swr";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
|
import { RefreshRounded, DragIndicatorRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -15,8 +11,20 @@ import {
|
|||||||
Menu,
|
Menu,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { RefreshRounded, DragIndicatorRounded } from "@mui/icons-material";
|
import { open } from "@tauri-apps/plugin-shell";
|
||||||
import { useLoadingCache, useSetLoadingCache } from "@/services/states";
|
import { useLockFn } from "ahooks";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { mutate } from "swr";
|
||||||
|
|
||||||
|
import { ProfileBox } from "./profile-box";
|
||||||
|
import { ProxiesEditorViewer } from "./proxies-editor-viewer";
|
||||||
|
|
||||||
|
import { ConfirmViewer } from "@/components/profile/confirm-viewer";
|
||||||
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
|
import { GroupsEditorViewer } from "@/components/profile/groups-editor-viewer";
|
||||||
|
import { RulesEditorViewer } from "@/components/profile/rules-editor-viewer";
|
||||||
import {
|
import {
|
||||||
viewProfile,
|
viewProfile,
|
||||||
readProfileFile,
|
readProfileFile,
|
||||||
@@ -25,14 +33,8 @@ import {
|
|||||||
getNextUpdateTime,
|
getNextUpdateTime,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import { GroupsEditorViewer } from "@/components/profile/groups-editor-viewer";
|
import { useLoadingCache, useSetLoadingCache } from "@/services/states";
|
||||||
import { RulesEditorViewer } from "@/components/profile/rules-editor-viewer";
|
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
|
||||||
import { ProfileBox } from "./profile-box";
|
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
import { ConfirmViewer } from "@/components/profile/confirm-viewer";
|
|
||||||
import { open } from "@tauri-apps/plugin-shell";
|
|
||||||
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); }
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { FeaturedPlayListRounded } from "@mui/icons-material";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Badge,
|
Badge,
|
||||||
@@ -10,11 +8,15 @@ import {
|
|||||||
Menu,
|
Menu,
|
||||||
IconButton,
|
IconButton,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { FeaturedPlayListRounded } from "@mui/icons-material";
|
import { useLockFn } from "ahooks";
|
||||||
import { viewProfile, readProfileFile, saveProfileFile } from "@/services/cmds";
|
import { useState } from "react";
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
import { useTranslation } from "react-i18next";
|
||||||
import { ProfileBox } from "./profile-box";
|
|
||||||
import { LogViewer } from "./log-viewer";
|
import { LogViewer } from "./log-viewer";
|
||||||
|
import { ProfileBox } from "./profile-box";
|
||||||
|
|
||||||
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
|
import { viewProfile, readProfileFile, saveProfileFile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
import {
|
|
||||||
forwardRef,
|
|
||||||
useEffect,
|
|
||||||
useImperativeHandle,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useForm, Controller } from "react-hook-form";
|
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
FormControl,
|
FormControl,
|
||||||
@@ -18,11 +8,23 @@ import {
|
|||||||
styled,
|
styled,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { createProfile, patchProfile } from "@/services/cmds";
|
|
||||||
import { BaseDialog, Switch } from "@/components/base";
|
|
||||||
import { version } from "@root/package.json";
|
import { version } from "@root/package.json";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import {
|
||||||
|
forwardRef,
|
||||||
|
useEffect,
|
||||||
|
useImperativeHandle,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
|
import { useForm, Controller } from "react-hook-form";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { FileInput } from "./file-input";
|
import { FileInput } from "./file-input";
|
||||||
|
|
||||||
|
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 { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@@ -15,6 +11,10 @@ import {
|
|||||||
SortableContext,
|
SortableContext,
|
||||||
sortableKeyboardCoordinates,
|
sortableKeyboardCoordinates,
|
||||||
} from "@dnd-kit/sortable";
|
} from "@dnd-kit/sortable";
|
||||||
|
import {
|
||||||
|
VerticalAlignTopRounded,
|
||||||
|
VerticalAlignBottomRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -27,19 +27,21 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import {
|
import { useLockFn } from "ahooks";
|
||||||
VerticalAlignTopRounded,
|
import yaml from "js-yaml";
|
||||||
VerticalAlignBottomRounded,
|
import { useEffect, useMemo, useState } from "react";
|
||||||
} from "@mui/icons-material";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import MonacoEditor from "react-monaco-editor";
|
||||||
|
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 getSystem from "@/utils/get-system";
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
import { Virtuoso } from "react-virtuoso";
|
|
||||||
import MonacoEditor from "react-monaco-editor";
|
|
||||||
import { useThemeMode } from "@/services/states";
|
|
||||||
import parseUri from "@/utils/uri-parser";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useThemeMode } from "@/services/states";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
import parseUri from "@/utils/uri-parser";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
profileUid: string;
|
profileUid: string;
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
|
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
IconButton,
|
IconButton,
|
||||||
@@ -6,9 +9,6 @@ import {
|
|||||||
alpha,
|
alpha,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type: "prepend" | "original" | "delete" | "append";
|
type: "prepend" | "original" | "delete" | "append";
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
|
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
IconButton,
|
IconButton,
|
||||||
@@ -6,9 +9,6 @@ import {
|
|||||||
alpha,
|
alpha,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { DeleteForeverRounded, UndoRounded } from "@mui/icons-material";
|
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type: "prepend" | "original" | "delete" | "append";
|
type: "prepend" | "original" | "delete" | "append";
|
||||||
ruleRaw: string;
|
ruleRaw: string;
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@@ -15,6 +11,10 @@ import {
|
|||||||
SortableContext,
|
SortableContext,
|
||||||
sortableKeyboardCoordinates,
|
sortableKeyboardCoordinates,
|
||||||
} from "@dnd-kit/sortable";
|
} from "@dnd-kit/sortable";
|
||||||
|
import {
|
||||||
|
VerticalAlignTopRounded,
|
||||||
|
VerticalAlignBottomRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Autocomplete,
|
Autocomplete,
|
||||||
Box,
|
Box,
|
||||||
@@ -29,19 +29,21 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import {
|
import { useLockFn } from "ahooks";
|
||||||
VerticalAlignTopRounded,
|
import yaml from "js-yaml";
|
||||||
VerticalAlignBottomRounded,
|
import { useEffect, useMemo, useState } from "react";
|
||||||
} from "@mui/icons-material";
|
import { useTranslation } from "react-i18next";
|
||||||
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
|
||||||
import { Switch } from "@/components/base";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { RuleItem } from "@/components/profile/rule-item";
|
|
||||||
import { BaseSearchBox } from "../base/base-search-box";
|
|
||||||
import { Virtuoso } from "react-virtuoso";
|
|
||||||
import MonacoEditor from "react-monaco-editor";
|
import MonacoEditor from "react-monaco-editor";
|
||||||
import { useThemeMode } from "@/services/states";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
|
|
||||||
|
import { BaseSearchBox } from "../base/base-search-box";
|
||||||
|
|
||||||
|
import { Switch } from "@/components/base";
|
||||||
|
import { RuleItem } from "@/components/profile/rule-item";
|
||||||
|
import { readProfileFile, saveProfileFile } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useThemeMode } from "@/services/states";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
groupsUid: string;
|
groupsUid: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { StorageOutlined, RefreshRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Box,
|
Box,
|
||||||
@@ -16,13 +16,14 @@ import {
|
|||||||
alpha,
|
alpha,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { proxyProviderUpdate } from "@/services/cmds";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import { StorageOutlined, RefreshRounded } from "@mui/icons-material";
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { proxyProviderUpdate } from "@/services/cmds";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
|
||||||
// 定义代理提供者类型
|
// 定义代理提供者类型
|
||||||
|
|||||||
@@ -1,23 +1,3 @@
|
|||||||
import { useState, useCallback, useEffect, useRef } from "react";
|
|
||||||
import {
|
|
||||||
Box,
|
|
||||||
Paper,
|
|
||||||
Typography,
|
|
||||||
IconButton,
|
|
||||||
Chip,
|
|
||||||
Alert,
|
|
||||||
useTheme,
|
|
||||||
Button,
|
|
||||||
} from "@mui/material";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import {
|
|
||||||
updateProxyChainConfigInRuntime,
|
|
||||||
updateProxyAndSync,
|
|
||||||
getProxies,
|
|
||||||
closeAllConnections,
|
|
||||||
} from "@/services/cmds";
|
|
||||||
import useSWR from "swr";
|
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@@ -38,11 +18,30 @@ import { CSS } from "@dnd-kit/utilities";
|
|||||||
import {
|
import {
|
||||||
Delete as DeleteIcon,
|
Delete as DeleteIcon,
|
||||||
DragIndicator,
|
DragIndicator,
|
||||||
ClearAll,
|
|
||||||
Save,
|
|
||||||
Link,
|
Link,
|
||||||
LinkOff,
|
LinkOff,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import {
|
||||||
|
Box,
|
||||||
|
Paper,
|
||||||
|
Typography,
|
||||||
|
IconButton,
|
||||||
|
Chip,
|
||||||
|
Alert,
|
||||||
|
useTheme,
|
||||||
|
Button,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useState, useCallback, useEffect, useRef } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import useSWR from "swr";
|
||||||
|
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import {
|
||||||
|
updateProxyChainConfigInRuntime,
|
||||||
|
updateProxyAndSync,
|
||||||
|
getProxies,
|
||||||
|
closeAllConnections,
|
||||||
|
} from "@/services/cmds";
|
||||||
|
|
||||||
interface ProxyChainItem {
|
interface ProxyChainItem {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
import { useRef, useState, useEffect, useCallback, useMemo } from "react";
|
import { Box, Snackbar, Alert } from "@mui/material";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
|
import { useRef, useState, useEffect, useCallback } from "react";
|
||||||
import { providerHealthCheck, getGroupProxyDelays } from "@/services/cmds";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useProxySelection } from "@/hooks/use-proxy-selection";
|
|
||||||
import { BaseEmpty } from "../base";
|
|
||||||
import { useRenderList } from "./use-render-list";
|
|
||||||
import { ProxyRender } from "./proxy-render";
|
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
|
||||||
|
|
||||||
|
import { BaseEmpty } from "../base";
|
||||||
import { ScrollTopButton } from "../layout/scroll-top-button";
|
import { ScrollTopButton } from "../layout/scroll-top-button";
|
||||||
import { Box, styled, Snackbar, Alert } from "@mui/material";
|
|
||||||
import { memo } from "react";
|
|
||||||
import { createPortal } from "react-dom";
|
|
||||||
import { ProxyChain } from "./proxy-chain";
|
import { ProxyChain } from "./proxy-chain";
|
||||||
|
import { ProxyRender } from "./proxy-render";
|
||||||
|
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;
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Box, IconButton, TextField, SxProps } from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
AccessTimeRounded,
|
AccessTimeRounded,
|
||||||
MyLocationRounded,
|
MyLocationRounded,
|
||||||
@@ -14,9 +11,14 @@ import {
|
|||||||
SortByAlphaRounded,
|
SortByAlphaRounded,
|
||||||
SortRounded,
|
SortRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { Box, IconButton, TextField, SxProps } from "@mui/material";
|
||||||
import type { HeadState } from "./use-head-state";
|
import { useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import type { ProxySortType } from "./use-filter-sort";
|
import type { ProxySortType } from "./use-filter-sort";
|
||||||
|
import type { HeadState } from "./use-head-state";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import delayManager from "@/services/delay";
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { CheckCircleOutlineRounded } from "@mui/icons-material";
|
import { CheckCircleOutlineRounded } from "@mui/icons-material";
|
||||||
import { alpha, Box, ListItemButton, styled, Typography } from "@mui/material";
|
import { alpha, Box, ListItemButton, styled, Typography } from "@mui/material";
|
||||||
import { BaseLoading } from "@/components/base";
|
import { useLockFn } from "ahooks";
|
||||||
import delayManager from "@/services/delay";
|
import { useEffect, useState } from "react";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { BaseLoading } from "@/components/base";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
group: IProxyGroupItem;
|
group: IProxyGroupItem;
|
||||||
proxy: IProxyItem;
|
proxy: IProxyItem;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { CheckCircleOutlineRounded } from "@mui/icons-material";
|
import { CheckCircleOutlineRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
alpha,
|
alpha,
|
||||||
@@ -12,9 +10,12 @@ import {
|
|||||||
SxProps,
|
SxProps,
|
||||||
Theme,
|
Theme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { BaseLoading } from "@/components/base";
|
import { BaseLoading } from "@/components/base";
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
group: IProxyGroupItem;
|
group: IProxyGroupItem;
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
import {
|
||||||
|
ExpandLessRounded,
|
||||||
|
ExpandMoreRounded,
|
||||||
|
InboxRounded,
|
||||||
|
} from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
alpha,
|
alpha,
|
||||||
Box,
|
Box,
|
||||||
@@ -8,22 +13,19 @@ import {
|
|||||||
Chip,
|
Chip,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import {
|
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||||
ExpandLessRounded,
|
import { useEffect, useMemo, useState } from "react";
|
||||||
ExpandMoreRounded,
|
import { useTranslation } from "react-i18next";
|
||||||
InboxRounded,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import { HeadState } from "./use-head-state";
|
|
||||||
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 type { IRenderItem } from "./use-render-list";
|
import type { IRenderItem } from "./use-render-list";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { useThemeMode } from "@/services/states";
|
|
||||||
import { useEffect, useMemo, useState } from "react";
|
|
||||||
import { convertFileSrc } from "@tauri-apps/api/core";
|
|
||||||
import { downloadIconCache } from "@/services/cmds";
|
import { downloadIconCache } from "@/services/cmds";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useThemeMode } from "@/services/states";
|
||||||
|
|
||||||
interface RenderProps {
|
interface RenderProps {
|
||||||
item: IRenderItem;
|
item: IRenderItem;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
|
||||||
import delayManager from "@/services/delay";
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
// default | delay | alphabet
|
// default | delay | alphabet
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
|
||||||
import { ProxySortType } from "./use-filter-sort";
|
import { ProxySortType } from "./use-filter-sort";
|
||||||
|
|
||||||
import { useProfiles } from "@/hooks/use-profiles";
|
import { useProfiles } from "@/hooks/use-profiles";
|
||||||
|
|
||||||
export interface HeadState {
|
export interface HeadState {
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { useEffect, useMemo } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { filterSort } from "./use-filter-sort";
|
import { filterSort } from "./use-filter-sort";
|
||||||
import { useWindowWidth } from "./use-window-width";
|
|
||||||
import {
|
import {
|
||||||
useHeadStateNew,
|
useHeadStateNew,
|
||||||
DEFAULT_STATE,
|
DEFAULT_STATE,
|
||||||
type HeadState,
|
type HeadState,
|
||||||
} from "./use-head-state";
|
} from "./use-head-state";
|
||||||
|
import { useWindowWidth } from "./use-window-width";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
import useSWR from "swr";
|
|
||||||
import { getRuntimeConfig } from "@/services/cmds";
|
import { getRuntimeConfig } from "@/services/cmds";
|
||||||
import delayManager from "@/services/delay";
|
import delayManager from "@/services/delay";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { StorageOutlined, RefreshRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Box,
|
Box,
|
||||||
@@ -15,12 +15,13 @@ import {
|
|||||||
alpha,
|
alpha,
|
||||||
styled,
|
styled,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { ruleProviderUpdate } from "@/services/cmds";
|
|
||||||
import { StorageOutlined, RefreshRounded } from "@mui/icons-material";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { ruleProviderUpdate } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
// 定义规则提供者类型
|
// 定义规则提供者类型
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { useState, useRef, memo, useEffect } from "react";
|
import Visibility from "@mui/icons-material/Visibility";
|
||||||
import { useTranslation } from "react-i18next";
|
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
||||||
import { useForm } from "react-hook-form";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { isValidUrl } from "@/utils/helper";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import {
|
import {
|
||||||
TextField,
|
TextField,
|
||||||
Button,
|
Button,
|
||||||
@@ -12,10 +8,15 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
InputAdornment,
|
InputAdornment,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import Visibility from "@mui/icons-material/Visibility";
|
import { useLockFn } from "ahooks";
|
||||||
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
import { useState, useRef, memo, useEffect } from "react";
|
||||||
|
import { useForm } from "react-hook-form";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { saveWebdavConfig, createWebdavBackup } from "@/services/cmds";
|
import { saveWebdavConfig, createWebdavBackup } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { isValidUrl } from "@/utils/helper";
|
||||||
|
|
||||||
interface BackupConfigViewerProps {
|
interface BackupConfigViewerProps {
|
||||||
onBackupSuccess: () => Promise<void>;
|
onBackupSuccess: () => Promise<void>;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { SVGProps, memo } from "react";
|
import DeleteIcon from "@mui/icons-material/Delete";
|
||||||
|
import RestoreIcon from "@mui/icons-material/Restore";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Paper,
|
Paper,
|
||||||
@@ -14,15 +15,15 @@ import {
|
|||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { Typography } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Dayjs } from "dayjs";
|
import { Dayjs } from "dayjs";
|
||||||
|
import { SVGProps, memo } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
deleteWebdavBackup,
|
deleteWebdavBackup,
|
||||||
restoreWebDavBackup,
|
restoreWebDavBackup,
|
||||||
restartApp,
|
restartApp,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import DeleteIcon from "@mui/icons-material/Delete";
|
|
||||||
import RestoreIcon from "@mui/icons-material/Restore";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export type BackupFile = IWebDavFile & {
|
export type BackupFile = IWebDavFile & {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { Box, Paper, Divider } from "@mui/material";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||||
import {
|
import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
useImperativeHandle,
|
useImperativeHandle,
|
||||||
@@ -6,17 +9,16 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
} 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 { BackupConfigViewer } from "./backup-config-viewer";
|
||||||
import dayjs from "dayjs";
|
|
||||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
||||||
import {
|
import {
|
||||||
BackupTableViewer,
|
BackupTableViewer,
|
||||||
BackupFile,
|
BackupFile,
|
||||||
DEFAULT_ROWS_PER_PAGE,
|
DEFAULT_ROWS_PER_PAGE,
|
||||||
} from "./backup-table-viewer";
|
} from "./backup-table-viewer";
|
||||||
import { BackupConfigViewer } from "./backup-config-viewer";
|
|
||||||
import { Box, Paper, Divider } from "@mui/material";
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
|
import { BaseLoadingOverlay } from "@/components/base";
|
||||||
import { listWebDavBackup } from "@/services/cmds";
|
import { listWebDavBackup } from "@/services/cmds";
|
||||||
dayjs.extend(customParseFormat);
|
dayjs.extend(customParseFormat);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
import { mutate } from "swr";
|
|
||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { LoadingButton } from "@mui/lab";
|
|
||||||
import {
|
import {
|
||||||
SwitchAccessShortcutRounded,
|
SwitchAccessShortcutRounded,
|
||||||
RestartAltRounded,
|
RestartAltRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import { LoadingButton } from "@mui/lab";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Chip,
|
Chip,
|
||||||
@@ -17,6 +11,13 @@ import {
|
|||||||
ListItemButton,
|
ListItemButton,
|
||||||
ListItemText,
|
ListItemText,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { mutate } from "swr";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { changeClashCore, restartCore } from "@/services/cmds";
|
import { changeClashCore, restartCore } from "@/services/cmds";
|
||||||
import {
|
import {
|
||||||
closeAllConnections,
|
closeAllConnections,
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
import { BaseDialog, Switch } from "@/components/base";
|
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { Shuffle } from "@mui/icons-material";
|
import { Shuffle } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
@@ -17,6 +12,12 @@ import { useLockFn, useRequest } 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 { BaseDialog, Switch } from "@/components/base";
|
||||||
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
const OS = getSystem();
|
const OS = getSystem();
|
||||||
|
|
||||||
interface ClashPortViewerProps {}
|
interface ClashPortViewerProps {}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
import { Box, Chip } from "@mui/material";
|
||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Box, Chip } from "@mui/material";
|
|
||||||
import { getRuntimeYaml } from "@/services/cmds";
|
|
||||||
import { DialogRef } from "@/components/base";
|
import { DialogRef } from "@/components/base";
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
|
import { getRuntimeYaml } from "@/services/cmds";
|
||||||
|
|
||||||
export const ConfigViewer = forwardRef<DialogRef>((_, ref) => {
|
export const ConfigViewer = forwardRef<DialogRef>((_, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import { ContentCopy } from "@mui/icons-material";
|
import { ContentCopy } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
@@ -19,6 +15,11 @@ 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 { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
|
export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState, useEffect } from "react";
|
import { RestartAltRounded } from "@mui/icons-material";
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -14,15 +12,18 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { RestartAltRounded } from "@mui/icons-material";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import { useClash } from "@/hooks/use-clash";
|
import { useLockFn } from "ahooks";
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
|
||||||
import yaml from "js-yaml";
|
import yaml from "js-yaml";
|
||||||
|
import { forwardRef, useImperativeHandle, useState, useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import MonacoEditor from "react-monaco-editor";
|
import MonacoEditor from "react-monaco-editor";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
|
import { useClash } from "@/hooks/use-clash";
|
||||||
|
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 { invoke } from "@tauri-apps/api/core";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
|
|
||||||
const Item = styled(ListItem)(() => ({
|
const Item = styled(ListItem)(() => ({
|
||||||
padding: "5px 2px",
|
padding: "5px 2px",
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { BaseDialog, Switch } from "@/components/base";
|
|
||||||
import { useClash } from "@/hooks/use-clash";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import { Delete as DeleteIcon } from "@mui/icons-material";
|
import { Delete as DeleteIcon } from "@mui/icons-material";
|
||||||
import { Box, Button, Divider, List, ListItem, TextField } from "@mui/material";
|
import { Box, Button, Divider, List, ListItem, TextField } from "@mui/material";
|
||||||
import { useLockFn, useRequest } from "ahooks";
|
import { useLockFn, useRequest } 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 { BaseDialog, Switch } from "@/components/base";
|
||||||
|
import { useClash } from "@/hooks/use-clash";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
// 定义开发环境的URL列表
|
// 定义开发环境的URL列表
|
||||||
// 这些URL在开发模式下会被自动包含在允许的来源中
|
// 这些URL在开发模式下会被自动包含在允许的来源中
|
||||||
// 在生产环境中,这些URL会被过滤掉
|
// 在生产环境中,这些URL会被过滤掉
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { cloneElement, isValidElement, ReactNode, useRef } from "react";
|
import { cloneElement, isValidElement, ReactNode, useRef } from "react";
|
||||||
|
|
||||||
import noop from "@/utils/noop";
|
import noop from "@/utils/noop";
|
||||||
|
|
||||||
interface Props<Value> {
|
interface Props<Value> {
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { useRef, useState } from "react";
|
|
||||||
import { alpha, Box, IconButton, styled } from "@mui/material";
|
|
||||||
import { DeleteRounded } from "@mui/icons-material";
|
import { DeleteRounded } from "@mui/icons-material";
|
||||||
import { parseHotkey } from "@/utils/parse-hotkey";
|
import { alpha, Box, IconButton, styled } from "@mui/material";
|
||||||
|
import { useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { parseHotkey } from "@/utils/parse-hotkey";
|
||||||
|
|
||||||
const KeyWrapper = styled("div")(({ theme }) => ({
|
const KeyWrapper = styled("div")(({ theme }) => ({
|
||||||
position: "relative",
|
position: "relative",
|
||||||
width: 165,
|
width: 165,
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
import { styled, Typography } from "@mui/material";
|
||||||
|
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 { useLockFn } from "ahooks";
|
|
||||||
import { styled, Typography } from "@mui/material";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
|
||||||
import { HotkeyInput } from "./hotkey-input";
|
import { HotkeyInput } from "./hotkey-input";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
const ItemWrapper = styled("div")`
|
const ItemWrapper = styled("div")`
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
List,
|
List,
|
||||||
Button,
|
Button,
|
||||||
@@ -10,17 +8,21 @@ import {
|
|||||||
ListItemText,
|
ListItemText,
|
||||||
Box,
|
Box,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||||
|
import { join } from "@tauri-apps/api/path";
|
||||||
|
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
||||||
|
import { exists } from "@tauri-apps/plugin-fs";
|
||||||
|
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
||||||
|
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 { GuardState } from "./guard-state";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
|
||||||
import { convertFileSrc } from "@tauri-apps/api/core";
|
|
||||||
import { copyIconFile, getAppDir } from "@/services/cmds";
|
import { copyIconFile, getAppDir } from "@/services/cmds";
|
||||||
import { join } from "@tauri-apps/api/path";
|
|
||||||
import { exists } from "@tauri-apps/plugin-fs";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
const OS = getSystem();
|
const OS = getSystem();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
List,
|
List,
|
||||||
ListItem,
|
ListItem,
|
||||||
@@ -9,9 +6,13 @@ import {
|
|||||||
Typography,
|
Typography,
|
||||||
InputAdornment,
|
InputAdornment,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useLockFn } from "ahooks";
|
||||||
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
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 { entry_lightweight_mode } from "@/services/cmds";
|
import { entry_lightweight_mode } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
InputAdornment,
|
InputAdornment,
|
||||||
List,
|
List,
|
||||||
@@ -10,9 +7,13 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useLockFn } from "ahooks";
|
||||||
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
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 { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
|
import { ContentCopyRounded } from "@mui/icons-material";
|
||||||
|
import { alpha, Box, Button, IconButton } from "@mui/material";
|
||||||
|
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
import { getNetworkInterfacesInfo } from "@/services/cmds";
|
import { getNetworkInterfacesInfo } from "@/services/cmds";
|
||||||
import { alpha, Box, Button, IconButton } from "@mui/material";
|
|
||||||
import { ContentCopyRounded } from "@mui/icons-material";
|
|
||||||
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import useSWR from "swr";
|
|
||||||
|
|
||||||
export const NetworkInterfaceViewer = forwardRef<DialogRef>((props, ref) => {
|
export const NetworkInterfaceViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
@@ -8,6 +6,8 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onConfirm: (passwd: string) => Promise<void>;
|
onConfirm: (passwd: string) => Promise<void>;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { ReactNode, useState } from "react";
|
import { ChevronRightRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
List,
|
List,
|
||||||
@@ -7,8 +7,9 @@ import {
|
|||||||
ListItemText,
|
ListItemText,
|
||||||
ListSubheader,
|
ListSubheader,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { ChevronRightRounded } from "@mui/icons-material";
|
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import React, { ReactNode, useState } from "react";
|
||||||
|
|
||||||
import isAsyncFunction from "@/utils/is-async-function";
|
import isAsyncFunction from "@/utils/is-async-function";
|
||||||
|
|
||||||
interface ItemProps {
|
interface ItemProps {
|
||||||
|
|||||||
@@ -1,19 +1,3 @@
|
|||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
|
||||||
import { BaseFieldset } from "@/components/base/base-fieldset";
|
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
|
||||||
import { getClashConfig } from "@/services/cmds";
|
|
||||||
import {
|
|
||||||
getAutotemProxy,
|
|
||||||
getNetworkInterfacesInfo,
|
|
||||||
getSystemHostname,
|
|
||||||
getSystemProxy,
|
|
||||||
patchVergeConfig,
|
|
||||||
} from "@/services/cmds";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { EditRounded } from "@mui/icons-material";
|
import { EditRounded } from "@mui/icons-material";
|
||||||
import {
|
import {
|
||||||
Autocomplete,
|
Autocomplete,
|
||||||
@@ -37,6 +21,23 @@ import {
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
|
import { BaseFieldset } from "@/components/base/base-fieldset";
|
||||||
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { getClashConfig } from "@/services/cmds";
|
||||||
|
import {
|
||||||
|
getAutotemProxy,
|
||||||
|
getNetworkInterfacesInfo,
|
||||||
|
getSystemHostname,
|
||||||
|
getSystemProxy,
|
||||||
|
patchVergeConfig,
|
||||||
|
} from "@/services/cmds";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
const DEFAULT_PAC = `function FindProxyForURL(url, host) {
|
const DEFAULT_PAC = `function FindProxyForURL(url, host) {
|
||||||
return "PROXY %proxy_host%:%mixed-port%; SOCKS5 %proxy_host%:%mixed-port%; DIRECT;";
|
return "PROXY %proxy_host%:%mixed-port%; SOCKS5 %proxy_host%:%mixed-port%; DIRECT;";
|
||||||
}`;
|
}`;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Button, ButtonGroup } from "@mui/material";
|
import { Button, ButtonGroup } from "@mui/material";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
type ThemeValue = IVergeConfig["theme_mode"];
|
type ThemeValue = IVergeConfig["theme_mode"];
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
import { EditRounded } from "@mui/icons-material";
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
List,
|
List,
|
||||||
@@ -10,11 +8,14 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useLockFn } from "ahooks";
|
||||||
import { defaultTheme, defaultDarkTheme } from "@/pages/_theme";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||||
import { EditRounded } from "@mui/icons-material";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { defaultTheme, defaultDarkTheme } from "@/pages/_theme";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const ThemeViewer = forwardRef<DialogRef>((props, ref) => {
|
export const ThemeViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
List,
|
List,
|
||||||
ListItem,
|
ListItem,
|
||||||
@@ -10,12 +7,17 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useClash } from "@/hooks/use-clash";
|
import { useLockFn } from "ahooks";
|
||||||
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { StackModeSwitch } from "./stack-mode-switch";
|
import { StackModeSwitch } from "./stack-mode-switch";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef, Switch } from "@/components/base";
|
||||||
|
import { useClash } from "@/hooks/use-clash";
|
||||||
import { enhanceProfiles } from "@/services/cmds";
|
import { enhanceProfiles } from "@/services/cmds";
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
const OS = getSystem();
|
const OS = getSystem();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import useSWR from "swr";
|
import { Box, LinearProgress, Button } from "@mui/material";
|
||||||
|
import { Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||||
|
import { relaunch } from "@tauri-apps/plugin-process";
|
||||||
|
import { open as openUrl } from "@tauri-apps/plugin-shell";
|
||||||
|
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
import {
|
import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
useImperativeHandle,
|
useImperativeHandle,
|
||||||
@@ -6,19 +11,15 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
useEffect,
|
useEffect,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { Box, LinearProgress, Button } from "@mui/material";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { relaunch } from "@tauri-apps/plugin-process";
|
|
||||||
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
|
||||||
import { useUpdateState, useSetUpdateState } from "@/services/states";
|
|
||||||
import { Event, UnlistenFn } from "@tauri-apps/api/event";
|
|
||||||
import { portableFlag } from "@/pages/_layout";
|
|
||||||
import { open as openUrl } from "@tauri-apps/plugin-shell";
|
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
|
import useSWR from "swr";
|
||||||
|
|
||||||
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
import { useListen } from "@/hooks/use-listen";
|
import { useListen } from "@/hooks/use-listen";
|
||||||
|
import { portableFlag } from "@/pages/_layout";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useUpdateState, useSetUpdateState } from "@/services/states";
|
||||||
|
|
||||||
export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import {
|
|
||||||
Divider,
|
|
||||||
IconButton,
|
|
||||||
Stack,
|
|
||||||
TextField,
|
|
||||||
Typography,
|
|
||||||
} from "@mui/material";
|
|
||||||
import {
|
import {
|
||||||
CheckRounded,
|
CheckRounded,
|
||||||
CloseRounded,
|
CloseRounded,
|
||||||
@@ -13,6 +5,14 @@ import {
|
|||||||
EditRounded,
|
EditRounded,
|
||||||
OpenInNewRounded,
|
OpenInNewRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
import {
|
||||||
|
Divider,
|
||||||
|
IconButton,
|
||||||
|
Stack,
|
||||||
|
TextField,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Button, Box, Typography } from "@mui/material";
|
import { Button, Box, Typography } from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useLockFn } from "ahooks";
|
||||||
import { openWebUrl } from "@/services/cmds";
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
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 { WebUIItem } from "./web-ui-item";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { openWebUrl } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const WebUIViewer = forwardRef<DialogRef>((props, ref) => {
|
export const WebUIViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
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 { updateGeoData } from "@/services/cmds";
|
|
||||||
import { invoke_uwp_tool } from "@/services/cmds";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
|
||||||
import getSystem from "@/utils/get-system";
|
|
||||||
import { LanRounded, SettingsRounded } from "@mui/icons-material";
|
import { LanRounded, SettingsRounded } from "@mui/icons-material";
|
||||||
import { MenuItem, Select, TextField, Typography } from "@mui/material";
|
import { MenuItem, Select, TextField, Typography } from "@mui/material";
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import { useLockFn } from "ahooks";
|
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 { 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";
|
||||||
import { DnsViewer } from "./mods/dns-viewer";
|
import { DnsViewer } from "./mods/dns-viewer";
|
||||||
|
import { HeaderConfiguration } from "./mods/external-controller-cors";
|
||||||
import { GuardState } from "./mods/guard-state";
|
import { GuardState } from "./mods/guard-state";
|
||||||
import { NetworkInterfaceViewer } from "./mods/network-interface-viewer";
|
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 { HeaderConfiguration } from "./mods/external-controller-cors";
|
|
||||||
|
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";
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
import { mutate } from "swr";
|
import { WarningRounded } from "@mui/icons-material";
|
||||||
|
import { Tooltip } from "@mui/material";
|
||||||
import React, { useRef } from "react";
|
import React, { useRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { WarningRounded } from "@mui/icons-material";
|
import { mutate } from "swr";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { DialogRef, Switch } from "@/components/base";
|
|
||||||
import { SettingList, SettingItem } from "./mods/setting-comp";
|
|
||||||
import { GuardState } from "./mods/guard-state";
|
import { GuardState } from "./mods/guard-state";
|
||||||
|
import { SettingList, SettingItem } from "./mods/setting-comp";
|
||||||
import { SysproxyViewer } from "./mods/sysproxy-viewer";
|
import { SysproxyViewer } from "./mods/sysproxy-viewer";
|
||||||
import { TunViewer } from "./mods/tun-viewer";
|
import { TunViewer } from "./mods/tun-viewer";
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
|
||||||
import { Tooltip } from "@mui/material";
|
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
|
||||||
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
|
||||||
|
|
||||||
|
import { DialogRef, Switch } from "@/components/base";
|
||||||
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
|
import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches";
|
||||||
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
|
import { ContentCopyRounded } from "@mui/icons-material";
|
||||||
|
import { Typography } from "@mui/material";
|
||||||
|
import { version } from "@root/package.json";
|
||||||
|
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 { Typography } from "@mui/material";
|
|
||||||
|
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 { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
import {
|
import {
|
||||||
exitApp,
|
exitApp,
|
||||||
openAppDir,
|
openAppDir,
|
||||||
@@ -9,20 +25,6 @@ import {
|
|||||||
openDevTools,
|
openDevTools,
|
||||||
exportDiagnosticInfo,
|
exportDiagnosticInfo,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
|
||||||
import { version } from "@root/package.json";
|
|
||||||
import { DialogRef } from "@/components/base";
|
|
||||||
import { SettingList, SettingItem } from "./mods/setting-comp";
|
|
||||||
import { ConfigViewer } from "./mods/config-viewer";
|
|
||||||
import { HotkeyViewer } from "./mods/hotkey-viewer";
|
|
||||||
import { MiscViewer } from "./mods/misc-viewer";
|
|
||||||
import { ThemeViewer } from "./mods/theme-viewer";
|
|
||||||
import { LayoutViewer } from "./mods/layout-viewer";
|
|
||||||
import { UpdateViewer } from "./mods/update-viewer";
|
|
||||||
import { BackupViewer } from "./mods/backup-viewer";
|
|
||||||
import { LiteModeViewer } from "./mods/lite-mode-viewer";
|
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
|
||||||
import { ContentCopyRounded } from "@mui/icons-material";
|
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
|
import { ContentCopyRounded } from "@mui/icons-material";
|
||||||
|
import { Button, MenuItem, Select, Input } from "@mui/material";
|
||||||
|
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 { open } from "@tauri-apps/plugin-dialog";
|
|
||||||
import { Button, MenuItem, Select, Input } from "@mui/material";
|
import { BackupViewer } from "./mods/backup-viewer";
|
||||||
import { copyClashEnv } from "@/services/cmds";
|
import { ConfigViewer } from "./mods/config-viewer";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { GuardState } from "./mods/guard-state";
|
||||||
import { DialogRef } from "@/components/base";
|
import { HotkeyViewer } from "./mods/hotkey-viewer";
|
||||||
|
import { LayoutViewer } from "./mods/layout-viewer";
|
||||||
|
import { MiscViewer } from "./mods/misc-viewer";
|
||||||
import { SettingList, SettingItem } from "./mods/setting-comp";
|
import { SettingList, SettingItem } from "./mods/setting-comp";
|
||||||
import { ThemeModeSwitch } from "./mods/theme-mode-switch";
|
import { ThemeModeSwitch } from "./mods/theme-mode-switch";
|
||||||
import { ConfigViewer } from "./mods/config-viewer";
|
|
||||||
import { HotkeyViewer } from "./mods/hotkey-viewer";
|
|
||||||
import { MiscViewer } from "./mods/misc-viewer";
|
|
||||||
import { ThemeViewer } from "./mods/theme-viewer";
|
import { ThemeViewer } from "./mods/theme-viewer";
|
||||||
import { GuardState } from "./mods/guard-state";
|
|
||||||
import { LayoutViewer } from "./mods/layout-viewer";
|
|
||||||
import { UpdateViewer } from "./mods/update-viewer";
|
import { UpdateViewer } from "./mods/update-viewer";
|
||||||
import { BackupViewer } from "./mods/backup-viewer";
|
|
||||||
import getSystem from "@/utils/get-system";
|
import { DialogRef } from "@/components/base";
|
||||||
import { routers } from "@/pages/_routers";
|
|
||||||
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
import { TooltipIcon } from "@/components/base/base-tooltip-icon";
|
||||||
import { ContentCopyRounded } from "@mui/icons-material";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
|
import { routers } from "@/pages/_routers";
|
||||||
|
import { copyClashEnv } from "@/services/cmds";
|
||||||
import { supportedLanguages } from "@/services/i18n";
|
import { supportedLanguages } from "@/services/i18n";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import getSystem from "@/utils/get-system";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError?: (err: Error) => void;
|
onError?: (err: Error) => void;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import React, { useRef, useCallback } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
import {
|
||||||
SettingsRounded,
|
SettingsRounded,
|
||||||
PlayCircleOutlineRounded,
|
PlayCircleOutlineRounded,
|
||||||
@@ -9,18 +7,21 @@ import {
|
|||||||
WarningRounded,
|
WarningRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { Box, Typography, alpha, useTheme } from "@mui/material";
|
import { Box, Typography, alpha, useTheme } from "@mui/material";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import React, { useRef, useCallback } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
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 { GuardState } from "@/components/setting/mods/guard-state";
|
import { GuardState } from "@/components/setting/mods/guard-state";
|
||||||
import { SysproxyViewer } from "@/components/setting/mods/sysproxy-viewer";
|
import { SysproxyViewer } from "@/components/setting/mods/sysproxy-viewer";
|
||||||
import { TunViewer } from "@/components/setting/mods/tun-viewer";
|
import { TunViewer } from "@/components/setting/mods/tun-viewer";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
import { useSystemProxyState } from "@/hooks/use-system-proxy-state";
|
import { useSystemProxyState } from "@/hooks/use-system-proxy-state";
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useServiceUninstaller } from "@/hooks/useServiceUninstaller";
|
import { useServiceUninstaller } from "@/hooks/useServiceUninstaller";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface ProxySwitchProps {
|
interface ProxySwitchProps {
|
||||||
label?: string;
|
label?: string;
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
import { Box, Divider, MenuItem, Menu, styled, alpha } from "@mui/material";
|
|
||||||
import { BaseLoading } from "@/components/base";
|
|
||||||
import { LanguageRounded } from "@mui/icons-material";
|
import { LanguageRounded } from "@mui/icons-material";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { Box, Divider, MenuItem, Menu, styled, alpha } from "@mui/material";
|
||||||
import { TestBox } from "./test-box";
|
|
||||||
import delayManager from "@/services/delay";
|
|
||||||
import { cmdTestDelay, downloadIconCache } from "@/services/cmds";
|
|
||||||
import { UnlistenFn } from "@tauri-apps/api/event";
|
|
||||||
import { convertFileSrc } from "@tauri-apps/api/core";
|
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||||
|
import { UnlistenFn } from "@tauri-apps/api/event";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { TestBox } from "./test-box";
|
||||||
|
|
||||||
|
import { BaseLoading } from "@/components/base";
|
||||||
import { useListen } from "@/hooks/use-listen";
|
import { useListen } from "@/hooks/use-listen";
|
||||||
|
import { cmdTestDelay, downloadIconCache } from "@/services/cmds";
|
||||||
|
import delayManager from "@/services/delay";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useForm, Controller } from "react-hook-form";
|
|
||||||
import { TextField } from "@mui/material";
|
import { TextField } from "@mui/material";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useLockFn } from "ahooks";
|
||||||
import { BaseDialog } from "@/components/base";
|
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
|
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||||
|
import { useForm, Controller } from "react-hook-form";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { BaseDialog } from "@/components/base";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import useSWR, { mutate } from "swr";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
|
import useSWR, { mutate } from "swr";
|
||||||
|
|
||||||
import { getVersion } from "@/services/cmds";
|
import { getVersion } from "@/services/cmds";
|
||||||
import {
|
import {
|
||||||
getClashInfo,
|
getClashInfo,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
|
||||||
// 定义代理组类型
|
// 定义代理组类型
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { useState, useCallback } from "react";
|
import { useState, useCallback } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { changeLanguage, supportedLanguages } from "@/services/i18n";
|
|
||||||
import { useVerge } from "./use-verge";
|
import { useVerge } from "./use-verge";
|
||||||
|
|
||||||
|
import { changeLanguage, supportedLanguages } from "@/services/i18n";
|
||||||
|
|
||||||
export const useI18n = () => {
|
export const useI18n = () => {
|
||||||
const { i18n, t } = useTranslation();
|
const { i18n, t } = useTranslation();
|
||||||
const { patchVerge } = useVerge();
|
const { patchVerge } = useVerge();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { listen, UnlistenFn, EventCallback } from "@tauri-apps/api/event";
|
|
||||||
import { event } from "@tauri-apps/api";
|
import { event } from "@tauri-apps/api";
|
||||||
|
import { listen, UnlistenFn, EventCallback } from "@tauri-apps/api/event";
|
||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
|
|
||||||
export const useListen = () => {
|
export const useListen = () => {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getProfiles,
|
getProfiles,
|
||||||
patchProfile,
|
patchProfile,
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import { useCallback, useMemo } from "react";
|
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
|
import { useCallback, useMemo } from "react";
|
||||||
|
|
||||||
|
import { useProfiles } from "@/hooks/use-profiles";
|
||||||
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import {
|
import {
|
||||||
updateProxy,
|
updateProxy,
|
||||||
updateProxyAndSync,
|
updateProxyAndSync,
|
||||||
@@ -8,8 +11,6 @@ import {
|
|||||||
getConnections,
|
getConnections,
|
||||||
deleteConnection,
|
deleteConnection,
|
||||||
} from "@/services/cmds";
|
} from "@/services/cmds";
|
||||||
import { useProfiles } from "@/hooks/use-profiles";
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
|
||||||
|
|
||||||
// 缓存连接清理
|
// 缓存连接清理
|
||||||
const cleanupConnections = async (previousProxy: string) => {
|
const cleanupConnections = async (previousProxy: string) => {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
|
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { getAutotemProxy } from "@/services/cmds";
|
|
||||||
import { useAppData } from "@/providers/app-data-provider";
|
import { useAppData } from "@/providers/app-data-provider";
|
||||||
|
import { getAutotemProxy } from "@/services/cmds";
|
||||||
import { closeAllConnections } from "@/services/cmds";
|
import { closeAllConnections } from "@/services/cmds";
|
||||||
|
|
||||||
// 系统代理状态检测统一逻辑
|
// 系统代理状态检测统一逻辑
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { getRunningMode, isAdmin, isServiceAvailable } from "@/services/cmds";
|
import { getRunningMode, isAdmin, isServiceAvailable } from "@/services/cmds";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState, useEffect, useRef, useCallback } from "react";
|
import { useState, useEffect, useRef, useCallback } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { useClashInfo } from "@/hooks/use-clash";
|
import { useClashInfo } from "@/hooks/use-clash";
|
||||||
import { useVisibility } from "@/hooks/use-visibility";
|
import { useVisibility } from "@/hooks/use-visibility";
|
||||||
import { getSystemMonitorOverviewSafe } from "@/services/cmds";
|
import { getSystemMonitorOverviewSafe } from "@/services/cmds";
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import useSWR from "swr";
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { getVergeConfig, patchVergeConfig } from "@/services/cmds";
|
import useSWR from "swr";
|
||||||
|
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
|
import { getVergeConfig, patchVergeConfig } from "@/services/cmds";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|
||||||
export const useVerge = () => {
|
export const useVerge = () => {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user