erp-blocks 1.1.6 → 1.2.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.
package/README.md CHANGED
@@ -50,6 +50,7 @@ Use the provided dashboard layout in your pages:
50
50
 
51
51
  <script setup>
52
52
  definePageMeta({
53
+ middleware: ["auth"],
53
54
  layout: 'dashboard'
54
55
  })
55
56
  </script>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
3
  "configKey": "erp",
4
- "version": "1.1.6",
4
+ "version": "1.2.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -14,8 +14,14 @@ defineSlots();
14
14
  v-bind="tableProps"
15
15
  class="flex-1 border border-default rounded-lg grow"
16
16
  >
17
- <template #default="slotProps">
18
- <slot v-bind="slotProps" />
17
+ <template
18
+ v-for="(_, name) in $slots"
19
+ #[name]="slotProps"
20
+ >
21
+ <slot
22
+ :name="name"
23
+ v-bind="slotProps"
24
+ />
19
25
  </template>
20
26
  </UTable>
21
27
  <div
@@ -15,13 +15,24 @@
15
15
  </div>
16
16
  <div class="space-x-6 flex items-center">
17
17
  <ColorModeButton />
18
+ <UButton
19
+ icon="i-lucide-log-out"
20
+ size="md"
21
+ color="neutral"
22
+ variant="ghost"
23
+ @click="logout"
24
+ />
18
25
  </div>
19
26
  </nav>
20
27
  </template>
21
28
 
22
29
  <script setup>
23
- import { useRoute } from "#app";
30
+ import { useRoute, useAppConfig } from "#app";
24
31
  import ColorModeButton from "./ColorModeButton.vue";
25
32
  import SidebarTrigger from "./SidebarTrigger.vue";
26
33
  const route = useRoute();
34
+ const appConfig = useAppConfig();
35
+ const logout = () => {
36
+ appConfig.auth?.logout();
37
+ };
27
38
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
- "version": "1.1.6",
3
+ "version": "1.2.1",
4
4
  "description": "Ready-to-use UI layouts and components designed as ERP system elements ",
5
5
  "repository": {
6
6
  "type": "git",