fix profile card.old icon

This commit is contained in:
2026-01-21 13:02:34 +09:00
parent 48e5d3bc82
commit 6b3be20a5f
2 changed files with 9 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
import './styles/main.css'
import './styles/card.css'
import './styles/card-migrate.css'
import { getConfig, resolveHandle, getProfile, getPosts, getPost, describeRepo, listRecords, getRecord, getPds, getNetworks, getChatMessages, getCards, getRse, getOldApiUserByDid, hasCardOldRecord } from './lib/api'
import { getConfig, resolveHandle, getProfile, getPosts, getPost, describeRepo, listRecords, getRecord, getPds, getNetworks, getChatMessages, getCards, getRse } from './lib/api'
import { parseRoute, onRouteChange, navigate, type Route } from './lib/router'
import { login, logout, handleCallback, restoreSession, isLoggedIn, getLoggedInHandle, getLoggedInDid, deleteRecord, updatePost } from './lib/auth'
import { validateRecord } from './lib/lexicon'
@@ -176,16 +176,9 @@ async function render(route: Route): Promise<void> {
const loggedInDid = getLoggedInDid()
const isOwner = isLoggedIn() && loggedInDid === did
// Check migration status (api.syui.ai -> ATProto)
const [oldApiUser, hasMigrated] = await Promise.all([
getOldApiUserByDid(did),
hasCardOldRecord(did)
])
const migration = oldApiUser ? { hasOldApi: true, hasMigrated } : undefined
// Profile section
if (profile) {
html += await renderProfile(did, profile, handle, webUrl, localOnly, collections, migration)
html += await renderProfile(did, profile, handle, webUrl, localOnly, collections)
}
// Content section based on route type