cleanup and refactor
This commit is contained in:
1 parent
5f9db690a4
commit
73da8fb849
10 files changed
+91
-97
No files matched your search
@@ -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'];
|
||||
|
||||
Reference in new issue
Block a user