fix(ui): responsive sidebar stays open on desktop when url changes

environments/review-docs-feat-z0hkbz/deployments/19891
ArneBo 2024-12-19 11:10:25 +01:00
rodzic a03d5ff29d
commit b1804d3d31
1 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ Sidebar on slim screen
const isCollapsed = ref(false)
const route = useRoute()
watch(() => route.path, () => ( isCollapsed.value = true ))
const { openShortcutsModal } = defineProps<{ openShortcutsModal: ()=> void }>()
@ -90,7 +91,7 @@ const uploads = useUploadsStore()
<Button round ghost icon="bi-list large" class="hide-on-desktop" @click="isCollapsed=!isCollapsed"/>
</Layout>
</Layout>
<Layout no-gap stack :class="$style['menu-links']" v-if="!isCollapsed">
<Layout no-gap stack :class="[$style['menu-links'], isCollapsed && 'hide-on-mobile']">
<div :class="$style.search">
<Input
v-model="searchQuery"
@ -295,11 +296,19 @@ const uploads = useUploadsStore()
}
}
:global(.hide-on-mobile){
display: none;
}
@media screen and (min-width: 1024px) {
height: 100%;
:global(.hide-on-desktop){
display: none !important;
display: none;
}
:global(.hide-on-mobile){
display: inherit;
}
&.sticky-content {