fix: Don't open the sidebar drawer by default on medium screens (#6107)

This commit is contained in:
Nico Hirsch
2025-09-08 16:58:39 +02:00
committed by GitHub
parent aa9e61a16f
commit c46c412bf5
3 changed files with 2 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ export default defineNuxtComponent({
const sidebar = ref<boolean>(false);
onMounted(() => {
sidebar.value = display.mdAndUp.value;
sidebar.value = display.lgAndUp.value;
});
function cookbookAsLink(cookbook: ReadCookBook): SideBarLink {

View File

@@ -105,7 +105,6 @@
</template>
<script lang="ts">
import { useWindowSize } from "@vueuse/core";
import { useLoggedInState } from "~/composables/use-logged-in-state";
import type { SidebarLinks } from "~/types/application-types";
import UserAvatar from "~/components/Domain/User/UserAvatar.vue";
@@ -160,20 +159,6 @@ export default defineNuxtComponent({
get: () => props.modelValue,
set: value => context.emit("update:modelValue", value),
});
watch(showDrawer, () => {
if (window.innerWidth < 760 && state.hasOpenedBefore === false) {
state.hasOpenedBefore = true;
}
});
const { width: wWidth } = useWindowSize();
watch(wWidth, (w) => {
if (w > 760) {
showDrawer.value = true;
}
else {
showDrawer.value = false;
}
});
const allLinks = computed(() => [...props.topLink, ...(props.secondaryLinks || [])]);
function initDropdowns() {