@motor-cms/ui-admin 1.8.0 → 1.8.1

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.
@@ -25,6 +25,7 @@ const {
25
25
  } = useDashboardData()
26
26
 
27
27
  const announcementModalOpen = ref(false)
28
+ const createPageModalOpen = ref(false)
28
29
 
29
30
  const currentDate = computed(() => {
30
31
  return new Date().toLocaleDateString(locale.value, {
@@ -35,6 +36,10 @@ const currentDate = computed(() => {
35
36
  })
36
37
  })
37
38
 
39
+ function onPageCreated(page: { id: number }) {
40
+ navigateTo(`/motor-builder/builder-pages/${page.id}/edit`)
41
+ }
42
+
38
43
  function onAnnouncementCreated() {
39
44
  refresh()
40
45
  toast.add({ title: t('motor-admin.dashboard.announcement_created'), icon: 'i-lucide-megaphone', color: 'success' })
@@ -50,6 +55,11 @@ async function onDismiss(id: number) {
50
55
 
51
56
  <template>
52
57
  <div class="p-6">
58
+ <div class="flex items-center gap-2 mb-3">
59
+ <UDashboardSidebarToggle class="lg:hidden shrink-0 -ml-2" />
60
+ <SidebarToggleButton />
61
+ <UBreadcrumb :items="[{ label: t('motor-core.global.dashboard'), icon: 'i-lucide-home' }]" />
62
+ </div>
53
63
  <div class="flex flex-col mb-6">
54
64
  <div>
55
65
  <h1 class="text-xl font-heading font-semibold text-highlighted">
@@ -65,7 +75,7 @@ async function onDismiss(id: number) {
65
75
  color="primary"
66
76
  size="sm"
67
77
  :label="t('motor-admin.dashboard.quick_actions.new_page')"
68
- @click="navigateTo('/motor-builder/builder-pages/create')"
78
+ @click="createPageModalOpen = true"
69
79
  />
70
80
  <UButton
71
81
  icon="i-lucide-upload"
@@ -115,5 +125,12 @@ async function onDismiss(id: number) {
115
125
  />
116
126
 
117
127
  <DashboardOnboarding />
128
+
129
+ <BuilderPageSettingsModal
130
+ v-model:open="createPageModalOpen"
131
+ :page-data="null"
132
+ :is-create-mode="true"
133
+ @created="onPageCreated"
134
+ />
118
135
  </div>
119
136
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motor-cms/ui-admin",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "@vueuse/core": "^14.0.0",
18
18
  "sortablejs": "^1.15.0",
19
19
  "zod": "^4.0.0",
20
- "@motor-cms/ui-core": "1.8.0"
20
+ "@motor-cms/ui-core": "1.8.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "nuxt": "^4.0.0",