Accounts sign-in looks like the church's site; Events sends its logo and colours
- @crosscode/ui: Shell with the church's colour wash, logo (or its initial) and name, footer; Card edged in the church's colour; Heading with an icon tile. Icons on every sign-in step. - contracts 1.9.0: churchLookSchema (logo, accent colour) in import.begin; church.branding request. Accounts fills (move) or replaces (button) the church profile's name, logo and colours. - Events 3.1.0: src/accounts/look.ts (logo as a full address), sent with a move; Settings -> Sign-in "Use this site's logo and colours". Tests: Accounts 55, contracts 218, Events 774, test:accounts 16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,26 @@ export function SignInTab({ active }: { active: boolean }) {
|
||||
|
||||
{status.accountsConnected && <AccountsMessaging onReady={setSending} />}
|
||||
|
||||
{status.accountsConnected && (
|
||||
<section className="border rounded-xl p-4 flex flex-wrap items-center gap-3">
|
||||
<div className="flex-1 min-w-[16rem]">
|
||||
<h3 className="font-medium">How the sign-in page looks</h3>
|
||||
<p className="text-sm text-gray-600">The church's sign-in page uses its name, logo and colours. Moving sign-in copies this site's when it has none; this replaces them with this site's now.</p>
|
||||
</div>
|
||||
<button type="button" className="px-3 py-2 rounded-lg border text-sm" disabled={!!busy} onClick={async () => {
|
||||
setBusy("look");
|
||||
setMsg(null);
|
||||
try {
|
||||
await apiV2("post", "/settings/sign-in/look", auth);
|
||||
setMsg({ ok: true, text: "The sign-in page now uses this site's logo and colours." });
|
||||
} catch (e) {
|
||||
setMsg({ ok: false, text: errorMessage(e) || "That didn't work." });
|
||||
}
|
||||
setBusy(null);
|
||||
}}>{busy === "look" ? "Sending…" : "Use this site's logo and colours"}</button>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{status.mode === "accounts" ? (
|
||||
<section className="border rounded-xl p-4 space-y-3">
|
||||
<p className="text-sm"><span className="font-medium">Through Accounts</span>{status.accountsUrl ? <> at <a className="underline" href={status.accountsUrl} target="_blank" rel="noreferrer">{status.accountsUrl.replace(/^https?:\/\//, "")}</a></> : null}{status.movedAt ? `, since ${when(status.movedAt)}` : ""}.</p>
|
||||
|
||||
Reference in New Issue
Block a user