lint code
parent
0d76c9ccb4
commit
71b84fb10d
|
@ -29,13 +29,22 @@ const typescriptRule = {
|
|||
allowBoolean: true,
|
||||
allowAny: true,
|
||||
}],
|
||||
'@typescript-eslint/no-misused-promises': [
|
||||
'error',
|
||||
{
|
||||
checksVoidReturn: {
|
||||
arguments: false,
|
||||
attributes: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/return-await': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/comma-dangle': 'off',
|
||||
}
|
||||
const vueRule = {
|
||||
...baseRule,
|
||||
...typescriptRule,
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
|
|
|
@ -6,9 +6,8 @@ module.exports = {
|
|||
'del',
|
||||
'comlink',
|
||||
'vue',
|
||||
'eslint-plugin-n',
|
||||
'@types/ws',
|
||||
'eslint-config-standard-with-typescript',
|
||||
// 'eslint-config-standard-with-typescript',
|
||||
],
|
||||
|
||||
// target: 'newest',
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
"electron-updater": "^6.1.4",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-config-standard-with-typescript": "^35.0.0",
|
||||
"eslint-config-standard-with-typescript": "^38.1.0",
|
||||
"eslint-formatter-friendly": "github:lyswhut/eslint-friendly-formatter#2170d1320e2fad13615a9dcf229669f0bb473a53",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
|
@ -3145,33 +3145,34 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
|
||||
"integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
|
||||
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/type-utils": "5.62.0",
|
||||
"@typescript-eslint/utils": "5.62.0",
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/type-utils": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.0",
|
||||
"natural-compare-lite": "^1.4.0",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
"ignore": "^5.2.4",
|
||||
"natural-compare": "^1.4.0",
|
||||
"semver": "^7.5.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -3180,25 +3181,26 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
|
||||
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
|
||||
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -3207,16 +3209,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
|
||||
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
|
||||
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/visitor-keys": "5.62.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -3224,26 +3226,26 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
|
||||
"integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
|
||||
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"@typescript-eslint/utils": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "*"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -3252,12 +3254,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
|
||||
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
|
||||
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -3265,21 +3267,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
|
||||
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
|
||||
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/visitor-keys": "5.62.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
"semver": "^7.5.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -3292,43 +3294,42 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
|
||||
"integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
|
||||
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"semver": "^7.3.7"
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
|
||||
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
|
||||
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -7445,49 +7446,23 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-config-standard-with-typescript": {
|
||||
"version": "35.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-35.0.0.tgz",
|
||||
"integrity": "sha512-Xa7DY9GgduZyp0qmXxBF0/dB+Vm4/DgWu1lGpNLJV2d46aCaUxTKDEnkzjUWX/1O9S0a+Dhnw7A4oI0JpYzwtw==",
|
||||
"version": "38.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-38.1.0.tgz",
|
||||
"integrity": "sha512-sdgN8Gf7BMVhVKlY7/mB426yO/MozU1zV7TKnh0z1wIoPq4lD0CHQ+b/UkgqKfiZ4Io0j3xIY1j+lHhVXQck0g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": "^5.50.0",
|
||||
"eslint-config-standard": "17.0.0"
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"eslint-config-standard": "17.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-standard-with-typescript/node_modules/eslint-config-standard": {
|
||||
"version": "17.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz",
|
||||
"integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-promise": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-formatter-friendly": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "git+ssh://git@github.com/lyswhut/eslint-friendly-formatter.git#2170d1320e2fad13615a9dcf229669f0bb473a53",
|
||||
|
@ -11245,13 +11220,6 @@
|
|||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/natural-compare-lite": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
|
||||
"integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/needle": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "git+ssh://git@github.com/lyswhut/needle.git#93299ac841b7e9a9f82ca7279b88aaaeda404060",
|
||||
|
@ -16293,6 +16261,18 @@
|
|||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz",
|
||||
"integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16.13.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-loader": {
|
||||
"version": "9.4.4",
|
||||
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz",
|
||||
|
@ -16331,27 +16311,6 @@
|
|||
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tsutils": {
|
||||
"version": "3.21.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
|
||||
"integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^1.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
|
||||
}
|
||||
},
|
||||
"node_modules/tsutils/node_modules/tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
|
@ -19924,105 +19883,106 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
|
||||
"integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
|
||||
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/type-utils": "5.62.0",
|
||||
"@typescript-eslint/utils": "5.62.0",
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/type-utils": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.0",
|
||||
"natural-compare-lite": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
"natural-compare": "^1.4.0",
|
||||
"semver": "latest",
|
||||
"tsutils": "^3.21.0"
|
||||
"ts-api-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
|
||||
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
|
||||
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
|
||||
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
|
||||
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/visitor-keys": "5.62.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/type-utils": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
|
||||
"integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
|
||||
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"@typescript-eslint/utils": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"@typescript-eslint/utils": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
"ts-api-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
|
||||
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
|
||||
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
|
||||
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
|
||||
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/visitor-keys": "5.62.0",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/visitor-keys": "6.4.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "latest",
|
||||
"tsutils": "^3.21.0"
|
||||
"ts-api-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
|
||||
"integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
|
||||
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/scope-manager": "5.62.0",
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.4.1",
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"@typescript-eslint/typescript-estree": "6.4.1",
|
||||
"semver": "latest"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.62.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
|
||||
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
|
||||
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.62.0",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
"@typescript-eslint/types": "6.4.1",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": {
|
||||
|
@ -23246,22 +23206,13 @@
|
|||
"requires": {}
|
||||
},
|
||||
"eslint-config-standard-with-typescript": {
|
||||
"version": "35.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-35.0.0.tgz",
|
||||
"integrity": "sha512-Xa7DY9GgduZyp0qmXxBF0/dB+Vm4/DgWu1lGpNLJV2d46aCaUxTKDEnkzjUWX/1O9S0a+Dhnw7A4oI0JpYzwtw==",
|
||||
"version": "38.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-38.1.0.tgz",
|
||||
"integrity": "sha512-sdgN8Gf7BMVhVKlY7/mB426yO/MozU1zV7TKnh0z1wIoPq4lD0CHQ+b/UkgqKfiZ4Io0j3xIY1j+lHhVXQck0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/parser": "^5.50.0",
|
||||
"eslint-config-standard": "17.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-config-standard": {
|
||||
"version": "17.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz",
|
||||
"integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
}
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"eslint-config-standard": "17.1.0"
|
||||
}
|
||||
},
|
||||
"eslint-formatter-friendly": {
|
||||
|
@ -26043,13 +25994,6 @@
|
|||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
||||
"dev": true
|
||||
},
|
||||
"natural-compare-lite": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
|
||||
"integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "git+ssh://git@github.com/lyswhut/needle.git#93299ac841b7e9a9f82ca7279b88aaaeda404060",
|
||||
"integrity": "sha512-NWwNanpqTqgHWYRLhd1nXwsDh83A8592gWWYz/lUbUd34PITOzzNuL8H0ipbdjFvWBRLPcQqVSn9Sx8RR1htIA==",
|
||||
|
@ -29918,6 +29862,13 @@
|
|||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"ts-api-utils": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz",
|
||||
"integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"ts-loader": {
|
||||
"version": "9.4.4",
|
||||
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz",
|
||||
|
@ -29949,23 +29900,6 @@
|
|||
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
|
||||
"dev": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "3.21.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
|
||||
"integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
"electron-updater": "^6.1.4",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-config-standard-with-typescript": "^35.0.0",
|
||||
"eslint-config-standard-with-typescript": "^38.1.0",
|
||||
"eslint-formatter-friendly": "github:lyswhut/eslint-friendly-formatter#2170d1320e2fad13615a9dcf229669f0bb473a53",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
|
|
|
@ -270,7 +270,7 @@ class Task extends EventEmitter {
|
|||
const result = this.__handleDiffChunk(chunk)
|
||||
if (result) chunk = result
|
||||
else {
|
||||
this.__handleStop().finally(() => {
|
||||
void this.__handleStop().finally(() => {
|
||||
// this.__handleError(new Error('Resume failed, response chunk does not match.'))
|
||||
// Resume failed, response chunk does not match, remove file and restart download
|
||||
console.log('Resume failed, response chunk does not match.')
|
||||
|
|
|
@ -65,7 +65,7 @@ export default {
|
|||
})
|
||||
|
||||
const menuClick = (item) => {
|
||||
if (item && item.disabled) return
|
||||
if (item?.disabled) return
|
||||
emit('menu-click', item)
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ const easeInOutQuad = (t, b, c, d) => {
|
|||
return (-c / 2) * (t * (t - 2) - 1) + b
|
||||
}
|
||||
const handleScroll = (element, to, duration = 300, callback = () => {}, onCancel = () => {}) => {
|
||||
if (!element) return callback()
|
||||
if (!element) { callback(); return }
|
||||
const start = element.scrollTop || element.scrollY || 0
|
||||
let cancel = false
|
||||
if (to > start) {
|
||||
|
@ -36,10 +36,10 @@ const handleScroll = (element, to, duration = 300, callback = () => {}, onCancel
|
|||
if (to > maxScrollTop) to = maxScrollTop
|
||||
} else if (to < start) {
|
||||
if (to < 0) to = 0
|
||||
} else return callback()
|
||||
} else { callback(); return }
|
||||
const change = to - start
|
||||
const increment = 10
|
||||
if (!change) return callback()
|
||||
if (!change) { callback(); return }
|
||||
|
||||
let currentTime = 0
|
||||
let val
|
||||
|
@ -145,7 +145,7 @@ export default {
|
|||
case 'down':
|
||||
break
|
||||
default:
|
||||
console.log(render(null, slots.default(list[0])[0]))
|
||||
render(null, slots.default(list[0])[0])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -196,14 +196,14 @@ export default {
|
|||
emit('scroll', event)
|
||||
}
|
||||
|
||||
const scrollTo = (scrollTop, animate = false) => {
|
||||
const scrollTo = async(scrollTop, animate = false) => {
|
||||
return new Promise(resolve => {
|
||||
if (cancelScroll) {
|
||||
cancelScroll(resolve)
|
||||
} else {
|
||||
resolve()
|
||||
}
|
||||
}).then(() => {
|
||||
}).then(async() => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (animate) {
|
||||
isScrolling = true
|
||||
|
@ -224,7 +224,7 @@ export default {
|
|||
})
|
||||
}
|
||||
|
||||
const scrollToIndex = (index, offset = 0, animate = false) => {
|
||||
const scrollToIndex = async(index, offset = 0, animate = false) => {
|
||||
return scrollTo(Math.max(index * props.itemHeight + offset, 0), animate)
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ export default {
|
|||
cachedList = Array(list.length)
|
||||
startIndex = -1
|
||||
endIndex = -1
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
updateView(true)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -22,13 +22,11 @@ import { ref, watch, onMounted, onBeforeUnmount, reactive } from '@common/utils/
|
|||
// https://github.com/vuejs/core/issues/2855#issuecomment-768388962
|
||||
import {
|
||||
Teleport as teleport_,
|
||||
TeleportProps,
|
||||
VNodeProps,
|
||||
type TeleportProps,
|
||||
type VNodeProps,
|
||||
} from 'vue'
|
||||
const Teleport = teleport_ as {
|
||||
new (): {
|
||||
$props: VNodeProps & TeleportProps
|
||||
}
|
||||
const Teleport = teleport_ as new () => {
|
||||
$props: VNodeProps & TeleportProps
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -50,7 +50,7 @@ const easeInOutQuad = (t, b, c, d) => {
|
|||
return (-c / 2) * (t * (t - 2) - 1) + b
|
||||
}
|
||||
const handleScroll = (element, to, duration = 300, callback = () => {}, onCancel = () => {}) => {
|
||||
if (!element) return callback()
|
||||
if (!element) { callback(); return }
|
||||
const start = element.scrollTop || element.scrollY || 0
|
||||
let cancel = false
|
||||
if (to > start) {
|
||||
|
@ -58,10 +58,10 @@ const handleScroll = (element, to, duration = 300, callback = () => {}, onCancel
|
|||
if (to > maxScrollTop) to = maxScrollTop
|
||||
} else if (to < start) {
|
||||
if (to < 0) to = 0
|
||||
} else return callback()
|
||||
} else { callback(); return }
|
||||
const change = to - start
|
||||
const increment = 10
|
||||
if (!change) return callback()
|
||||
if (!change) { callback(); return }
|
||||
|
||||
let currentTime = 0
|
||||
let val
|
||||
|
@ -214,7 +214,7 @@ export default {
|
|||
|
||||
const scrollTo = (scrollTop, animate = false, onScrollEnd) => {
|
||||
if (onScrollEnd) {
|
||||
new Promise(resolve => {
|
||||
void new Promise(resolve => {
|
||||
if (cancelScroll) {
|
||||
cancelScroll(resolve)
|
||||
} else {
|
||||
|
@ -270,7 +270,7 @@ export default {
|
|||
cachedList = Array(list.length)
|
||||
startIndex = -1
|
||||
endIndex = -1
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
updateView()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleClick(quality) {
|
||||
createDownloadTasks([this.musicInfo], quality)
|
||||
void createDownloadTasks([this.musicInfo], quality)
|
||||
this.handleClose()
|
||||
},
|
||||
handleClose() {
|
||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
|||
emits: ['update:show', 'confirm'],
|
||||
methods: {
|
||||
handleClick(quality) {
|
||||
createDownloadTasks(this.list.filter(item => item.source != 'local'), quality)
|
||||
void createDownloadTasks(this.list.filter(item => item.source != 'local'), quality)
|
||||
this.handleClose()
|
||||
this.$emit('confirm')
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@ export default {
|
|||
|
||||
const checkMusicExist = (musicInfo) => {
|
||||
const mid = musicInfo.id
|
||||
getMusicExistListIds(mid).then(ids => {
|
||||
void getMusicExistListIds(mid).then(ids => {
|
||||
if (mid != musicInfo.id) return
|
||||
for (const list of lists.value) {
|
||||
if (ids.includes(list.id)) list.isExist = true
|
||||
|
@ -150,9 +150,8 @@ export default {
|
|||
: width < 3840 ? 5 : 6
|
||||
},
|
||||
handleClick(index) {
|
||||
this.isMove
|
||||
? moveListMusics(this.fromListId, this.lists[index].id, [this.currentMusicInfo])
|
||||
: addListMusics(this.lists[index].id, [this.currentMusicInfo])
|
||||
if (this.isMove) void moveListMusics(this.fromListId, this.lists[index].id, [this.currentMusicInfo])
|
||||
else void addListMusics(this.lists[index].id, [this.currentMusicInfo])
|
||||
|
||||
this.lists[index].isExist = true
|
||||
if (this.keyModDown && !this.isMove) return
|
||||
|
@ -174,7 +173,7 @@ export default {
|
|||
this.newListName = event.target.value = ''
|
||||
this.isEditing = false
|
||||
if (!name) return
|
||||
createUserList({ name })
|
||||
void createUserList({ name })
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -111,9 +111,8 @@ export default {
|
|||
handleClick(index) {
|
||||
const list = 'progress' in this.musicList[0] ? this.musicList.map(t => t.metadata.musicInfo) : this.musicList
|
||||
|
||||
this.isMove
|
||||
? moveListMusics(this.fromListId, this.lists[index].id, list)
|
||||
: addListMusics(this.lists[index].id, list)
|
||||
if (this.isMove) void moveListMusics(this.fromListId, this.lists[index].id, list)
|
||||
else void addListMusics(this.lists[index].id, list)
|
||||
|
||||
if (this.keyModDown && !this.isMove) return
|
||||
this.$nextTick(() => {
|
||||
|
@ -135,7 +134,7 @@ export default {
|
|||
this.newListName = event.target.value = ''
|
||||
this.isEditing = false
|
||||
if (!name) return
|
||||
createUserList({ name })
|
||||
void createUserList({ name })
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ const handleEditing = () => {
|
|||
if (isEditing.value) return
|
||||
// if (!this.newPresetName) this.newPresetName = this.listName
|
||||
isEditing.value = true
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
input.value.$el.focus()
|
||||
})
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ const handleSave = (event) => {
|
|||
isEditing.value = false
|
||||
if (!name) return
|
||||
if (name.length > 20) name = name.substring(0, 20)
|
||||
saveUserConvolutionPreset({
|
||||
void saveUserConvolutionPreset({
|
||||
id: Date.now().toString(),
|
||||
name,
|
||||
source: appSetting['player.soundEffect.convolution.fileName'],
|
||||
|
|
|
@ -18,7 +18,7 @@ const handleEditing = () => {
|
|||
if (isEditing.value) return
|
||||
// if (!this.newPresetName) this.newPresetName = this.listName
|
||||
isEditing.value = true
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
input.value.$el.focus()
|
||||
})
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ const handleSave = (event) => {
|
|||
isEditing.value = false
|
||||
if (!name) return
|
||||
if (name.length > 20) name = name.substring(0, 20)
|
||||
saveUserEQPreset({
|
||||
void saveUserEQPreset({
|
||||
id: Date.now().toString(),
|
||||
name,
|
||||
hz31: appSetting['player.soundEffect.biquadFilter.hz31'],
|
||||
|
|
|
@ -69,7 +69,7 @@ const handleSetPreset = (item) => {
|
|||
}
|
||||
const userPresetList = ref([])
|
||||
const handleRemovePreset = id => {
|
||||
removeUserConvolutionPreset(id)
|
||||
void removeUserConvolutionPreset(id)
|
||||
}
|
||||
|
||||
const disabledConvolution = computed(() => {
|
||||
|
@ -77,7 +77,7 @@ const disabledConvolution = computed(() => {
|
|||
})
|
||||
|
||||
onMounted(() => {
|
||||
getUserConvolutionPresetList().then(list => {
|
||||
void getUserConvolutionPresetList().then(list => {
|
||||
userPresetList.value = list
|
||||
})
|
||||
})
|
||||
|
|
|
@ -65,11 +65,11 @@ const handleSetPreset = (item) => {
|
|||
const userPresetList = ref([])
|
||||
|
||||
const handleRemovePreset = id => {
|
||||
removeUserEQPreset(id)
|
||||
void removeUserEQPreset(id)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserEQPresetList().then(list => {
|
||||
void getUserEQPresetList().then(list => {
|
||||
userPresetList.value = list
|
||||
})
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ import { computed, ref } from '@common/utils/vueTools'
|
|||
export default {
|
||||
setup() {
|
||||
const lastStartVersion = ref(null)
|
||||
getLastStartInfo().then(version => {
|
||||
void getLastStartInfo().then(version => {
|
||||
lastStartVersion.value = version
|
||||
})
|
||||
|
||||
|
@ -43,7 +43,7 @@ export default {
|
|||
history: [],
|
||||
isLatest: true,
|
||||
}
|
||||
if (!versionInfo.newVersion || !versionInfo.newVersion?.history) return info
|
||||
if (!versionInfo.newVersion?.history) return info
|
||||
info.isLatest = compareVer(currentVer, versionInfo.newVersion.version) >= 0
|
||||
|
||||
const history = [{ version: versionInfo.newVersion.version, desc: versionInfo.newVersion.desc }, ...versionInfo.newVersion.history]
|
||||
|
|
|
@ -81,11 +81,11 @@ export default {
|
|||
}, 2e3)
|
||||
},
|
||||
handleClose(isExit) {
|
||||
if (isExit) return quitApp(true)
|
||||
if (isExit) { quitApp(true); return }
|
||||
isShowPact.value = false
|
||||
},
|
||||
openUrl(url) {
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
},
|
||||
startTimeout() {
|
||||
window.setTimeout(() => {
|
||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
|||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
|||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
|||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
|
|
@ -113,7 +113,7 @@ export default {
|
|||
lyricMenuXY.x = event.pageX
|
||||
lyricMenuXY.y = event.pageY
|
||||
if (lyricMenuVisible.value) return
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
lyricMenuVisible.value = true
|
||||
})
|
||||
}
|
||||
|
|
|
@ -55,10 +55,10 @@ const offsetTagRxp = /(?:^|\n)\s*\[offset:\s*(\S+(?:\d+)*)\s*\]/
|
|||
const offsetTagAllRxp = /(^|\n)\s*\[offset:\s*(\S+(?:\d+)*)\s*\]/g
|
||||
|
||||
const saveLyric = debounce((musicInfo, lyricInfo) => {
|
||||
saveLyricEdited(musicInfo, lyricInfo)
|
||||
void saveLyricEdited(musicInfo, lyricInfo)
|
||||
})
|
||||
const removeLyric = debounce(musicInfo => {
|
||||
removeLyricEdited(musicInfo)
|
||||
void removeLyricEdited(musicInfo)
|
||||
})
|
||||
|
||||
const getOffset = lrc => {
|
||||
|
|
|
@ -138,7 +138,7 @@ export default {
|
|||
visibled,
|
||||
isFullscreen,
|
||||
fullscreenExit() {
|
||||
setFullScreen(false).then((fullscreen) => {
|
||||
void setFullScreen(false).then((fullscreen) => {
|
||||
isFullscreen.value = fullscreen
|
||||
})
|
||||
},
|
||||
|
|
|
@ -61,7 +61,7 @@ export default {
|
|||
}
|
||||
const handleSelectMode = (mode) => {
|
||||
if (mode.startsWith('overwrite') && isOverwrite.value) mode += '_full'
|
||||
sendSyncAction({ action: 'select_mode', data: mode })
|
||||
void sendSyncAction({ action: 'select_mode', data: mode })
|
||||
handleClose()
|
||||
}
|
||||
return {
|
||||
|
|
|
@ -97,7 +97,7 @@ export default {
|
|||
break
|
||||
case 'listClick':
|
||||
searchText.value = tipList.value[data]
|
||||
nextTick(handleSearch)
|
||||
void nextTick(handleSearch)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
history() {
|
||||
if (!this.versionInfo.newVersion || !this.versionInfo.newVersion?.history) return []
|
||||
if (!this.versionInfo.newVersion?.history) return []
|
||||
let arr = []
|
||||
let currentVer = this.versionInfo.version
|
||||
this.versionInfo.newVersion?.history.forEach(ver => {
|
||||
|
@ -134,7 +134,7 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
getIgnoreVersion().then(version => {
|
||||
void getIgnoreVersion().then(version => {
|
||||
this.ignoreVersion = version
|
||||
})
|
||||
},
|
||||
|
@ -143,7 +143,7 @@ export default {
|
|||
versionInfo.showModal = false
|
||||
},
|
||||
handleOpenUrl(url) {
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
},
|
||||
handleRestartClick(event) {
|
||||
this.handleClose()
|
||||
|
@ -166,7 +166,7 @@ export default {
|
|||
confirmButtonText: window.i18n.t('update__ignore_confirm'),
|
||||
})) {
|
||||
setTimeout(() => {
|
||||
dialog({
|
||||
void dialog({
|
||||
message: window.i18n.t('update__ignore_confirm_tip'),
|
||||
confirmButtonText: window.i18n.t('update__ignore_confirm_tip_confirm'),
|
||||
})
|
||||
|
|
|
@ -161,7 +161,7 @@ export default {
|
|||
// }
|
||||
this.setRandomAnimation()
|
||||
this.showModal = true
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
this.$refs.dom_container.parentNode.classList.add('show-modal')
|
||||
this.showContent = true
|
||||
})
|
||||
|
|
|
@ -234,7 +234,7 @@ export default {
|
|||
handleShowDownloadModal(index, true)
|
||||
break
|
||||
case 'play':
|
||||
handlePlayMusic(index, true)
|
||||
void handlePlayMusic(index, true)
|
||||
break
|
||||
case 'search':
|
||||
handleSearch(index)
|
||||
|
|
|
@ -83,6 +83,7 @@ export default {
|
|||
if (this.maxPage <= this.btnLength) return Array.from({ length: this.maxPage }, (_, i) => i + 1)
|
||||
let start =
|
||||
this.page - this.pageEvg > 1
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
? this.maxPage - this.page < this.pageEvg + 1
|
||||
? this.maxPage - (this.btnLength - 1)
|
||||
: this.page - this.pageEvg
|
||||
|
|
|
@ -141,7 +141,7 @@ export default {
|
|||
},
|
||||
handleSearch() {
|
||||
this.hideList()
|
||||
if (this.selectIndex < 0) return this.sendEvent('submit')
|
||||
if (this.selectIndex < 0) { this.sendEvent('submit'); return }
|
||||
this.sendEvent('listClick', this.selectIndex)
|
||||
},
|
||||
showList() {
|
||||
|
|
|
@ -141,7 +141,7 @@ export const getCachedLyricInfo = async(musicInfo: LX.Music.MusicInfo): Promise<
|
|||
export const getPlayQuality = (highQuality: boolean, musicInfo: LX.Music.MusicInfoOnline): LX.Quality => {
|
||||
let type: LX.Quality = '128k'
|
||||
let list = qualityList.value[musicInfo.source]
|
||||
if (highQuality && musicInfo.meta._qualitys['320k'] && list && list.includes('320k')) type = '320k'
|
||||
if (highQuality && musicInfo.meta._qualitys['320k'] && list?.includes('320k')) type = '320k'
|
||||
return type
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ export const getPlayType = (highQuality: boolean, musicInfo: LX.Music.MusicInfo
|
|||
if ('progress' in musicInfo || musicInfo.source == 'local') return null
|
||||
let type: LX.Quality = '128k'
|
||||
let list = qualityList.value[musicInfo.source]
|
||||
if (highQuality && musicInfo.meta._qualitys['320k'] && list && list.includes('320k')) type = '320k'
|
||||
if (highQuality && musicInfo.meta._qualitys['320k'] && list?.includes('320k')) type = '320k'
|
||||
return type
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export default () => {
|
|||
userApi.status = status
|
||||
userApi.message = message
|
||||
|
||||
if (status && apiInfo && apiInfo.sources) {
|
||||
if (status && apiInfo?.sources) {
|
||||
if (apiInfo.id === appSetting['common.apiSource']) {
|
||||
let apis: any = {}
|
||||
let qualitys: LX.QualityList = {}
|
||||
|
|
|
@ -73,7 +73,7 @@ export default () => {
|
|||
navigator.mediaSession.playbackState = 'none'
|
||||
}
|
||||
const handleSetPlayInfo = () => {
|
||||
emptyAudio.play().finally(() => {
|
||||
void emptyAudio.play().finally(() => {
|
||||
updateMediaSessionInfo()
|
||||
updatePositionState({
|
||||
position: playProgress.nowPlayTime,
|
||||
|
@ -100,12 +100,12 @@ export default () => {
|
|||
})
|
||||
navigator.mediaSession.setActionHandler('seekbackward', details => {
|
||||
console.log('seekbackward')
|
||||
const seekOffset = details.seekOffset == null ? 5 : details.seekOffset
|
||||
const seekOffset = details.seekOffset ?? 5
|
||||
setProgress(Math.max(getCurrentTime() - seekOffset, 0))
|
||||
})
|
||||
navigator.mediaSession.setActionHandler('seekforward', details => {
|
||||
console.log('seekforward')
|
||||
const seekOffset = details.seekOffset == null ? 5 : details.seekOffset
|
||||
const seekOffset = details.seekOffset ?? 5
|
||||
setProgress(Math.min(getCurrentTime() + seekOffset, getDuration()))
|
||||
})
|
||||
navigator.mediaSession.setActionHandler('seekto', details => {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export default LX
|
|
@ -143,9 +143,9 @@ export default {
|
|||
if (task.isComplate) {
|
||||
handlePlayMusic(list.value.indexOf(task), true)
|
||||
} else if (task.status === downloadStatus.RUN || task.status === downloadStatus.WAITING) {
|
||||
handlePauseTask(index, true)
|
||||
void handlePauseTask(index, true)
|
||||
} else {
|
||||
handleStartTask(index, true)
|
||||
void handleStartTask(index, true)
|
||||
}
|
||||
clickTime = 0
|
||||
clickIndex = -1
|
||||
|
@ -172,16 +172,16 @@ export default {
|
|||
handlePlayMusic(index, true)
|
||||
break
|
||||
case 'start':
|
||||
handleStartTask(index, true)
|
||||
void handleStartTask(index, true)
|
||||
break
|
||||
case 'pause':
|
||||
handlePauseTask(index, true)
|
||||
void handlePauseTask(index, true)
|
||||
break
|
||||
case 'remove':
|
||||
handleRemoveTask(index, true)
|
||||
void handleRemoveTask(index, true)
|
||||
break
|
||||
case 'file':
|
||||
handleOpenFile(index)
|
||||
void handleOpenFile(index)
|
||||
break
|
||||
case 'search':
|
||||
handleSearch(index)
|
||||
|
|
|
@ -25,9 +25,8 @@
|
|||
<script setup lang="ts">
|
||||
import { watch, shallowReactive, ref } from '@common/utils/vueTools'
|
||||
import { getBoardsList, setBoard } from '@renderer/store/leaderboard/action'
|
||||
import { boards, Board } from '@renderer/store/leaderboard/state'
|
||||
import { boards, type Board } from '@renderer/store/leaderboard/state'
|
||||
import useMenu from './useMenu'
|
||||
import LX from '@renderer/types/lx'
|
||||
import { useRouter, useRoute } from '@common/utils/vueRouter'
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -44,7 +43,7 @@ const list = shallowReactive<Board['list']>([])
|
|||
const rightClickItemIndex = ref(-1)
|
||||
|
||||
const handleToggleList = (id: string) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
source: props.source,
|
||||
|
@ -65,7 +64,7 @@ const handleRigthClick = (event: MouseEvent, index: number) => {
|
|||
rightClickItemIndex.value = index
|
||||
showMenu(event, index)
|
||||
}
|
||||
const handleMenuClick = (action?: { action: string}) => {
|
||||
const handleMenuClick = (action?: { action: string }) => {
|
||||
if (rightClickItemIndex.value < 0) return
|
||||
let index = rightClickItemIndex.value
|
||||
rightClickItemIndex.value = -1
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { watch } from '@common/utils/vueTools'
|
||||
import LX from '@renderer/types/lx'
|
||||
import useList from './useList'
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ const verifyQueryParams = async function(to, from, next) {
|
|||
next()
|
||||
source.value = _source
|
||||
boardId.value = _boardId
|
||||
setLeaderboardSetting({ source: _source, boardId: _boardId })
|
||||
void setLeaderboardSetting({ source: _source, boardId: _boardId })
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ export default {
|
|||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const handleToggleSource = (id) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
source: id,
|
||||
|
|
|
@ -139,12 +139,12 @@ export default {
|
|||
const handleRestoreScroll = (_scrollIndex, _isAnimation) => {
|
||||
scrollIndex = _scrollIndex
|
||||
isAnimation = _isAnimation
|
||||
if (isAnimation) restoreScroll(scrollIndex, isAnimation)
|
||||
if (isAnimation) void restoreScroll(scrollIndex, isAnimation)
|
||||
// console.log('handleRestoreScroll', scrollIndex, isAnimation)
|
||||
}
|
||||
const onLoadedList = () => {
|
||||
// console.log('restoreScroll', scrollIndex, isAnimation)
|
||||
restoreScroll(scrollIndex, isAnimation)
|
||||
void restoreScroll(scrollIndex, isAnimation)
|
||||
}
|
||||
|
||||
const {
|
||||
|
|
|
@ -84,7 +84,7 @@ export default {
|
|||
watch(() => props.visible, (visible) => {
|
||||
if (visible) {
|
||||
if (duplicateList.value.length) duplicateList.value = []
|
||||
handleFilterList()
|
||||
void handleFilterList()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ export default {
|
|||
console.log(sortType.value, sortField.value)
|
||||
|
||||
closeModal()
|
||||
updateListMusicsPosition({ listId: props.listInfo.id, position: 0, ids: list.map(m => m.id) })
|
||||
void updateListMusicsPosition({ listId: props.listInfo.id, position: 0, ids: list.map(m => m.id) })
|
||||
}
|
||||
|
||||
const listName = computed(() => {
|
||||
|
|
|
@ -56,7 +56,7 @@ export default {
|
|||
const updateInfo = ref({})
|
||||
// const updateTimes = ref({})
|
||||
|
||||
getListUpdateInfo().then((listUpdateInfo) => {
|
||||
void getListUpdateInfo().then((listUpdateInfo) => {
|
||||
updateInfo.value = listUpdateInfo
|
||||
// if (listUpdateTimes._inited) {
|
||||
// for (const [id, value] of Object.entries(info)) {
|
||||
|
@ -72,12 +72,12 @@ export default {
|
|||
})
|
||||
|
||||
const handleUpdate = (targetListInfo) => {
|
||||
handleSyncSourceList(targetListInfo)
|
||||
void handleSyncSourceList(targetListInfo)
|
||||
// console.log(targetListInfo.list.length, list.length)
|
||||
}
|
||||
|
||||
const handleChangeAutoUpdate = (list, enable) => {
|
||||
setListAutoUpdate(list.id, enable)
|
||||
void setListAutoUpdate(list.id, enable)
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -148,16 +148,16 @@ export default {
|
|||
url = await musicSdk[source].songList.getDetailPageUrl(sourceListId)
|
||||
}
|
||||
if (!url) return
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
}
|
||||
|
||||
const handleRemove = (listInfo) => {
|
||||
dialog.confirm({
|
||||
void dialog.confirm({
|
||||
message: t('lists__remove_tip', { name: listInfo.name }),
|
||||
confirmButtonText: t('lists__remove_tip_button'),
|
||||
}).then(isRemove => {
|
||||
if (!isRemove) return
|
||||
removeUserList([listInfo.id])
|
||||
void removeUserList([listInfo.id])
|
||||
if (props.listId == listInfo.id) {
|
||||
handleListToggle(LIST_IDS.DEFAULT)
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ export default {
|
|||
|
||||
watch(() => userLists, (lists) => {
|
||||
if (lists.some(l => l.id == props.listId)) return
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: defaultList.id,
|
||||
|
|
|
@ -6,7 +6,7 @@ import useDarg from '@renderer/utils/compositions/useDrag'
|
|||
|
||||
export default ({ dom_lists_list, handleSaveListName, handleMenuClick }: {
|
||||
dom_lists_list: Ref<HTMLElement | null>
|
||||
handleSaveListName: () => void
|
||||
handleSaveListName: () => Promise<void> | void
|
||||
handleMenuClick: () => void
|
||||
}) => {
|
||||
const isModDown = ref(false)
|
||||
|
@ -34,7 +34,7 @@ export default ({ dom_lists_list, handleSaveListName, handleMenuClick }: {
|
|||
|
||||
isModDown.value = true
|
||||
setDisabled(false)
|
||||
handleSaveListName()
|
||||
void handleSaveListName()
|
||||
}
|
||||
handleMenuClick()
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import { watch } from '@common/utils/vueTools'
|
||||
import { searchText } from '@renderer/store/search/state'
|
||||
import { useRouter, useRoute } from '@common/utils/vueRouter'
|
||||
import useList, { SearchSource } from './useList'
|
||||
import useList, { type SearchSource } from './useList'
|
||||
|
||||
interface Props {
|
||||
sourceId: SearchSource
|
||||
|
@ -51,7 +51,7 @@ watch(searchText, (searchText) => {
|
|||
})
|
||||
|
||||
const handleTogglePage = (page: number) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
...route.query,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { watch } from '@common/utils/vueTools'
|
||||
import { searchText } from '@renderer/store/search/state'
|
||||
import { useRouter, useRoute } from '@common/utils/vueRouter'
|
||||
import useList, { SearchSource } from './useList'
|
||||
import useList, { type SearchSource } from './useList'
|
||||
import SongList from '@renderer/views/songList/List/components/SongList.vue'
|
||||
|
||||
interface Props {
|
||||
|
@ -40,7 +40,7 @@ watch(searchText, (searchText) => {
|
|||
})
|
||||
|
||||
const togglePage = (page: number) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
...route.query,
|
||||
|
|
|
@ -44,7 +44,7 @@ const hotSearchList = shallowRef([])
|
|||
if (appSetting['search.isShowHotSearch']) {
|
||||
watch(() => props.visible, (visible) => {
|
||||
if (!visible) return
|
||||
getList(props.source).then(list => {
|
||||
void getList(props.source).then(list => {
|
||||
hotSearchList.value = list
|
||||
})
|
||||
}, {
|
||||
|
@ -53,7 +53,7 @@ if (appSetting['search.isShowHotSearch']) {
|
|||
|
||||
watch(() => props.source, (source) => {
|
||||
if (!props.visible) return
|
||||
getList(source).then(list => {
|
||||
void getList(source).then(list => {
|
||||
if (source != props.source) return
|
||||
hotSearchList.value = list
|
||||
})
|
||||
|
@ -61,12 +61,12 @@ if (appSetting['search.isShowHotSearch']) {
|
|||
}
|
||||
|
||||
if (appSetting['search.isShowHistorySearch']) {
|
||||
getHistoryList()
|
||||
void getHistoryList()
|
||||
}
|
||||
|
||||
const router = useRouter()
|
||||
const handleSearch = (text) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: '/search',
|
||||
query: {
|
||||
text,
|
||||
|
|
|
@ -54,7 +54,7 @@ const verifyQueryParams = async(to, from, next) => {
|
|||
if (!_page) page.value = 1
|
||||
}
|
||||
next()
|
||||
setSearchSetting({ source: _source, type: _type })
|
||||
void setSearchSetting({ source: _source, type: _type })
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -76,7 +76,7 @@ export default {
|
|||
}
|
||||
})
|
||||
const handleSourceChange = (id) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
...route.query,
|
||||
|
@ -93,7 +93,7 @@ export default {
|
|||
]
|
||||
})
|
||||
const handleTypeChange = (type) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
...route.query,
|
||||
|
|
|
@ -148,11 +148,11 @@ export default {
|
|||
await importNewListData(allData.playList)
|
||||
importNewSettingData(allData.setting)
|
||||
break
|
||||
default: return showImportTip(allData.type)
|
||||
default: { showImportTip(allData.type) }
|
||||
}
|
||||
}
|
||||
const handleImportAllData = () => {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__backup_all_import_desc'),
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
|
@ -161,13 +161,13 @@ export default {
|
|||
],
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
dialog.confirm({
|
||||
void dialog.confirm({
|
||||
message: t('setting__backup_part_import_list_confirm'),
|
||||
cancelButtonText: t('cancel_button_text'),
|
||||
confirmButtonText: t('confirm_button_text'),
|
||||
}).then(confirm => {
|
||||
if (!confirm) return
|
||||
importAllData(result.filePaths[0])
|
||||
void importAllData(result.filePaths[0])
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -178,15 +178,15 @@ export default {
|
|||
setting: { ...appSetting },
|
||||
playList: await getAllLists(),
|
||||
}
|
||||
window.lx.worker.main.saveLxConfigFile(path, allData)
|
||||
void window.lx.worker.main.saveLxConfigFile(path, allData)
|
||||
}
|
||||
const handleExportAllData = () => {
|
||||
openSaveDir({
|
||||
void openSaveDir({
|
||||
title: t('setting__backup_all_export_desc'),
|
||||
defaultPath: 'lx_datas_v2.lxmc',
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
exportAllData(result.filePath)
|
||||
void exportAllData(result.filePath)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -195,10 +195,10 @@ export default {
|
|||
type: 'setting_v2',
|
||||
data: { ...appSetting },
|
||||
}
|
||||
window.lx.worker.main.saveLxConfigFile(path, data)
|
||||
void window.lx.worker.main.saveLxConfigFile(path, data)
|
||||
}
|
||||
const handleExportSetting = () => {
|
||||
openSaveDir({
|
||||
void openSaveDir({
|
||||
title: t('setting__backup_part_export_setting_desc'),
|
||||
defaultPath: 'lx_setting_v2.lxmc',
|
||||
}).then(result => {
|
||||
|
@ -222,11 +222,11 @@ export default {
|
|||
case 'setting_v2':
|
||||
importNewSettingData(settingData.data)
|
||||
break
|
||||
default: return showImportTip(settingData.type)
|
||||
default: { showImportTip(settingData.type) }
|
||||
}
|
||||
}
|
||||
const handleImportSetting = () => {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__backup_part_import_setting_desc'),
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
|
@ -235,7 +235,7 @@ export default {
|
|||
],
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
importSetting(result.filePaths[0])
|
||||
void importSetting(result.filePaths[0])
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -244,15 +244,15 @@ export default {
|
|||
type: 'playList_v2',
|
||||
data: await getAllLists(),
|
||||
}
|
||||
window.lx.worker.main.saveLxConfigFile(path, data)
|
||||
void window.lx.worker.main.saveLxConfigFile(path, data)
|
||||
}
|
||||
const handleExportPlayList = () => {
|
||||
openSaveDir({
|
||||
void openSaveDir({
|
||||
title: t('setting__backup_part_export_list_desc'),
|
||||
defaultPath: 'lx_list.lxmc',
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
exportPlayList(result.filePath)
|
||||
void exportPlayList(result.filePath)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -275,11 +275,11 @@ export default {
|
|||
case 'playList_v2':
|
||||
await importNewListData(listData.data)
|
||||
break
|
||||
default: return showImportTip(listData.type)
|
||||
default: { showImportTip(listData.type) }
|
||||
}
|
||||
}
|
||||
const handleImportPlayList = () => {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__backup_part_import_list_desc'),
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
|
@ -288,13 +288,13 @@ export default {
|
|||
],
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
dialog.confirm({
|
||||
void dialog.confirm({
|
||||
message: t('setting__backup_part_import_list_confirm'),
|
||||
cancelButtonText: t('cancel_button_text'),
|
||||
confirmButtonText: t('confirm_button_text'),
|
||||
}).then(confirm => {
|
||||
if (!confirm) return
|
||||
importPlayList(result.filePaths[0])
|
||||
void importPlayList(result.filePaths[0])
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -310,23 +310,23 @@ export default {
|
|||
confirmButtonText: t('confirm_button_text'),
|
||||
})
|
||||
if (confirm) {
|
||||
openSaveDir({
|
||||
void openSaveDir({
|
||||
title: t('setting__backup_other_export_dir'),
|
||||
defaultPath: 'lx_list_all.txt',
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
let path = result.filePath
|
||||
if (!path.endsWith('.txt')) path += '.txt'
|
||||
exportPlayListToText(path, true)
|
||||
void exportPlayListToText(path, true)
|
||||
})
|
||||
} else {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__backup_other_export_dir'),
|
||||
// defaultPath: currentStting.value.download.savePath,
|
||||
properties: ['openDirectory'],
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
exportPlayListToText(result.filePaths[0], false)
|
||||
void exportPlayListToText(result.filePaths[0], false)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -342,23 +342,23 @@ export default {
|
|||
confirmButtonText: t('confirm_button_text'),
|
||||
})
|
||||
if (confirm) {
|
||||
openSaveDir({
|
||||
void openSaveDir({
|
||||
title: t('setting__backup_other_export_dir'),
|
||||
defaultPath: 'lx_list_all.csv',
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
let path = result.filePath
|
||||
if (!path.endsWith('.csv')) path += '.csv'
|
||||
exportPlayListToCsv(path, true)
|
||||
void exportPlayListToCsv(path, true)
|
||||
})
|
||||
} else {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__backup_other_export_dir'),
|
||||
// defaultPath: currentStting.value.download.savePath,
|
||||
properties: ['openDirectory'],
|
||||
}).then(result => {
|
||||
if (result.canceled) return
|
||||
exportPlayListToCsv(result.filePaths[0], false)
|
||||
void exportPlayListToCsv(result.filePaths[0], false)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ export default {
|
|||
const handleEditTheme = (theme) => {
|
||||
// console.log(theme)
|
||||
if (!theme && userThemes.length >= 10) {
|
||||
dialog({
|
||||
void dialog({
|
||||
message: t('theme_max_tip'),
|
||||
confirmButtonText: t('alert_button_text'),
|
||||
})
|
||||
|
@ -214,7 +214,7 @@ export default {
|
|||
if (themeId.value == 'auto') return
|
||||
if (window.localStorage.getItem('theme-auto-tip') != 'true') {
|
||||
window.localStorage.setItem('theme-auto-tip', 'true')
|
||||
dialog({
|
||||
void dialog({
|
||||
message: t('setting__basic_theme_auto_tip'),
|
||||
confirmButtonText: t('ok'),
|
||||
})
|
||||
|
@ -271,7 +271,7 @@ export default {
|
|||
const fontList = computed(() => {
|
||||
return [{ id: '', label: t('setting__desktop_lyric_font_default') }, ...systemFontList.value]
|
||||
})
|
||||
getSystemFonts().then(fonts => {
|
||||
void getSystemFonts().then(fonts => {
|
||||
systemFontList.value = fonts.map(f => ({ id: f, label: f.replace(/(^"|"$)/g, '') }))
|
||||
})
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ export default {
|
|||
const fontList = computed(() => {
|
||||
return [{ id: '', label: t('setting__desktop_lyric_font_default') }, ...systemFontList.value]
|
||||
})
|
||||
getSystemFonts().then(fonts => {
|
||||
void getSystemFonts().then(fonts => {
|
||||
systemFontList.value = fonts.map(f => ({ id: f, label: f.replace(/(^"|"$)/g, '') }))
|
||||
})
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
|||
const t = useI18n()
|
||||
|
||||
const handleChangeSavePath = () => {
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: t('setting__download_select_save_path'),
|
||||
defaultPath: appSetting['download.savePath'],
|
||||
properties: ['openDirectory'],
|
||||
|
|
|
@ -134,6 +134,7 @@ export default {
|
|||
if (config) {
|
||||
if (config.key == newHotKey) return
|
||||
originKey = config.key
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete current_hot_key.value[type].keys[config.key]
|
||||
} else if (!newHotKey) return
|
||||
|
||||
|
@ -143,6 +144,7 @@ export default {
|
|||
config = tempInfo.keys[newHotKey]
|
||||
if (config) {
|
||||
console.log(newHotKey, info, config, info.name, config.name)
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete current_hot_key.value[tempType].keys[newHotKey]
|
||||
break
|
||||
}
|
||||
|
@ -203,7 +205,7 @@ export default {
|
|||
await handleHotKeySaveConfig()
|
||||
await getHotKeyStatus()
|
||||
}
|
||||
const getHotKeyStatus = () => {
|
||||
const getHotKeyStatus = async() => {
|
||||
return hotKeyGetStatus().then(status => {
|
||||
// console.log(status)
|
||||
hotKeyStatus.value = status
|
||||
|
@ -213,7 +215,7 @@ export default {
|
|||
|
||||
current_hot_key.value = window.lx.appHotKeyConfig
|
||||
initHotKeyConfig()
|
||||
getHotKeyStatus()
|
||||
void getHotKeyStatus()
|
||||
|
||||
window.app_event.on('keyDown', handleKeyDown)
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ export default {
|
|||
const isDisabledResourceCacheClear = ref(false)
|
||||
// const isDisabledListCacheClear = ref(false)
|
||||
const refreshCacheSize = () => {
|
||||
getCacheSize().then(size => {
|
||||
void getCacheSize().then(size => {
|
||||
cacheSize.value = sizeFormate(size)
|
||||
})
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ export default {
|
|||
confirmButtonText: t('setting__other_resource_cache_confirm'),
|
||||
})) return
|
||||
isDisabledResourceCacheClear.value = true
|
||||
clearCache().then(() => {
|
||||
void clearCache().then(() => {
|
||||
refreshCacheSize()
|
||||
isDisabledResourceCacheClear.value = false
|
||||
})
|
||||
|
@ -105,13 +105,13 @@ export default {
|
|||
const otherSourceCount = ref(0)
|
||||
const isDisabledOtherSourceCacheClear = ref(false)
|
||||
const refreshOtherSourceCount = () => {
|
||||
getOtherSourceCount().then(count => {
|
||||
void getOtherSourceCount().then(count => {
|
||||
otherSourceCount.value = count
|
||||
})
|
||||
}
|
||||
const handleClearOtherSourceCache = async() => {
|
||||
isDisabledOtherSourceCacheClear.value = true
|
||||
clearOtherSource().then(() => {
|
||||
void clearOtherSource().then(() => {
|
||||
refreshOtherSourceCount()
|
||||
isDisabledOtherSourceCacheClear.value = false
|
||||
})
|
||||
|
@ -122,13 +122,13 @@ export default {
|
|||
const musicUrlCount = ref(0)
|
||||
const isDisabledMusicUrlCacheClear = ref(false)
|
||||
const refreshMusicUrlCount = () => {
|
||||
getMusicUrlCount().then(count => {
|
||||
void getMusicUrlCount().then(count => {
|
||||
musicUrlCount.value = count
|
||||
})
|
||||
}
|
||||
const handleClearMusicUrlCache = async() => {
|
||||
isDisabledMusicUrlCacheClear.value = true
|
||||
clearMusicUrl().then(() => {
|
||||
void clearMusicUrl().then(() => {
|
||||
refreshMusicUrlCount()
|
||||
isDisabledMusicUrlCacheClear.value = false
|
||||
})
|
||||
|
@ -139,13 +139,13 @@ export default {
|
|||
const lyricRawCount = ref(0)
|
||||
const isDisabledLyricRawCacheClear = ref(false)
|
||||
const refreshLyricRawCount = () => {
|
||||
getLyricRawCount().then(count => {
|
||||
void getLyricRawCount().then(count => {
|
||||
lyricRawCount.value = count
|
||||
})
|
||||
}
|
||||
const handleClearLyricRawCache = async() => {
|
||||
isDisabledLyricRawCacheClear.value = true
|
||||
clearLyricRaw().then(() => {
|
||||
void clearLyricRaw().then(() => {
|
||||
refreshLyricRawCount()
|
||||
isDisabledLyricRawCacheClear.value = false
|
||||
})
|
||||
|
@ -156,7 +156,7 @@ export default {
|
|||
const lyricEditedCount = ref(0)
|
||||
const isDisabledLyricEditedCacheClear = ref(false)
|
||||
const refreshLyricEditedCount = () => {
|
||||
getLyricEditedCount().then(count => {
|
||||
void getLyricEditedCount().then(count => {
|
||||
lyricEditedCount.value = count
|
||||
})
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ export default {
|
|||
confirmButtonText: t('setting__other_resource_cache_confirm'),
|
||||
})) return
|
||||
isDisabledLyricEditedCacheClear.value = true
|
||||
clearLyricEdited().then(() => {
|
||||
void clearLyricEdited().then(() => {
|
||||
refreshLyricEditedCount()
|
||||
isDisabledLyricEditedCacheClear.value = false
|
||||
})
|
||||
|
@ -180,7 +180,7 @@ export default {
|
|||
cancelButtonText: t('cancel_button_text'),
|
||||
confirmButtonText: t('setting__other_resource_cache_confirm'),
|
||||
})) return
|
||||
overwriteListFull({
|
||||
void overwriteListFull({
|
||||
defaultList: [],
|
||||
loveList: [],
|
||||
userList: [],
|
||||
|
|
|
@ -47,7 +47,7 @@ export default {
|
|||
mediaDevices.value = audioDevices
|
||||
// console.log(this.mediaDevices)
|
||||
}
|
||||
getMediaDevice()
|
||||
void getMediaDevice()
|
||||
|
||||
navigator.mediaDevices.addEventListener('devicechange', getMediaDevice)
|
||||
onBeforeUnmount(() => {
|
||||
|
|
|
@ -91,7 +91,7 @@ export default {
|
|||
})
|
||||
|
||||
const refreshSyncCode = () => {
|
||||
sendSyncAction({ action: 'generate_code' })
|
||||
void sendSyncAction({ action: 'generate_code' })
|
||||
}
|
||||
|
||||
const setSyncServerPort = debounce(port => {
|
||||
|
|
|
@ -288,39 +288,39 @@ export default {
|
|||
// console.log('appBgColor', color)
|
||||
theme.config.extInfo['--color-app-background'] = color == appBgColor ? appBgColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setAppBgColor(getColor(appBgColorOrigin, theme)))
|
||||
}, () => { setAppBgColor(getColor(appBgColorOrigin, theme)) })
|
||||
initAsideFontColor(asideFontColor, (color) => {
|
||||
theme.config.extInfo['--color-nav-font'] = color == asideFontColor ? asideFontColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setAsideFontColor(getColor(asideFontColorOrigin, theme)))
|
||||
}, () => { setAsideFontColor(getColor(asideFontColorOrigin, theme)) })
|
||||
initMainBgColor(mainBgColor, (color) => {
|
||||
theme.config.extInfo['--color-main-background'] = color == mainBgColor ? mainBgColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setMainBgColor(getColor(mainBgColorOrigin, theme)))
|
||||
}, () => { setMainBgColor(getColor(mainBgColorOrigin, theme)) })
|
||||
initBadgePrimaryColor(badgePrimaryColor, (color) => {
|
||||
theme.config.extInfo['--color-badge-primary'] = color == badgePrimaryColor ? badgePrimaryColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setBadgePrimaryColor(getColor(badgePrimaryColorOrigin, theme)))
|
||||
}, () => { setBadgePrimaryColor(getColor(badgePrimaryColorOrigin, theme)) })
|
||||
initBadgeSecondaryColor(badgeSecondaryColor, (color) => {
|
||||
theme.config.extInfo['--color-badge-secondary'] = color == badgeSecondaryColor ? badgeSecondaryColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setBadgeSecondaryColor(getColor(badgeSecondaryColorOrigin, theme)))
|
||||
}, () => { setBadgeSecondaryColor(getColor(badgeSecondaryColorOrigin, theme)) })
|
||||
initBadgeTertiaryColor(badgeTertiaryColor, (color) => {
|
||||
theme.config.extInfo['--color-badge-tertiary'] = color == badgeTertiaryColor ? badgeTertiaryColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setBadgeTertiaryColor(getColor(badgeTertiaryColorOrigin, theme)))
|
||||
}, () => { setBadgeTertiaryColor(getColor(badgeTertiaryColorOrigin, theme)) })
|
||||
initCloseBtnColor(closeBtnColor, (color) => {
|
||||
theme.config.extInfo['--color-btn-close'] = color == closeBtnColor ? closeBtnColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setCloseBtnColor(getColor(closeBtnColorOrigin, theme)))
|
||||
}, () => { setCloseBtnColor(getColor(closeBtnColorOrigin, theme)) })
|
||||
initMinBtnColor(minBtnColor, (color) => {
|
||||
theme.config.extInfo['--color-btn-min'] = color == minBtnColor ? minBtnColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setMinBtnColor(getColor(minBtnColorOrigin, theme)))
|
||||
}, () => { setMinBtnColor(getColor(minBtnColorOrigin, theme)) })
|
||||
initHideBtnColor(hideBtnColor, (color) => {
|
||||
theme.config.extInfo['--color-btn-hide'] = color == hideBtnColor ? hideBtnColorOrigin : color
|
||||
createPreview()
|
||||
}, () => setHideBtnColor(getColor(hideBtnColorOrigin, theme)))
|
||||
}, () => { setHideBtnColor(getColor(hideBtnColorOrigin, theme)) })
|
||||
|
||||
createPreview()
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ export default {
|
|||
}
|
||||
|
||||
watch(() => props.modelValue, (visible) => {
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
getThemes(({ themes, userThemes }) => {
|
||||
if (visible) {
|
||||
if (props.themeId) {
|
||||
|
@ -392,7 +392,7 @@ export default {
|
|||
}
|
||||
const removeBgImg = async() => {
|
||||
if (currentBgPath) {
|
||||
removeFile(currentBgPath)
|
||||
void removeFile(currentBgPath)
|
||||
currentBgPath = ''
|
||||
}
|
||||
bgImg.value = ''
|
||||
|
@ -432,7 +432,7 @@ export default {
|
|||
// 移除旧背景
|
||||
if (originBgName &&
|
||||
theme.config.extInfo['--background-image'] != originBgName &&
|
||||
!isUrl(theme.config.extInfo['--background-image'])) removeFile(joinPath(themeInfo.dataPath, originBgName))
|
||||
!isUrl(theme.config.extInfo['--background-image'])) void removeFile(joinPath(themeInfo.dataPath, originBgName))
|
||||
if (props.themeId) {
|
||||
const index = themeInfo.userThemes.findIndex(t => t.id == theme.id)
|
||||
if (index > -1) themeInfo.userThemes.splice(index, 1, theme)
|
||||
|
@ -468,7 +468,7 @@ export default {
|
|||
}
|
||||
}
|
||||
if (isRequireUpdateSetting) updateSetting(newSetting)
|
||||
if (originBgName) removeFile(joinPath(themeInfo.dataPath, originBgName))
|
||||
if (originBgName) void removeFile(joinPath(themeInfo.dataPath, originBgName))
|
||||
await removeTheme(props.themeId)
|
||||
const index = themeInfo.userThemes.findIndex(t => t.id == theme.id)
|
||||
console.log(index)
|
||||
|
|
|
@ -60,16 +60,16 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
showSelectDialog({
|
||||
void showSelectDialog({
|
||||
title: this.$t('user_api__import_file'),
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
{ name: 'LX API File', extensions: ['js'] },
|
||||
{ name: 'All Files', extensions: ['*'] },
|
||||
],
|
||||
}).then(result => {
|
||||
}).then(async result => {
|
||||
if (result.canceled) return
|
||||
return readFile(result.filePaths[0]).then(data => {
|
||||
return readFile(result.filePaths[0]).then(async data => {
|
||||
return importUserApi(data.toString()).then(({ apiList }) => {
|
||||
userApi.list = apiList
|
||||
})
|
||||
|
@ -92,10 +92,10 @@ export default {
|
|||
this.$emit('update:modelValue', false)
|
||||
},
|
||||
handleOpenUrl(url) {
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
},
|
||||
handleChangeAllowUpdateAlert(api, enable) {
|
||||
setAllowShowUserApiUpdateAlert(api.id, enable)
|
||||
void setAllowShowUserApiUpdateAlert(api.id, enable)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ export default {
|
|||
|
||||
const toggleTab = id => {
|
||||
avtiveComponentName.value = id
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
dom_content_ref.value?.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
import { ref, watch } from '@common/utils/vueTools'
|
||||
import { listDetailInfo } from '@renderer/store/songList/state'
|
||||
import { setVisibleListDetail } from '@renderer/store/songList/action'
|
||||
import LX from '@renderer/types/lx'
|
||||
import { useRouter } from '@common/utils/vueRouter'
|
||||
import { addSongListDetail, playSongListDetail } from './action'
|
||||
import useList from './useList'
|
||||
|
@ -68,7 +67,7 @@ interface Query {
|
|||
fromName?: string
|
||||
}
|
||||
|
||||
const verifyQueryParams = async function(this: any, to: { query: Query, path: string}, from: any, next: (route?: { path: string; query: Query }) => void) {
|
||||
const verifyQueryParams = async function(this: any, to: { query: Query, path: string }, from: any, next: (route?: { path: string, query: Query }) => void) {
|
||||
let _source = to.query.source
|
||||
let _id = to.query.id
|
||||
let _page: string | undefined = to.query.page
|
||||
|
@ -119,25 +118,25 @@ export default {
|
|||
|
||||
|
||||
const togglePage = (page: number) => {
|
||||
getListData(source.value, id.value, page, refresh.value)
|
||||
void getListData(source.value, id.value, page, refresh.value)
|
||||
}
|
||||
|
||||
const handleBack = () => {
|
||||
setVisibleListDetail(false)
|
||||
if (window.lx.songListInfo.fromName) router.replace({ name: window.lx.songListInfo.fromName })
|
||||
if (window.lx.songListInfo.fromName) void router.replace({ name: window.lx.songListInfo.fromName })
|
||||
else router.back()
|
||||
}
|
||||
|
||||
useKeyBack(handleBack)
|
||||
|
||||
watch([source, id, page, refresh], ([_source, _id, _page, _refresh]) => {
|
||||
watch([source, id, page, refresh], async([_source, _id, _page, _refresh]) => {
|
||||
if (!_source || !_id) return router.replace({ path: '/songList/list' })
|
||||
// console.log(_source, _id, _page, _refresh, picUrl.value)
|
||||
// source.value = _source
|
||||
// id.value = _id
|
||||
// refresh.value = _refresh
|
||||
// page.value = _page ?? 1
|
||||
getListData(_source, _id, _page, _refresh)
|
||||
void getListData(_source, _id, _page, _refresh)
|
||||
}, {
|
||||
immediate: true,
|
||||
})
|
||||
|
|
|
@ -7,7 +7,6 @@ import { watch, ref, nextTick } from '@common/utils/vueTools'
|
|||
import { listInfo } from '@renderer/store/songList/state'
|
||||
import { getAndSetList } from '@renderer/store/songList/action'
|
||||
import { useRouter, useRoute, onBeforeRouteLeave } from '@common/utils/vueRouter'
|
||||
import LX from '@renderer/types/lx'
|
||||
import SongList from './components/SongList.vue'
|
||||
|
||||
|
||||
|
@ -28,12 +27,12 @@ const getListData = async(source: LX.OnlineSource, tabId: string, sortId: string
|
|||
// console.log(source, tabId, sortId, page)
|
||||
await getAndSetList(source, tabId, sortId, page).then(() => {
|
||||
if (listInfo.key == window.lx.songListInfo.songlistKey && window.lx.songListInfo.songlistPosition) {
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
list_ref.value?.scrollTo(window.lx.songListInfo.songlistPosition)
|
||||
})
|
||||
} else if (list_ref.value) {
|
||||
window.lx.songListInfo.songlistKey = null
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
list_ref.value.scrollTo(0)
|
||||
})
|
||||
}
|
||||
|
@ -41,7 +40,7 @@ const getListData = async(source: LX.OnlineSource, tabId: string, sortId: string
|
|||
}
|
||||
|
||||
const togglePage = (page: number) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
...route.query,
|
||||
|
@ -57,7 +56,7 @@ watch(() => [props.source, props.tagId, props.sortId, props.page], ([source, tag
|
|||
// console.log(source, tagId, sortId)
|
||||
if (!source || !sortId) return
|
||||
// console.log(source, tagId, sortId, page)
|
||||
getListData(source as LX.OnlineSource, tagId as string, sortId as string, page as number)
|
||||
void getListData(source as LX.OnlineSource, tagId as string, sortId as string, page as number)
|
||||
}, {
|
||||
immediate: true,
|
||||
})
|
||||
|
|
|
@ -65,7 +65,7 @@ watch(() => props.modelValue, (visible) => {
|
|||
const handleSubmit = () => {
|
||||
if (!text.value.length) return
|
||||
setOpenSongListInputInfo(text.value, source.value)
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/songList/detail',
|
||||
query: {
|
||||
source: source.value,
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from '@common/utils/vueTools'
|
||||
import type { ListInfo, ListInfoItem } from '@renderer/store/songList/state'
|
||||
// import LX from '@renderer/types/lx'
|
||||
import { useRoute, useRouter } from '@common/utils/vueRouter'
|
||||
|
||||
|
||||
|
@ -60,7 +59,7 @@ const togglePage = (page: number) => {
|
|||
}
|
||||
|
||||
const toDetail = (info: ListInfoItem) => {
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/songList/detail',
|
||||
query: {
|
||||
source: info.source,
|
||||
|
|
|
@ -29,7 +29,7 @@ const list = shallowReactive([])
|
|||
|
||||
|
||||
const handleToggle = (id) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
source: props.source,
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import { watch, shallowReactive, ref, onMounted, onBeforeUnmount, computed, reactive } from '@common/utils/vueTools'
|
||||
import { setTags, getTags } from '@renderer/store/songList/action'
|
||||
import { tags, type TagInfoTypeItem } from '@renderer/store/songList/state'
|
||||
import LX from '@renderer/types/lx'
|
||||
import { useRouter, useRoute } from '@common/utils/vueRouter'
|
||||
import { useI18n } from '@renderer/plugins/i18n'
|
||||
|
||||
|
@ -40,7 +39,7 @@ const t = useI18n()
|
|||
|
||||
const list = shallowReactive<TagInfoTypeItem[]>([])
|
||||
const handleToggleTag = (id: string) => {
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
source: props.source,
|
||||
|
|
|
@ -22,7 +22,6 @@ import OpenListModal from './components/OpenListModal.vue'
|
|||
import ListView from './ListView.vue'
|
||||
import { sources, listInfo, isVisibleListDetail } from '@renderer/store/songList/state'
|
||||
import { sourceNames } from '@renderer/store'
|
||||
import LX from '@renderer/types/lx'
|
||||
import { useRoute, useRouter } from '@common/utils/vueRouter'
|
||||
|
||||
const source = ref<LX.OnlineSource>('kw')
|
||||
|
@ -38,7 +37,7 @@ interface Query {
|
|||
page?: string
|
||||
}
|
||||
|
||||
const verifyQueryParams = async function(this: any, to: { query: Query, path: string}, from: any, next: (route?: { path: string; query: Query }) => void) {
|
||||
const verifyQueryParams = async function(this: any, to: { query: Query, path: string }, from: any, next: (route?: { path: string, query: Query }) => void) {
|
||||
let _source = to.query.source
|
||||
let _tagId = to.query.tagId
|
||||
let _sortId = to.query.sortId
|
||||
|
@ -72,7 +71,7 @@ const verifyQueryParams = async function(this: any, to: { query: Query, path: st
|
|||
tagId.value = _tagId ?? ''
|
||||
sortId.value = _sortId ?? ''
|
||||
page.value = _page ? parseInt(_page) : 1
|
||||
setSongListSetting({ source: _source, tagId: _tagId, sortId: _sortId })
|
||||
void setSongListSetting({ source: _source, tagId: _tagId, sortId: _sortId })
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,7 +94,7 @@ export default {
|
|||
const route = useRoute()
|
||||
const handleToggleSource = (id: LX.OnlineSource) => {
|
||||
if (id == source.value) return
|
||||
router.replace({
|
||||
void router.replace({
|
||||
path: route.path,
|
||||
query: {
|
||||
source: id,
|
||||
|
|
Loading…
Reference in New Issue