Disallow using project importer when not logged in

Closes #1120
This commit is contained in:
Nassim Jahnke 2023-03-25 22:46:22 +01:00
parent fea4d2feb5
commit 8c5b338771
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
3 changed files with 5 additions and 2 deletions

View File

@ -904,6 +904,7 @@
},
"importer": {
"title": "Import Projects",
"notLoggedIn": "You need to be logged in to use the project importer.",
"step1": {
"title": "Intro",
"text1": "This page allows you to import projects from other platforms.",

View File

@ -178,14 +178,17 @@ function createProject(project: NewProjectForm) {
});
}
const loggedIn = useAuthStore().user !== null;
useHead(useSeo(t("importer.title"), null, route, null));
</script>
<template>
<div>
<PageTitle>{{ t("importer.title") }}</PageTitle>
<p v-if="!loggedIn">{{ t("importer.notLoggedIn") }}</p>
<Steps v-model="selectedStep" :steps="steps" button-lang-key="importer.step">
<Steps v-else v-model="selectedStep" :steps="steps" button-lang-key="importer.step">
<template #intro>
<p>{{ t("importer.step1.text1") }}</p>
<p class="inline-flex items-center space-x-2">

View File

@ -14,7 +14,6 @@ declare module "@vue/runtime-core" {
IconMdiAlertBox: typeof import("~icons/mdi/alert-box")["default"];
IconMdiAlertDecagram: typeof import("~icons/mdi/alert-decagram")["default"];
IconMdiAlertOutline: typeof import("~icons/mdi/alert-outline")["default"];
IconMdiAlphaX: typeof import("~icons/mdi/alpha-x")["default"];
IconMdiBell: typeof import("~icons/mdi/bell")["default"];
IconMdiBellOutline: typeof import("~icons/mdi/bell-outline")["default"];
IconMdiBookshelf: typeof import("~icons/mdi/bookshelf")["default"];