mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
some fix for nav
This commit is contained in:
@@ -370,7 +370,7 @@
|
|||||||
|
|
||||||
const handleFolderCycleNavigation = (item) => {
|
const handleFolderCycleNavigation = (item) => {
|
||||||
if (!item?.entries?.length) {
|
if (!item?.entries?.length) {
|
||||||
return [];
|
return;
|
||||||
}
|
}
|
||||||
const entries = item.entries.filter((entry) => Boolean(entry?.routeName || entry?.path));
|
const entries = item.entries.filter((entry) => Boolean(entry?.routeName || entry?.path));
|
||||||
if (!entries.length) {
|
if (!entries.length) {
|
||||||
@@ -593,13 +593,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function handleKeydown(e) {
|
|
||||||
if (e.ctrlKey && e.key === 'd') {
|
|
||||||
e.preventDefault();
|
|
||||||
directAccessPaste();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSupportLink = (id) => {
|
const handleSupportLink = (id) => {
|
||||||
supportMenuVisible.value = false;
|
supportMenuVisible.value = false;
|
||||||
const target = links[id];
|
const target = links[id];
|
||||||
@@ -738,7 +731,6 @@
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadNavMenuConfig();
|
await loadNavMenuConfig();
|
||||||
window.addEventListener('keydown', handleKeydown);
|
|
||||||
|
|
||||||
if (!sentryErrorReporting.value) return;
|
if (!sentryErrorReporting.value) return;
|
||||||
try {
|
try {
|
||||||
@@ -750,10 +742,6 @@
|
|||||||
console.error('Error setting up Sentry feedback:', error);
|
console.error('Error setting up Sentry feedback:', error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
window.removeEventListener('keydown', handleKeydown);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -3,16 +3,21 @@ import { defineStore } from 'pinia';
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useNotificationStore } from './notification';
|
import { useNotificationStore } from './notification';
|
||||||
import { watchState } from '../service/watchState';
|
import { useSearchStore } from './search';
|
||||||
|
|
||||||
export const useUiStore = defineStore('Ui', () => {
|
export const useUiStore = defineStore('Ui', () => {
|
||||||
const notificationStore = useNotificationStore();
|
const notificationStore = useNotificationStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const search = useSearchStore();
|
||||||
|
|
||||||
document.addEventListener('keydown', function (e) {
|
document.addEventListener('keydown', function (e) {
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
shiftHeld.value = true;
|
shiftHeld.value = true;
|
||||||
}
|
}
|
||||||
|
if (e.ctrlKey && e.key === 'd') {
|
||||||
|
e.preventDefault();
|
||||||
|
search.directAccessPaste();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('keyup', function (e) {
|
document.addEventListener('keyup', function (e) {
|
||||||
@@ -24,15 +29,6 @@ export const useUiStore = defineStore('Ui', () => {
|
|||||||
const notifiedMenus = ref([]);
|
const notifiedMenus = ref([]);
|
||||||
const shiftHeld = ref(false);
|
const shiftHeld = ref(false);
|
||||||
const trayIconNotify = ref(false);
|
const trayIconNotify = ref(false);
|
||||||
watch(
|
|
||||||
() => watchState.isLoggedIn,
|
|
||||||
(isLoggedIn) => {
|
|
||||||
if (isLoggedIn) {
|
|
||||||
router.push({ name: 'feed' });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ flush: 'sync' }
|
|
||||||
);
|
|
||||||
|
|
||||||
function notifyMenu(index) {
|
function notifyMenu(index) {
|
||||||
const currentRouteName = router.currentRoute.value?.name;
|
const currentRouteName = router.currentRoute.value?.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user