Skip to content

Commit af3dc7f

Browse files
authored
Merge pull request #47 from connorabbas/develop
Changes from inertia project, loading fixes
2 parents ad2f133 + c845900 commit af3dc7f

File tree

10 files changed

+37
-6
lines changed

10 files changed

+37
-6
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { RouterView } from 'vue-router';
55
<template>
66
<!-- Use key to re-generate the page view component on each navigation :key="$route.path" -->
77
<!-- Alteratively, use a watch() on each component to re-render dynamic data as needed -->
8-
<Toast position="top-center" />
8+
<Toast position="bottom-right" />
99
<RouterView v-slot="{ Component }">
1010
<Suspense timeout="0">
1111
<template #default>

src/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import PageTitleSection from '@/components/PageTitleSection.vue';
1616

1717
import { useColorMode } from '@vueuse/core';
1818
import themePreset from '@/theme/noir-preset';
19+
import globalPt from './theme/global-pt';
1920

2021
// Site light/dark mode
2122
const colorMode = useColorMode({ emitAuto: true });
@@ -37,6 +38,7 @@ app.provide('colorMode', colorMode)
3738
},
3839
},
3940
},
41+
pt: globalPt,
4042
})
4143
.use(ToastService)
4244
.component('Container', Container)

src/components/DeleteUserModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ const deleteAccount = () => {
4949
<template>
5050
<Dialog
5151
v-model:visible="modalOpen"
52+
class="w-[40rem]"
5253
position="center"
5354
header="Are you sure you want to delete your account?"
54-
:style="{ width: '40rem' }"
5555
:draggable="false"
5656
dismissableMask
5757
modal

src/layouts/app/HeaderLayout.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ const toggleMobileUserMenu = (event) => {
7272
</div>
7373
</template>
7474
</Drawer>
75+
<ScrollTop
76+
:buttonProps="{ class: 'fixed! right-4! bottom-4! md:right-8! md:bottom-8! z-[1000]!', rounded: true, raised: true }"
77+
/>
7578
</Teleport>
7679
<div class="min-h-screen">
7780
<!-- Primary Navigation Menu -->

src/layouts/app/SidebarLayout.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ const toggleMobileUserMenu = (event) => {
7070
</div>
7171
</template>
7272
</Drawer>
73+
<ScrollTop
74+
:buttonProps="{ class: 'fixed! right-4! bottom-4! md:right-8! md:bottom-8! z-[1000]!', rounded: true, raised: true }"
75+
/>
7376
</Teleport>
7477

7578
<!-- Mobile Header -->

src/theme/global-pt.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Global pass through styling for components
3+
* https://primevue.org/passthrough/#global
4+
*/
5+
export default {
6+
dialog: {
7+
root: {
8+
class: 'm-4 sm:m-0'
9+
},
10+
mask: {
11+
class: 'backdrop-blur-xs'
12+
},
13+
},
14+
toast: {
15+
root: {
16+
// Full width/centered on mobile, bottom right desktop
17+
class: 'fixed! left-4! right-4! bottom-4! w-auto! md:right-8! md:bottom-8! sm:w-[25rem]! sm:not-fixed! sm:left-auto! sm:ml-auto!'
18+
},
19+
message: {
20+
class: 'shadow-lg mb-0 mt-4'
21+
},
22+
},
23+
};

src/views/auth/ForgotPassword.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const submit = () => {
3030
};
3131
3232
const loading = computed(() => {
33-
return submittingRequest.value || authStore.fetchingCsrfToken;
33+
return submittingRequest.value || authStore.fetchingCsrfToken || authStore.fetchingUser;
3434
});
3535
3636
onMounted(() => {

src/views/auth/Login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const submit = () => {
4343
};
4444
4545
const loading = computed(() => {
46-
return loggingIn.value || authStore.fetchingCsrfToken;
46+
return loggingIn.value || authStore.fetchingCsrfToken || authStore.fetchingUser;
4747
});
4848
4949
onMounted(() => {

src/views/auth/Register.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const submit = () => {
3333
};
3434
3535
const loading = computed(() => {
36-
return registering.value || authStore.fetchingCsrfToken;
36+
return registering.value || authStore.fetchingCsrfToken || authStore.fetchingUser;
3737
});
3838
3939
onMounted(() => {

src/views/auth/ResetPassword.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const submit = () => {
4545
};
4646
4747
const loading = computed(() => {
48-
return resetting.value || authStore.fetchingCsrfToken;
48+
return resetting.value || authStore.fetchingCsrfToken || authStore.fetchingUser;
4949
});
5050
5151
onMounted(() => {

0 commit comments

Comments
 (0)