add translate

This commit is contained in:
2026-01-18 15:47:24 +09:00
parent 6ef8780ac6
commit 4da313aa68
14 changed files with 970 additions and 84 deletions

View File

@@ -1,11 +1,11 @@
import { isLoggedIn, getLoggedInDid } from '../lib/auth'
import { isLoggedIn, getLoggedInHandle } from '../lib/auth'
export function renderHeader(currentHandle: string): string {
const loggedIn = isLoggedIn()
const did = getLoggedInDid()
const handle = getLoggedInHandle()
const loginBtn = loggedIn
? `<button type="button" class="header-btn user-btn" id="logout-btn" title="Logout (${did?.slice(0, 20)}...)">✓</button>`
? `<button type="button" class="header-btn user-btn" id="logout-btn" title="Logout">${handle || 'logout'}</button>`
: `<button type="button" class="header-btn login-btn" id="login-btn" title="Login">↗</button>`
return `