Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aacf71798f | ||
|
|
a6544eafc0 | ||
|
|
0bd1780589 | ||
|
|
3d44bdf173 | ||
|
|
10f4d75b17 | ||
|
|
867f7e5e37 | ||
|
|
44d7637034 | ||
|
|
26c66c5555 | ||
|
|
41a2ceee42 | ||
|
|
7075f90d15 |
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/license-CC0_1.0-blue" alt="License: CC0 1.0" />
|
<img src="https://img.shields.io/badge/license-CC0_1.0-blue" alt="License: CC0 1.0" />
|
||||||
<img src="https://img.shields.io/badge/version-1.1.0-green" alt="Version 1.1.0" />
|
<img src="https://img.shields.io/badge/version-1.1.1-green" alt="Version 1.1.1" />
|
||||||
<img src="https://img.shields.io/badge/platform-Windows-0078D4?logo=windows" alt="Windows" />
|
<img src="https://img.shields.io/badge/platform-Windows-0078D4?logo=windows" alt="Windows" />
|
||||||
<img src="https://img.shields.io/badge/portable-no%20install%20needed-brightgreen" alt="Portable" />
|
<img src="https://img.shields.io/badge/portable-no%20install%20needed-brightgreen" alt="Portable" />
|
||||||
<img src="https://img.shields.io/badge/built%20with-Tauri%20v2-orange" alt="Built with Tauri v2" />
|
<img src="https://img.shields.io/badge/built%20with-Tauri%20v2-orange" alt="Built with Tauri v2" />
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Your productivity tools shouldn't phone home. They shouldn't harvest your habits. They shouldn't stop working when a company pivots to AI or gets acqui-hired.
|
Your productivity tools shouldn't phone home. They shouldn't harvest your habits. They shouldn't stop working when a company pivots to AI or gets acqui-hired.
|
||||||
|
|
||||||
OpenPylon is a desktop Kanban application that keeps everything on your machine. Every board, card, and attachment is a plain JSON file in a folder next to the executable. Copy it to a USB drive. Back it up to a NAS. Share it with your team over a local network. The data is yours -- always has been, always will be.
|
OpenPylon is a desktop Kanban application that keeps everything on your machine. Every board, card, and attachment is a plain JSON file in a folder next to the executable. Copy it to a USB drive. Back it up to a NAS. Share it with your team over a local network. The data is yours - always has been, always will be.
|
||||||
|
|
||||||
No subscription. No signup. No server between you and your work. No one profits from your productivity except you.
|
No subscription. No signup. No server between you and your work. No one profits from your productivity except you.
|
||||||
|
|
||||||
@@ -33,44 +33,44 @@ No subscription. No signup. No server between you and your work. No one profits
|
|||||||
### 📋 Boards
|
### 📋 Boards
|
||||||
|
|
||||||
- **Unlimited boards** with custom accent colors and editable titles
|
- **Unlimited boards** with custom accent colors and editable titles
|
||||||
- **Three built-in templates** -- Blank, Kanban (To Do / In Progress / Done), and Sprint (Backlog / To Do / In Progress / Review / Done)
|
- **Three built-in templates** - Blank, Kanban (To Do / In Progress / Done), and Sprint (Backlog / To Do / In Progress / Review / Done)
|
||||||
- **Save any board as a reusable template** -- build your own workflows and share them freely
|
- **Save any board as a reusable template** - build your own workflows and share them freely
|
||||||
- **Duplicate entire boards** with all cards, labels, and settings preserved
|
- **Duplicate entire boards** with all cards, labels, and settings preserved
|
||||||
- **Drag-and-drop reordering** in the board list
|
- **Drag-and-drop reordering** in the board list
|
||||||
- **Sort boards** by name, last modified, date created, or manual drag order
|
- **Sort boards** by name, last modified, date created, or manual drag order
|
||||||
- **Import and export** -- JSON (full fidelity) and CSV (spreadsheet-compatible); imports from Trello JSON too
|
- **Import and export** - JSON (full fidelity) and CSV (spreadsheet-compatible); imports from Trello JSON too
|
||||||
|
|
||||||
### 🏛️ Columns
|
### 🏛️ Columns
|
||||||
|
|
||||||
- **Add, rename, reorder, and delete** columns with drag-and-drop
|
- **Add, rename, reorder, and delete** columns with drag-and-drop
|
||||||
- **Three column widths** -- Narrow, Standard, Wide
|
- **Three column widths** - Narrow, Standard, Wide
|
||||||
- **Column colors** -- 10 preset hues or no color
|
- **Column colors** - 10 preset hues or no color
|
||||||
- **WIP limits** -- optional per-column capacity limits (3, 5, 7, or 10) with amber/red header warnings when the collective workload exceeds what's sustainable
|
- **WIP limits** - optional per-column capacity limits (3, 5, 7, or 10) with amber/red header warnings when the collective workload exceeds what's sustainable
|
||||||
- **Collapse columns** to a narrow vertical strip showing just the title and card count -- keep things tidy without losing context
|
- **Collapse columns** to a narrow vertical strip showing just the title and card count - keep things tidy without losing context
|
||||||
|
|
||||||
### 🃏 Cards
|
### 🃏 Cards
|
||||||
|
|
||||||
- **Drag-and-drop** cards within and between columns
|
- **Drag-and-drop** cards within and between columns
|
||||||
- **Markdown descriptions** -- full GitHub Flavored Markdown with tables, strikethrough, task lists, autolinks, and a live preview toggle
|
- **Markdown descriptions** - full GitHub Flavored Markdown with tables, strikethrough, task lists, autolinks, and a live preview toggle
|
||||||
- **Checklists** -- add items, check them off, reorder by dragging, track progress with a visual bar
|
- **Checklists** - add items, check them off, reorder by dragging, track progress with a visual bar
|
||||||
- **Labels** -- create labels with custom names and colors, toggle them per card
|
- **Labels** - create labels with custom names and colors, toggle them per card
|
||||||
- **Due dates** -- custom calendar picker with relative time display ("in 3 days", "overdue by 2 days")
|
- **Due dates** - custom calendar picker with relative time display ("in 3 days", "overdue by 2 days")
|
||||||
- **Priority levels** -- None, Low, Medium, High, Urgent -- each with a distinct color indicator visible on card thumbnails
|
- **Priority levels** - None, Low, Medium, High, Urgent - each with a distinct color indicator visible on card thumbnails
|
||||||
- **Cover colors** -- 10 preset hues rendered as a colored header bar on the card detail
|
- **Cover colors** - 10 preset hues rendered as a colored header bar on the card detail
|
||||||
- **File attachments** -- link to files in place or copy them into the board's data directory; open in your system's default application
|
- **File attachments** - link to files in place or copy them into the board's data directory; open in your system's default application
|
||||||
- **Comments** -- timestamped notes on each card, newest first, with add and delete
|
- **Comments** - timestamped notes on each card, newest first, with add and delete
|
||||||
- **Card duplication** -- copy a card within its column
|
- **Card duplication** - copy a card within its column
|
||||||
- **Card aging** -- cards that haven't been touched in a while gradually fade, so you can see at a glance where work has stalled
|
- **Card aging** - cards that haven't been touched in a while gradually fade, so you can see at a glance where work has stalled
|
||||||
|
|
||||||
### 🔍 Filtering and Search
|
### 🔍 Filtering and Search
|
||||||
|
|
||||||
- **Filter bar** (press `/`) -- narrow down cards by text search, labels, due date status (overdue, today, this week, no date), and priority level
|
- **Filter bar** (press `/`) - narrow down cards by text search, labels, due date status (overdue, today, this week, no date), and priority level
|
||||||
- **Command palette** (`Ctrl+K`) -- fuzzy search across cards in the current board, across all boards, and quick access to app actions like creating a new board or toggling dark mode
|
- **Command palette** (`Ctrl+K`) - fuzzy search across cards in the current board, across all boards, and quick access to app actions like creating a new board or toggling dark mode
|
||||||
- **Cross-board search** -- find any card by title or description across every board you have
|
- **Cross-board search** - find any card by title or description across every board you have
|
||||||
|
|
||||||
### ⌨️ Keyboard Navigation
|
### ⌨️ Keyboard Navigation
|
||||||
|
|
||||||
Full keyboard-driven workflow. Vim-style or arrow keys -- your choice.
|
Full keyboard-driven workflow. Vim-style or arrow keys - your choice.
|
||||||
|
|
||||||
| Shortcut | Action |
|
| Shortcut | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -86,39 +86,39 @@ Full keyboard-driven workflow. Vim-style or arrow keys -- your choice.
|
|||||||
|
|
||||||
### 🎨 Appearance
|
### 🎨 Appearance
|
||||||
|
|
||||||
- **Theme** -- Light, Dark, or follow your system preference
|
- **Theme** - Light, Dark, or follow your system preference
|
||||||
- **Accent color** -- 10 hues (Teal, Blue, Purple, Pink, Red, Orange, Yellow, Lime, Cyan, Slate) applied globally across the interface
|
- **Accent color** - 10 hues (Teal, Blue, Purple, Pink, Red, Orange, Yellow, Lime, Cyan, Slate) applied globally across the interface
|
||||||
- **UI zoom** -- 75% to 150% in 5% increments
|
- **UI zoom** - 75% to 150% in 5% increments
|
||||||
- **Density** -- Compact, Comfortable, or Spacious -- adjust how much breathing room the interface gets
|
- **Density** - Compact, Comfortable, or Spacious - adjust how much breathing room the interface gets
|
||||||
- **Board backgrounds** -- None, Dots, Grid, or Gradient pattern per board
|
- **Board backgrounds** - None, Dots, Grid, or Gradient pattern per board
|
||||||
- **Default column width** -- configure what width new columns start at
|
- **Default column width** - configure what width new columns start at
|
||||||
- **Custom scrollbars** -- themed scrollbars throughout, with auto-hide behavior
|
- **Custom scrollbars** - themed scrollbars throughout, with auto-hide behavior
|
||||||
- **Smooth animations** -- staggered entrances, layout transitions, and micro-interactions powered by Framer Motion, with full `prefers-reduced-motion` support
|
- **Smooth animations** - staggered entrances, layout transitions, and micro-interactions powered by Framer Motion, with full `prefers-reduced-motion` support
|
||||||
|
|
||||||
### ♿ Accessibility (WCAG 2.2 AAA)
|
### ♿ Accessibility (WCAG 2.2 AAA)
|
||||||
|
|
||||||
OpenPylon targets WCAG 2.2 AAA conformance -- because productivity tools should work for everyone, not just people with perfect vision and a mouse.
|
OpenPylon targets WCAG 2.2 AAA conformance - because productivity tools should work for everyone, not just people with perfect vision and a mouse.
|
||||||
|
|
||||||
**Color and Contrast**
|
**Color and Contrast**
|
||||||
|
|
||||||
- **7:1 enhanced contrast** on all text and interactive elements, in both light and dark themes
|
- **7:1 enhanced contrast** on all text and interactive elements, in both light and dark themes
|
||||||
- **3:1 non-text contrast** on borders, scrollbar thumbs, and focus indicators
|
- **3:1 non-text contrast** on borders, scrollbar thumbs, and focus indicators
|
||||||
- **High-contrast mode** support -- `prefers-contrast: more` boosts all tokens further
|
- **High-contrast mode** support - `prefers-contrast: more` boosts all tokens further
|
||||||
- **Color is never the sole indicator** -- priority levels, due date status, and labels all include text or shape cues alongside color
|
- **Color is never the sole indicator** - priority levels, due date status, and labels all include text or shape cues alongside color
|
||||||
|
|
||||||
**Focus and Keyboard**
|
**Focus and Keyboard**
|
||||||
|
|
||||||
- **3px dual-ring focus indicators** visible on every interactive element, against any background
|
- **3px dual-ring focus indicators** visible on every interactive element, against any background
|
||||||
- **Skip-to-content link** as the first focusable element on the page
|
- **Skip-to-content link** as the first focusable element on the page
|
||||||
- **Full keyboard navigation** -- vim keys, arrow keys, tab order, Escape to dismiss
|
- **Full keyboard navigation** - vim keys, arrow keys, tab order, Escape to dismiss
|
||||||
- **Shift+F10 context menus** -- right-click menus are also reachable via keyboard
|
- **Shift+F10 context menus** - right-click menus are also reachable via keyboard
|
||||||
- **Focus trapping** in all modals and dialogs with focus restore on close
|
- **Focus trapping** in all modals and dialogs with focus restore on close
|
||||||
- **Hidden interactive elements** (menu buttons, action buttons) become visible on `focus-visible`, not just hover
|
- **Hidden interactive elements** (menu buttons, action buttons) become visible on `focus-visible`, not just hover
|
||||||
|
|
||||||
**Screen Readers and ARIA**
|
**Screen Readers and ARIA**
|
||||||
|
|
||||||
- **ARIA live regions** announce card/column creation, deletion, moves, filter changes, and drag-and-drop operations
|
- **ARIA live regions** announce card/column creation, deletion, moves, filter changes, and drag-and-drop operations
|
||||||
- **Proper dialog semantics** -- `role="dialog"`, `aria-modal`, `aria-labelledby` on all modals
|
- **Proper dialog semantics** - `role="dialog"`, `aria-modal`, `aria-labelledby` on all modals
|
||||||
- **Tab/tabpanel pattern** in settings with `role="tablist"`, `role="tab"`, `aria-selected`
|
- **Tab/tabpanel pattern** in settings with `role="tablist"`, `role="tab"`, `aria-selected`
|
||||||
- **Calendar grid** with `role="grid"`, `aria-selected` on date cells, labeled navigation
|
- **Calendar grid** with `role="grid"`, `aria-selected` on date cells, labeled navigation
|
||||||
- **`aria-label`** on every icon-only button, color swatch, status indicator, and unlabeled input
|
- **`aria-label`** on every icon-only button, color swatch, status indicator, and unlabeled input
|
||||||
@@ -133,33 +133,33 @@ OpenPylon targets WCAG 2.2 AAA conformance -- because productivity tools should
|
|||||||
|
|
||||||
**Motion**
|
**Motion**
|
||||||
|
|
||||||
- **`prefers-reduced-motion`** fully respected -- both via CSS media query and an in-app toggle
|
- **`prefers-reduced-motion`** fully respected - both via CSS media query and an in-app toggle
|
||||||
- **No essential information** conveyed through animation alone
|
- **No essential information** conveyed through animation alone
|
||||||
|
|
||||||
**Page Structure**
|
**Page Structure**
|
||||||
|
|
||||||
- **Dynamic page titles** -- updates to reflect the current board name
|
- **Dynamic page titles** - updates to reflect the current board name
|
||||||
- **Landmark regions** and semantic HTML throughout
|
- **Landmark regions** and semantic HTML throughout
|
||||||
- **Minimum touch targets** -- 44px interactive area on small buttons via extended hit zones
|
- **Minimum touch targets** - 44px interactive area on small buttons via extended hit zones
|
||||||
|
|
||||||
### 🛡️ Data Safety
|
### 🛡️ Data Safety
|
||||||
|
|
||||||
Your work is protected by multiple layers of redundancy -- because tools that lose your data don't deserve your trust.
|
Your work is protected by multiple layers of redundancy - because tools that lose your data don't deserve your trust.
|
||||||
|
|
||||||
- **Auto-save** -- boards save automatically 500ms after every change
|
- **Auto-save** - boards save automatically 500ms after every change
|
||||||
- **Automatic backups** -- timestamped snapshots every 5 minutes, last 10 retained per board
|
- **Automatic backups** - timestamped snapshots every 5 minutes, last 10 retained per board
|
||||||
- **Version history** -- browse and restore previous versions from the board settings menu
|
- **Version history** - browse and restore previous versions from the board settings menu
|
||||||
- **Rolling backup** -- the previous save is always preserved as a `.backup.json` file
|
- **Rolling backup** - the previous save is always preserved as a `.backup.json` file
|
||||||
- **Portable storage** -- all data lives in a `data/` folder next to the executable; no registry entries, no AppData, no hidden folders
|
- **Portable storage** - all data lives in a `data/` folder next to the executable; no registry entries, no AppData, no hidden folders
|
||||||
- **Schema validation** -- all data is validated with Zod on every load, with graceful fallback to defaults if a file is corrupted. Forward-compatible: boards from older versions just work.
|
- **Schema validation** - all data is validated with Zod on every load, with graceful fallback to defaults if a file is corrupted. Forward-compatible: boards from older versions just work.
|
||||||
|
|
||||||
### 🖥️ Desktop Integration
|
### 🖥️ Desktop Integration
|
||||||
|
|
||||||
- **Custom frameless window** -- integrated title bar with minimize, maximize, and close controls, plus a drag region that feels native
|
- **Custom frameless window** - integrated title bar with minimize, maximize, and close controls, plus a drag region that feels native
|
||||||
- **Window state persistence** -- remembers your window position, size, and maximized state between sessions
|
- **Window state persistence** - remembers your window position, size, and maximized state between sessions
|
||||||
- **Due date notifications** -- OS-level desktop notifications for cards that are due today or overdue, checked hourly
|
- **Due date notifications** - OS-level desktop notifications for cards that are due today or overdue, checked hourly
|
||||||
- **Open attachments** directly in your system's default application
|
- **Open attachments** directly in your system's default application
|
||||||
- **Right-click context menus** -- on boards (duplicate, export, save as template, delete) and on cards (move, duplicate, set priority, delete)
|
- **Right-click context menus** - on boards (duplicate, export, save as template, delete) and on cards (move, duplicate, set priority, delete)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -169,9 +169,9 @@ Your work is protected by multiple layers of redundancy -- because tools that lo
|
|||||||
|
|
||||||
Grab `openpylon.exe` from the [Releases](https://git.lashman.live/lashman/openpylon/releases) page. That's it. Unzip, run, done.
|
Grab `openpylon.exe` from the [Releases](https://git.lashman.live/lashman/openpylon/releases) page. That's it. Unzip, run, done.
|
||||||
|
|
||||||
No installer. No admin rights. No registry entries. Runs from anywhere -- your desktop, a USB stick, a shared drive. Put it wherever you want. It's yours.
|
No installer. No admin rights. No registry entries. Runs from anywhere - your desktop, a USB stick, a shared drive. Put it wherever you want. It's yours.
|
||||||
|
|
||||||
> 💡 **Fully portable** -- OpenPylon stores all its data in a `data/` folder right next to the executable. Move the folder, move your data. Delete the folder, it's gone. No traces left behind.
|
> 💡 **Fully portable** - OpenPylon stores all its data in a `data/` folder right next to the executable. Move the folder, move your data. Delete the folder, it's gone. No traces left behind.
|
||||||
|
|
||||||
### Build from Source
|
### Build from Source
|
||||||
|
|
||||||
@@ -229,15 +229,15 @@ data/
|
|||||||
|
|
||||||
### 📄 Board Format
|
### 📄 Board Format
|
||||||
|
|
||||||
Each board is a self-contained JSON file with a Zod-validated schema. New fields added in future versions receive sensible defaults on load -- so older board files never break. You can read, edit, or script against these files with any tool you like. They're just JSON. No proprietary formats, no binary blobs, no vendor lock-in.
|
Each board is a self-contained JSON file with a Zod-validated schema. New fields added in future versions receive sensible defaults on load - so older board files never break. You can read, edit, or script against these files with any tool you like. They're just JSON. No proprietary formats, no binary blobs, no vendor lock-in.
|
||||||
|
|
||||||
### 🔄 Backup and Recovery
|
### 🔄 Backup and Recovery
|
||||||
|
|
||||||
If something goes wrong:
|
If something goes wrong:
|
||||||
|
|
||||||
1. **Version History** -- open board settings (⚙️ icon in the top bar) -> "Version History" -> pick a snapshot -> restore. Your current state is backed up first.
|
1. **Version History** - open board settings (⚙️ icon in the top bar) -> "Version History" -> pick a snapshot -> restore. Your current state is backed up first.
|
||||||
2. **Manual `.backup.json`** -- every board has a `.backup.json` sibling in the `boards/` folder. Rename it to replace the current file.
|
2. **Manual `.backup.json`** - every board has a `.backup.json` sibling in the `boards/` folder. Rename it to replace the current file.
|
||||||
3. **Timestamped snapshots** -- find the one you want in `data/backups/<board-id>/` and copy it into `data/boards/`.
|
3. **Timestamped snapshots** - find the one you want in `data/backups/<board-id>/` and copy it into `data/boards/`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -249,10 +249,10 @@ Click the **Import** button on the board list screen and pick a `.json` file. Op
|
|||||||
|
|
||||||
| Format | What Gets Imported |
|
| Format | What Gets Imported |
|
||||||
|---|---|
|
|---|---|
|
||||||
| **OpenPylon JSON** | Everything -- full fidelity round-trip, no data loss |
|
| **OpenPylon JSON** | Everything - full fidelity round-trip, no data loss |
|
||||||
| **Trello JSON** | Lists -> columns, cards, labels (with color mapping), checklists. Archived/closed items are skipped. |
|
| **Trello JSON** | Lists -> columns, cards, labels (with color mapping), checklists. Archived/closed items are skipped. |
|
||||||
|
|
||||||
Migrating off Trello? Export your board from Trello (Menu -> Share -> Export as JSON), then import it here. Your data belongs with you -- not with Atlassian.
|
Migrating off Trello? Export your board from Trello (Menu -> Share -> Export as JSON), then import it here. Your data belongs with you - not with Atlassian.
|
||||||
|
|
||||||
### Exporting
|
### Exporting
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ No lock-in. Take your data wherever you want, whenever you want. We'd rather you
|
|||||||
|
|
||||||
| Layer | Technology |
|
| Layer | Technology |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 🦀 Runtime | [Tauri v2](https://v2.tauri.app/) -- lightweight, native, no Electron bloat |
|
| 🦀 Runtime | [Tauri v2](https://v2.tauri.app/) - lightweight, native, no Electron bloat |
|
||||||
| ⚛️ Frontend | [React 19](https://react.dev/) + [TypeScript 5.8](https://www.typescriptlang.org/) |
|
| ⚛️ Frontend | [React 19](https://react.dev/) + [TypeScript 5.8](https://www.typescriptlang.org/) |
|
||||||
| 🎨 Styling | [Tailwind CSS 4](https://tailwindcss.com/) + [Radix UI](https://www.radix-ui.com/) primitives |
|
| 🎨 Styling | [Tailwind CSS 4](https://tailwindcss.com/) + [Radix UI](https://www.radix-ui.com/) primitives |
|
||||||
| 🧠 State | [Zustand 5](https://zustand.docs.pmnd.rs/) + [Zundo](https://github.com/charkour/zundo) (50-step undo/redo) |
|
| 🧠 State | [Zustand 5](https://zustand.docs.pmnd.rs/) + [Zundo](https://github.com/charkour/zundo) (50-step undo/redo) |
|
||||||
@@ -324,9 +324,9 @@ All dependencies are free and open-source. No proprietary tooling. No paid servi
|
|||||||
openpylon/
|
openpylon/
|
||||||
├── src/ # React frontend
|
├── src/ # React frontend
|
||||||
│ ├── components/
|
│ ├── components/
|
||||||
│ │ ├── board/ # Board view -- columns, cards, filter bar, drag overlays
|
│ │ ├── board/ # Board view - columns, cards, filter bar, drag overlays
|
||||||
│ │ ├── boards/ # Board list -- grid, new board dialog, board cards
|
│ │ ├── boards/ # Board list - grid, new board dialog, board cards
|
||||||
│ │ ├── card-detail/ # Card modal -- markdown, checklists, labels, priority,
|
│ │ ├── card-detail/ # Card modal - markdown, checklists, labels, priority,
|
||||||
│ │ │ # due dates, attachments, comments, cover colors
|
│ │ │ # due dates, attachments, comments, cover colors
|
||||||
│ │ ├── command-palette/ # Ctrl+K fuzzy search across everything
|
│ │ ├── command-palette/ # Ctrl+K fuzzy search across everything
|
||||||
│ │ ├── import-export/ # Import/export buttons and file handling
|
│ │ ├── import-export/ # Import/export buttons and file handling
|
||||||
@@ -335,7 +335,7 @@ openpylon/
|
|||||||
│ │ └── ui/ # Shared primitives (button, dialog, tooltip, popover...)
|
│ │ └── ui/ # Shared primitives (button, dialog, tooltip, popover...)
|
||||||
│ ├── hooks/ # Keyboard shortcuts, keyboard card navigation
|
│ ├── hooks/ # Keyboard shortcuts, keyboard card navigation
|
||||||
│ ├── lib/ # Storage, import/export, board factory, motion presets
|
│ ├── lib/ # Storage, import/export, board factory, motion presets
|
||||||
│ ├── stores/ # Zustand -- app store, board store, toast store
|
│ ├── stores/ # Zustand - app store, board store, toast store
|
||||||
│ └── types/ # TypeScript interfaces and type definitions
|
│ └── types/ # TypeScript interfaces and type definitions
|
||||||
├── src-tauri/ # Tauri / Rust backend
|
├── src-tauri/ # Tauri / Rust backend
|
||||||
│ ├── src/
|
│ ├── src/
|
||||||
@@ -345,7 +345,6 @@ openpylon/
|
|||||||
│ ├── icons/ # App icons
|
│ ├── icons/ # App icons
|
||||||
│ ├── Cargo.toml # Rust dependencies
|
│ ├── Cargo.toml # Rust dependencies
|
||||||
│ └── tauri.conf.json # Tauri app configuration
|
│ └── tauri.conf.json # Tauri app configuration
|
||||||
├── docs/plans/ # Design documents and implementation plans
|
|
||||||
├── package.json
|
├── package.json
|
||||||
└── README.md # You are here
|
└── README.md # You are here
|
||||||
```
|
```
|
||||||
@@ -359,7 +358,7 @@ openpylon/
|
|||||||
npm run tauri dev
|
npm run tauri dev
|
||||||
|
|
||||||
# Type-check the frontend
|
# Type-check the frontend
|
||||||
npx tsc --noEmit
|
npx tsc -noEmit
|
||||||
|
|
||||||
# Production build (portable exe)
|
# Production build (portable exe)
|
||||||
npm run tauri build
|
npm run tauri build
|
||||||
@@ -369,7 +368,7 @@ The dev server runs on `http://localhost:1420` with Vite HMR. Rust backend chang
|
|||||||
|
|
||||||
### 🤝 Contributing
|
### 🤝 Contributing
|
||||||
|
|
||||||
OpenPylon is released into the public domain under CC0 1.0. There's no CLA, no copyright assignment, no gatekeeping. If you want to contribute, just open a PR. If you want to fork it and build something entirely different, go ahead -- no permission needed.
|
OpenPylon is released into the public domain under CC0 1.0. There's no CLA, no copyright assignment, no gatekeeping. If you want to contribute, just open a PR. If you want to fork it and build something entirely different, go ahead - no permission needed.
|
||||||
|
|
||||||
Good things happen when tools are shared freely.
|
Good things happen when tools are shared freely.
|
||||||
|
|
||||||
@@ -383,11 +382,11 @@ Good things happen when tools are shared freely.
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
**CC0 1.0 Universal -- Public Domain Dedication**
|
**CC0 1.0 Universal - Public Domain Dedication**
|
||||||
|
|
||||||
To the extent possible under law, the authors of OpenPylon have waived all copyright and related rights to this software. This work is published from the United States.
|
To the extent possible under law, the authors of OpenPylon have waived all copyright and related rights to this software. This work is published from the United States.
|
||||||
|
|
||||||
You can copy, modify, distribute, and use this software -- even for commercial purposes -- without asking permission and without owing anyone anything.
|
You can copy, modify, distribute, and use this software - even for commercial purposes - without asking permission and without owing anyone anything.
|
||||||
|
|
||||||
See [LICENSE](LICENSE) or https://creativecommons.org/publicdomain/zero/1.0/ for details.
|
See [LICENSE](LICENSE) or https://creativecommons.org/publicdomain/zero/1.0/ for details.
|
||||||
|
|
||||||
@@ -397,6 +396,10 @@ See [LICENSE](LICENSE) or https://creativecommons.org/publicdomain/zero/1.0/ for
|
|||||||
<sub>
|
<sub>
|
||||||
Made with care. Shared without conditions.
|
Made with care. Shared without conditions.
|
||||||
<br />
|
<br />
|
||||||
Your tools should serve you -- not the other way around.
|
Your tools should serve you - not the other way around.
|
||||||
</sub>
|
</sub>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<sub><em>This project is developed with the help of a locally-run LLM via opencode for scaffolding, planning, and routine code tasks. Architecture and design decisions are my own.</em></sub>
|
||||||
|
</p>
|
||||||
|
|||||||
Generated
+2
-12
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "openpylon",
|
"name": "openpylon",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "openpylon",
|
"name": "openpylon",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
"@dnd-kit/sortable": "^10.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
"@tauri-apps/plugin-fs": "^2.4.5",
|
"@tauri-apps/plugin-fs": "^2.4.5",
|
||||||
"@tauri-apps/plugin-notification": "^2.3.3",
|
"@tauri-apps/plugin-notification": "^2.3.3",
|
||||||
"@tauri-apps/plugin-opener": "^2",
|
"@tauri-apps/plugin-opener": "^2",
|
||||||
"@tauri-apps/plugin-shell": "^2.3.5",
|
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
@@ -4524,15 +4523,6 @@
|
|||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/plugin-shell": {
|
|
||||||
"version": "2.3.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.3.5.tgz",
|
|
||||||
"integrity": "sha512-jewtULhiQ7lI7+owCKAjc8tYLJr92U16bPOeAa472LHJdgaibLP83NcfAF2e+wkEcA53FxKQAZ7byDzs2eeizg==",
|
|
||||||
"license": "MIT OR Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@tauri-apps/api": "^2.10.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tootallnate/quickjs-emscripten": {
|
"node_modules/@tootallnate/quickjs-emscripten": {
|
||||||
"version": "0.23.0",
|
"version": "0.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "openpylon",
|
"name": "openpylon",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
"@tauri-apps/plugin-fs": "^2.4.5",
|
"@tauri-apps/plugin-fs": "^2.4.5",
|
||||||
"@tauri-apps/plugin-notification": "^2.3.3",
|
"@tauri-apps/plugin-notification": "^2.3.3",
|
||||||
"@tauri-apps/plugin-opener": "^2",
|
"@tauri-apps/plugin-opener": "^2",
|
||||||
"@tauri-apps/plugin-shell": "^2.3.5",
|
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
|
|||||||
Generated
+1
-74
@@ -793,15 +793,6 @@ version = "1.2.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
|
checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding_rs"
|
|
||||||
version = "0.8.35"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "endi"
|
name = "endi"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
@@ -2360,7 +2351,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openpylon"
|
name = "openpylon"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -2370,7 +2361,6 @@ dependencies = [
|
|||||||
"tauri-plugin-fs",
|
"tauri-plugin-fs",
|
||||||
"tauri-plugin-notification",
|
"tauri-plugin-notification",
|
||||||
"tauri-plugin-opener",
|
"tauri-plugin-opener",
|
||||||
"tauri-plugin-shell",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2389,16 +2379,6 @@ dependencies = [
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "os_pipe"
|
|
||||||
version = "1.2.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"windows-sys 0.61.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pango"
|
name = "pango"
|
||||||
version = "0.18.3"
|
version = "0.18.3"
|
||||||
@@ -3343,44 +3323,12 @@ dependencies = [
|
|||||||
"digest",
|
"digest",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "shared_child"
|
|
||||||
version = "1.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1e362d9935bc50f019969e2f9ecd66786612daae13e8f277be7bfb66e8bed3f7"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"sigchld",
|
|
||||||
"windows-sys 0.60.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shlex"
|
name = "shlex"
|
||||||
version = "1.3.0"
|
version = "1.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "sigchld"
|
|
||||||
version = "0.2.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "47106eded3c154e70176fc83df9737335c94ce22f821c32d17ed1db1f83badb1"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"os_pipe",
|
|
||||||
"signal-hook",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "signal-hook"
|
|
||||||
version = "0.3.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"signal-hook-registry",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "signal-hook-registry"
|
name = "signal-hook-registry"
|
||||||
version = "1.4.8"
|
version = "1.4.8"
|
||||||
@@ -3851,27 +3799,6 @@ dependencies = [
|
|||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tauri-plugin-shell"
|
|
||||||
version = "2.3.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8457dbf9e2bab1edd8df22bb2c20857a59a9868e79cb3eac5ed639eec4d0c73b"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_rs",
|
|
||||||
"log",
|
|
||||||
"open",
|
|
||||||
"os_pipe",
|
|
||||||
"regex",
|
|
||||||
"schemars 0.8.22",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"shared_child",
|
|
||||||
"tauri",
|
|
||||||
"tauri-plugin",
|
|
||||||
"thiserror 2.0.18",
|
|
||||||
"tokio",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime"
|
name = "tauri-runtime"
|
||||||
version = "2.10.0"
|
version = "2.10.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "openpylon"
|
name = "openpylon"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -22,7 +22,6 @@ tauri = { version = "2", features = [] }
|
|||||||
tauri-plugin-opener = "2"
|
tauri-plugin-opener = "2"
|
||||||
tauri-plugin-fs = "2"
|
tauri-plugin-fs = "2"
|
||||||
tauri-plugin-dialog = "2"
|
tauri-plugin-dialog = "2"
|
||||||
tauri-plugin-shell = "2"
|
|
||||||
tauri-plugin-notification = "2"
|
tauri-plugin-notification = "2"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"core:window:allow-close",
|
"core:window:allow-close",
|
||||||
|
"core:window:allow-destroy",
|
||||||
"core:window:allow-minimize",
|
"core:window:allow-minimize",
|
||||||
"core:window:allow-maximize",
|
"core:window:allow-maximize",
|
||||||
"core:window:allow-unmaximize",
|
"core:window:allow-unmaximize",
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
"core:window:allow-set-focus",
|
"core:window:allow-set-focus",
|
||||||
"opener:default",
|
"opener:default",
|
||||||
"dialog:default",
|
"dialog:default",
|
||||||
"shell:default",
|
|
||||||
"fs:default",
|
"fs:default",
|
||||||
"fs:read-all",
|
"fs:read-all",
|
||||||
"fs:write-all",
|
"fs:write-all",
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ pub fn run() {
|
|||||||
.plugin(tauri_plugin_opener::init())
|
.plugin(tauri_plugin_opener::init())
|
||||||
.plugin(tauri_plugin_fs::init())
|
.plugin(tauri_plugin_fs::init())
|
||||||
.plugin(tauri_plugin_dialog::init())
|
.plugin(tauri_plugin_dialog::init())
|
||||||
.plugin(tauri_plugin_shell::init())
|
|
||||||
.plugin(tauri_plugin_notification::init())
|
.plugin(tauri_plugin_notification::init())
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
// Get portable data directory next to the exe
|
// Get portable data directory next to the exe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "openpylon",
|
"productName": "openpylon",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"identifier": "com.openpylon.app",
|
"identifier": "com.openpylon.app",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
|
|||||||
+9
-5
@@ -13,7 +13,6 @@ import { SettingsDialog } from "@/components/settings/SettingsDialog";
|
|||||||
import { ToastContainer } from "@/components/toast/ToastContainer";
|
import { ToastContainer } from "@/components/toast/ToastContainer";
|
||||||
import { ShortcutHelpModal } from "@/components/shortcuts/ShortcutHelpModal";
|
import { ShortcutHelpModal } from "@/components/shortcuts/ShortcutHelpModal";
|
||||||
import { useKeyboardShortcuts } from "@/hooks/useKeyboardShortcuts";
|
import { useKeyboardShortcuts } from "@/hooks/useKeyboardShortcuts";
|
||||||
import { useAnnounceStore } from "@/hooks/useAnnounce";
|
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
const initialized = useAppStore((s) => s.initialized);
|
const initialized = useAppStore((s) => s.initialized);
|
||||||
@@ -21,7 +20,6 @@ export default function App() {
|
|||||||
const view = useAppStore((s) => s.view);
|
const view = useAppStore((s) => s.view);
|
||||||
const reduceMotion = useAppStore((s) => s.settings.reduceMotion);
|
const reduceMotion = useAppStore((s) => s.settings.reduceMotion);
|
||||||
const boardTitle = useBoardStore((s) => s.board?.title);
|
const boardTitle = useBoardStore((s) => s.board?.title);
|
||||||
const announcement = useAnnounceStore((s) => s.message);
|
|
||||||
|
|
||||||
const [settingsOpen, setSettingsOpen] = useState(false);
|
const [settingsOpen, setSettingsOpen] = useState(false);
|
||||||
const [shortcutHelpOpen, setShortcutHelpOpen] = useState(false);
|
const [shortcutHelpOpen, setShortcutHelpOpen] = useState(false);
|
||||||
@@ -49,8 +47,17 @@ export default function App() {
|
|||||||
useBoardStore.getState().closeBoard();
|
useBoardStore.getState().closeBoard();
|
||||||
}
|
}
|
||||||
window.addEventListener("beforeunload", handleBeforeUnload);
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
||||||
|
|
||||||
|
// The title bar close button skips beforeunload on some platforms
|
||||||
|
const appWindow = getCurrentWindow();
|
||||||
|
const unlistenClose = appWindow.onCloseRequested(async () => {
|
||||||
|
// tauri destroys the window only once this handler settles
|
||||||
|
await useBoardStore.getState().flushBoard();
|
||||||
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener("beforeunload", handleBeforeUnload);
|
window.removeEventListener("beforeunload", handleBeforeUnload);
|
||||||
|
unlistenClose.then((fn) => fn());
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@@ -136,9 +143,6 @@ export default function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<MotionConfig reducedMotion={reduceMotion ? "always" : "user"}>
|
<MotionConfig reducedMotion={reduceMotion ? "always" : "user"}>
|
||||||
<div aria-live="assertive" aria-atomic="true" className="sr-only">
|
|
||||||
{announcement}
|
|
||||||
</div>
|
|
||||||
<AppShell>
|
<AppShell>
|
||||||
<AnimatePresence mode="wait">
|
<AnimatePresence mode="wait">
|
||||||
{view.type === "board-list" ? (
|
{view.type === "board-list" ? (
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useRef, useEffect, useCallback } from "react";
|
import React, { useState, useRef, useEffect, useCallback } from "react";
|
||||||
import { Plus } from "lucide-react";
|
import { Plus } from "lucide-react";
|
||||||
|
import { parseDueDate } from "@/lib/due-date";
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
import { OverlayScrollbarsComponent, type OverlayScrollbarsComponentRef } from "overlayscrollbars-react";
|
import { OverlayScrollbarsComponent, type OverlayScrollbarsComponentRef } from "overlayscrollbars-react";
|
||||||
import { staggerContainer } from "@/lib/motion";
|
import { staggerContainer } from "@/lib/motion";
|
||||||
@@ -96,19 +97,17 @@ export function BoardView() {
|
|||||||
if (filters.dueDate !== "all") {
|
if (filters.dueDate !== "all") {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||||
if (filters.dueDate === "none" && card.dueDate != null) return false;
|
const due = card.dueDate ? parseDueDate(card.dueDate) : null;
|
||||||
if (filters.dueDate === "overdue" && (!card.dueDate || new Date(card.dueDate) >= today)) return false;
|
if (filters.dueDate === "none" && due != null) return false;
|
||||||
|
if (filters.dueDate === "overdue" && (!due || due >= today)) return false;
|
||||||
if (filters.dueDate === "today") {
|
if (filters.dueDate === "today") {
|
||||||
if (!card.dueDate) return false;
|
if (!due || due.toDateString() !== today.toDateString()) return false;
|
||||||
const d = new Date(card.dueDate);
|
|
||||||
if (d.toDateString() !== today.toDateString()) return false;
|
|
||||||
}
|
}
|
||||||
if (filters.dueDate === "week") {
|
if (filters.dueDate === "week") {
|
||||||
if (!card.dueDate) return false;
|
if (!due) return false;
|
||||||
const d = new Date(card.dueDate);
|
|
||||||
const weekEnd = new Date(today);
|
const weekEnd = new Date(today);
|
||||||
weekEnd.setDate(weekEnd.getDate() + 7);
|
weekEnd.setDate(weekEnd.getDate() + 7);
|
||||||
if (d < today || d > weekEnd) return false;
|
if (due < today || due > weekEnd) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -201,10 +200,13 @@ export function BoardView() {
|
|||||||
|
|
||||||
// Debounce cross-column moves to prevent oscillation crashes
|
// Debounce cross-column moves to prevent oscillation crashes
|
||||||
const lastCrossColumnMoveRef = useRef<number>(0);
|
const lastCrossColumnMoveRef = useRef<number>(0);
|
||||||
|
const rowRef = useRef<HTMLDivElement>(null);
|
||||||
|
const [columnMarker, setColumnMarker] = useState<{ left: number; top: number; height: number } | null>(null);
|
||||||
|
|
||||||
const clearDragState = useCallback(() => {
|
const clearDragState = useCallback(() => {
|
||||||
setActiveId(null);
|
setActiveId(null);
|
||||||
setActiveType(null);
|
setActiveType(null);
|
||||||
|
setColumnMarker(null);
|
||||||
lastCrossColumnMoveRef.current = 0;
|
lastCrossColumnMoveRef.current = 0;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@@ -216,17 +218,48 @@ export function BoardView() {
|
|||||||
lastCrossColumnMoveRef.current = 0;
|
lastCrossColumnMoveRef.current = 0;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// where a dragged column would land, measured inside the columns row
|
||||||
|
const columnDropMarker = useCallback(
|
||||||
|
(board: Board, activeId: string, over: DragOverEvent["over"]) => {
|
||||||
|
if (!over) return null;
|
||||||
|
// the card list inside a column is a droppable of its own, so over.id can be a prefixed id
|
||||||
|
const overColumnId = String(over.data.current?.columnId ?? over.id);
|
||||||
|
|
||||||
|
const fromIndex = board.columns.findIndex((c) => c.id === activeId);
|
||||||
|
const toIndex = board.columns.findIndex((c) => c.id === overColumnId);
|
||||||
|
const row = rowRef.current;
|
||||||
|
if (!row || fromIndex === -1 || toIndex === -1 || fromIndex === toIndex) return null;
|
||||||
|
|
||||||
|
const target = row.querySelector<HTMLElement>(`[data-column-id="${overColumnId}"]`);
|
||||||
|
if (!target) return null;
|
||||||
|
|
||||||
|
// dropping to the right lands after the target, dropping to the left lands before it
|
||||||
|
const gap = parseFloat(getComputedStyle(row).columnGap) || 0;
|
||||||
|
const left =
|
||||||
|
fromIndex < toIndex
|
||||||
|
? target.offsetLeft + target.offsetWidth + gap / 2
|
||||||
|
: target.offsetLeft - gap / 2;
|
||||||
|
|
||||||
|
return { left, top: target.offsetTop, height: target.offsetHeight };
|
||||||
|
},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
const handleDragOver = useCallback(
|
const handleDragOver = useCallback(
|
||||||
(event: DragOverEvent) => {
|
(event: DragOverEvent) => {
|
||||||
const { active, over } = event;
|
const { active, over } = event;
|
||||||
if (!over) return;
|
|
||||||
|
|
||||||
// Always read fresh state to avoid stale-closure bugs
|
// Always read fresh state to avoid stale-closure bugs
|
||||||
const currentBoard = useBoardStore.getState().board;
|
const currentBoard = useBoardStore.getState().board;
|
||||||
if (!currentBoard) return;
|
if (!currentBoard) return;
|
||||||
|
|
||||||
const activeType = active.data.current?.type;
|
const activeType = active.data.current?.type;
|
||||||
|
if (activeType === "column") {
|
||||||
|
setColumnMarker(columnDropMarker(currentBoard, active.id as string, over));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (activeType !== "card") return;
|
if (activeType !== "card") return;
|
||||||
|
if (!over) return;
|
||||||
|
|
||||||
const activeCardId = active.id as string;
|
const activeCardId = active.id as string;
|
||||||
const overId = over.id as string;
|
const overId = over.id as string;
|
||||||
@@ -266,7 +299,7 @@ export function BoardView() {
|
|||||||
|
|
||||||
moveCard(activeCardId, activeColumn.id, overColumn.id, overIndex);
|
moveCard(activeCardId, activeColumn.id, overColumn.id, overIndex);
|
||||||
},
|
},
|
||||||
[moveCard]
|
[moveCard, columnDropMarker]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDragEnd = useCallback(
|
const handleDragEnd = useCallback(
|
||||||
@@ -282,7 +315,9 @@ export function BoardView() {
|
|||||||
|
|
||||||
if (type === "column") {
|
if (type === "column") {
|
||||||
const activeColumnId = active.id as string;
|
const activeColumnId = active.id as string;
|
||||||
const overColumnId = over.id as string;
|
// the card list inside a column is a droppable of its own, so over.id can be a prefixed id
|
||||||
|
const overColumnId =
|
||||||
|
(over.data.current?.columnId as string | undefined) ?? String(over.id);
|
||||||
|
|
||||||
if (activeColumnId !== overColumnId) {
|
if (activeColumnId !== overColumnId) {
|
||||||
const fromIndex = currentBoard.columns.findIndex(
|
const fromIndex = currentBoard.columns.findIndex(
|
||||||
@@ -426,12 +461,30 @@ export function BoardView() {
|
|||||||
defer
|
defer
|
||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
className="flex h-full"
|
ref={rowRef}
|
||||||
|
className="relative flex h-full"
|
||||||
style={{ gap: `calc(1.5rem * var(--density-factor))`, padding: `calc(1.5rem * var(--density-factor))`, ...getBoardBackground(board) }}
|
style={{ gap: `calc(1.5rem * var(--density-factor))`, padding: `calc(1.5rem * var(--density-factor))`, ...getBoardBackground(board) }}
|
||||||
variants={staggerContainer(0.06)}
|
variants={staggerContainer(0.06)}
|
||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate="visible"
|
animate="visible"
|
||||||
>
|
>
|
||||||
|
{columnMarker && (
|
||||||
|
<motion.div
|
||||||
|
aria-hidden
|
||||||
|
className="pointer-events-none absolute z-10 w-[3px] rounded-full bg-white transition-[left,top,height] duration-150 ease-out"
|
||||||
|
initial={{ opacity: 0 }}
|
||||||
|
animate={{ opacity: 1 }}
|
||||||
|
transition={{ duration: 0.12 }}
|
||||||
|
style={{
|
||||||
|
left: columnMarker.left,
|
||||||
|
top: columnMarker.top,
|
||||||
|
height: columnMarker.height,
|
||||||
|
marginLeft: -1.5,
|
||||||
|
// white glow, with a faint dark edge so the line still shows on the light theme
|
||||||
|
boxShadow: "0 0 10px oklch(100% 0 0 / 60%), 0 0 2px oklch(0% 0 0 / 25%)",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{board.columns.map((column) => (
|
{board.columns.map((column) => (
|
||||||
<KanbanColumn
|
<KanbanColumn
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { createPortal } from "react-dom";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { motion, useReducedMotion, AnimatePresence } from "framer-motion";
|
import { motion, useReducedMotion, AnimatePresence } from "framer-motion";
|
||||||
import { fadeSlideUp, springs } from "@/lib/motion";
|
import { fadeSlideUp, springs } from "@/lib/motion";
|
||||||
|
import { dueDaysFromToday, parseDueDate } from "@/lib/due-date";
|
||||||
import { useSortable } from "@dnd-kit/sortable";
|
import { useSortable } from "@dnd-kit/sortable";
|
||||||
import { CSS } from "@dnd-kit/utilities";
|
import { CSS } from "@dnd-kit/utilities";
|
||||||
import type { Card, Label, Priority } from "@/types/board";
|
import type { Card, Label, Priority } from "@/types/board";
|
||||||
@@ -26,11 +27,9 @@ import { useBoardStore } from "@/stores/board-store";
|
|||||||
|
|
||||||
function getDueDateStatus(dueDate: string | null): { color: string; bgColor: string; label: string } | null {
|
function getDueDateStatus(dueDate: string | null): { color: string; bgColor: string; label: string } | null {
|
||||||
if (!dueDate) return null;
|
if (!dueDate) return null;
|
||||||
const date = new Date(dueDate);
|
const due = parseDueDate(dueDate);
|
||||||
const now = new Date();
|
if (!due) return null;
|
||||||
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
const diffDays = dueDaysFromToday(due);
|
||||||
const dueDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
||||||
const diffDays = Math.ceil((dueDay.getTime() - today.getTime()) / (1000 * 60 * 60 * 24));
|
|
||||||
|
|
||||||
if (diffDays < 0) {
|
if (diffDays < 0) {
|
||||||
return { color: "text-pylon-danger", bgColor: "bg-pylon-danger/10", label: "Overdue" };
|
return { color: "text-pylon-danger", bgColor: "bg-pylon-danger/10", label: "Overdue" };
|
||||||
@@ -92,6 +91,7 @@ export function CardThumbnail({ card, boardLabels, columnId, onCardClick, isFocu
|
|||||||
}, [isFocused]);
|
}, [isFocused]);
|
||||||
|
|
||||||
const hasDueDate = card.dueDate != null;
|
const hasDueDate = card.dueDate != null;
|
||||||
|
const dueDate = card.dueDate ? parseDueDate(card.dueDate) : null;
|
||||||
const dueDateStatus = getDueDateStatus(card.dueDate);
|
const dueDateStatus = getDueDateStatus(card.dueDate);
|
||||||
|
|
||||||
function handleClick() {
|
function handleClick() {
|
||||||
@@ -179,12 +179,12 @@ export function CardThumbnail({ card, boardLabels, columnId, onCardClick, isFocu
|
|||||||
role="img"
|
role="img"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{dueDateStatus && card.dueDate && (
|
{dueDateStatus && dueDate && (
|
||||||
<span
|
<span
|
||||||
className={`font-mono text-xs rounded px-1 py-0.5 ${dueDateStatus.color} ${dueDateStatus.bgColor}`}
|
className={`font-mono text-xs rounded px-1 py-0.5 ${dueDateStatus.color} ${dueDateStatus.bgColor}`}
|
||||||
aria-label={`Due: ${format(new Date(card.dueDate), "MMM d")} - ${dueDateStatus.label}`}
|
aria-label={`Due: ${format(dueDate, "MMM d")} - ${dueDateStatus.label}`}
|
||||||
>
|
>
|
||||||
{format(new Date(card.dueDate), "MMM d")}
|
{format(dueDate, "MMM d")}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{card.checklist.length > 0 && (
|
{card.checklist.length > 0 && (
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { LabelDots } from "@/components/board/LabelDots";
|
|||||||
import { ChecklistBar } from "@/components/board/ChecklistBar";
|
import { ChecklistBar } from "@/components/board/ChecklistBar";
|
||||||
import { format, isPast, isToday } from "date-fns";
|
import { format, isPast, isToday } from "date-fns";
|
||||||
import { springs } from "@/lib/motion";
|
import { springs } from "@/lib/motion";
|
||||||
|
import { parseDueDate } from "@/lib/due-date";
|
||||||
|
|
||||||
interface CardOverlayProps {
|
interface CardOverlayProps {
|
||||||
card: Card;
|
card: Card;
|
||||||
@@ -13,7 +14,7 @@ interface CardOverlayProps {
|
|||||||
|
|
||||||
export function CardOverlay({ card, boardLabels }: CardOverlayProps) {
|
export function CardOverlay({ card, boardLabels }: CardOverlayProps) {
|
||||||
const hasDueDate = card.dueDate != null;
|
const hasDueDate = card.dueDate != null;
|
||||||
const dueDate = hasDueDate ? new Date(card.dueDate!) : null;
|
const dueDate = card.dueDate ? parseDueDate(card.dueDate) : null;
|
||||||
const overdue = dueDate != null && isPast(dueDate) && !isToday(dueDate);
|
const overdue = dueDate != null && isPast(dueDate) && !isToday(dueDate);
|
||||||
|
|
||||||
const rotate = useMotionValue(0);
|
const rotate = useMotionValue(0);
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ export function KanbanColumn({ column, filteredCardIds, focusedCardId, onCardCli
|
|||||||
exit={{ width: 0, opacity: 0 }}
|
exit={{ width: 0, opacity: 0 }}
|
||||||
transition={springs.bouncy}
|
transition={springs.bouncy}
|
||||||
className="shrink-0 overflow-hidden"
|
className="shrink-0 overflow-hidden"
|
||||||
|
data-column-id={column.id}
|
||||||
{...attributes}
|
{...attributes}
|
||||||
>
|
>
|
||||||
{column.collapsed ? (
|
{column.collapsed ? (
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { format, formatDistanceToNow, isPast, isToday } from "date-fns";
|
|||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import { useBoardStore } from "@/stores/board-store";
|
import { useBoardStore } from "@/stores/board-store";
|
||||||
import { CalendarPopover } from "@/components/card-detail/CalendarPopover";
|
import { CalendarPopover } from "@/components/card-detail/CalendarPopover";
|
||||||
|
import { parseDueDate } from "@/lib/due-date";
|
||||||
|
|
||||||
interface DueDatePickerProps {
|
interface DueDatePickerProps {
|
||||||
cardId: string;
|
cardId: string;
|
||||||
@@ -11,7 +12,7 @@ interface DueDatePickerProps {
|
|||||||
export function DueDatePicker({ cardId, dueDate }: DueDatePickerProps) {
|
export function DueDatePicker({ cardId, dueDate }: DueDatePickerProps) {
|
||||||
const updateCard = useBoardStore((s) => s.updateCard);
|
const updateCard = useBoardStore((s) => s.updateCard);
|
||||||
|
|
||||||
const dateObj = dueDate ? new Date(dueDate) : null;
|
const dateObj = dueDate ? parseDueDate(dueDate) : null;
|
||||||
const overdue = dateObj != null && isPast(dateObj) && !isToday(dateObj);
|
const overdue = dateObj != null && isPast(dateObj) && !isToday(dateObj);
|
||||||
|
|
||||||
function handleSelect(date: Date) {
|
function handleSelect(date: Date) {
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ export function SettingsDialog({ open, onOpenChange }: SettingsDialogProps) {
|
|||||||
<div className="space-y-2 text-sm text-pylon-text">
|
<div className="space-y-2 text-sm text-pylon-text">
|
||||||
<p className="font-heading text-lg">OpenPylon</p>
|
<p className="font-heading text-lg">OpenPylon</p>
|
||||||
<p className="text-pylon-text-secondary">
|
<p className="text-pylon-text-secondary">
|
||||||
v1.1.0 · Local-first Kanban board
|
v1.1.1 · Local-first Kanban board
|
||||||
</p>
|
</p>
|
||||||
<p className="text-pylon-text-secondary">
|
<p className="text-pylon-text-secondary">
|
||||||
Built with Tauri, React, and TypeScript.
|
Built with Tauri, React, and TypeScript.
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
import * as React from "react"
|
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
|
||||||
import { Slot } from "radix-ui"
|
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
|
||||||
|
|
||||||
const badgeVariants = cva(
|
|
||||||
"inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
||||||
{
|
|
||||||
variants: {
|
|
||||||
variant: {
|
|
||||||
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
||||||
secondary:
|
|
||||||
"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
||||||
destructive:
|
|
||||||
"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
||||||
outline:
|
|
||||||
"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
||||||
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
||||||
link: "text-primary underline-offset-4 [a&]:hover:underline",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
variant: "default",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
function Badge({
|
|
||||||
className,
|
|
||||||
variant = "default",
|
|
||||||
asChild = false,
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<"span"> &
|
|
||||||
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
||||||
const Comp = asChild ? Slot.Root : "span"
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Comp
|
|
||||||
data-slot="badge"
|
|
||||||
data-variant={variant}
|
|
||||||
className={cn(badgeVariants({ variant }), className)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export { Badge, badgeVariants }
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import * as React from "react"
|
|
||||||
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
|
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
|
||||||
|
|
||||||
function ScrollArea({
|
|
||||||
className,
|
|
||||||
children,
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
||||||
return (
|
|
||||||
<ScrollAreaPrimitive.Root
|
|
||||||
data-slot="scroll-area"
|
|
||||||
className={cn("relative", className)}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<ScrollAreaPrimitive.Viewport
|
|
||||||
data-slot="scroll-area-viewport"
|
|
||||||
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</ScrollAreaPrimitive.Viewport>
|
|
||||||
<ScrollBar />
|
|
||||||
<ScrollAreaPrimitive.Corner />
|
|
||||||
</ScrollAreaPrimitive.Root>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function ScrollBar({
|
|
||||||
className,
|
|
||||||
orientation = "vertical",
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
||||||
return (
|
|
||||||
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
||||||
data-slot="scroll-area-scrollbar"
|
|
||||||
orientation={orientation}
|
|
||||||
className={cn(
|
|
||||||
"flex touch-none p-px transition-colors select-none",
|
|
||||||
orientation === "vertical" &&
|
|
||||||
"h-full w-2.5 border-l border-l-transparent",
|
|
||||||
orientation === "horizontal" &&
|
|
||||||
"h-2.5 flex-col border-t border-t-transparent",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
|
||||||
>
|
|
||||||
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
||||||
data-slot="scroll-area-thumb"
|
|
||||||
className="bg-border relative flex-1 rounded-full"
|
|
||||||
/>
|
|
||||||
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export { ScrollArea, ScrollBar }
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import * as React from "react"
|
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
|
||||||
|
|
||||||
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
||||||
return (
|
|
||||||
<textarea
|
|
||||||
data-slot="textarea"
|
|
||||||
className={cn(
|
|
||||||
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export { Textarea }
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { create } from "zustand";
|
|
||||||
|
|
||||||
interface AnnounceState {
|
|
||||||
message: string;
|
|
||||||
announce: (text: string) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useAnnounceStore = create<AnnounceState>((set) => ({
|
|
||||||
message: "",
|
|
||||||
announce: (text) => {
|
|
||||||
// Clear first to ensure re-announcement of identical messages
|
|
||||||
set({ message: "" });
|
|
||||||
requestAnimationFrame(() => set({ message: text }));
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
export function useAnnounce() {
|
|
||||||
return useAnnounceStore((s) => s.announce);
|
|
||||||
}
|
|
||||||
@@ -35,13 +35,6 @@ export function useKeyboardShortcuts(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Escape: close any open modal/dialog
|
|
||||||
// Note: Radix dialogs handle their own Escape, but this covers custom modals
|
|
||||||
if (e.key === "Escape") {
|
|
||||||
document.dispatchEvent(new CustomEvent("close-all-modals"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.key === "?" || (e.shiftKey && e.key === "/")) {
|
if (e.key === "?" || (e.shiftKey && e.key === "/")) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.dispatchEvent(new CustomEvent("open-shortcut-help"));
|
document.dispatchEvent(new CustomEvent("open-shortcut-help"));
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { isValid, parse } from "date-fns";
|
||||||
|
|
||||||
|
// Due dates are stored as yyyy-MM-dd, but Trello imports keep their ISO stamp
|
||||||
|
export function parseDueDate(value: string): Date | null {
|
||||||
|
const local = parse(value, "yyyy-MM-dd", new Date());
|
||||||
|
if (isValid(local)) return local;
|
||||||
|
|
||||||
|
const fallback = new Date(value);
|
||||||
|
return isValid(fallback) ? fallback : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// whole days between local midnights; round because DST makes the gap 23 or 25 hours
|
||||||
|
export function dueDaysFromToday(due: Date, now: Date = new Date()): number {
|
||||||
|
const dueDay = new Date(due.getFullYear(), due.getMonth(), due.getDate());
|
||||||
|
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||||
|
return Math.round((dueDay.getTime() - today.getTime()) / 86_400_000);
|
||||||
|
}
|
||||||
@@ -17,12 +17,6 @@ export const fadeSlideUp: Variants = {
|
|||||||
exit: { opacity: 0, y: -8 },
|
exit: { opacity: 0, y: -8 },
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fadeSlideDown: Variants = {
|
|
||||||
hidden: { opacity: 0, y: -12 },
|
|
||||||
visible: { opacity: 1, y: 0 },
|
|
||||||
exit: { opacity: 0, y: 8 },
|
|
||||||
};
|
|
||||||
|
|
||||||
export const fadeSlideLeft: Variants = {
|
export const fadeSlideLeft: Variants = {
|
||||||
hidden: { opacity: 0, x: 40 },
|
hidden: { opacity: 0, x: 40 },
|
||||||
visible: { opacity: 1, x: 0 },
|
visible: { opacity: 1, x: 0 },
|
||||||
|
|||||||
+3
-20
@@ -221,24 +221,6 @@ export async function deleteBoard(boardId: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Backup restoration
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
export async function restoreFromBackup(boardId: string): Promise<Board> {
|
|
||||||
const boardsDir = await getBoardsDir();
|
|
||||||
const backupPath = await boardBackupPath(boardsDir, boardId);
|
|
||||||
|
|
||||||
const raw = await readTextFile(backupPath);
|
|
||||||
const data = JSON.parse(raw);
|
|
||||||
const board = boardSchema.parse(data) as Board;
|
|
||||||
|
|
||||||
// Save the restored board as the current version
|
|
||||||
await saveBoard(board);
|
|
||||||
|
|
||||||
return board;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Search
|
// Search
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -361,10 +343,11 @@ export async function listBackups(boardId: string): Promise<BackupEntry[]> {
|
|||||||
const raw = await readTextFile(filePath);
|
const raw = await readTextFile(filePath);
|
||||||
const data = JSON.parse(raw);
|
const data = JSON.parse(raw);
|
||||||
const board = boardSchema.parse(data);
|
const board = boardSchema.parse(data);
|
||||||
const isoMatch = entry.name.match(/\d{4}-\d{2}-\d{2}T[\d.]+Z/);
|
// createBackup swaps the colons in the ISO stamp for dashes, so stitch them back
|
||||||
|
const isoMatch = entry.name.match(/(\d{4}-\d{2}-\d{2}T\d{2})-(\d{2})-(\d{2}\.\d+Z)/);
|
||||||
backups.push({
|
backups.push({
|
||||||
filename: entry.name,
|
filename: entry.name,
|
||||||
timestamp: isoMatch ? isoMatch[0].replace(/-(?=\d{2}-\d{2}T)/g, "-") : board.updatedAt,
|
timestamp: isoMatch ? `${isoMatch[1]}:${isoMatch[2]}:${isoMatch[3]}` : board.updatedAt,
|
||||||
cardCount: Object.keys(board.cards).length,
|
cardCount: Object.keys(board.cards).length,
|
||||||
columnCount: board.columns.length,
|
columnCount: board.columns.length,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import type { AppSettings, BoardSortOrder } from "@/types/settings";
|
|||||||
import type { BoardMeta, ColumnWidth } from "@/types/board";
|
import type { BoardMeta, ColumnWidth } from "@/types/board";
|
||||||
import { loadSettings, saveSettings, listBoards, ensureDataDirs, loadBoard } from "@/lib/storage";
|
import { loadSettings, saveSettings, listBoards, ensureDataDirs, loadBoard } from "@/lib/storage";
|
||||||
import { isPermissionGranted, requestPermission, sendNotification } from "@tauri-apps/plugin-notification";
|
import { isPermissionGranted, requestPermission, sendNotification } from "@tauri-apps/plugin-notification";
|
||||||
|
import { parseDueDate } from "@/lib/due-date";
|
||||||
|
|
||||||
export type View = { type: "board-list" } | { type: "board"; boardId: string };
|
export type View = { type: "board-list" } | { type: "board"; boardId: string };
|
||||||
|
|
||||||
@@ -111,7 +112,8 @@ export const useAppStore = create<AppState>((set, get) => ({
|
|||||||
const board = await loadBoard(meta.id);
|
const board = await loadBoard(meta.id);
|
||||||
for (const card of Object.values(board.cards)) {
|
for (const card of Object.values(board.cards)) {
|
||||||
if (!card.dueDate) continue;
|
if (!card.dueDate) continue;
|
||||||
const due = new Date(card.dueDate);
|
const due = parseDueDate(card.dueDate);
|
||||||
|
if (!due) continue;
|
||||||
if (due.toDateString() === todayStr) dueToday++;
|
if (due.toDateString() === todayStr) dueToday++;
|
||||||
else if (due < today) overdue++;
|
else if (due < today) overdue++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ interface BoardState {
|
|||||||
interface BoardActions {
|
interface BoardActions {
|
||||||
openBoard: (boardId: string) => Promise<void>;
|
openBoard: (boardId: string) => Promise<void>;
|
||||||
closeBoard: () => void;
|
closeBoard: () => void;
|
||||||
|
flushBoard: () => Promise<void>;
|
||||||
|
|
||||||
addColumn: (title: string) => void;
|
addColumn: (title: string) => void;
|
||||||
updateColumnTitle: (columnId: string, title: string) => void;
|
updateColumnTitle: (columnId: string, title: string) => void;
|
||||||
@@ -114,6 +115,8 @@ export const useBoardStore = create<BoardState & BoardActions>()(
|
|||||||
openBoard: async (boardId: string) => {
|
openBoard: async (boardId: string) => {
|
||||||
const board = await loadBoard(boardId);
|
const board = await loadBoard(boardId);
|
||||||
set({ board, saving: false, lastSaved: null });
|
set({ board, saving: false, lastSaved: null });
|
||||||
|
// Drop history carried over from the previous board, and the set above
|
||||||
|
useBoardStore.temporal.getState().clear();
|
||||||
},
|
},
|
||||||
|
|
||||||
closeBoard: () => {
|
closeBoard: () => {
|
||||||
@@ -126,6 +129,15 @@ export const useBoardStore = create<BoardState & BoardActions>()(
|
|||||||
set({ board: null, saving: false, lastSaved: null });
|
set({ board: null, saving: false, lastSaved: null });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
flushBoard: async () => {
|
||||||
|
if (saveTimeout) {
|
||||||
|
clearTimeout(saveTimeout);
|
||||||
|
saveTimeout = null;
|
||||||
|
}
|
||||||
|
const { board } = get();
|
||||||
|
if (board) await saveBoard(board);
|
||||||
|
},
|
||||||
|
|
||||||
// -- Column actions --
|
// -- Column actions --
|
||||||
|
|
||||||
addColumn: (title: string) => {
|
addColumn: (title: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user