diff --git a/app.vue b/app.vue index 4ea47a4..6c0bad8 100644 --- a/app.vue +++ b/app.vue @@ -14,6 +14,16 @@ import "@unocss/reset/tailwind.css" const theme = useTheme() const auth = useUserinfo() +const { locale } = useI18n() + +watch(locale, (value) => { + useHead({ + htmlAttrs: { + lang: value, + }, + }) +}, { deep: true, immediate: true }) + onMounted(() => { theme.global.name.value = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" diff --git a/components/PostItem.vue b/components/PostItem.vue index cb3afea..f3872fb 100644 --- a/components/PostItem.vue +++ b/components/PostItem.vue @@ -16,12 +16,13 @@ -
+
@@ -52,6 +53,6 @@ diff --git a/components/activity/Carousel.vue b/components/activity/Carousel.vue index e6025c8..40371c2 100644 --- a/components/activity/Carousel.vue +++ b/components/activity/Carousel.vue @@ -2,7 +2,7 @@ - + diff --git a/components/attachment/Renderer.vue b/components/attachment/Renderer.vue index bc8348e..83c74e7 100644 --- a/components/attachment/Renderer.vue +++ b/components/attachment/Renderer.vue @@ -17,8 +17,8 @@ - +