refactor: fix indentation

This commit is contained in:
2026-06-15 23:16:27 +02:00 Unverified
parent 6352bc67d2
commit bb50b5ca6a
6 changed files with 2 additions and 24 deletions
-6
View File
@@ -6,12 +6,10 @@ import BIIcon from "~/components/BIIcon.vue";
const route = useRoute()
const isMobileMenuOpen = ref(false)
// 1. Close menu on route change
watch(() => route.path, () => {
isMobileMenuOpen.value = false
})
// 2. Prevent body scroll when mobile menu is open
watch(isMobileMenuOpen, (isOpen) => {
if (typeof document !== 'undefined') {
if (isOpen) {
@@ -22,7 +20,6 @@ watch(isMobileMenuOpen, (isOpen) => {
}
})
// 3. Failsafe: Re-enable scrolling if the component is destroyed while menu is open
onUnmounted(() => {
if (typeof document !== 'undefined') {
document.body.style.overflow = ''
@@ -151,7 +148,6 @@ const panelLabel = computed(() => user.value?.role?.toUpperCase() === 'ADMIN' ?
<div class="close-div">
<button class="btn close-menu" type="button" @click="isMobileMenuOpen = false">
<span class="visually-hidden">Nascondi la navigazione</span>
<!-- FIXED: Added color="black" so it's visible on white -->
<BIIcon name="it-close-big" color="black"/>
</button>
</div>
@@ -200,7 +196,6 @@ const panelLabel = computed(() => user.value?.role?.toUpperCase() === 'ADMIN' ?
background-color: rgb(0, 76.5, 153);
}
/* --- MOBILE MENU FIXES --- */
@media (max-width: 991.98px) {
.overlay {
position: fixed;
@@ -241,7 +236,6 @@ const panelLabel = computed(() => user.value?.role?.toUpperCase() === 'ADMIN' ?
transform: translateX(0);
}
/* FIXED: Removed the border-bottom here */
.close-div {
display: flex;
justify-content: flex-end;