mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Fix: bundle and bug
This commit is contained in:
parent
7ddc4eecfc
commit
c5cb1234a9
@ -17,7 +17,6 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
|||||||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||||
const publicUrlOrPath = getPublicUrlOrPath(
|
const publicUrlOrPath = getPublicUrlOrPath(
|
||||||
process.env.NODE_ENV === 'development',
|
process.env.NODE_ENV === 'development',
|
||||||
require(resolveApp('package.json')).homepage,
|
|
||||||
process.env.PUBLIC_URL
|
process.env.PUBLIC_URL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
177
package-lock.json
generated
177
package-lock.json
generated
@ -1883,9 +1883,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/html-minifier-terser": {
|
"@types/html-minifier-terser": {
|
||||||
"version": "5.1.0",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
|
||||||
"integrity": "sha512-iYCgjm1dGPRuo12+BStjd1HiVQqhlRhWDOQigNxn023HcjnhsiFz9pc6CzJj4HwDCSQca9bxTL4PxJDbkdm3PA==",
|
"integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/json-schema": {
|
"@types/json-schema": {
|
||||||
@ -1913,9 +1913,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.11.1",
|
"version": "14.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz",
|
||||||
"integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==",
|
"integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
@ -2083,13 +2083,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz",
|
||||||
"integrity": "sha512-Hoxyt99EA9LMmqo/5PuWWPeWeB3mKyvibfJ1Hy5SfiUpjE8Nqp+5QNd9fOkzL66+fqvIWSIE+Ett16LGMzCGnQ==",
|
"integrity": "sha512-zBNRkzvLSwo6y5TG0DVcmshZIYBHKtmzD4N+LYnfTFpzc4bc79o8jNRSb728WV7A4Cegbs+MV5IRAj8BKBgOVQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/experimental-utils": "4.1.1",
|
"@typescript-eslint/experimental-utils": "4.2.0",
|
||||||
"@typescript-eslint/scope-manager": "4.1.1",
|
"@typescript-eslint/scope-manager": "4.2.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"regexpp": "^3.0.0",
|
"regexpp": "^3.0.0",
|
||||||
@ -2098,12 +2098,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "2.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
@ -2115,38 +2115,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.2.0.tgz",
|
||||||
"integrity": "sha512-jzYsNciHoa4Z3c1URtmeT/bamYm8Dwfw6vuN3WHIE/BXb1iC4KveAnXDErTAZtPVxTYBaYn3n2gbt6F6D2rm1A==",
|
"integrity": "sha512-5BBj6BjgHEndBaQQpUVzRIPERz03LBc0MCQkHwUaH044FJFL08SwWv/sQftk7gf0ShZ2xZysz0LTwCwNt4Xu3w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/scope-manager": "4.1.1",
|
"@typescript-eslint/scope-manager": "4.2.0",
|
||||||
"@typescript-eslint/types": "4.1.1",
|
"@typescript-eslint/types": "4.2.0",
|
||||||
"@typescript-eslint/typescript-estree": "4.1.1",
|
"@typescript-eslint/typescript-estree": "4.2.0",
|
||||||
"eslint-scope": "^5.0.0",
|
"eslint-scope": "^5.0.0",
|
||||||
"eslint-utils": "^2.0.0"
|
"eslint-utils": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.2.0.tgz",
|
||||||
"integrity": "sha512-NLIhmicpKGfJbdXyQBz9j48PA6hq6e+SDOoXy7Ak6bq1ebGqbgG+fR1UIDAuay6OjQdot69c/URu2uLlsP8GQQ==",
|
"integrity": "sha512-54jJ6MwkOtowpE48C0QJF9iTz2/NZxfKVJzv1ha5imigzHbNSLN9yvbxFFH1KdlRPQrlR8qxqyOvLHHxd397VA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "4.1.1",
|
"@typescript-eslint/scope-manager": "4.2.0",
|
||||||
"@typescript-eslint/types": "4.1.1",
|
"@typescript-eslint/types": "4.2.0",
|
||||||
"@typescript-eslint/typescript-estree": "4.1.1",
|
"@typescript-eslint/typescript-estree": "4.2.0",
|
||||||
"debug": "^4.1.1"
|
"debug": "^4.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "2.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
@ -2158,29 +2158,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz",
|
||||||
"integrity": "sha512-0W8TTobCvIIQ2FsrYTffyZGAAFUyIbEHq5EYJb1m7Rpd005jrnOvKOo8ywCLhs/Bm17C+KsrUboBvBAARQVvyA==",
|
"integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.1.1",
|
"@typescript-eslint/types": "4.2.0",
|
||||||
"@typescript-eslint/visitor-keys": "4.1.1"
|
"@typescript-eslint/visitor-keys": "4.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz",
|
||||||
"integrity": "sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==",
|
"integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.2.0.tgz",
|
||||||
"integrity": "sha512-2AUg5v0liVBsqbGxBphbJ0QbGqSRVaF5qPoTPWcxop+66vMdU1h4CCvHxTC47+Qb+Pr4l2RhXDd41JNpwcQEKw==",
|
"integrity": "sha512-iWDLCB7z4MGkLipduF6EOotdHNtgxuNKnYD54nMS/oitFnsk4S3S/TE/UYXQTra550lHtlv9eGmp+dvN9pUDtA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.1.1",
|
"@typescript-eslint/types": "4.2.0",
|
||||||
"@typescript-eslint/visitor-keys": "4.1.1",
|
"@typescript-eslint/visitor-keys": "4.2.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"globby": "^11.0.1",
|
"globby": "^11.0.1",
|
||||||
"is-glob": "^4.0.1",
|
"is-glob": "^4.0.1",
|
||||||
@ -2190,12 +2190,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "2.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
@ -2207,12 +2207,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz",
|
||||||
"integrity": "sha512-/EOOXbA2ferGLG6RmCHEQ0lTTLkOlXYDgblCmQk3tIU7mTPLm4gKhFMeeUSe+bcchTUsKeCk8xcpbop5Zr/8Rw==",
|
"integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "4.1.1",
|
"@typescript-eslint/types": "4.2.0",
|
||||||
"eslint-visitor-keys": "^2.0.0"
|
"eslint-visitor-keys": "^2.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -5064,6 +5064,11 @@
|
|||||||
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
|
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"dequal": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug=="
|
||||||
|
},
|
||||||
"des.js": {
|
"des.js": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
|
||||||
@ -6001,9 +6006,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-react": {
|
"eslint-plugin-react": {
|
||||||
"version": "7.20.6",
|
"version": "7.21.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.6.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.2.tgz",
|
||||||
"integrity": "sha512-kidMTE5HAEBSLu23CUDvj8dc3LdBU0ri1scwHBZjI41oDv4tjsWZKU7MQccFzH1QYPYhsnTF2ovh7JlcIcmxgg==",
|
"integrity": "sha512-j3XKvrK3rpBzveKFbgAeGsWb9uz6iUOrR0jixRfjwdFeGSRsXvVTFtHDQYCjsd1/6Z/xvb8Vy3LiI5Reo7fDrg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"array-includes": "^3.1.1",
|
"array-includes": "^3.1.1",
|
||||||
@ -6027,15 +6032,6 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"esutils": "^2.0.2"
|
"esutils": "^2.0.2"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"resolve": {
|
|
||||||
"version": "1.17.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
|
||||||
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"path-parse": "^1.0.6"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -6422,9 +6418,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "2.0.1",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"fast-glob": {
|
"fast-glob": {
|
||||||
"version": "3.2.4",
|
"version": "3.2.4",
|
||||||
@ -7763,9 +7760,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html-webpack-plugin": {
|
"html-webpack-plugin": {
|
||||||
"version": "4.4.1",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.0.tgz",
|
||||||
"integrity": "sha512-nEtdEIsIGXdXGG7MjTTZlmhqhpHU9pJFc1OYxcP36c5/ZKP6b0BJMww2QTvJGQYA9aMxUnjDujpZdYcVOXiBCQ==",
|
"integrity": "sha512-MouoXEYSjTzCrjIxWwg8gxL5fE2X2WZJLmBYXlaJhQUH5K/b5OrqmV7T4dB7iu0xkmJ6JlUuV6fFVtnqbPopZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/html-minifier-terser": "^5.0.0",
|
"@types/html-minifier-terser": "^5.0.0",
|
||||||
@ -11729,9 +11726,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-table": {
|
"react-table": {
|
||||||
"version": "7.5.0",
|
"version": "7.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-table/-/react-table-7.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-table/-/react-table-7.5.1.tgz",
|
||||||
"integrity": "sha512-hLsbNqLJkkYiATVteM8mthP8y5vnLPB2qdi9FeGZjsvb2m5vxj6cavIgk35oulvBmYD6Kox0HFfI332HPZpC7w=="
|
"integrity": "sha512-rprrUElCqvj79lyY2XbUoYLzwA5Mm4CGS8ElQ8OyzocvmkvCcmunvvfbpIg9Jm9HnMBjVZcVyPFPZ1BFelIBKw=="
|
||||||
},
|
},
|
||||||
"react-virtualized-auto-sizer": {
|
"react-virtualized-auto-sizer": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@ -12703,9 +12700,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is-callable": {
|
"is-callable": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
|
||||||
"integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==",
|
"integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"is-regex": {
|
"is-regex": {
|
||||||
@ -13548,11 +13545,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"swr": {
|
"swr": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/swr/-/swr-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/swr/-/swr-0.3.5.tgz",
|
||||||
"integrity": "sha512-Bs5Bihq1hQ66O5bdKaL47iZ2nlAaBsd8tTLRLkw9stZeuBEfH7zSuQI95S2TpchL0ybsMq3isWwuso2uPvCfHA==",
|
"integrity": "sha512-sZNed7JBEnFC42+XFWJ+aYGGVg5D3qNyISZOke3oL/gM1UNm0tsj9mbhTPT99SV9DzbKbT1NFTTRandPdhvpUA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "2.0.1"
|
"dequal": "2.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
@ -13646,9 +13643,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"terser-webpack-plugin": {
|
"terser-webpack-plugin": {
|
||||||
"version": "4.2.1",
|
"version": "4.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-4.2.2.tgz",
|
||||||
"integrity": "sha512-D0IZQNl1ZN/JivFNDFzOeU2Bk2LdQQESHJhKTHsodpUmISkaeRwVFk7gzHzX4OuQwanDGelOxIEsBt1SZ+s6nA==",
|
"integrity": "sha512-3qAQpykRTD5DReLu5/cwpsg7EZFzP3Q0Hp2XUWJUw2mpq2jfgOKTZr8IZKKnNieRVVo1UauROTdhbQJZveGKtQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"cacache": "^15.0.5",
|
"cacache": "^15.0.5",
|
||||||
@ -13658,7 +13655,7 @@
|
|||||||
"schema-utils": "^2.7.1",
|
"schema-utils": "^2.7.1",
|
||||||
"serialize-javascript": "^5.0.1",
|
"serialize-javascript": "^5.0.1",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1",
|
||||||
"terser": "^5.3.1",
|
"terser": "^5.3.2",
|
||||||
"webpack-sources": "^1.4.3"
|
"webpack-sources": "^1.4.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -13686,12 +13683,6 @@
|
|||||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"find-cache-dir": {
|
"find-cache-dir": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
|
||||||
@ -14041,9 +14032,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
|
||||||
"integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==",
|
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"unicode-canonical-property-names-ecmascript": {
|
"unicode-canonical-property-names-ecmascript": {
|
||||||
|
20
package.json
20
package.json
@ -18,7 +18,7 @@
|
|||||||
"homepage": "https://github.com/Dreamacro/clash-dashboard",
|
"homepage": "https://github.com/Dreamacro/clash-dashboard",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node scripts/start.js",
|
"start": "node scripts/start.js",
|
||||||
"build": "node scripts/build.js",
|
"build": "GENERATE_SOURCEMAP=false node scripts/build.js",
|
||||||
"lint": "npm run lint:ts",
|
"lint": "npm run lint:ts",
|
||||||
"lint:ts": "eslint --ext=jsx,ts,tsx --fix src",
|
"lint:ts": "eslint --ext=jsx,ts,tsx --fix src",
|
||||||
"contributors:add": "all-contributors add",
|
"contributors:add": "all-contributors add",
|
||||||
@ -29,15 +29,15 @@
|
|||||||
"@svgr/webpack": "^5.4.0",
|
"@svgr/webpack": "^5.4.0",
|
||||||
"@types/classnames": "^2.2.10",
|
"@types/classnames": "^2.2.10",
|
||||||
"@types/lodash": "^4.14.161",
|
"@types/lodash": "^4.14.161",
|
||||||
"@types/node": "^14.11.1",
|
"@types/node": "^14.11.2",
|
||||||
"@types/react": "^16.9.0",
|
"@types/react": "^16.9.0",
|
||||||
"@types/react-dom": "^16.9.0",
|
"@types/react-dom": "^16.9.0",
|
||||||
"@types/react-router-dom": "^5.1.5",
|
"@types/react-router-dom": "^5.1.5",
|
||||||
"@types/react-table": "^7.0.23",
|
"@types/react-table": "^7.0.23",
|
||||||
"@types/react-virtualized-auto-sizer": "^1.0.0",
|
"@types/react-virtualized-auto-sizer": "^1.0.0",
|
||||||
"@types/react-window": "^1.8.2",
|
"@types/react-window": "^1.8.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.1.1",
|
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
||||||
"@typescript-eslint/parser": "^4.1.1",
|
"@typescript-eslint/parser": "^4.2.0",
|
||||||
"babel-eslint": "10.1.0",
|
"babel-eslint": "10.1.0",
|
||||||
"babel-loader": "8.1.0",
|
"babel-loader": "8.1.0",
|
||||||
"babel-plugin-named-asset-import": "^0.3.6",
|
"babel-plugin-named-asset-import": "^0.3.6",
|
||||||
@ -53,11 +53,11 @@
|
|||||||
"eslint-plugin-flowtype": "^5.2.0",
|
"eslint-plugin-flowtype": "^5.2.0",
|
||||||
"eslint-plugin-import": "^2.22.0",
|
"eslint-plugin-import": "^2.22.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.3.1",
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||||
"eslint-plugin-react": "^7.20.6",
|
"eslint-plugin-react": "^7.21.2",
|
||||||
"eslint-plugin-react-hooks": "^4.1.2",
|
"eslint-plugin-react-hooks": "^4.1.2",
|
||||||
"file-loader": "^6.1.0",
|
"file-loader": "^6.1.0",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.0.1",
|
||||||
"html-webpack-plugin": "^4.4.1",
|
"html-webpack-plugin": "^4.5.0",
|
||||||
"identity-obj-proxy": "3.0.0",
|
"identity-obj-proxy": "3.0.0",
|
||||||
"mini-css-extract-plugin": "^0.11.2",
|
"mini-css-extract-plugin": "^0.11.2",
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.4",
|
"optimize-css-assets-webpack-plugin": "^5.0.4",
|
||||||
@ -75,11 +75,11 @@
|
|||||||
"sass-loader": "^10.0.2",
|
"sass-loader": "^10.0.2",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
"terser-webpack-plugin": "^4.2.1",
|
"terser-webpack-plugin": "^4.2.2",
|
||||||
"ts-pnp": "^1.2.0",
|
"ts-pnp": "^1.2.0",
|
||||||
"tsconfig-paths-webpack-plugin": "^3.3.0",
|
"tsconfig-paths-webpack-plugin": "^3.3.0",
|
||||||
"type-fest": "^0.16.0",
|
"type-fest": "^0.16.0",
|
||||||
"typescript": "^4.0.2",
|
"typescript": "^4.0.3",
|
||||||
"url-loader": "^4.1.0",
|
"url-loader": "^4.1.0",
|
||||||
"webpack": "^4.44.2",
|
"webpack": "^4.44.2",
|
||||||
"webpack-dev-server": "3.11.0",
|
"webpack-dev-server": "3.11.0",
|
||||||
@ -96,11 +96,11 @@
|
|||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-table": "^7.5.0",
|
"react-table": "^7.5.1",
|
||||||
"react-virtualized-auto-sizer": "^1.0.2",
|
"react-virtualized-auto-sizer": "^1.0.2",
|
||||||
"react-window": "^1.8.5",
|
"react-window": "^1.8.5",
|
||||||
"recoil": "0.0.13",
|
"recoil": "0.0.13",
|
||||||
"swr": "^0.3.2",
|
"swr": "^0.3.5",
|
||||||
"use-immer": "^0.4.1"
|
"use-immer": "^0.4.1"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
|
@ -48,8 +48,8 @@ export function Modal (props: ModalProps) {
|
|||||||
children
|
children
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Modal')
|
const { t } = translation('Modal')
|
||||||
|
|
||||||
const portalRef = useRef<HTMLDivElement>(document.createElement('div'))
|
const portalRef = useRef<HTMLDivElement>(document.createElement('div'))
|
||||||
const maskRef = useRef<HTMLDivElement>(null)
|
const maskRef = useRef<HTMLDivElement>(null)
|
||||||
|
@ -17,8 +17,8 @@ interface TagsProps extends BaseComponentProps {
|
|||||||
export function Tags (props: TagsProps) {
|
export function Tags (props: TagsProps) {
|
||||||
const { className, data, onClick, select, canClick, errSet, rowHeight: rawHeight } = props
|
const { className, data, onClick, select, canClick, errSet, rowHeight: rawHeight } = props
|
||||||
|
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Proxies')
|
const { t } = translation('Proxies')
|
||||||
const [expand, setExpand] = useState(false)
|
const [expand, setExpand] = useState(false)
|
||||||
const [showExtend, setShowExtend] = useState(false)
|
const [showExtend, setShowExtend] = useState(false)
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ function formatSpeed (upload: number, download: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Connections () {
|
export default function Connections () {
|
||||||
const { useTranslation, lang } = useI18n()
|
const { translation, lang } = useI18n()
|
||||||
const t = useTranslation('Connections').t
|
const t = useMemo(() => translation('Connections').t, [translation])
|
||||||
|
|
||||||
// total
|
// total
|
||||||
const [traffic, setTraffic] = useObject({
|
const [traffic, setTraffic] = useObject({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as API from '@lib/request'
|
import * as API from '@lib/request'
|
||||||
import { useState, useMemo, useRef } from 'react'
|
import { useState, useMemo, useRef, useCallback } from 'react'
|
||||||
|
|
||||||
type Connections = API.Connections & { completed?: boolean, speed: { upload: number, download: number } }
|
type Connections = API.Connections & { completed?: boolean, speed: { upload: number, download: number } }
|
||||||
|
|
||||||
@ -64,16 +64,16 @@ export function useConnections () {
|
|||||||
const [connections, setConnections] = useState<Connections[]>([])
|
const [connections, setConnections] = useState<Connections[]>([])
|
||||||
const [save, setSave] = useState<boolean>(false)
|
const [save, setSave] = useState<boolean>(false)
|
||||||
|
|
||||||
function feed (connections: API.Connections[]) {
|
const feed = useCallback(function (connections: API.Connections[]) {
|
||||||
store.appendToSet(connections)
|
store.appendToSet(connections)
|
||||||
if (shouldFlush.current) {
|
if (shouldFlush.current) {
|
||||||
setConnections(store.getConnections())
|
setConnections(store.getConnections())
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldFlush.current = !shouldFlush.current
|
shouldFlush.current = !shouldFlush.current
|
||||||
}
|
}, [store])
|
||||||
|
|
||||||
function toggleSave () {
|
const toggleSave = useCallback(function () {
|
||||||
const state = store.toggleSave()
|
const state = store.toggleSave()
|
||||||
setSave(state)
|
setSave(state)
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ export function useConnections () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldFlush.current = true
|
shouldFlush.current = true
|
||||||
}
|
}, [store])
|
||||||
|
|
||||||
return { connections, feed, toggleSave, save }
|
return { connections, feed, toggleSave, save }
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ import { useI18n, useAPIInfo, useIdentity } from '@stores'
|
|||||||
import './style.scss'
|
import './style.scss'
|
||||||
|
|
||||||
export default function ExternalController () {
|
export default function ExternalController () {
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Settings')
|
const { t } = translation('Settings')
|
||||||
const { data: info, update, fetch } = useAPIInfo()
|
const { data: info, update, fetch } = useAPIInfo()
|
||||||
const { identity, set: setIdentity } = useIdentity()
|
const { identity, set: setIdentity } = useIdentity()
|
||||||
const [value, set] = useObject({
|
const [value, set] = useObject({
|
||||||
|
@ -11,8 +11,8 @@ export default function Logs () {
|
|||||||
const listRef = useRef<HTMLUListElement>(null)
|
const listRef = useRef<HTMLUListElement>(null)
|
||||||
const logsRef = useRef<Log[]>([])
|
const logsRef = useRef<Log[]>([])
|
||||||
const [logs, setLogs] = useState<Log[]>([])
|
const [logs, setLogs] = useState<Log[]>([])
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Logs')
|
const { t } = translation('Logs')
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
const ul = listRef.current
|
const ul = listRef.current
|
||||||
|
@ -15,10 +15,10 @@ interface ProvidersProps {
|
|||||||
|
|
||||||
export function Provider (props: ProvidersProps) {
|
export function Provider (props: ProvidersProps) {
|
||||||
const { update } = useProxyProviders()
|
const { update } = useProxyProviders()
|
||||||
const { useTranslation, lang } = useI18n()
|
const { translation, lang } = useI18n()
|
||||||
|
|
||||||
const { provider } = props
|
const { provider } = props
|
||||||
const { t } = useTranslation('Proxies')
|
const { t } = translation('Proxies')
|
||||||
|
|
||||||
const { visible, hide, show } = useVisible()
|
const { visible, hide, show } = useVisible()
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ function ProxyGroups () {
|
|||||||
const { groups, global } = useProxy()
|
const { groups, global } = useProxy()
|
||||||
const { data: config, set: setConfig } = useConfig()
|
const { data: config, set: setConfig } = useConfig()
|
||||||
const { general } = useGeneral()
|
const { general } = useGeneral()
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Proxies')
|
const { t } = translation('Proxies')
|
||||||
|
|
||||||
const list = useMemo(
|
const list = useMemo(
|
||||||
() => general.mode === 'global' ? [global] : groups,
|
() => general.mode === 'global' ? [global] : groups,
|
||||||
@ -68,7 +68,7 @@ function ProxyGroups () {
|
|||||||
|
|
||||||
function ProxyProviders () {
|
function ProxyProviders () {
|
||||||
const { providers } = useProxyProviders()
|
const { providers } = useProxyProviders()
|
||||||
const { useTranslation } = useI18n()
|
const { translation: useTranslation } = useI18n()
|
||||||
const { t } = useTranslation('Proxies')
|
const { t } = useTranslation('Proxies')
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
@ -92,7 +92,7 @@ function ProxyProviders () {
|
|||||||
|
|
||||||
function Proxies () {
|
function Proxies () {
|
||||||
const { proxies } = useProxy()
|
const { proxies } = useProxy()
|
||||||
const { useTranslation } = useI18n()
|
const { translation: useTranslation } = useI18n()
|
||||||
const { t } = useTranslation('Proxies')
|
const { t } = useTranslation('Proxies')
|
||||||
|
|
||||||
function handleNotitySpeedTest () {
|
function handleNotitySpeedTest () {
|
||||||
|
@ -13,10 +13,10 @@ interface ProvidersProps {
|
|||||||
|
|
||||||
export function Provider (props: ProvidersProps) {
|
export function Provider (props: ProvidersProps) {
|
||||||
const { update } = useRuleProviders()
|
const { update } = useRuleProviders()
|
||||||
const { useTranslation, lang } = useI18n()
|
const { translation, lang } = useI18n()
|
||||||
|
|
||||||
const { provider } = props
|
const { provider } = props
|
||||||
const { t } = useTranslation('Rules')
|
const { t } = translation('Rules')
|
||||||
|
|
||||||
const { visible, hide, show } = useVisible()
|
const { visible, hide, show } = useVisible()
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ import './style.scss'
|
|||||||
|
|
||||||
function RuleProviders () {
|
function RuleProviders () {
|
||||||
const { providers } = useRuleProviders()
|
const { providers } = useRuleProviders()
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Rules')
|
const { t } = translation('Rules')
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
{
|
{
|
||||||
@ -33,8 +33,8 @@ function RuleProviders () {
|
|||||||
|
|
||||||
export default function Rules () {
|
export default function Rules () {
|
||||||
const { rules, update } = useRule()
|
const { rules, update } = useRule()
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { t } = useTranslation('Rules')
|
const { t } = translation('Rules')
|
||||||
|
|
||||||
useSWR('rules', update)
|
useSWR('rules', update)
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ export default function Settings () {
|
|||||||
const { general, update: fetchGeneral } = useGeneral()
|
const { general, update: fetchGeneral } = useGeneral()
|
||||||
const { set: setIdentity } = useIdentity()
|
const { set: setIdentity } = useIdentity()
|
||||||
const { data: apiInfo } = useAPIInfo()
|
const { data: apiInfo } = useAPIInfo()
|
||||||
const { useTranslation, setLang, lang } = useI18n()
|
const { translation, setLang, lang } = useI18n()
|
||||||
const { t } = useTranslation('Settings')
|
const { t } = translation('Settings')
|
||||||
const [info, set] = useObject({
|
const [info, set] = useObject({
|
||||||
socks5ProxyPort: 7891,
|
socks5ProxyPort: 7891,
|
||||||
httpProxyPort: 7890,
|
httpProxyPort: 7890,
|
||||||
|
@ -18,10 +18,10 @@ interface SidebarProps {
|
|||||||
|
|
||||||
export default function Sidebar (props: SidebarProps) {
|
export default function Sidebar (props: SidebarProps) {
|
||||||
const { routes } = props
|
const { routes } = props
|
||||||
const { useTranslation } = useI18n()
|
const { translation } = useI18n()
|
||||||
const { version, premium, update } = useVersion()
|
const { version, premium, update } = useVersion()
|
||||||
const { data } = useClashXData()
|
const { data } = useClashXData()
|
||||||
const { t } = useTranslation('SideBar')
|
const { t } = translation('SideBar')
|
||||||
|
|
||||||
useSWR('version', update)
|
useSWR('version', update)
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ export function useI18n () {
|
|||||||
setLanguage(lang)
|
setLanguage(lang)
|
||||||
}
|
}
|
||||||
|
|
||||||
const useTranslation = useCallback(
|
const translation = useCallback(
|
||||||
function (namespace: keyof typeof Language['en_US']) {
|
function (namespace: keyof typeof Language['en_US']) {
|
||||||
function t (path: string) {
|
function t (path: string) {
|
||||||
return get(Language[lang][namespace], path) as string
|
return get(Language[lang][namespace], path) as string
|
||||||
@ -60,7 +60,7 @@ export function useI18n () {
|
|||||||
[lang]
|
[lang]
|
||||||
)
|
)
|
||||||
|
|
||||||
return { lang, locales, setLang, useTranslation }
|
return { lang, locales, setLang, translation }
|
||||||
}
|
}
|
||||||
|
|
||||||
export const version = atom({
|
export const version = atom({
|
||||||
@ -170,7 +170,7 @@ export const proxies = atom({
|
|||||||
export function useProxy () {
|
export function useProxy () {
|
||||||
const [allProxy, set] = useRecoilObjectWithImmer(proxies)
|
const [allProxy, set] = useRecoilObjectWithImmer(proxies)
|
||||||
|
|
||||||
const { mutate } = swr(['/proxies', set], async () => {
|
const { mutate } = swr('/proxies', async () => {
|
||||||
const allProxies = await API.getProxies()
|
const allProxies = await API.getProxies()
|
||||||
|
|
||||||
const global = allProxies.data.proxies.GLOBAL as API.Group
|
const global = allProxies.data.proxies.GLOBAL as API.Group
|
||||||
|
Loading…
x
Reference in New Issue
Block a user