diff --git a/frontend_nuxt/components/HeaderComponent.vue b/frontend_nuxt/components/HeaderComponent.vue index a97cb948e..d1770fd1d 100644 --- a/frontend_nuxt/components/HeaderComponent.vue +++ b/frontend_nuxt/components/HeaderComponent.vue @@ -146,14 +146,6 @@ onMounted(async () => { await updateUnread() }, ) - - watch( - () => router.currentRoute.value.fullPath, - () => { - if (userMenu.value) userMenu.value.close() - showSearch.value = false - }, - ) }) diff --git a/frontend_nuxt/nuxt.config.ts b/frontend_nuxt/nuxt.config.ts index 1772ff678..271ce21a1 100644 --- a/frontend_nuxt/nuxt.config.ts +++ b/frontend_nuxt/nuxt.config.ts @@ -1,25 +1,25 @@ -import { defineNuxtConfig } from "nuxt/config"; +import { defineNuxtConfig } from 'nuxt/config' export default defineNuxtConfig({ - ssr: true, - runtimeConfig: { - public: { - apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL || "", - websiteBaseUrl: process.env.NUXT_PUBLIC_WEBSITE_BASE_URL || "", - googleClientId: process.env.NUXT_PUBLIC_GOOGLE_CLIENT_ID || "", - githubClientId: process.env.NUXT_PUBLIC_GITHUB_CLIENT_ID || "", - discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || "", - twitterClientId: process.env.NUXT_PUBLIC_TWITTER_CLIENT_ID || "", - }, - }, - // Ensure Vditor styles load before our overrides in global.css - css: ["vditor/dist/index.css", "~/assets/global.css", "~/assets/fonts.css"], - app: { - head: { - script: [ - { - tagPriority: "high", - innerHTML: ` + ssr: true, + runtimeConfig: { + public: { + apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL || '', + websiteBaseUrl: process.env.NUXT_PUBLIC_WEBSITE_BASE_URL || '', + googleClientId: process.env.NUXT_PUBLIC_GOOGLE_CLIENT_ID || '', + githubClientId: process.env.NUXT_PUBLIC_GITHUB_CLIENT_ID || '', + discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || '', + twitterClientId: process.env.NUXT_PUBLIC_TWITTER_CLIENT_ID || '', + }, + }, + // Ensure Vditor styles load before our overrides in global.css + css: ['vditor/dist/index.css', '~/assets/fonts.css', '~/assets/global.css'], + app: { + head: { + script: [ + { + tagPriority: 'high', + innerHTML: ` (function () { try { const mode = localStorage.getItem('theme-mode'); @@ -29,35 +29,35 @@ export default defineNuxtConfig({ } catch (e) {} })(); `, - }, - ], - link: [ - { - rel: "icon", - type: "image/x-icon", - href: "/favicon.ico", - }, - { - rel: "apple-touch-icon", - href: "/apple-touch-icon.png", - }, - { - rel: "manifest", - href: "/manifest.webmanifest", - }, - { - rel: "stylesheet", - href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css", - referrerpolicy: "no-referrer", - }, - ], - }, - baseURL: "/", - buildAssetsDir: "/_nuxt/", - }, - vue: { - compilerOptions: { - isCustomElement: (tag) => ["l-hatch", "l-hatch-spinner"].includes(tag), - }, - }, -}); + }, + ], + link: [ + { + rel: 'icon', + type: 'image/x-icon', + href: '/favicon.ico', + }, + { + rel: 'apple-touch-icon', + href: '/apple-touch-icon.png', + }, + { + rel: 'manifest', + href: '/manifest.webmanifest', + }, + { + rel: 'stylesheet', + href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css', + referrerpolicy: 'no-referrer', + }, + ], + }, + baseURL: '/', + buildAssetsDir: '/_nuxt/', + }, + vue: { + compilerOptions: { + isCustomElement: (tag) => ['l-hatch', 'l-hatch-spinner'].includes(tag), + }, + }, +})