mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2026-01-17 14:32:25 +01:00
feat:#4 added link-out button for local import
This commit is contained in:
@@ -12,7 +12,16 @@ import tokenStore from "@/store/tokenStore.ts";
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
const toast = useToast();
|
||||
|
||||
const token = ref("");
|
||||
const token = ref(tokenStore().token || "" as string );
|
||||
|
||||
// parse token from query parameter
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const tokenFromUrl = urlParams.get("token");
|
||||
if (tokenFromUrl) {
|
||||
token.value = tokenFromUrl;
|
||||
tokenStore().setToken(tokenFromUrl);
|
||||
loadCalendar();
|
||||
}
|
||||
|
||||
function loadCalendar() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user