@shwfed/nuxt 0.1.52 → 0.1.54
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/dist/module.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/app.vue +8 -3
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useHead, useNuxtApp, useRouter } from "#app";
|
|
2
|
+
import { useHead, useNuxtApp, useRouter, useRuntimeConfig } from "#app";
|
|
3
3
|
import { computed, ref } from "vue";
|
|
4
4
|
import { CommandDialog, CommandInput, CommandList, CommandGroup, CommandEmpty, CommandItem } from "./ui/command";
|
|
5
5
|
import { TooltipProvider } from "./ui/tooltip";
|
|
@@ -14,6 +14,7 @@ import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarMenu,
|
|
|
14
14
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collapsible";
|
|
15
15
|
import Logo from "./logo.vue";
|
|
16
16
|
const { $dsl } = useNuxtApp();
|
|
17
|
+
const config = useRuntimeConfig().public.shwfed;
|
|
17
18
|
const props = defineProps({
|
|
18
19
|
navigation: { type: Array, required: false },
|
|
19
20
|
commands: { type: Array, required: false },
|
|
@@ -23,7 +24,8 @@ const { t } = useI18n();
|
|
|
23
24
|
useHead({
|
|
24
25
|
bodyAttrs: {
|
|
25
26
|
style: {
|
|
26
|
-
"--primary": "#2DA8BC"
|
|
27
|
+
"--primary": "#2DA8BC",
|
|
28
|
+
"--workspace": "#FFFFFF"
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
});
|
|
@@ -286,6 +288,9 @@ const tabs = useSessionStorage("navigation-tabs", /* @__PURE__ */ new Set(), {
|
|
|
286
288
|
const activeTab = useSessionStorage("navigation-active-tab", void 0, {
|
|
287
289
|
writeDefaults: false
|
|
288
290
|
});
|
|
291
|
+
useHead({
|
|
292
|
+
title: () => activeTab.value ? findNavigationByKey(navigation.value, activeTab.value)?.title ?? config.title : config.title
|
|
293
|
+
});
|
|
289
294
|
</script>
|
|
290
295
|
|
|
291
296
|
<template>
|
|
@@ -665,7 +670,7 @@ const activeTab = useSessionStorage("navigation-active-tab", void 0, {
|
|
|
665
670
|
</button>
|
|
666
671
|
</div>
|
|
667
672
|
</nav>
|
|
668
|
-
<main class="m-2 flex-1 p-1 bg-
|
|
673
|
+
<main class="m-2 flex-1 p-1 bg-(--workspace) border border-zinc-100 rounded overflow-hidden">
|
|
669
674
|
<slot />
|
|
670
675
|
</main>
|
|
671
676
|
</main>
|