Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

607 B
Raw Blame
import { renderCell, text } from "../render/cell.js";
import type { Ui } from "../render/ui.js";

export type TaskChange = {
  readonly verb: "Created" | "Updated";
  readonly reference: string;
  readonly url: string;
  readonly detail: string;
};

export function renderTaskChange(ui: Ui, change: TaskChange): string[] {
  const { theme, glyphs } = ui;
  const reference = renderCell(
    [text(change.reference, theme.strong, change.url)],
    ui,
  );
  return [
    "",
    `  ${theme.success(glyphs.tick)} ${change.verb} ${reference} ${theme.muted(glyphs.separator)} ${change.detail}`,
    "",
  ];
}