cleanup and refactor

This commit is contained in:
th committed 2026-04-09 19:39:56 +02:00
1 parent 5f9db690a4
commit 73da8fb849
10 files changed
+91 -97

No files matched your search

+24 -2
View File
@@ -3,22 +3,44 @@
import { esc } from './util.js';
export const state = {
// Data
cards: [],
buckets: [],
// Filters & view
activeBucket: 'all',
activeTags: [],
activeGroup: null,
sortMode: localStorage.getItem('hyprcrd-sort') || 'manual',
hideTermine: localStorage.getItem('hyprcrd-hide-termine') === '1',
hideDone: localStorage.getItem('hyprcrd-hide-done') === '1',
superView: localStorage.getItem('hyprcrd-superview') === '1',
activeGroup: null,
sortMode: localStorage.getItem('hyprcrd-sort') || 'manual',
// Board split preview
boardSplitOpen: localStorage.getItem('hyprcrd-board-split') === '1',
boardPreviewCardId: null,
// Multi-select
selectedIds: new Set(),
// Detail / editor
editingId: null,
viewingCard: null,
zoom: parseFloat(localStorage.getItem('hyprcrd-detail-zoom') || '1') || 1,
// Navigation context
openedFromSearch: false,
openedFromGallery: false,
galleryOrigin: null,
returnToGalleryAfterEdit: false,
previewVisible: false,
// Calendar
calYear: new Date().getFullYear(),
calMonth: new Date().getMonth(),
// Sync
bgSyncRunning: false,
};
export const SORT_MODES = ['manual', 'newest', 'oldest', 'alpha', 'tag'];