fix(sidebar) : le hamburger pilote le repli + suppression du code de tiroir mobile mort
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,10 +68,6 @@ const isMailVisible = computed(() => {
|
|||||||
const { enabled: shareEnabled, ensureLoaded: ensureShareStatus } = useShareStatus()
|
const { enabled: shareEnabled, ensureLoaded: ensureShareStatus } = useShareStatus()
|
||||||
const isDocumentsVisible = computed(() => shareEnabled.value === true)
|
const isDocumentsVisible = computed(() => shareEnabled.value === true)
|
||||||
|
|
||||||
// Close mobile sidebar on route change
|
|
||||||
watch(() => route.path, () => {
|
|
||||||
ui.closeMobileSidebar()
|
|
||||||
})
|
|
||||||
|
|
||||||
const currentProjectId = computed(() => {
|
const currentProjectId = computed(() => {
|
||||||
const match = route.path.match(/^\/projects\/(\d+)/)
|
const match = route.path.match(/^\/projects\/(\d+)/)
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
<div class="flex h-full items-center justify-between">
|
<div class="flex h-full items-center justify-between">
|
||||||
<MalioButtonIcon
|
<MalioButtonIcon
|
||||||
icon="mdi:menu"
|
icon="mdi:menu"
|
||||||
aria-label="Menu"
|
aria-label="Replier ou déplier le menu"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
icon-size="24"
|
icon-size="24"
|
||||||
button-class="lg:hidden text-white hover:bg-primary-600"
|
button-class="lg:hidden text-white hover:bg-primary-600"
|
||||||
@click="ui.openMobileSidebar()"
|
@click="ui.toggleSidebar()"
|
||||||
/>
|
/>
|
||||||
<div class="hidden items-center gap-2 lg:flex">
|
<div class="hidden items-center gap-2 lg:flex">
|
||||||
<h1 class="text-lg font-bold tracking-tight">Lesstime</h1>
|
<h1 class="text-lg font-bold tracking-tight">Lesstime</h1>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
export const useUiStore = defineStore('ui', () => {
|
export const useUiStore = defineStore('ui', () => {
|
||||||
const sidebarCollapsed = ref(false)
|
const sidebarCollapsed = ref(false)
|
||||||
const sidebarOpen = ref(false)
|
|
||||||
const darkMode = ref(false)
|
const darkMode = ref(false)
|
||||||
|
|
||||||
if (import.meta.client) {
|
if (import.meta.client) {
|
||||||
@@ -45,13 +44,5 @@ export const useUiStore = defineStore('ui', () => {
|
|||||||
sidebarCollapsed.value = !sidebarCollapsed.value
|
sidebarCollapsed.value = !sidebarCollapsed.value
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMobileSidebar() {
|
return { sidebarCollapsed, darkMode, toggleSidebar, toggleDarkMode }
|
||||||
sidebarOpen.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeMobileSidebar() {
|
|
||||||
sidebarOpen.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
return { sidebarCollapsed, sidebarOpen, darkMode, toggleSidebar, openMobileSidebar, closeMobileSidebar, toggleDarkMode }
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user