fix frontend bugs

This commit is contained in:
Edd
2026-01-26 19:12:50 +00:00
parent 582cb3cb4c
commit 29ebda9b18
3 changed files with 13 additions and 9 deletions
-5
View File
@@ -165,13 +165,11 @@ import { useAuthStore } from "~/stores/auth-store.js";
const authStore = useAuthStore();
const router = useRouter();
// State
const isDark = ref(false);
const isUserMenuOpen = ref(false);
const isMobileMenuOpen = ref(false);
const userMenuRef = ref(null);
// Toggle Dark Mode
function toggleDark() {
isDark.value = !isDark.value;
if (isDark.value) {
@@ -183,7 +181,6 @@ function toggleDark() {
}
}
// Navigation Links
const navLinks = [
{ name: 'Profile', path: '/profile' },
];
@@ -208,13 +205,11 @@ function closeDropdowns(event) {
}
onMounted(() => {
// Initialize Theme
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
isDark.value = true;
document.documentElement.classList.add('dark');
}
// Click listener for closing dropdowns
window.addEventListener('click', closeDropdowns);
});