diff --git a/components/app/windows/tty.vue b/components/app/windows/tty.vue index 4714752..f6e0182 100644 --- a/components/app/windows/tty.vue +++ b/components/app/windows/tty.vue @@ -103,6 +103,18 @@ const commands = [ command: "help", run: displayHelp, }, + { + command: "關於", + run: printAbout, + }, + { + command: "清掉", + run: cleanTTY, + }, + { + command: "幫助", + run: displayHelp, + }, ]; diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 7309b1b..109bcbc 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -1,5 +1,6 @@ { "localeflag": "🇺🇸", + "nextlang": "zh_tw", "core": { "sitename": "BlindSpec" }, @@ -51,6 +52,7 @@ "Welcome": "Welcome", "loading": "Loading...", "app": { + "changelangmessage": "Switching the language", "launchtext": "Cooking up the desktop...", "hotnews": "Hot News", "news": "News", diff --git a/i18n/locales/zh-tw.json b/i18n/locales/zh-tw.json index ce05095..80db6e5 100644 --- a/i18n/locales/zh-tw.json +++ b/i18n/locales/zh-tw.json @@ -1,5 +1,6 @@ { "localeflag": "🇹🇼", + "nextlang": "en", "core": { "sitename": "新聞盲點平台" }, @@ -51,6 +52,7 @@ "Welcome": "歡迎", "loading": "載入中...", "app": { + "changelangmessage": "正在切換語言中...", "launchtext": "系統開機中...", "hotnews": "熱門新聞", "news": "新聞", diff --git a/nuxt.config.ts b/nuxt.config.ts index 29b7a69..3ad7eb5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -48,6 +48,7 @@ export default defineNuxtConfig({ }, app: { + buildAssetsDir: "/_assets/", head: { title: "", htmlAttrs: { @@ -55,7 +56,6 @@ export default defineNuxtConfig({ }, link: [ { rel: "dns-prefetch", href: "https://utfs.io" }, - { rel: "dns-prefetch", href: "https://s3.yhw.tw" }, { rel: "icon", type: "image/svg", href: "/favicon.svg" }, ], meta: [ diff --git a/pages/app/desktop/index.vue b/pages/app/desktop/index.vue index b460aeb..49cd870 100644 --- a/pages/app/desktop/index.vue +++ b/pages/app/desktop/index.vue @@ -72,6 +72,7 @@ const titleAppName = ref("Desktop"); const openingAppViaAnApp = ref(false); const passedValues = ref(); const globalWindowVal = ref(new Map()); +const changeLangAnimation = ref(false); // Key Data const menuItems = [ @@ -384,12 +385,22 @@ watchEffect(() => { }); }); // Booting animation +onMounted(() => { + const changeLang = route.query.changelang; + if (changeLang) { + bootingAnimation.value = false; + changeLangAnimation.value = true; + } + setTimeout(() => { + changeLangAnimation.value = false; + }, 4000); +}); + onMounted(() => { // booting animation bypass const bootingHeaderParams = route.query.bypass; if (bootingHeaderParams) { bootingAnimation.value = false; - return; } if (bootingAnimation.value) { gsap.to(popMessage.value, { @@ -397,10 +408,10 @@ onMounted(() => { text: t("app.booting"), ease: "none", }); - setTimeout(() => { - bootingAnimation.value = false; - }, 2000); } + setTimeout(() => { + bootingAnimation.value = false; + }, 2000); }); watchEffect((cleanupFn) => { @@ -415,6 +426,13 @@ watchEffect((cleanupFn) => { });