delete animation, no #inbox tag, preset delete lock on builtins
Card delete animation (public/css/style.css, public/js/modules/board.js):
* @keyframes card-remove: opacity 1→0 + scale(1)→0.85 + translateY(8px),
250ms ease-in forwards. .card-removing class with pointer-events:none.
* New exported animateCardRemoval(ids) in board.js: adds .card-removing
to each matching board-card element, resolves after 260ms so the
caller can await before the API DELETE + _reloadAll.
* Wired into all three delete paths:
- context-menu.js group delete: animates parent + all children
- context-menu.js single delete: same path (allCards has one entry)
- app.js Del/Backspace shortcut: animates all selected cards
Quick capture no #inbox (public/js/app.js):
* Removed the line that auto-injected #inbox into the body of every
quick-captured card. Cards now land tag-free in the active bucket
(or unsorted).
Settings: preset delete lock (public/js/modules/theme.js):
* refreshPresetSelect() now disables the delete button (disabled attr
+ opacity 0.35 + cursor not-allowed) when a builtin: preset is
selected. Re-enabled when a user: preset is selected. The click
handler already had a startsWith('user:') guard but the button
wasn't visually locked.
chore: bump version to 0.9.17
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ce6ca73ea0
commit
195b0e343f
6 files changed
+35
-5
No files matched your search
+3
-3
@@ -308,13 +308,13 @@ registerShortcut({ key: 'Enter', guard: () => gBoard() && !!document.querySelect
|
||||
}});
|
||||
// Delete selected cards
|
||||
registerShortcut({ match: (e) => (e.key === 'Delete' || e.key === 'Backspace') && !e.ctrlKey && gBoard() && getSelectedIds().length > 0, section: 'global', keys: '<kbd>Del</kbd>', label: 'delete selected', hidden: true, handler: async () => {
|
||||
// Delegated to board.js's existing handler via a synthetic event is
|
||||
// impractical; re-implement the small logic here to avoid coupling.
|
||||
const ids = getSelectedIds();
|
||||
if (localStorage.getItem('hyprcrd-confirm-delete') !== '0') {
|
||||
const ok = await showDialog({ title: 'delete cards', message: `Delete ${ids.length} card${ids.length > 1 ? 's' : ''}?`, danger: true, okLabel: 'Delete' });
|
||||
if (!ok) return;
|
||||
}
|
||||
const { animateCardRemoval } = await import('./modules/board.js');
|
||||
await animateCardRemoval(ids);
|
||||
for (const id of ids) await api(`api/cards/${id}`, { method: 'DELETE' });
|
||||
clearSelection();
|
||||
await window._reloadAll();
|
||||
@@ -394,7 +394,7 @@ document.getElementById('quick-capture-input')?.addEventListener('keydown', asyn
|
||||
body = lines.slice(1).join('\n').trim();
|
||||
}
|
||||
if (!cardTitle) return;
|
||||
if (!body.includes('#inbox')) body = (body ? body + '\n\n' : '') + '#inbox';
|
||||
// No auto-tag — the card goes into the active bucket (or unsorted).
|
||||
|
||||
// Place the card in the currently active bucket (if it's a real
|
||||
// user bucket). Special filters (all/current/favorites/journal/none)
|
||||
|
||||
Reference in new issue
Block a user