Clean up keyboard bindings and reload locale

Co-Authored-By: kubectl <me@kube.moe>
This commit is contained in:
Natsumi
2025-11-20 21:07:42 +11:00
parent 506b709a21
commit 39a8685f0d
5 changed files with 106 additions and 74 deletions

View File

@@ -9,7 +9,6 @@ import { debounce, parseLocation } from '../shared/utils';
import { AppDebug } from '../service/appConfig';
import { database } from '../service/database';
import { failedGetRequests } from '../service/request';
import { refreshCustomCss } from '../shared/utils/base/ui';
import { useAdvancedSettingsStore } from './settings/advanced';
import { useAvatarProviderStore } from './avatarProvider';
import { useAvatarStore } from './avatar';
@@ -150,48 +149,6 @@ export const useVrcxStore = defineStore('Vrcx', () => {
init();
// Make sure file drops outside of the screenshot manager don't navigate to the file path dropped.
// This issue persists on prompts created with prompt(), unfortunately. Not sure how to fix that.
document.body.addEventListener('drop', function (e) {
e.preventDefault();
});
document.addEventListener('keyup', function (e) {
if (e.ctrlKey) {
if (e.key === 'I') {
showConsole();
} else if (e.key === 'r') {
location.reload();
}
} else if (e.altKey && e.key === 'R') {
refreshCustomCss();
ElMessage({
message: 'Custom CSS refreshed',
type: 'success'
});
}
});
function showConsole() {
AppApi.ShowDevTools();
if (
AppDebug.debug ||
AppDebug.debugWebRequests ||
AppDebug.debugWebSocket ||
AppDebug.debugUserDiff
) {
return;
}
console.log(
'%cCareful! This might not do what you think.',
'background-color: red; color: yellow; font-size: 32px; font-weight: bold'
);
console.log(
'%cIf someone told you to copy-paste something here, it can give them access to your account.',
'font-size: 20px;'
);
}
async function updateDatabaseVersion() {
// requires dbVars.userPrefix to be already set
const databaseVersion = 13;
@@ -775,7 +732,6 @@ export const useVrcxStore = defineStore('Vrcx', () => {
ipcEnabled,
clearVRCXCacheFrequency,
maxTableSize,
showConsole,
clearVRCXCache,
eventVrcxMessage,
eventLaunchCommand,