@shwfed/nuxt 0.1.57 → 0.1.59
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.json
CHANGED
|
@@ -679,7 +679,7 @@ useHead({
|
|
|
679
679
|
</Sidebar>
|
|
680
680
|
</SidebarProvider>
|
|
681
681
|
<main class="flex-1 flex flex-col bg-zinc-100 overflow-hidden">
|
|
682
|
-
<nav class="bg-white p-1 border-b border-zinc-100 h-10 flex items-center justify-start gap-1 overflow-x-hidden
|
|
682
|
+
<nav class="bg-white p-1 border-b border-zinc-100 h-10 flex items-center justify-start gap-1 overflow-x-hidden min-w-0">
|
|
683
683
|
<div
|
|
684
684
|
v-for="tab in tabs"
|
|
685
685
|
:key="tab"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { defineNuxtPlugin, navigateTo, useNuxtApp, useRuntimeConfig } from "#app";
|
|
2
|
+
import { useNavigatorLanguage } from "@vueuse/core";
|
|
2
3
|
import z from "zod";
|
|
3
4
|
export default defineNuxtPlugin({
|
|
4
5
|
name: "shwfed-nuxt:api",
|
|
5
6
|
dependsOn: ["shwfed-nuxt:cel"],
|
|
6
7
|
setup: (nuxt) => {
|
|
8
|
+
const locale = useNavigatorLanguage();
|
|
7
9
|
const config = useRuntimeConfig().public.shwfed;
|
|
8
10
|
const { $dsl } = useNuxtApp();
|
|
9
11
|
const api = $fetch.create({
|
|
@@ -26,6 +28,9 @@ export default defineNuxtPlugin({
|
|
|
26
28
|
} catch {
|
|
27
29
|
}
|
|
28
30
|
}
|
|
31
|
+
if (locale.isSupported && locale.language.value) {
|
|
32
|
+
options.headers.set("Accept-Language", locale.language.value);
|
|
33
|
+
}
|
|
29
34
|
},
|
|
30
35
|
onResponse: ({ response }) => {
|
|
31
36
|
const authorizeUri = config.apis.authorizeUri;
|