feat: Phase 1 quick wins - defaultColumnWidth, due date colors, card aging, open attachments
This commit is contained in:
@@ -10,6 +10,7 @@ import type {
|
||||
ColumnWidth,
|
||||
} from "@/types/board";
|
||||
import { saveBoard, loadBoard } from "@/lib/storage";
|
||||
import { useAppStore } from "@/stores/app-store";
|
||||
|
||||
interface BoardState {
|
||||
board: Board | null;
|
||||
@@ -121,6 +122,7 @@ export const useBoardStore = create<BoardState & BoardActions>()(
|
||||
// -- Column actions --
|
||||
|
||||
addColumn: (title: string) => {
|
||||
const defaultWidth = useAppStore.getState().settings.defaultColumnWidth;
|
||||
mutate(get, set, (b) => ({
|
||||
...b,
|
||||
updatedAt: now(),
|
||||
@@ -130,7 +132,7 @@ export const useBoardStore = create<BoardState & BoardActions>()(
|
||||
id: ulid(),
|
||||
title,
|
||||
cardIds: [],
|
||||
width: "standard" as ColumnWidth,
|
||||
width: defaultWidth,
|
||||
color: null,
|
||||
collapsed: false,
|
||||
wipLimit: null,
|
||||
|
||||
Reference in New Issue
Block a user