Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a896f15c44 | ||
|
|
f78eead5fd | ||
|
|
6fe8f03f16 | ||
|
|
8e7b35385b |
@@ -0,0 +1,61 @@
|
||||
interface Res {
|
||||
topic_list: {
|
||||
can_create_topic: boolean
|
||||
more_topics_url: string
|
||||
per_page: number
|
||||
top_tags: string[]
|
||||
topics: {
|
||||
id: number
|
||||
title: string
|
||||
fancy_title: string
|
||||
posts_count: number
|
||||
reply_count: number
|
||||
highest_post_number: number
|
||||
image_url: null | string
|
||||
created_at: Date
|
||||
last_posted_at: Date
|
||||
bumped: boolean
|
||||
bumped_at: Date
|
||||
unseen: boolean
|
||||
pinned: boolean
|
||||
excerpt?: string
|
||||
visible: boolean
|
||||
closed: boolean
|
||||
archived: boolean
|
||||
like_count: number
|
||||
has_summary: boolean
|
||||
last_poster_username: string
|
||||
category_id: number
|
||||
pinned_globally: boolean
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
const hot = defineSource(async () => {
|
||||
const res = await myFetch<Res>("https://n8n.chgr.cc/webhook/api?name=idcflare")
|
||||
return res.topic_list.topics
|
||||
.filter(k => k.visible && !k.archived && !k.pinned)
|
||||
.map(k => ({
|
||||
id: k.id,
|
||||
title: k.title,
|
||||
url: `https://linux.do/t/topic/${k.id}`,
|
||||
}))
|
||||
})
|
||||
|
||||
const latest = defineSource(async () => {
|
||||
const res = await myFetch<Res>("https://linux.do/latest.json?order=created")
|
||||
return res.topic_list.topics
|
||||
.filter(k => k.visible && !k.archived && !k.pinned)
|
||||
.map(k => ({
|
||||
id: k.id,
|
||||
title: k.title,
|
||||
pubDate: new Date(k.created_at).valueOf(),
|
||||
url: `https://linux.do/t/topic/${k.id}`,
|
||||
}))
|
||||
})
|
||||
|
||||
export default defineSource({
|
||||
"linuxdo": latest,
|
||||
"linuxdo-latest": latest,
|
||||
"linuxdo-hot": hot,
|
||||
})
|
||||
@@ -38,6 +38,8 @@
|
||||
"baidu": "baiduresou",
|
||||
"linuxdo-latest": "LINUX DO-zuixin",
|
||||
"linuxdo-hot": "LINUX DO-jinrizuire",
|
||||
"idcflare-latest": "IDC Flare-zuixin",
|
||||
"idcflare-hot": "IDC Flare-jinrizuire",
|
||||
"nowcoder": "niuke",
|
||||
"sspai": "shaoshupai",
|
||||
"juejin": "xitujuejin",
|
||||
|
||||
@@ -348,6 +348,24 @@ export const originSources = {
|
||||
home: "https://linux.do/hot",
|
||||
},
|
||||
},
|
||||
},
|
||||
"idcflare": {
|
||||
name: "IDC Flare",
|
||||
column: "tech",
|
||||
color: "slate",
|
||||
home: "https://idcflare.com/",
|
||||
sub: {
|
||||
latest: {
|
||||
title: "最新",
|
||||
home: "https://idcflare.com/latest",
|
||||
},
|
||||
hot: {
|
||||
title: "今日最热",
|
||||
type: "hottest",
|
||||
interval: Time.Common,
|
||||
home: "https://idcflare.com/hot",
|
||||
},
|
||||
},
|
||||
},
|
||||
"ghxi": {
|
||||
name: "果核剥壳",
|
||||
|
||||
@@ -422,6 +422,15 @@
|
||||
"color": "gray",
|
||||
"interval": 1800000,
|
||||
"title": "今日最热"
|
||||
},
|
||||
"idcflare-hot": {
|
||||
"name": "IDC Flare",
|
||||
"type": "hottest",
|
||||
"column": "tech",
|
||||
"home": "https://idcflare.com",
|
||||
"color": "gray",
|
||||
"interval": 1800000,
|
||||
"title": "今日最热"
|
||||
},
|
||||
"nowcoder": {
|
||||
"name": "牛客",
|
||||
|
||||
Reference in New Issue
Block a user