diff --git a/client/src/components/onboarding/WizardPage.vue b/client/src/components/onboarding/WizardPage.vue new file mode 100644 index 00000000..02d01dbc --- /dev/null +++ b/client/src/components/onboarding/WizardPage.vue @@ -0,0 +1,19 @@ + + + diff --git a/client/src/components/onboarding/WizardSidePanel.vue b/client/src/components/onboarding/WizardSidePanel.vue new file mode 100644 index 00000000..e6a8ad49 --- /dev/null +++ b/client/src/components/onboarding/WizardSidePanel.vue @@ -0,0 +1,104 @@ + + diff --git a/client/src/pages/onboarding/OnboardUk.vue b/client/src/pages/onboarding/OnboardUk.vue deleted file mode 100644 index e1847512..00000000 --- a/client/src/pages/onboarding/OnboardUk.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - diff --git a/client/src/pages/onboarding/uk/AccountConfirm.vue b/client/src/pages/onboarding/uk/AccountConfirm.vue new file mode 100644 index 00000000..8e30b5bd --- /dev/null +++ b/client/src/pages/onboarding/uk/AccountConfirm.vue @@ -0,0 +1,31 @@ + + + diff --git a/client/src/pages/onboarding/uk/AccountProfile.vue b/client/src/pages/onboarding/uk/AccountProfile.vue new file mode 100644 index 00000000..2131cffd --- /dev/null +++ b/client/src/pages/onboarding/uk/AccountProfile.vue @@ -0,0 +1,79 @@ + + + diff --git a/client/src/pages/onboarding/uk/AccountSetup.vue b/client/src/pages/onboarding/uk/AccountSetup.vue new file mode 100644 index 00000000..486caccf --- /dev/null +++ b/client/src/pages/onboarding/uk/AccountSetup.vue @@ -0,0 +1,23 @@ + + + diff --git a/client/src/pages/onboarding/uk/WizardBase.vue b/client/src/pages/onboarding/uk/WizardBase.vue new file mode 100644 index 00000000..dc8dd1a8 --- /dev/null +++ b/client/src/pages/onboarding/uk/WizardBase.vue @@ -0,0 +1,10 @@ + + + diff --git a/client/src/router/index.ts b/client/src/router/index.ts index 9e5dcb1c..9744f956 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -1,5 +1,5 @@ -import DashboardPage from "@/pages/dashboard/DashboardPage.vue"; import LoginPage from "@/pages/LoginPage.vue"; +import DashboardPage from "@/pages/dashboard/DashboardPage.vue"; import { handleCourseSessionAsQueryParam, handleCurrentCourseSession, @@ -7,6 +7,7 @@ import { updateLoggedIn, } from "@/router/guards"; import { addToHistory } from "@/router/history"; +import { checkUKProcess } from "@/router/onboarding"; import { createRouter, createWebHistory } from "vue-router"; const router = createRouter({ @@ -231,11 +232,33 @@ const router = createRouter({ }, { path: "/onboarding/uk", - component: () => import("@/pages/onboarding/OnboardUk.vue"), + props: true, + component: () => import("@/pages/onboarding/uk/WizardBase.vue"), meta: { public: true, hideChrome: true, }, + beforeEnter: checkUKProcess, + children: [ + { + path: "account/create", + props: true, + component: () => import("@/pages/onboarding/uk/AccountSetup.vue"), + name: "accountCreate", + }, + { + path: "account/confirm", + props: true, + component: () => import("@/pages/onboarding/uk/AccountConfirm.vue"), + name: "accountConfirm", + }, + { + path: "account/profile", + props: true, + component: () => import("@/pages/onboarding/uk/AccountProfile.vue"), + name: "accountProfile", + }, + ], }, { path: "/styleguide", diff --git a/client/src/router/onboarding.ts b/client/src/router/onboarding.ts new file mode 100644 index 00000000..06c840d8 --- /dev/null +++ b/client/src/router/onboarding.ts @@ -0,0 +1,25 @@ +import { useUserStore } from "@/stores/user"; +import type { NavigationGuardNext, RouteLocationNormalized } from "vue-router"; + +export async function checkUKProcess( + to: RouteLocationNormalized, + from: RouteLocationNormalized, + next: NavigationGuardNext +) { + const userStore = useUserStore(); + + // Guest + if (!userStore.loggedIn) { + if (to.name !== "accountCreate") { + return next({ name: "accountCreate" }); + } + return next(); + } + + // Logged in + if (to.name === "accountCreate") { + return next({ name: "accountConfirm" }); + } + + return next(); +} diff --git a/server/vbv_lernwelt/static/images/mood_uk.jpg b/server/vbv_lernwelt/static/images/mood_uk.jpg new file mode 100644 index 00000000..ece7d4be Binary files /dev/null and b/server/vbv_lernwelt/static/images/mood_uk.jpg differ diff --git a/server/vbv_lernwelt/static/images/student.jpg b/server/vbv_lernwelt/static/images/mood_vv.jpg similarity index 100% rename from server/vbv_lernwelt/static/images/student.jpg rename to server/vbv_lernwelt/static/images/mood_vv.jpg