diff --git a/webclient/components/CalendarModal.vue b/webclient/components/CalendarModal.vue index dd6786d13..4dc6b164b 100644 --- a/webclient/components/CalendarModal.vue +++ b/webclient/components/CalendarModal.vue @@ -1,170 +1,210 @@ + - + + +de: + title: Kalendar + close: Schließen + Loading data...: Lädt daten... + error: + header: Beim Versuch, den Kalender anzuzeigen, ist ein Fehler aufgetreten + reason: Der Grund für diesen Fehler ist + call_to_action: Wenn dieses Problem weiterhin besteht, kontaktieren Sie uns bitte über das {0} + feedback_form: Feedback-Formular + footer: + disclaimer: Stündlich aktualisiert und identische Termine zusammengefasst. + please_check: Im Zweifelsfall prüfe bitte den {official_calendar}. + official_calendar: offiziellen TUMonline-Kalender + last_sync: Stand {0} +en: + title: Calendar + close: Close + Loading data...: Loading data... + error: + header: Got an error trying to display calendar + reason: Reason for this error is + call_to_action: If this issue persists, please contact us via the {0} + feedback_form: feedback-form + footer: + disclaimer: Updated hourly and identical events are merged. + please_check: If in doubt, please check the {official_calendar} + official_calendar: official calendar on TUMonline + last_sync: Updated {0} + diff --git a/webclient/components/Toast.vue b/webclient/components/Toast.vue index d1a98a593..69f7eb8d4 100644 --- a/webclient/components/Toast.vue +++ b/webclient/components/Toast.vue @@ -4,8 +4,9 @@ const props = withDefaults( id?: string; msg?: string; level?: "error" | "warning" | "info" | "default"; + class?: string, }>(), - { level: "default", msg: "", id: undefined }, + { level: "default", msg: "", id: undefined, class: "" }, ); @@ -21,6 +22,8 @@ const props = withDefaults( 'text-zinc-900 bg-zinc-100 border-zinc-300': props.level === 'default', }" > - {{ props.msg }} +
+ {{ props.msg }} +
diff --git a/webclient/composables/calendar.ts b/webclient/composables/calendar.ts new file mode 100644 index 000000000..252ce28ab --- /dev/null +++ b/webclient/composables/calendar.ts @@ -0,0 +1,9 @@ +type CalendarState = { + open: boolean; + showing: string[]; +}; +export const useCalendar = () => + useState("calendar", () => ({ + open: false, + showing: [], + })); diff --git a/webclient/pages/[view]/[id].vue b/webclient/pages/[view]/[id].vue index f232ee0b8..3b8bfd164 100644 --- a/webclient/pages/[view]/[id].vue +++ b/webclient/pages/[view]/[id].vue @@ -19,6 +19,7 @@ const { t, locale } = useI18n({ useScope: "local" }); const route = useRoute(); const router = useRouter(); +const calendar = useCalendar(); const runtimeConfig = useRuntimeConfig(); const url = computed(() => `${runtimeConfig.public.apiURL}/api/get/${route.params.id}?lang=${locale.value}`); const { data, error } = useFetch(url, { key: "details", dedupe: "defer", deep: false }); @@ -167,15 +168,18 @@ onMounted(() => {
{{ data.type_common_name }}
- - + @@ -281,6 +285,9 @@ onMounted(() => { {{ t("Loading data...") }}
+ + + diff --git a/webclient/pnpm-lock.yaml b/webclient/pnpm-lock.yaml index 16eb05a2a..ff1933432 100644 --- a/webclient/pnpm-lock.yaml +++ b/webclient/pnpm-lock.yaml @@ -53,6 +53,9 @@ importers: vue-router: specifier: 4.3.3 version: 4.3.3(vue@3.4.29(typescript@5.4.5)) + vue-simple-calendar: + specifier: 7.1.0 + version: 7.1.0(typescript@5.4.5) vue3-carousel: specifier: 0.3.3 version: 0.3.3(vue@3.4.29(typescript@5.4.5)) @@ -6383,6 +6386,9 @@ packages: peerDependencies: vue: ^3.2.0 + vue-simple-calendar@7.1.0: + resolution: {integrity: sha512-WNbvRVGQQJlStaLPvvpe2ZsB/E1n8eFgUh4hD931ljp2czPA8xT81i4jGD5+jKZT1OHDFpON5mNn0KwO2QC9rA==} + vue-template-compiler@2.7.16: resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} @@ -14691,6 +14697,12 @@ snapshots: '@vue/devtools-api': 6.6.1 vue: 3.4.29(typescript@5.4.5) + vue-simple-calendar@7.1.0(typescript@5.4.5): + dependencies: + vue: 3.4.29(typescript@5.4.5) + transitivePeerDependencies: + - typescript + vue-template-compiler@2.7.16: dependencies: de-indent: 1.0.2 diff --git a/webclient/tailwind.config.ts b/webclient/tailwind.config.ts index 4ab84893f..dbcd1b94d 100644 --- a/webclient/tailwind.config.ts +++ b/webclient/tailwind.config.ts @@ -1,5 +1,5 @@ import type { Config } from "tailwindcss"; -import { current, inherit, orange, red, transparent, white, zinc } from "tailwindcss/colors"; +import { current, green, inherit, orange, red, transparent, white, zinc } from "tailwindcss/colors"; export default >{ darkMode: "class", @@ -12,6 +12,21 @@ export default >{ white, zinc, orange, + green, + "fuchsia-pink": { + "50": "#faf5fa", + "100": "#f7ecf6", + "200": "#f1d9f0", + "300": "#e6bbe2", + "400": "#d591cf", + "500": "#c56fb9", + DEFAULT: "#b55ca5", + "600": "#b55ca5", + "700": "#973f85", + "800": "#7d376d", + "900": "#6a315d", + "950": "#3f1837", + }, red, blue: { 50: "#f3f6fc",