@motor-cms/ui-admin 1.16.1 → 1.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,17 @@ function onAnnouncementCreated() {
47
47
 
48
48
  const toast = useToast()
49
49
 
50
+ onMounted(() => {
51
+ if (sessionStorage.getItem('motor:login-success')) {
52
+ sessionStorage.removeItem('motor:login-success')
53
+ toast.add({
54
+ title: t('motor-core.login.login_success'),
55
+ color: 'success',
56
+ icon: 'i-lucide-check-circle'
57
+ })
58
+ }
59
+ })
60
+
50
61
  async function onDismiss(id: number) {
51
62
  await dismissAnnouncement(id)
52
63
  toast.add({ title: t('motor-admin.dashboard.announcement_dismissed'), icon: 'i-lucide-check', color: 'success' })
@@ -4,7 +4,6 @@ import type { FormSubmitEvent } from '@nuxt/ui'
4
4
 
5
5
  const { t } = useI18n()
6
6
  const { login } = useSanctumAuth()
7
- const toast = useToast()
8
7
 
9
8
  definePageMeta({
10
9
  layout: 'auth',
@@ -54,11 +53,7 @@ async function onSubmit(event: FormSubmitEvent<Schema>) {
54
53
  email: event.data.email,
55
54
  password: event.data.password
56
55
  })
57
- toast.add({
58
- title: t('motor-core.login.login_success'),
59
- color: 'success',
60
- icon: 'i-lucide-check-circle'
61
- })
56
+ sessionStorage.setItem('motor:login-success', '1')
62
57
  } catch {
63
58
  error.value = t('motor-core.login.login_failed')
64
59
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motor-cms/ui-admin",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -20,7 +20,7 @@
20
20
  "zod": "^4.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@motor-cms/ui-core": ">=1.16.1",
23
+ "@motor-cms/ui-core": ">=1.16.2",
24
24
  "nuxt": "^4.0.0",
25
25
  "vue": "^3.5.0"
26
26
  }