From 016e980f4eea0108e02e76cd3ef3381cb220b2d7 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 25 Mar 2023 20:34:10 +0100 Subject: [PATCH] basic impementation of a calendar --- webclient/package.json | 3 +- webclient/src/App.vue | 2 + webclient/src/components/CalendarModal.vue | 105 +++++++++++++++++++++ webclient/src/stores/global.ts | 3 + webclient/src/views/DetailsView.vue | 4 +- 5 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 webclient/src/components/CalendarModal.vue diff --git a/webclient/package.json b/webclient/package.json index 21b9f0147..1212b209b 100644 --- a/webclient/package.json +++ b/webclient/package.json @@ -16,7 +16,8 @@ "swagger-ui-dist": "^5.0.0-alpha.0", "swaggerdark": "github:octycs/SwaggerDark#f02d394c8ff698cdd93e09c2188b058d2d686ca3", "vue": "^3.2.45", - "vue-router": "^4.1.6" + "vue-router": "^4.1.6", + "vue-simple-calendar": "^6.3.1" }, "devDependencies": { "@intlify/unplugin-vue-i18n": "^0.8.1", diff --git a/webclient/src/App.vue b/webclient/src/App.vue index 7a39ad512..43300c63b 100644 --- a/webclient/src/App.vue +++ b/webclient/src/App.vue @@ -1,5 +1,6 @@ + + diff --git a/webclient/src/stores/global.ts b/webclient/src/stores/global.ts index dd0543642..b76766b98 100644 --- a/webclient/src/stores/global.ts +++ b/webclient/src/stores/global.ts @@ -13,6 +13,9 @@ export const useGlobalStore = defineStore({ state: () => ({ search_focused: false, error_message: null, + calendar: { + open: false, + }, information_modal: { header: null as string | null, body: null as string | null, diff --git a/webclient/src/views/DetailsView.vue b/webclient/src/views/DetailsView.vue index 3d668434f..b8cc02a08 100644 --- a/webclient/src/views/DetailsView.vue +++ b/webclient/src/views/DetailsView.vue @@ -11,6 +11,7 @@ import { useI18n } from "vue-i18n"; import { getLocalStorageWithExpiry, removeLocalStorage } from "@/utils/storage"; import { copyCurrentLink, setDescription, setTitle } from "@/utils/common"; import { selectedMap, useDetailsStore } from "@/stores/details"; +import { useGlobalStore } from "@/stores/global"; import { nextTick, onMounted, ref, watch } from "vue"; import { useFetch } from "@/utils/fetch"; import { useRoute } from "vue-router"; @@ -60,6 +61,7 @@ function update() { }); } +const global = useGlobalStore(); const state = useDetailsStore(); const copied = ref(false); // Coordinate picker states @@ -236,7 +238,7 @@ onMounted(() => {