From 4377faa40e3728553e6dde155a4c3c12ab86bfd9 Mon Sep 17 00:00:00 2001 From: survellow <59056368+survellow@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:22:43 +0100 Subject: [PATCH 1/3] 91 responsive changes --- frontend/src/App.vue | 10 + frontend/src/components/CalendarPreview.vue | 11 +- frontend/src/components/ModuleInformation.vue | 64 ++++++- frontend/src/components/ModuleSelection.vue | 17 +- .../src/components/ModuleTemplateDialog.vue | 3 +- frontend/src/components/RenameModules.vue | 176 +++++++++--------- frontend/src/i18n/translations/de.json | 12 +- frontend/src/i18n/translations/en.json | 12 +- frontend/src/main.ts | 2 + frontend/src/view/AdditionalModules.vue | 22 ++- frontend/src/view/CourseSelection.vue | 3 +- 11 files changed, 219 insertions(+), 113 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 0d464b1..cdb7a38 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -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);