2
0
This commit is contained in:
2026-04-03 12:31:36 +09:00
parent 83e65771b6
commit a6dcc157d2
9 changed files with 17 additions and 15 deletions

View File

@@ -35,6 +35,5 @@
"3mhm7lcyvpm2z",
"3mhm7litch332",
"3mhm7lrzmep33",
"3mhme7m5cxj34",
"list"
"3mhme7m5cxj34"
]

View File

@@ -35,6 +35,5 @@
"3mhm7lcyvpm2z",
"3mhm7litch332",
"3mhm7lrzmep33",
"3mhme7m5cxj34",
"list"
"3mhme7m5cxj34"
]

View File

@@ -150,6 +150,5 @@
"3mhmdm05bt23",
"3mhmdm06bt23",
"3mhmdm07bt23",
"3mhmdm08bt23",
"list"
"3mhmdm08bt23"
]

View File

@@ -150,6 +150,5 @@
"3mhmdm05us22",
"3mhmdm06us22",
"3mhmdm07us22",
"3mhmdm08us22",
"list"
"3mhmdm08us22"
]

View File

@@ -1,5 +1,4 @@
[
"3mchqlshygs2s",
"3mf653plsl722",
"list"
"3mf653plsl722"
]

BIN
public/font/aifont.woff2 Normal file

Binary file not shown.

View File

@@ -65,7 +65,7 @@ pub fn run(content_dir: &Path) -> Result<()> {
if !filename.ends_with(".json") {
continue;
}
if filename == "index.json" || filename == "describe.json" || filename == "self.json" {
if filename == "index.json" || filename == "list.json" || filename == "describe.json" || filename == "self.json" {
continue;
}

View File

@@ -176,7 +176,7 @@ async function getLocalPosts(did: string, collection: string): Promise<Post[]> {
try {
const listRes = await fetch(`/at/${did}/${collection}/list.json`)
if (listRes.ok && isJsonResponse(listRes)) {
const posts: Post[] = await listRes.json()
const posts: Post[] = (await listRes.json()).filter((p: Post) => p && p.value && p.value.publishedAt)
return posts.sort((a, b) =>
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
)
@@ -195,7 +195,7 @@ async function getLocalPosts(did: string, collection: string): Promise<Post[]> {
return null
})
)
const posts = results.filter((p): p is Post => p !== null)
const posts = results.filter((p): p is Post => p !== null && !!p.value && !!p.value.publishedAt)
return posts.sort((a, b) =>
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
)
@@ -221,7 +221,7 @@ export async function getPosts(did: string, collection: string, localOnly = fals
const res = await fetchWithTimeout(url, {}, 8000)
if (res.ok) {
const data: ListRecordsResponse<Post> = await res.json()
return data.records.sort((a, b) =>
return data.records.filter(r => r && r.value && r.value.publishedAt).sort((a, b) =>
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
)
}
@@ -451,6 +451,7 @@ export async function getChatMessages(
])
const messages = [...userMessages, ...botMessages]
.filter(m => m && m.value && m.value.publishedAt)
// Sort by publishedAt
return messages.sort((a, b) =>

View File

@@ -1,3 +1,9 @@
@font-face {
font-family: 'aifont';
src: url('/font/aifont.woff2') format('woff2');
font-display: swap;
}
:root {
--btn-color: #0066cc;
}
@@ -9,7 +15,7 @@
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
font-family: 'aifont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #1a1a1a;
background: #fff;