Skip to content

Commit 59d0b6c

Browse files
committed
Add UiKit Notification
1 parent 8fd3899 commit 59d0b6c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/views/PageLogin.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { watch } from 'vue'
2+
import { watch, ref } from 'vue'
33
import { useRouter } from 'vue-router'
4-
import { ref } from 'vue'
4+
import UIkit from 'uikit'
55
import type { AlertInterface, LoginForm } from '@userfrosting/sprinkle-account/types'
66
import { useAuthStore } from '@userfrosting/sprinkle-account/stores'
77
@@ -37,6 +37,14 @@ function sendLogin() {
3737
loading.value = true
3838
error.value = null
3939
auth.login(form)
40+
.then((user) => {
41+
UIkit.notification({
42+
message: 'Welcome back ' + user?.full_name + '!',
43+
status: 'success',
44+
pos: 'bottom-right',
45+
timeout: 4000
46+
})
47+
})
4048
.catch((err) => {
4149
error.value = err
4250
})

0 commit comments

Comments
 (0)