Replaces the dark navy palette with a light grouped-background system: - theme.ts: full token set (space/radius/type/shadow) + light+dark palettes - ui.tsx: Screen/Title/SectionHeader/Card/Separator/Pill/Empty primitives - TaskRow: rounded-square checkbox carrying priority colour, inset separators - TaskListScreen: rows grouped into a card, drag lift, refined deferred footer - Icon.tsx: dependency-free geometric icon set (emoji don't take a tint) - home: large title, Next-up card, "needs attention" rows, icon tab bar - Priority/Estimate/Date chips unified on the accent-soft active state Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
35 lines
939 B
TypeScript
35 lines
939 B
TypeScript
import type { Task } from "./types";
|
|
|
|
export const PRIORITIES: Task["priority"][] = [1, 2, 3, 4];
|
|
|
|
export const PRIORITY_LABEL: Record<Task["priority"], string> = {
|
|
1: "Urgent",
|
|
2: "High",
|
|
3: "Medium",
|
|
4: "Low",
|
|
};
|
|
|
|
// Todoist's flag mapping (urgent red → low grey), retuned to sit calmly on a
|
|
// light canvas. `PRIORITY_TINT` is the same hue at wash strength, for the
|
|
// selected state of a chip — a saturated fill would shout on a white card.
|
|
export const PRIORITY_COLOR: Record<Task["priority"], `#${string}`> = {
|
|
1: "#E5484D",
|
|
2: "#D98324",
|
|
3: "#2F6FED",
|
|
4: "#9A9AA2",
|
|
};
|
|
|
|
export const PRIORITY_TINT: Record<Task["priority"], `#${string}`> = {
|
|
1: "#FDECEC",
|
|
2: "#FBF0E2",
|
|
3: "#E8F0FE",
|
|
4: "#F0F0F3",
|
|
};
|
|
|
|
export function formatEstimate(min: number | null): string | null {
|
|
if (!min) return null;
|
|
const h = Math.floor(min / 60);
|
|
const m = min % 60;
|
|
return h ? (m ? `${h}h${m}` : `${h}h`) : `${m}m`;
|
|
}
|