mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-16 09:38:49 +02:00
feat:#58 added htwk app button
This commit is contained in:
@ -142,7 +142,10 @@
|
||||
"copyToastErrorDetail": "Link konnte nicht in Zwischenablage kopiert werden",
|
||||
"copyToClipboard": "Link kopieren",
|
||||
"toGoogleCalendar": "Google Kalender",
|
||||
"toMicrosoftCalendar": "Microsoft Kalender"
|
||||
"toMicrosoftCalendar": "Microsoft Kalender",
|
||||
"copyTokenToastSummary": "Information",
|
||||
"copyTokenToastNotification": "Token in die Zwischenablage kopiert, um den Kalender in der HTWK App zu abonnieren",
|
||||
"toHTWKApp": "HTWK App"
|
||||
},
|
||||
"calendarPreview": {
|
||||
"preview": "Vorschau",
|
||||
|
@ -142,7 +142,10 @@
|
||||
"copyToastErrorDetail": "could not copy link to clipboard",
|
||||
"copyToClipboard": "copy to clipboard",
|
||||
"toGoogleCalendar": "to Google Calendar",
|
||||
"toMicrosoftCalendar": "to Microsoft Calendar"
|
||||
"toMicrosoftCalendar": "to Microsoft Calendar",
|
||||
"copyTokenToastSummary": "information",
|
||||
"copyTokenToastNotification": "token copied to clipboard, go to the HTWK app to insert it",
|
||||
"toHTWKApp": "HTWK App"
|
||||
},
|
||||
"calendarPreview": {
|
||||
"preview": "preview",
|
||||
|
@ -78,6 +78,17 @@ const forwardToMicrosoft = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const copyTokenToClipboard = () => {
|
||||
navigator.clipboard.writeText(tokenStore().token).then(() => {
|
||||
toast.add({
|
||||
severity: "info",
|
||||
summary: t("calendarLink.copyTokenToastSummary"),
|
||||
detail: t("calendarLink.copyTokenToastNotification"),
|
||||
life: 3000,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const actions = computed(() => [
|
||||
{
|
||||
label: t("calendarLink.copyToClipboard"),
|
||||
@ -94,6 +105,11 @@ const actions = computed(() => [
|
||||
icon: "pi pi-microsoft",
|
||||
command: forwardToMicrosoft,
|
||||
},
|
||||
{
|
||||
label: t("calendarLink.toHTWKApp"),
|
||||
icon: "pi pi-mobile",
|
||||
command: copyTokenToClipboard,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user