Remove legacy component & Update validating system using localstorage.

This commit is contained in:
yuanhau 2025-05-30 15:49:59 +08:00
parent b716a0ed5c
commit c5c614c75d
7 changed files with 141 additions and 86 deletions

View file

@ -1,10 +1,55 @@
<script setup lang="ts">
const apis = [
{
apiroute: "/shortforward",
name: "A Simple url forwarder.",
content:
"This is maly used for yhw.tw/news, which is a super simple redirection tool for easy redirecting.",
caching: false,
},
{
apiroute: "/api/tabs",
name: "Get LINE Today Tabs",
content: "Using LINE Today as a source for getting tabs & caching results.",
caching: true,
},
{
apiroute: "/api/home/lt",
name: "Get the news feed of LINE Today",
content:
"This endpoint requires ?query=, and you can go the the /api/tabs to find the query.",
caching: true,
},
{
apiroute: "/api/news/get/lt/[slug]",
name: "Get the news article using node-fetch & cheerio",
content:
"This endpoint requires the slug to be filled in, in order to get it to work.",
caching: true,
},
{
apiroute: "/api/ai/chat/[slug]",
name: "",
content: "",
caching: false,
},
{
apiroute: "/api/ai/summarize/[slug]",
name: "",
content: "",
caching: false,
},
];
</script>
<template>
<div
class="justify-center align-center text-center absolute inset-0 flex flex-col"
>
<h1 class="text-4xl text-bold">APIs</h1>
<div class="items flex flex-row flex-wrap">
<div class="item group"></div>
<div class="item group" v-for="item in apis">
{{ item.name }}
</div>
</div>
</div>
</template>

View file

@ -472,12 +472,6 @@ const openNewsSourcePage = async (slug: string, titleName: string) => {
passedValues.value = null;
}, 1000);
};
// Not used?
const getStaticArticleId = () => {
storeStaticArticleId.value += 1;
return storeStaticArticleId.value;
};
</script>
<template>
<div v-if="changeLangAnimation">
@ -597,7 +591,6 @@ const getStaticArticleId = () => {
@loadValue=""
@openArticles="openArticles"
@openNewsSourcePage="openNewsSourcePage"
:staticid="getStaticArticleId"
:values="passedValues"
/>
</Suspense>