mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 17:23:50 +02:00
jsconfig
This commit is contained in:
@@ -4,15 +4,15 @@
|
|||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"jsx": "preserve",
|
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"lib": ["esnext", "dom", "dom.iterable"],
|
"lib": ["esnext"],
|
||||||
"types": ["vite/client", "element-plus/global", "node"]
|
"types": ["node"],
|
||||||
|
"noEmit": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "src-electron/**/*"],
|
"include": ["src/vite.config.js", "src/shared/utils/localizationHelperCLI.js"],
|
||||||
"exclude": ["node_modules", "build"]
|
"exclude": ["node_modules", "build"]
|
||||||
}
|
}
|
||||||
|
|||||||
18
src-electron/jsconfig.json
Normal file
18
src-electron/jsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "nodenext",
|
||||||
|
"target": "ES2022",
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"lib": ["esnext", "dom"],
|
||||||
|
"types": ["node"],
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": ["**/*"],
|
||||||
|
"exclude": ["../node_modules", "../build"]
|
||||||
|
}
|
||||||
20
src/jsconfig.json
Normal file
20
src/jsconfig.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"target": "ESNext",
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"lib": ["esnext", "dom", "dom.iterable"],
|
||||||
|
"types": ["vite/client", "element-plus/global"],
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": ["**/*"],
|
||||||
|
"exclude": ["../node_modules", "../build", "vite.config.js", "shared/utils/localizationHelperCLI.js"]
|
||||||
|
}
|
||||||
@@ -196,7 +196,7 @@ export function request(endpoint, options) {
|
|||||||
if (
|
if (
|
||||||
init.method === 'GET' &&
|
init.method === 'GET' &&
|
||||||
status === 404 &&
|
status === 404 &&
|
||||||
endpoint.startsWith('avatars/')
|
endpoint?.startsWith('avatars/')
|
||||||
) {
|
) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: t('message.api_handler.avatar_private_or_deleted'),
|
message: t('message.api_handler.avatar_private_or_deleted'),
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import {
|
|||||||
removeFromArray,
|
removeFromArray,
|
||||||
replaceReactiveObject
|
replaceReactiveObject
|
||||||
} from '../shared/utils';
|
} from '../shared/utils';
|
||||||
import { database } from '../service/database';
|
|
||||||
import { avatarRequest, favoriteRequest } from '../api';
|
import { avatarRequest, favoriteRequest } from '../api';
|
||||||
|
import { database } from '../service/database';
|
||||||
import { processBulk } from '../service/request';
|
import { processBulk } from '../service/request';
|
||||||
import { useAppearanceSettingsStore } from './settings/appearance';
|
import { useAppearanceSettingsStore } from './settings/appearance';
|
||||||
import { useAvatarStore } from './avatar';
|
import { useAvatarStore } from './avatar';
|
||||||
@@ -1258,7 +1258,10 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
* @param {Function | null} onProgress - Progress callback function, receives (current, total) parameters
|
* @param {Function | null} onProgress - Progress callback function, receives (current, total) parameters
|
||||||
* @returns {Promise<{total: number, invalid: number, invalidIds: string[]}>}
|
* @returns {Promise<{total: number, invalid: number, invalidIds: string[]}>}
|
||||||
*/
|
*/
|
||||||
async function checkInvalidLocalAvatars(targetGroup = null, onProgress = null) {
|
async function checkInvalidLocalAvatars(
|
||||||
|
targetGroup = null,
|
||||||
|
onProgress = null
|
||||||
|
) {
|
||||||
const result = {
|
const result = {
|
||||||
total: 0,
|
total: 0,
|
||||||
invalid: 0,
|
invalid: 0,
|
||||||
@@ -1295,7 +1298,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
await avatarRequest.getAvatar({
|
await avatarRequest.getAvatar({
|
||||||
avatarId: favorite.id
|
avatarId: favorite.id
|
||||||
});
|
});
|
||||||
await new Promise(resolve => setTimeout(resolve, 500));
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
result.invalid++;
|
result.invalid++;
|
||||||
result.invalidIds.push(favorite.id);
|
result.invalidIds.push(favorite.id);
|
||||||
@@ -1329,7 +1332,9 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const avatarId of avatarIds) {
|
for (const avatarId of avatarIds) {
|
||||||
const index = favoriteGroup.findIndex(fav => fav.id === avatarId);
|
const index = favoriteGroup.findIndex(
|
||||||
|
(fav) => fav.id === avatarId
|
||||||
|
);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
removeLocalAvatarFavorite(avatarId, group);
|
removeLocalAvatarFavorite(avatarId, group);
|
||||||
result.removed++;
|
result.removed++;
|
||||||
|
|||||||
Reference in New Issue
Block a user