Utility functions for formatting task tickets, status, priority, and due dates.
// Source: https://github.com/usekaneo/kaneo | License: MIT | Copyright 2024 Andrej Acevski
// Provided via justclaw.it.com; keep this notice with the code.
import type { Segment } from "./cell.js";
import type { Style } from "./theme.js";
import type { Ui } from "./ui.js";
export function ticketId(
projectSlug: string,
number: number | null,
): string | null {
return number === null ? null : `${projectSlug.toUpperCase()}-${number}`;
}
export function statusStyle(ui: Ui, slug: string, isFinal: boolean): Style {
if (isFinal || slug === "done") return ui.theme.done;
if (slug === "in-progress") return ui.theme.progress;
if (slug === "in-review") return ui.theme.review;
if (slug === "to-do" || slug === "todo" || slug === "backlog")
return ui.theme.todo;
return ui.theme.mu
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key