Add backend integration modules to discover, read, and modify provider-hosted boards, issues, and comments across multiple providers. Expose Tauri commands for board discovery, listing, and card moves, and implement safe issue actions and comment APIs. Wire new Svelte UI components to render boards, issue centers, comments, labels, and assignees, and add sanitized markdown rendering. - Add board discovery, board reading, and card-move APIs - Add Svelte components and styles for integrated board UI - Use marked + DOMPurify for safe markdown rendering
21 lines
953 B
TypeScript
21 lines
953 B
TypeScript
/** Visual tones only; provider status values and board membership stay untouched. */
|
|
export function issueTone(value: string): "neutral" | "active" | "review" | "done" {
|
|
const name = value.toLocaleLowerCase();
|
|
if (/^(closed|done|completed|resolved|erledigt|geschlossen|shipped)$/.test(name)) return "done";
|
|
if (/review|testing|test|\bqa\b|prüfung/.test(name)) return "review";
|
|
if (/progress|development|entwicklung|active|doing|build|bearbeitung/.test(name)) return "active";
|
|
return "neutral";
|
|
}
|
|
|
|
export function issueStateLabel(value: string, de: boolean): string {
|
|
if (!de) return value;
|
|
return ({ open: "Offen", opened: "Offen", closed: "Geschlossen" } as Record<string, string>)[value] ?? value;
|
|
}
|
|
|
|
export function labelTone(label: string): string {
|
|
const name = label.toLocaleLowerCase();
|
|
if (/bug|error|fehler/.test(name)) return "red";
|
|
if (/enhancement|feature|verbesserung/.test(name)) return "blue";
|
|
return "neutral";
|
|
}
|