API reference
Apps
Rules of the kanban, tasks and file manager.
Everything in utils/ is a pure function: it takes data and returns data, with no Vue and no global state. Pass the current date as now so results are deterministic. Each file has its unit tests in tests/unit/.
moveKanbanCard()
Moves a card to a column and position, keeping orders consistent.
moveKanbanCard(cards: KanbanCard[], cardId: string, columnId: string, index?: number): KanbanCard[]
isColumnFull()
Whether a column reached its WIP limit.
isColumnFull(column: KanbanColumn, count: number): boolean
kanbanDueState()
overdue, soon, later or done for a due date.
kanbanDueState(due: string, today: string, isDone: boolean, soonDays: number): KanbanDueState
matchesKanbanFilters()
Whether a card passes the search, people, labels and due filters.
matchesKanbanFilters(card: KanbanCard, filters: KanbanFilters, dueState: KanbanDueState): boolean
checklistProgress()
Done and total checklist items.
checklistProgress(items: KanbanChecklistItem[]): { done: number; total: number; }donetotalparseTodoQuickAdd()
Parses “tomorrow 10:00 !high #design” into date, time, priority and tag.
parseTodoQuickAdd(text: string, today: string, vocabulary: TodoQuickAddVocabulary): TodoQuickAdd
todoDateGroup()
The date group of a task: overdue, today, tomorrow, this week, later.
todoDateGroup(task: TodoTask, today: string, weekEnd: string): TodoDateGroup
matchesTodoFilter()
Whether a task belongs to a list (today, important, assigned to me…).
matchesTodoFilter(task: TodoTask, filter: TodoFilter, context: { today: string; weekEnd: string; me: string }): booleansubtaskProgress()
Done and total subtasks.
subtaskProgress(task: TodoTask): { done: number; total: number; }donetotalshiftIsoDate()
Adds days to a YYYY-MM-DD date.
shiftIsoDate(iso: string, days: number): string
TODO_PRIORITY_ORDER
The sort order of priorities.
const TODO_PRIORITY_ORDER: Record<TodoPriority, number>
fileKind()
The kind of a file from its extension.
fileKind(name: string, kinds: FileKindConfig[]): FileKind
matchesFileFilters()
Whether a file passes section, folder, search and kind filters.
matchesFileFilters(file: FileEntry, filters: FileFilters, kinds: FileKindConfig[], now: number, recentDays: number): boolean
sortFiles()
Sorts files by name, date or size.
sortFiles(files: FileEntry[], sort: FileSort): FileEntry[]
folderPath()
The breadcrumb of a folder.
folderPath(folders: FileFolder[], folderId: string | null): FileFolder[]
folderDescendants()
All the folders inside a folder.
folderDescendants(folders: FileFolder[], folderId: string): string[]
storageBreakdown()
Used storage by kind against the quota.
storageBreakdown(files: FileEntry[], quota: number, kinds: FileKindConfig[]): { used: number; quota: number; percent: number; kinds: { kind: FileKind; color: string; size: number; percent: number; }[]; }usedquotapercentkinds