mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-23 08:43:50 +02:00
Clean up keyboard bindings and reload locale
Co-Authored-By: kubectl <me@kube.moe>
This commit is contained in:
@@ -405,6 +405,7 @@
|
||||
useLaunchStore,
|
||||
useNotificationsSettingsStore,
|
||||
usePhotonStore,
|
||||
useUiStore,
|
||||
useUserStore,
|
||||
useVRCXUpdaterStore,
|
||||
useVrStore,
|
||||
@@ -430,7 +431,8 @@
|
||||
const { showLaunchOptions } = useLaunchStore();
|
||||
const { enablePrimaryPasswordChange } = useAuthStore();
|
||||
const { cachedConfig } = storeToRefs(useAuthStore());
|
||||
const { showConsole, clearVRCXCache, showRegistryBackupDialog } = useVrcxStore();
|
||||
const { clearVRCXCache, showRegistryBackupDialog } = useVrcxStore();
|
||||
const { showConsole } = useUiStore();
|
||||
const { disableGameLogDialog } = useGameLogStore();
|
||||
|
||||
const { cachedUsers } = useUserStore();
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ArrowDown, ArrowRight, DocumentCopy, Notebook } from '@element-plus/icons-vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed, onBeforeUnmount, ref } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -425,15 +425,26 @@
|
||||
|
||||
const zoomLevel = ref(100);
|
||||
const isLinux = computed(() => LINUX);
|
||||
let cleanupWheel = null;
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (cleanupWheel) {
|
||||
cleanupWheel();
|
||||
}
|
||||
});
|
||||
|
||||
initGetZoomLevel();
|
||||
|
||||
async function initGetZoomLevel() {
|
||||
addEventListener('wheel', (event) => {
|
||||
const handleWheel = (event) => {
|
||||
if (event.ctrlKey) {
|
||||
getZoomLevel();
|
||||
}
|
||||
});
|
||||
};
|
||||
window.addEventListener('wheel', handleWheel);
|
||||
cleanupWheel = () => {
|
||||
window.removeEventListener('wheel', handleWheel);
|
||||
};
|
||||
getZoomLevel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user