Sign-in steps (password, sign-up, email code, two-step sign-in and its setup with recovery codes, privacy notice, news question), forgot and reset password, the account page, admin (people, deletions, church profile, linked products, settings, notice, licence, audit) and setup. Strict CSP with a nonce per page; church colours from the profile. @crosscode/ui gets its first components (shell, card, fields, buttons). Plan: roles stay in each product (asked 2026-11-18). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
583 B
TypeScript
14 lines
583 B
TypeScript
"use client";
|
|
|
|
import React, { createContext, useContext } from "react";
|
|
|
|
export type ClientBranding = { name: string; shortName: string | null; logoUrl: string | null; signupEnabled: boolean; setupNeeded: boolean };
|
|
|
|
const Ctx = createContext<ClientBranding>({ name: "Sign in", shortName: null, logoUrl: null, signupEnabled: true, setupNeeded: false });
|
|
|
|
export function BrandingProvider({ value, children }: { value: ClientBranding; children: React.ReactNode }) {
|
|
return <Ctx.Provider value={value}>{children}</Ctx.Provider>;
|
|
}
|
|
|
|
export const useBranding = () => useContext(Ctx);
|