feat:#4 added link-out button for local import

This commit is contained in:
Elmar Kresse
2024-05-20 14:58:29 +02:00
parent 5641484b93
commit 306ca12391
4 changed files with 27 additions and 3 deletions

View File

@@ -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 {