Add owner inbox UI with address release
Web: "My listings" (listings, requests of a listing, conversation) in three panes on wide screens and one at a time on phones, and a sheet or dialog to release the exact address. Sign-in uses a link printed by `node run` (token in the URL fragment, kept in sessionStorage only). API: GET /api/v1/mine (own listings with request counts and whether an address is saved); inbox rows gain last_dir, needs_reply, preview, effort and grant_until, and can be filtered by listing. Docs: PROTOCOL.md and README describe the owner UI and login. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,15 @@ export function date(unix: number): string {
|
||||
return new Date(unix * 1000).toLocaleDateString(lang, { dateStyle: "medium" });
|
||||
}
|
||||
|
||||
/** A time of day for today's events, otherwise the day. */
|
||||
export function when(unix: number): string {
|
||||
const d = new Date(unix * 1000);
|
||||
if (d.toDateString() === new Date(Date.now()).toDateString()) {
|
||||
return d.toLocaleTimeString(lang, { hour: "2-digit", minute: "2-digit" });
|
||||
}
|
||||
return d.toLocaleDateString(lang, { day: "numeric", month: "short" });
|
||||
}
|
||||
|
||||
export function price(l: Listing): string {
|
||||
if (!l.price) return "";
|
||||
const base = money(l.price.amount_cents);
|
||||
|
||||
Reference in New Issue
Block a user