mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
uncommit changes related to Avatar DB log cleanup feature
This commit is contained in:
78
package-lock.json
generated
78
package-lock.json
generated
@@ -23,7 +23,7 @@
|
|||||||
"@kamiya4047/eslint-plugin-pretty-import": "^0.1.6",
|
"@kamiya4047/eslint-plugin-pretty-import": "^0.1.6",
|
||||||
"@pinia/testing": "^1.0.3",
|
"@pinia/testing": "^1.0.3",
|
||||||
"@sentry/vite-plugin": "^4.9.1",
|
"@sentry/vite-plugin": "^4.9.1",
|
||||||
"@sentry/vue": "^10.43.0",
|
"@sentry/vue": "^10.44.0",
|
||||||
"@sigma/edge-curve": "^3.1.0",
|
"@sigma/edge-curve": "^3.1.0",
|
||||||
"@sigma/node-border": "^3.0.0",
|
"@sigma/node-border": "^3.0.0",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"dayjs": "^1.11.20",
|
"dayjs": "^1.11.20",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"electron": "^39.8.2",
|
"electron": "^39.8.3",
|
||||||
"electron-builder": "^26.8.1",
|
"electron-builder": "^26.8.1",
|
||||||
"embla-carousel-vue": "^8.6.0",
|
"embla-carousel-vue": "^8.6.0",
|
||||||
"eslint": "^9.39.4",
|
"eslint": "^9.39.4",
|
||||||
@@ -2903,54 +2903,54 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@sentry-internal/browser-utils": {
|
"node_modules/@sentry-internal/browser-utils": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-10.44.0.tgz",
|
||||||
"integrity": "sha512-8zYTnzhAPvNkVH1Irs62wl0J/c+0QcJ62TonKnzpSFUUD3V5qz8YDZbjIDGfxy+1EB9fO0sxtddKCzwTHF/MbQ==",
|
"integrity": "sha512-z9xz3T/v+MnfHY6kdUCmOZI8CiAl3LlKYtGH2p3rAsrxhwX+BTnUp01VhMVnEZIDgUXNt3AhJac+4kcDIPu1Hg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry-internal/feedback": {
|
"node_modules/@sentry-internal/feedback": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-10.44.0.tgz",
|
||||||
"integrity": "sha512-YoXuwluP6eOcQxTeTtaWb090++MrLyWOVsUTejzUQQ6LFL13Jwt+bDPF1kvBugMq4a7OHw/UNKQfd6//rZMn2g==",
|
"integrity": "sha512-yNS2EGK1bNm8YUI+Orzpa7yr05Da+b1VEe/9x7dl7gTjw/+tfutoXlG6Y+iFZBB3gQ9QU+nxZAhU+KcxiPEURw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry-internal/replay": {
|
"node_modules/@sentry-internal/replay": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-10.44.0.tgz",
|
||||||
"integrity": "sha512-khCXlGrlH1IU7P5zCEAJFestMeH97zDVCekj8OsNNDtN/1BmCJ46k6Xi0EqAUzdJgrOLJeLdoYdgtiIjovZ8Sg==",
|
"integrity": "sha512-KDmoqBsRmkaoc+eKLR2CbScd2eBmLcw+1+D441lLttAO3WWhvYyCaYdu/HIGGUoybuSgt+IcpCJdi7hFuCvYqw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry-internal/browser-utils": "10.43.0",
|
"@sentry-internal/browser-utils": "10.44.0",
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry-internal/replay-canvas": {
|
"node_modules/@sentry-internal/replay-canvas": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-10.44.0.tgz",
|
||||||
"integrity": "sha512-ZIw1UNKOFXo1LbPCJPMAx9xv7D8TMZQusLDUgb6BsPQJj0igAuwd7KRGTkjjgnrwBp2O/sxcQFRhQhknWk7QPg==",
|
"integrity": "sha512-RA7XgYZWHY7M+vaHvuMxDFT51wCs4puS2smElM5oh+j3YqbFXY7P16fOCwIAGoyI4gVsj8aTeBgVqUmrmzhAXQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry-internal/replay": "10.43.0",
|
"@sentry-internal/replay": "10.44.0",
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -2967,17 +2967,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/browser": {
|
"node_modules/@sentry/browser": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-10.44.0.tgz",
|
||||||
"integrity": "sha512-2V3I3sXi3SMeiZpKixd9ztokSgK27cmvsD9J5oyOyjhGLTW/6QKCwHbKnluMgQMXq20nixQk5zN4wRjRUma3sg==",
|
"integrity": "sha512-UpMx5forbVKieNULma3gT2SsLYqsYT4nLXa6s1io/Y8BFej9sH2dD5ExA8TrkQThQwAWFI3qKsQzYnF+EX/Bfg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry-internal/browser-utils": "10.43.0",
|
"@sentry-internal/browser-utils": "10.44.0",
|
||||||
"@sentry-internal/feedback": "10.43.0",
|
"@sentry-internal/feedback": "10.44.0",
|
||||||
"@sentry-internal/replay": "10.43.0",
|
"@sentry-internal/replay": "10.44.0",
|
||||||
"@sentry-internal/replay-canvas": "10.43.0",
|
"@sentry-internal/replay-canvas": "10.44.0",
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -3178,9 +3178,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/core": {
|
"node_modules/@sentry/core": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz",
|
||||||
"integrity": "sha512-l0SszQAPiQGWl/ferw8GP3ALyHXiGiRKJaOvNmhGO+PrTQyZTZ6OYyPnGijAFRg58dE1V3RCH/zw5d2xSUIiNg==",
|
"integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -3202,14 +3202,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/vue": {
|
"node_modules/@sentry/vue": {
|
||||||
"version": "10.43.0",
|
"version": "10.44.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-10.43.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-10.44.0.tgz",
|
||||||
"integrity": "sha512-PYBJVHfd7JwnQv92sTnsfLVNwVEKY2wQzXt9aux6QNcKh4g3pyK68PoEBrcCSEHpUb7zs3lJedk3+aeX+kN7fw==",
|
"integrity": "sha512-XAjvUPhfqkEULt3kly4fSmwQ7fi9XuBWU8Hq9Fme3WN3Ti5q1lTqFBvxlpGeUDKzb2g/J9NVRq9G10m7d438Fg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/browser": "10.43.0",
|
"@sentry/browser": "10.44.0",
|
||||||
"@sentry/core": "10.43.0"
|
"@sentry/core": "10.44.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -6489,9 +6489,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron": {
|
"node_modules/electron": {
|
||||||
"version": "39.8.2",
|
"version": "39.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-39.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-39.8.3.tgz",
|
||||||
"integrity": "sha512-uwNJHeqm8pzQEZf/KX4XM1fJctZpHcA0Za/MlP9mOg0FAWHbKo6yRC33QbdfLX7PeNjYZC3I3nnVhE5L2CLqxw==",
|
"integrity": "sha512-ZhetvWz2qbI2WbBHdK/utR8I5bi1pYWJdit9tP0sGzs42CpsAFyu/FirXE88NWSh+3U8X6Wuf9jjDEYvAyrxNw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"@kamiya4047/eslint-plugin-pretty-import": "^0.1.6",
|
"@kamiya4047/eslint-plugin-pretty-import": "^0.1.6",
|
||||||
"@pinia/testing": "^1.0.3",
|
"@pinia/testing": "^1.0.3",
|
||||||
"@sentry/vite-plugin": "^4.9.1",
|
"@sentry/vite-plugin": "^4.9.1",
|
||||||
"@sentry/vue": "^10.43.0",
|
"@sentry/vue": "^10.44.0",
|
||||||
"@sigma/edge-curve": "^3.1.0",
|
"@sigma/edge-curve": "^3.1.0",
|
||||||
"@sigma/node-border": "^3.0.0",
|
"@sigma/node-border": "^3.0.0",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"dayjs": "^1.11.20",
|
"dayjs": "^1.11.20",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"electron": "^39.8.2",
|
"electron": "^39.8.3",
|
||||||
"electron-builder": "^26.8.1",
|
"electron-builder": "^26.8.1",
|
||||||
"embla-carousel-vue": "^8.6.0",
|
"embla-carousel-vue": "^8.6.0",
|
||||||
"eslint": "^9.39.4",
|
"eslint": "^9.39.4",
|
||||||
|
|||||||
@@ -21,11 +21,9 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { TooltipWrapper } from './ui/tooltip';
|
import { TooltipWrapper } from './ui/tooltip';
|
||||||
import { useAvatarStore } from '../stores';
|
|
||||||
import { getAvatarName, showAvatarAuthorDialog } from '../coordinators/avatarCoordinator';
|
import { getAvatarName, showAvatarAuthorDialog } from '../coordinators/avatarCoordinator';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const avatarStore = useAvatarStore();
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
imageurl: String,
|
imageurl: String,
|
||||||
|
|||||||
@@ -839,8 +839,7 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
*/
|
*/
|
||||||
async function loginComplete() {
|
async function loginComplete() {
|
||||||
await database.initUserTables(userStore.currentUser.id);
|
await database.initUserTables(userStore.currentUser.id);
|
||||||
// [Disabled] Avatar DB log auto-cleanup on login
|
advancedSettingsStore.runAvatarAutoCleanup(userStore.currentUser.id);
|
||||||
// advancedSettingsStore.runAvatarAutoCleanup(userStore.currentUser.id);
|
|
||||||
watchState.isLoggedIn = true;
|
watchState.isLoggedIn = true;
|
||||||
AppApi.CheckGameRunning(); // restore state from hot-reload
|
AppApi.CheckGameRunning(); // restore state from hot-reload
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -529,103 +529,100 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [Disabled] Avatar DB log cleanup - setAvatarAutoCleanup
|
async function setAvatarAutoCleanup(value) {
|
||||||
// async function setAvatarAutoCleanup(value) {
|
avatarAutoCleanup.value = value;
|
||||||
// avatarAutoCleanup.value = value;
|
await configRepository.setString('VRCX_avatarAutoCleanup', value);
|
||||||
// await configRepository.setString('VRCX_avatarAutoCleanup', value);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * @param {number|null} days - Number of days to keep. Null means delete all.
|
* @param {number|null} days - Number of days to keep. Null means delete all.
|
||||||
// */
|
*/
|
||||||
// [Disabled] Avatar DB log cleanup - purgeAvatarFeedData
|
async function purgeAvatarFeedData(days) {
|
||||||
// async function purgeAvatarFeedData(days) {
|
let cutoffDate = null;
|
||||||
// let cutoffDate = null;
|
if (days !== null) {
|
||||||
// if (days !== null) {
|
const cutoff = new Date();
|
||||||
// const cutoff = new Date();
|
cutoff.setDate(cutoff.getDate() - days);
|
||||||
// cutoff.setDate(cutoff.getDate() - days);
|
cutoffDate = cutoff.toJSON();
|
||||||
// cutoffDate = cutoff.toJSON();
|
}
|
||||||
// }
|
|
||||||
//
|
purgeInProgress.value = true;
|
||||||
// purgeInProgress.value = true;
|
const msgBox = toast.warning(
|
||||||
// const msgBox = toast.warning(
|
t(
|
||||||
// t(
|
'view.settings.advanced.advanced.database_cleanup.purge_in_progress'
|
||||||
// 'view.settings.advanced.advanced.database_cleanup.purge_in_progress'
|
),
|
||||||
// ),
|
{ duration: Infinity }
|
||||||
// { duration: Infinity }
|
);
|
||||||
// );
|
|
||||||
//
|
try {
|
||||||
// try {
|
await database.purgeAvatarFeedData(cutoffDate);
|
||||||
// await database.purgeAvatarFeedData(cutoffDate);
|
await database.vacuum();
|
||||||
// await database.vacuum();
|
toast.dismiss(msgBox);
|
||||||
// toast.dismiss(msgBox);
|
toast.success(
|
||||||
// toast.success(
|
t(
|
||||||
// t(
|
'view.settings.advanced.advanced.database_cleanup.purge_complete'
|
||||||
// 'view.settings.advanced.advanced.database_cleanup.purge_complete'
|
)
|
||||||
// )
|
);
|
||||||
// );
|
// Brief delay before restart to show success message
|
||||||
// // Brief delay before restart to show success message
|
await new Promise((resolve) =>
|
||||||
// await new Promise((resolve) =>
|
setTimeout(resolve, 1500)
|
||||||
// setTimeout(resolve, 1500)
|
);
|
||||||
// );
|
VRCXUpdaterStore.restartVRCX(false);
|
||||||
// VRCXUpdaterStore.restartVRCX(false);
|
} catch (err) {
|
||||||
// } catch (err) {
|
console.error(err);
|
||||||
// console.error(err);
|
toast.dismiss(msgBox);
|
||||||
// toast.dismiss(msgBox);
|
toast.error(t('view.settings.advanced.advanced.database_cleanup.purge_failed', { error: err }));
|
||||||
// toast.error(t('view.settings.advanced.advanced.database_cleanup.purge_failed', { error: err }));
|
} finally {
|
||||||
// } finally {
|
purgeInProgress.value = false;
|
||||||
// purgeInProgress.value = false;
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Run auto-cleanup on startup if configured and enough time has passed.
|
* Run auto-cleanup on startup if configured and enough time has passed.
|
||||||
// * Reads config directly from configRepository to avoid race condition
|
* Reads config directly from configRepository to avoid race condition
|
||||||
// * with initAdvancedSettings not having completed yet.
|
* with initAdvancedSettings not having completed yet.
|
||||||
// * @param {string} userId - Current user ID for per-user cleanup tracking.
|
* @param {string} userId - Current user ID for per-user cleanup tracking.
|
||||||
// */
|
*/
|
||||||
// [Disabled] Avatar DB log cleanup - runAvatarAutoCleanup
|
async function runAvatarAutoCleanup(userId) {
|
||||||
// async function runAvatarAutoCleanup(userId) {
|
const cleanupSetting = await configRepository.getString(
|
||||||
// const cleanupSetting = await configRepository.getString(
|
'VRCX_avatarAutoCleanup',
|
||||||
// 'VRCX_avatarAutoCleanup',
|
'Off'
|
||||||
// 'Off'
|
);
|
||||||
// );
|
if (cleanupSetting === 'Off') return;
|
||||||
// if (cleanupSetting === 'Off') return;
|
|
||||||
//
|
const configKey = `VRCX_lastAvatarCleanupDate_${userId}`;
|
||||||
// const configKey = `VRCX_lastAvatarCleanupDate_${userId}`;
|
const lastCleanupStr = await configRepository.getString(
|
||||||
// const lastCleanupStr = await configRepository.getString(
|
configKey,
|
||||||
// configKey,
|
''
|
||||||
// ''
|
);
|
||||||
// );
|
const now = new Date();
|
||||||
// const now = new Date();
|
|
||||||
//
|
if (lastCleanupStr) {
|
||||||
// if (lastCleanupStr) {
|
const lastCleanup = new Date(lastCleanupStr);
|
||||||
// const lastCleanup = new Date(lastCleanupStr);
|
const daysSinceLastCleanup =
|
||||||
// const daysSinceLastCleanup =
|
(now - lastCleanup) / (1000 * 60 * 60 * 24);
|
||||||
// (now - lastCleanup) / (1000 * 60 * 60 * 24);
|
if (daysSinceLastCleanup < 7) return;
|
||||||
// if (daysSinceLastCleanup < 7) return;
|
}
|
||||||
// }
|
|
||||||
//
|
const days = parseInt(cleanupSetting, 10);
|
||||||
// const days = parseInt(cleanupSetting, 10);
|
if (isNaN(days) || days <= 0) return;
|
||||||
// if (isNaN(days) || days <= 0) return;
|
|
||||||
//
|
const cutoff = new Date();
|
||||||
// const cutoff = new Date();
|
cutoff.setDate(cutoff.getDate() - days);
|
||||||
// cutoff.setDate(cutoff.getDate() - days);
|
const cutoffDate = cutoff.toJSON();
|
||||||
// const cutoffDate = cutoff.toJSON();
|
|
||||||
//
|
try {
|
||||||
// try {
|
await database.purgeAvatarFeedData(cutoffDate);
|
||||||
// await database.purgeAvatarFeedData(cutoffDate);
|
await configRepository.setString(
|
||||||
// await configRepository.setString(
|
configKey,
|
||||||
// configKey,
|
now.toJSON()
|
||||||
// now.toJSON()
|
);
|
||||||
// );
|
console.log(
|
||||||
// console.log(
|
`Auto-cleaned avatar feed data older than ${days} days`
|
||||||
// `Auto-cleaned avatar feed data older than ${days} days`
|
);
|
||||||
// );
|
} catch (err) {
|
||||||
// } catch (err) {
|
console.error('Avatar auto-cleanup failed:', err);
|
||||||
// console.error('Avatar auto-cleanup failed:', err);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
async function setSaveInstanceEmoji() {
|
async function setSaveInstanceEmoji() {
|
||||||
saveInstanceEmoji.value = !saveInstanceEmoji.value;
|
saveInstanceEmoji.value = !saveInstanceEmoji.value;
|
||||||
@@ -1174,10 +1171,9 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
setProgressPieFilter,
|
setProgressPieFilter,
|
||||||
setShowConfirmationOnSwitchAvatar,
|
setShowConfirmationOnSwitchAvatar,
|
||||||
setGameLogDisabled,
|
setGameLogDisabled,
|
||||||
// [Disabled] Avatar DB log cleanup exports
|
setAvatarAutoCleanup,
|
||||||
// setAvatarAutoCleanup,
|
purgeAvatarFeedData,
|
||||||
// purgeAvatarFeedData,
|
runAvatarAutoCleanup,
|
||||||
// runAvatarAutoCleanup,
|
|
||||||
setUGCFolderPath,
|
setUGCFolderPath,
|
||||||
cropPrintsChanged,
|
cropPrintsChanged,
|
||||||
setAutoDeleteOldPrints,
|
setAutoDeleteOldPrints,
|
||||||
|
|||||||
@@ -165,7 +165,6 @@
|
|||||||
<span>{{ t('view.settings.advanced.advanced.sqlite_table_size.event') }} <span v-text="sqliteTableSizes.event"></span></span>
|
<span>{{ t('view.settings.advanced.advanced.sqlite_table_size.event') }} <span v-text="sqliteTableSizes.event"></span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- [Disabled] Avatar DB log cleanup UI - auto cleanup select & purge button & dialog
|
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
:label="t('view.settings.advanced.advanced.database_cleanup.auto_cleanup')"
|
:label="t('view.settings.advanced.advanced.database_cleanup.auto_cleanup')"
|
||||||
:description="t('view.settings.advanced.advanced.database_cleanup.auto_cleanup_description')">
|
:description="t('view.settings.advanced.advanced.database_cleanup.auto_cleanup_description')">
|
||||||
@@ -191,10 +190,9 @@
|
|||||||
{{ t('view.settings.advanced.advanced.database_cleanup.purge') }}
|
{{ t('view.settings.advanced.advanced.database_cleanup.purge') }}
|
||||||
</Button>
|
</Button>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
-->
|
|
||||||
</SettingsGroup>
|
</SettingsGroup>
|
||||||
|
|
||||||
<!-- [Disabled] Avatar DB log cleanup - purge dialog
|
|
||||||
<Dialog :open="isPurgeDialogVisible" @update:open="(open) => { if (!open) isPurgeDialogVisible = false; }">
|
<Dialog :open="isPurgeDialogVisible" @update:open="(open) => { if (!open) isPurgeDialogVisible = false; }">
|
||||||
<DialogContent class="x-dialog sm:max-w-md">
|
<DialogContent class="x-dialog sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
@@ -239,7 +237,7 @@
|
|||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
-->
|
|
||||||
|
|
||||||
<SettingsGroup :title="t('view.settings.advanced_groups.diagnostics.header')">
|
<SettingsGroup :title="t('view.settings.advanced_groups.diagnostics.header')">
|
||||||
<SettingsGroup :title="t('view.profile.game_info.header')">
|
<SettingsGroup :title="t('view.profile.game_info.header')">
|
||||||
@@ -298,16 +296,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { RefreshCcw, Trash2 } from 'lucide-vue-next';
|
import { RefreshCcw, Trash2,TriangleAlert } from 'lucide-vue-next';
|
||||||
// [Disabled] Avatar DB log cleanup - unused imports
|
|
||||||
// import { TriangleAlert } from 'lucide-vue-next';
|
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Switch } from '@/components/ui/switch';
|
import { Switch } from '@/components/ui/switch';
|
||||||
// [Disabled] Avatar DB log cleanup - unused imports
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
// import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
// import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||||
// import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
@@ -379,9 +374,8 @@
|
|||||||
showConfirmationOnSwitchAvatar,
|
showConfirmationOnSwitchAvatar,
|
||||||
gameLogDisabled,
|
gameLogDisabled,
|
||||||
sqliteTableSizes,
|
sqliteTableSizes,
|
||||||
// [Disabled] Avatar DB log cleanup
|
avatarAutoCleanup,
|
||||||
// avatarAutoCleanup,
|
purgeInProgress,
|
||||||
// purgeInProgress,
|
|
||||||
sentryErrorReporting
|
sentryErrorReporting
|
||||||
} = storeToRefs(advancedSettingsStore);
|
} = storeToRefs(advancedSettingsStore);
|
||||||
|
|
||||||
@@ -395,18 +389,16 @@
|
|||||||
setEnableAppLauncherRunProcessOnce,
|
setEnableAppLauncherRunProcessOnce,
|
||||||
setShowConfirmationOnSwitchAvatar,
|
setShowConfirmationOnSwitchAvatar,
|
||||||
getSqliteTableSizes,
|
getSqliteTableSizes,
|
||||||
// [Disabled] Avatar DB log cleanup
|
setAvatarAutoCleanup,
|
||||||
// setAvatarAutoCleanup,
|
purgeAvatarFeedData,
|
||||||
// purgeAvatarFeedData,
|
|
||||||
promptAutoClearVRCXCacheFrequency,
|
promptAutoClearVRCXCacheFrequency,
|
||||||
setSentryErrorReporting
|
setSentryErrorReporting
|
||||||
} = advancedSettingsStore;
|
} = advancedSettingsStore;
|
||||||
|
|
||||||
const configTreeData = ref({});
|
const configTreeData = ref({});
|
||||||
const visits = ref(0);
|
const visits = ref(0);
|
||||||
// [Disabled] Avatar DB log cleanup
|
const selectedPurgePeriod = ref('180');
|
||||||
// const selectedPurgePeriod = ref('180');
|
const isPurgeDialogVisible = ref(false);
|
||||||
// const isPurgeDialogVisible = ref(false);
|
|
||||||
|
|
||||||
const cacheSize = reactive({
|
const cacheSize = reactive({
|
||||||
cachedUsers: 0,
|
cachedUsers: 0,
|
||||||
@@ -419,15 +411,14 @@
|
|||||||
|
|
||||||
const isLinux = computed(() => LINUX);
|
const isLinux = computed(() => LINUX);
|
||||||
|
|
||||||
// [Disabled] Avatar DB log cleanup - handlePurge
|
function handlePurge() {
|
||||||
// function handlePurge() {
|
const days =
|
||||||
// const days =
|
selectedPurgePeriod.value === 'all'
|
||||||
// selectedPurgePeriod.value === 'all'
|
? null
|
||||||
// ? null
|
: parseInt(selectedPurgePeriod.value, 10);
|
||||||
// : parseInt(selectedPurgePeriod.value, 10);
|
isPurgeDialogVisible.value = false;
|
||||||
// isPurgeDialogVisible.value = false;
|
purgeAvatarFeedData(days);
|
||||||
// purgeAvatarFeedData(days);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user