mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-24 05:28:51 +02:00
91 responsive changes
This commit is contained in:
@ -3,15 +3,25 @@ import MenuBar from "./components/MenuBar.vue";
|
||||
import {RouteRecordName, RouterView} from "vue-router";
|
||||
import CalendarPreview from "./components/CalendarPreview.vue";
|
||||
import moduleStore from "./store/moduleStore.ts";
|
||||
import { provide, ref } from "vue";
|
||||
|
||||
const disabledPages = ["room-finder", "faq", "imprint", "privacy-policy", "edit", "edit-calendar"];
|
||||
|
||||
const store = moduleStore();
|
||||
const mobilePage = ref(true);
|
||||
provide("mobilePage", mobilePage);
|
||||
|
||||
const isDisabled = (routeName: RouteRecordName | null | undefined) => {
|
||||
return !disabledPages.includes(routeName as string) && store.modules.size > 0
|
||||
};
|
||||
|
||||
const updateMobile = () => {
|
||||
mobilePage.value = window.innerWidth <= 992;
|
||||
};
|
||||
|
||||
updateMobile();
|
||||
|
||||
window.addEventListener("resize", updateMobile);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Reference in New Issue
Block a user