Skip to content

Commit 8f060cc

Browse files
committed
Fixes
1 parent 4c17c85 commit 8f060cc

File tree

5 files changed

+38
-57
lines changed

5 files changed

+38
-57
lines changed

src/components/ToggleDarkModeButton.vue

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/composables/useAxiosErrorHandling.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ export function useAxiosErrorHandling() {
3333
const status = error.response.status;
3434
const responseData = error.response.data;
3535

36-
if (status === 401) {
37-
//router.push({ name: 'login' });
38-
showErrorToast('Unauthorized', 'Please log in to continue.');
39-
} else if (status === 419) {
36+
if (status === 419) {
4037
router.push({ name: 'login' });
4138
showErrorToast('Session Expired', 'Please log in again.');
4239
} else if (status === 422 && responseData?.errors) {

src/layouts/UserSettingsLayout.vue

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const sidebarNavItems = computed(() => [
4141
<div class="flex flex-col gap-6 lg:gap-8 lg:flex-row">
4242
<aside class="w-full md:max-w-2xl lg:w-48">
4343
<nav class="flex flex-col space-x-0 space-y-1">
44-
<!-- <RouterLink
44+
<RouterLink
4545
v-for="item in sidebarNavItems"
4646
:key="item.route"
4747
:to="item.route"
@@ -52,28 +52,11 @@ const sidebarNavItems = computed(() => [
5252
:severity="item.active ? 'secondary' : ''"
5353
:variant="item.active ? 'outlined' : 'text'"
5454
:href="item.route"
55-
as="RouterLink"
55+
fluid
5656
>
5757
{{ item.title }}
5858
</Button>
59-
</RouterLink> -->
60-
<!-- TODO -->
61-
<Button
62-
v-for="item in sidebarNavItems"
63-
:key="item.route"
64-
:severity="item.active ? 'secondary' : ''"
65-
:variant="item.active ? 'outlined' : 'text'"
66-
class="flex items-center justify-start no-underline"
67-
v-slot="slotProps"
68-
asChild
69-
>
70-
<RouterLink
71-
:to="item.route"
72-
:class="slotProps.class"
73-
>
74-
{{ item.title }}
75-
</RouterLink>
76-
</Button>
59+
</RouterLink>
7760
</nav>
7861
</aside>
7962

src/views/Welcome.vue

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup>
2-
import ToggleDarkModeButton from '@/components/ToggleDarkModeButton.vue';
32
import { useAuthStore } from '@/stores/auth';
4-
import { Card } from 'primevue';
3+
import { LayoutGrid, LogIn, Settings, UserPlus } from 'lucide-vue-next';
54
65
const authStore = useAuthStore();
76
await authStore.fetchUser();
@@ -35,37 +34,48 @@ await authStore.fetchUser();
3534
<RouterLink :to="{ name: 'dashboard' }">
3635
<Button
3736
label="Dashboard"
38-
icon="pi pi-th-large"
3937
class="mr-4"
40-
/>
38+
>
39+
<template #icon>
40+
<LayoutGrid />
41+
</template>
42+
</Button>
4143
</RouterLink>
4244
<RouterLink :to="{ name: 'settings.profile.edit' }">
4345
<Button
4446
outlined
45-
label="Profile"
46-
icon="pi pi-user"
47+
label="Profile Settings"
4748
class="mr-4"
48-
/>
49+
>
50+
<template #icon>
51+
<Settings />
52+
</template>
53+
</Button>
4954
</RouterLink>
5055
</template>
5156
<template v-else>
5257
<RouterLink :to="{ name: 'login' }">
5358
<Button
5459
label="Login"
55-
icon="pi pi-sign-in"
5660
class="mr-4"
57-
/>
61+
>
62+
<template #icon>
63+
<LogIn />
64+
</template>
65+
</Button>
5866
</RouterLink>
5967
<RouterLink :to="{ name: 'register' }">
6068
<Button
6169
outlined
6270
label="Register"
63-
icon="pi pi-user-plus"
6471
class="mr-4"
65-
/>
72+
>
73+
<template #icon>
74+
<UserPlus />
75+
</template>
76+
</Button>
6677
</RouterLink>
6778
</template>
68-
<ToggleDarkModeButton outlined />
6979
</section>
7080
</div>
7181
</template>

src/views/error/NotFound.vue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<script setup>
2+
import { ArrowLeft } from 'lucide-vue-next';
3+
</script>
4+
15
<template>
26
<main>
37
<div class="h-screen flex items-center justify-center">
@@ -6,13 +10,15 @@
610
<div class="text-center">
711
<section>
812
<h2 class="mb-8 font-extrabold text-9xl"> <span class="sr-only">Error</span>404 </h2>
9-
<p class="mb-8 text-2xl font-semibold md:text-3xl text-muted-color">Sorry, we couldn't find
10-
this page.</p>
13+
<p class="mb-8 text-2xl font-semibold md:text-3xl text-muted-color">
14+
Sorry, we couldn't find this page.
15+
</p>
1116
<RouterLink :to="{ name: 'welcome' }">
12-
<Button
13-
label="Back to homepage"
14-
icon="pi pi-arrow-left"
15-
/>
17+
<Button label="Back to homepage">
18+
<template #icon>
19+
<ArrowLeft />
20+
</template>
21+
</Button>
1622
</RouterLink>
1723
</section>
1824
</div>

0 commit comments

Comments
 (0)