diff --git a/backend/backend.iml b/backend/backend.iml index 49df094..8021953 100644 --- a/backend/backend.iml +++ b/backend/backend.iml @@ -1,6 +1,5 @@ - diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 918cd48..153089b 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,9 +4,8 @@ import { RouterView } from "vue-router"; diff --git a/frontend/src/components/CalendarLink.vue b/frontend/src/components/CalendarLink.vue index a8a7a40..2507ca8 100644 --- a/frontend/src/components/CalendarLink.vue +++ b/frontend/src/components/CalendarLink.vue @@ -4,19 +4,20 @@ import { useToast } from "primevue/usetoast"; import { onMounted } from "vue"; import router from "../router"; import { useI18n } from "vue-i18n"; -const { t } = useI18n({ useScope: 'global' }) +const { t } = useI18n({ useScope: "global" }); const toast = useToast(); const domain = window.location.hostname; -const getLink = () => "https://" + domain + "/api/feed?token=" + tokenStore().token; +const getLink = () => + "https://" + domain + "/api/feed?token=" + tokenStore().token; const show = () => { toast.add({ severity: "info", - summary: t('calendarLink.copyToastSummary'), - detail: t('calendarLink.copyToastNotification'), + summary: t("calendarLink.copyToastSummary"), + detail: t("calendarLink.copyToastNotification"), life: 3000, }); }; @@ -33,46 +34,48 @@ function rerouteIfTokenIsEmpty() { function copyToClipboard() { // Copy the text inside the text field - navigator.clipboard.writeText(getLink()).then( - show, - (err) => { - console.error("Could not copy text: ", err); - toast.add({ - severity: "error", - summary: t('calendarLink.copyToastError'), - detail: t('calendarLink.copyToastErrorDetail'), - life: 3000, - }); - }, - ); + navigator.clipboard.writeText(getLink()).then(show, (err) => { + console.error("Could not copy text: ", err); + toast.add({ + severity: "error", + summary: t("calendarLink.copyToastError"), + detail: t("calendarLink.copyToastErrorDetail"), + life: 3000, + }); + }); } const forwardToGoogle = () => { - window.open("https://calendar.google.com/calendar/u/0/r?cid=" + encodeURI(getLink().replace("https://", "http://"))); + window.open( + "https://calendar.google.com/calendar/u/0/r?cid=" + + encodeURI(getLink().replace("https://", "http://")), + ); }; const forwardToMicrosoft = () => { - window.open("https://outlook.live.com/owa?path=/calendar/action/compose&rru=addsubscription&name=HTWK%20Kalender&url=" + encodeURI(getLink())); + window.open( + "https://outlook.live.com/owa?path=/calendar/action/compose&rru=addsubscription&name=HTWK%20Kalender&url=" + + encodeURI(getLink()), + ); }; const actions = [ { - label: t('calendarLink.copyToClipboard'), + label: t("calendarLink.copyToClipboard"), icon: "pi pi-copy", command: copyToClipboard, }, { - label: t('calendarLink.toGoogleCalendar'), + label: t("calendarLink.toGoogleCalendar"), icon: "pi pi-google", command: forwardToGoogle, }, { - label: t('calendarLink.toMicrosoftCalendar'), + label: t("calendarLink.toMicrosoftCalendar"), icon: "pi pi-microsoft", command: forwardToMicrosoft, }, ]; - \ No newline at end of file + diff --git a/frontend/src/components/LocaleSwitcher.vue b/frontend/src/components/LocaleSwitcher.vue index ccc6a62..ea614e2 100644 --- a/frontend/src/components/LocaleSwitcher.vue +++ b/frontend/src/components/LocaleSwitcher.vue @@ -2,11 +2,11 @@ import { computed } from "vue"; import localeStore from "../store/localeStore.ts"; import { useI18n } from "vue-i18n"; -const { t } = useI18n({ useScope: 'global' }) +const { t } = useI18n({ useScope: "global" }); const countries = computed(() => [ - { name: t('english'), code: "en", icon: "🇬🇧" }, - { name: t('german'), code: "de", icon: "🇩🇪" }, + { name: t("english"), code: "en", icon: "🇬🇧" }, + { name: t("german"), code: "de", icon: "🇩🇪" }, ]); function displayIcon(code: string) { @@ -23,12 +23,12 @@ function updateLocale(locale: string) {