Files
lage-chat-control/frontend/src/lib/site.ts
T

21 lines
857 B
TypeScript
Raw Normal View History

/** Constantes du site — un seul endroit à changer si la forge bouge. */
export const REPO_URL = 'https://labola.o-k-i.net/cyber-mawonaj/lage-chat-control'
export const NEW_TOOL_ISSUE_URL = `${REPO_URL}/issues/new?template=.gitea/ISSUE_TEMPLATE/nouvo-zouti.yaml`
/**
* Les trois arcs du chimen (sommaire) : progression Fondations →
* Reprendre le contrôle → Autodéfense avancée. Une catégorie appartient
* au premier arc dont `maxPart` couvre son `part`.
*/
export const ARCS = [
{ id: 'fondations', maxPart: 4, difficulty: 'beginner' },
{ id: 'controle', maxPart: 9, difficulty: 'intermediate' },
{ id: 'avance', maxPart: 99, difficulty: 'advanced' }
] as const
export type ArcId = (typeof ARCS)[number]['id']
export function arcOf(part: number): ArcId {
return (ARCS.find((a) => part <= a.maxPart) ?? ARCS[ARCS.length - 1]).id
}