/** Where an app stands, from its status in apps.json: its test links while in testing, its store links once released. */ import type { App } from "./registry.ts"; import { STATUS } from "./copy.ts"; import { esc } from "./html.ts"; const a_ = (href: string, text: string) => `${text}`; /** The status line: "In testing · TestFlight · Google Play (testing)", or "On the App Store · On Google Play". */ export function status(a: App): string { const parts = a.status === "released" ? [a_(a.links.appStore, STATUS.appStore), a_(a.links.googlePlay, STATUS.googlePlay)] : [`${STATUS.testing}`, a_(a.links.testFlight, STATUS.testFlight), a_(a.links.playTest, STATUS.playTest)]; return `
${parts.join(" · ")}
`; } /** Not in the stores yet. */ export const waiting = (a: App): boolean => a.status !== "released";