[Closes #10] Reactive breadcrumbs
This commit is contained in:
parent
6d3cdb560d
commit
a1708317ec
19 changed files with 200 additions and 33 deletions
|
|
@ -1,5 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { useBreadcrumbStore } from "~/stores/breadcrumbs";
|
||||
import SignupForm from "@/components/SignupForm.vue";
|
||||
|
||||
const breadcrumbStore = useBreadcrumbStore();
|
||||
breadcrumbStore.setBreadcrumbs([{ label: "Auth" }, { label: "Create Account", to: "/auth/create-account" }]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import LoginForm from "@/components/LoginForm.vue";
|
||||
import { useBreadcrumbStore } from "~/stores/breadcrumbs";
|
||||
import LoginForm from "~/components/LoginForm.vue";
|
||||
|
||||
const breadcrumbStore = useBreadcrumbStore();
|
||||
breadcrumbStore.setBreadcrumbs([{ label: "Auth" }, { label: "Login", to: "/auth/login" }]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -4,9 +4,13 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
|
|||
import { Field, FieldDescription } from "@/components/ui/field";
|
||||
|
||||
import { useAuthStore } from "~/stores/auth";
|
||||
import { useBreadcrumbStore } from "~/stores/breadcrumbs";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
await authStore.init();
|
||||
|
||||
const breadcrumbStore = useBreadcrumbStore();
|
||||
breadcrumbStore.setBreadcrumbs([{ label: "Auth" }, { label: "Logout", to: "/auth/logout" }]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useBreadcrumbStore } from "~/stores/breadcrumbs";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
const lastClicked = ref<string>("None");
|
||||
|
|
@ -7,6 +8,9 @@ const lastClicked = ref<string>("None");
|
|||
const buttonClicked = (variant: string) => {
|
||||
lastClicked.value = variant;
|
||||
};
|
||||
|
||||
const breadcrumbStore = useBreadcrumbStore();
|
||||
breadcrumbStore.setBreadcrumbs([{ label: "Homepage", to: "/" }]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue