Give finished Rules a print path, folded launch counts, and a two-day follow-up.

Export is PDF, RULE.md, and Print on US Letter, with every shared term, no member names, and a takeaway that points at Ask an organizer. Finished Rules keep type and place so the team can read folded counts without a database, Umami can sit beside the app with no cookies, and the person who holds the pen gets working PDF and RULE.md links 48 hours later.
This commit is contained in:
adilallo committed 2026-11-10 18:32:33 -07:00
1 parent 0efc907633
commit d9c475a967
74 files changed
+2401 -630

No files matched your search

+32
View File
@@ -19,6 +19,38 @@ export function buildPublicRuleUrl(origin: string, ruleId: string): string {
return `${base}${publishedRulePath(ruleId)}`;
}
export const ASK_ORGANIZER_HASH = "ask-organizer";
/** Home Ask an organizer section. Exports link here; they do not embed the form. */
export function askOrganizerUrl(origin: string): string {
const base = origin.replace(/\/$/, "");
return `${base}/#${ASK_ORGANIZER_HASH}`;
}
export function ruleExportPdfPath(ruleId: string, token: string): string {
return `/api/rules/${encodeURIComponent(ruleId)}/export/pdf?t=${encodeURIComponent(token)}`;
}
export function ruleExportMarkdownPath(ruleId: string, token: string): string {
return `/api/rules/${encodeURIComponent(ruleId)}/export/md?t=${encodeURIComponent(token)}`;
}
export function ruleExportPdfUrl(
origin: string,
ruleId: string,
token: string,
): string {
return `${origin.replace(/\/$/, "")}${ruleExportPdfPath(ruleId, token)}`;
}
export function ruleExportMarkdownUrl(
origin: string,
ruleId: string,
token: string,
): string {
return `${origin.replace(/\/$/, "")}${ruleExportMarkdownPath(ruleId, token)}`;
}
export function buildShareRuleUrl(origin: string, shareSlug: string): string {
const base = origin.replace(/\/$/, "");
return `${base}${shareRulePath(shareSlug)}`;