From 937f8ad5317548130931a41989eb9e857c81876a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Thu, 29 May 2025 15:32:10 +0800 Subject: [PATCH] Add I18N into the confirm quit option & you can now view articles from clicking on the "View article" button (but for now you can not view dynamic articles & also chnaged the path from /_assets/ to /n3a_assets/ & Made the title as the navbar thing --- components/app/windows/news.vue | 52 +++++++++++++++---------- components/app/windows/newsView.vue | 2 +- i18n/locales/en.json | 3 +- i18n/locales/zh-tw.json | 3 +- nuxt.config.ts | 14 ++++--- pages/desktop.vue | 59 ++++++++++++++++++++--------- 6 files changed, 87 insertions(+), 46 deletions(-) diff --git a/components/app/windows/news.vue b/components/app/windows/news.vue index f7c304e..b4d1260 100644 --- a/components/app/windows/news.vue +++ b/components/app/windows/news.vue @@ -18,9 +18,17 @@ async function CheckKidUnfriendlyContent(title: string, words: any[]) { } } -const emit = defineEmits(["close", "min", "restore"]); +const emit = defineEmits([ + "openArticles", + "openNewsSourcePage", + "windowopener", +]); const staticid = computed(() => props.staticid); +const openNewWindow = (itemId: string) => { + emit("windowopener", "aboutNewsOrg"); +}; + const contentArray = ref([]); const errorr = ref(false); const switchTabs = ref(false); @@ -163,11 +171,13 @@ const useArgFindRel = (title) => { return similarities.sort((a, b) => b.similarity - a.similarity).slice(0, 3); }; -const openNews = (url: string) => { - console.log(url); +const openNews = (url: string, titleName: string) => { + emit("openArticles", url, titleName); }; -const openPublisher = (text: string) => {}; +const openPublisher = (text: string) => { + emit("openNewsSourcePage", text); +};