27 lines
1.2 KiB
TypeScript
27 lines
1.2 KiB
TypeScript
// One table for the three tiers, so the policy can change without touching the
|
|
// UI. guest = the landing + a capped, watermarked demo; member = any signed-in
|
|
// account, which is the basic tier: recipes, the photo folder and a clean export
|
|
// of the photo it is editing; pro = the operator's Activated Pro box, which adds
|
|
// the PRO tools (HSL, TOOLS and GRADIENT MASK, RAW) and lets the export run past
|
|
// the photo's own pixels.
|
|
//
|
|
// `maxExportDim` here is the tier's own ceiling. The basic tier's ceiling is the
|
|
// photo being edited, which only the caller knows — see `exportCap` in App.
|
|
|
|
export type TierId = 'guest' | 'member' | 'pro';
|
|
|
|
export interface Tier {
|
|
id: TierId;
|
|
/** Longest edge of an exported photo, or null for the caller's own ceiling. */
|
|
maxExportDim: number | null;
|
|
/** Text burned into every export, or null for a clean file. */
|
|
watermark: string | null;
|
|
batchExport: boolean;
|
|
}
|
|
|
|
export const TIERS: Record<TierId, Tier> = {
|
|
guest: { id: 'guest', maxExportDim: 2048, watermark: 'RecipesCam demo', batchExport: false },
|
|
member: { id: 'member', maxExportDim: null, watermark: null, batchExport: false },
|
|
pro: { id: 'pro', maxExportDim: null, watermark: null, batchExport: true },
|
|
};
|