@shwfed/nuxt 0.1.52 → 0.1.53
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 +6 -2
- 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 },
|
|
@@ -286,6 +287,9 @@ const tabs = useSessionStorage("navigation-tabs", /* @__PURE__ */ new Set(), {
|
|
|
286
287
|
const activeTab = useSessionStorage("navigation-active-tab", void 0, {
|
|
287
288
|
writeDefaults: false
|
|
288
289
|
});
|
|
290
|
+
useHead({
|
|
291
|
+
title: () => activeTab.value ? findNavigationByKey(navigation.value, activeTab.value)?.title ?? config.title : config.title
|
|
292
|
+
});
|
|
289
293
|
</script>
|
|
290
294
|
|
|
291
295
|
<template>
|
|
@@ -665,7 +669,7 @@ const activeTab = useSessionStorage("navigation-active-tab", void 0, {
|
|
|
665
669
|
</button>
|
|
666
670
|
</div>
|
|
667
671
|
</nav>
|
|
668
|
-
<main class="m-2 flex-1 p-1 bg-white border border-zinc-100 rounded">
|
|
672
|
+
<main class="m-2 flex-1 p-1 bg-white border border-zinc-100 rounded overflow-hidden">
|
|
669
673
|
<slot />
|
|
670
674
|
</main>
|
|
671
675
|
</main>
|