@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 CHANGED
@@ -66,6 +66,7 @@ interface ModuleOptions {
66
66
  */
67
67
  name: string;
68
68
  }>;
69
+ title: string;
69
70
  }
70
71
  interface Env {
71
72
  git: Readonly<{
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.52",
4
+ "version": "0.1.54",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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-white border border-zinc-100 rounded">
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",