From 3019c06ec190b9209ed9c9257995491e5a079607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Sun, 25 May 2025 09:49:35 +0800 Subject: [PATCH] Add Time into the news system & Add a new API keypoint into the home page. --- components/app/windows/news.vue | 20 ++++++++++++++++---- i18n/locales/en.json | 6 ++++-- i18n/locales/zh-tw.json | 6 ++++-- pages/desktop.vue | 4 ++-- pages/home.vue | 7 ++++++- server/api/cached/tabs.ts | 26 +++++++++++++------------- 6 files changed, 45 insertions(+), 24 deletions(-) diff --git a/components/app/windows/news.vue b/components/app/windows/news.vue index 51f0dc0..ff5b2c2 100644 --- a/components/app/windows/news.vue +++ b/components/app/windows/news.vue @@ -1,17 +1,15 @@ @@ -78,6 +77,19 @@ onMounted(async () => { diff --git a/i18n/locales/en.json b/i18n/locales/en.json index af5c016..761caf2 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -39,13 +39,15 @@ "find": "Find", "interface": "Interface", "documentation": "Documentation", - "opensource": "Open Source" + "opensource": "Open Source", + "apis": "APIs" }, "description": { "find": "You can easily find the same topic from different news sources.", "interface": "Use a desktop like interface, the one that you already got used to.", "documentation": "We provide a documentation for you to learn how to use the app.", - "opensource": "This platform is open source! minus the database part, but I'm going to try!" + "opensource": "This platform is open source! minus the database part, but I'm going to try!", + "apis": "We develop apis that does not exist before, like the line today one, but it just needs some revese engineering to find the apis behind it." } } }, diff --git a/i18n/locales/zh-tw.json b/i18n/locales/zh-tw.json index 4c9121e..4ec9db5 100644 --- a/i18n/locales/zh-tw.json +++ b/i18n/locales/zh-tw.json @@ -39,13 +39,15 @@ "find": "尋找", "interface": "使用者介面", "documentation": "教學", - "opensource": "開源" + "opensource": "開源", + "apis": "APIs" }, "description": { "find": "你可以輕鬆地從不同的新聞來源找到相同的主題。", "interface": "這個網站使用類似 Xfce / MacOS / DSM 的介面,讓你可以簡單使用這個網站。", "documentation": "我做了一組教學,讓你可以學會如何使用這個網站 UI。", - "opensource": "這個平台的所有程式碼都放在Github上,沒有開源的資料庫,我會想辦法把它用其他方式開源!" + "opensource": "這個平台的所有程式碼都放在Github上,沒有開源的資料庫,我會想辦法把它用其他方式開源!", + "apis": "我們使用LINE Today 的資訊來做出一個 API。" } } }, diff --git a/pages/desktop.vue b/pages/desktop.vue index 306d2cd..50659a7 100644 --- a/pages/desktop.vue +++ b/pages/desktop.vue @@ -133,6 +133,8 @@ const associAppWindow = [ id: "6", title: t("app.news"), component: NewsWindow, + width: "800px", + height: "600px", }, { name: "starred", @@ -166,8 +168,6 @@ const associAppWindow = [ id: "11", title: t("app.newsview"), component: NewsViewWindow, - width: "800px", - height: "600px", }, ]; diff --git a/pages/home.vue b/pages/home.vue index bf99a68..ca27c1b 100644 --- a/pages/home.vue +++ b/pages/home.vue @@ -12,7 +12,7 @@ import { ViewfinderCircleIcon, DocumentDuplicateIcon, } from "@heroicons/vue/24/outline"; -import { GithubIcon } from "lucide-vue-next"; +import { GithubIcon, KeyIcon } from "lucide-vue-next"; import { gsap } from "gsap"; import { TextPlugin } from "gsap/TextPlugin"; gsap.registerPlugin(TextPlugin); @@ -45,6 +45,11 @@ const cards = [ title: t("home.cards.title.opensource"), description: t("home.cards.description.opensource"), }, + { + icon: KeyIcon, + title: t("home.cards.title.apis"), + description: t("home.cards.description.apis"), + }, ]; const accordionItems = [ diff --git a/server/api/cached/tabs.ts b/server/api/cached/tabs.ts index 1582111..3fd32d1 100644 --- a/server/api/cached/tabs.ts +++ b/server/api/cached/tabs.ts @@ -1,16 +1,16 @@ export default defineEventHandler(async (event) => { return { data: [ - { - text: "國內", - url: "domestic", - default: true, - }, - { - text: "國外", - url: "global", - default: false, - }, -] - } -}) \ No newline at end of file + { + text: "國內", + url: "domestic", + default: true, + }, + { + text: "國外", + url: "global", + default: false, + }, + ], + }; +});