feel: card resting spacing + editor Cmd/Ctrl+Enter
- NoteCard: overlay the hover toolbar (absolute bottom-right, translucent backdrop, pointer-events gated) instead of reserving a permanent action row. At rest cards are now content-sized with even padding, so text no longer looks pinned to the top above an empty strip. Affects every card surface (board, search, graph, reminders). - NoteEditor: Cmd/Ctrl+Enter saves & closes (mirrors Esc-closes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -105,8 +105,11 @@ function cardClass(color: NoteColor): string {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Toolbar overlays the card's bottom-right on hover/focus instead of
|
||||
reserving a permanent row — so at rest the card is content-sized with
|
||||
even padding, not text pinned to the top above an empty strip. -->
|
||||
<div
|
||||
class="mt-2 flex items-center justify-end gap-0.5 opacity-0 transition focus-within:opacity-100 group-hover:opacity-100"
|
||||
class="pointer-events-none absolute bottom-1.5 right-1.5 flex items-center gap-0.5 rounded-lg bg-white/85 p-0.5 opacity-0 shadow-sm ring-1 ring-black/5 backdrop-blur-sm transition focus-within:pointer-events-auto focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 dark:bg-neutral-900/85 dark:ring-white/10"
|
||||
>
|
||||
<template v-if="note.trashed">
|
||||
<button type="button" class="icon-btn" title="Restore" aria-label="Restore" @click="notes.restore(note.id)">
|
||||
|
||||
@@ -182,6 +182,8 @@ async function act(fn: () => Promise<void>) {
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
@keydown.esc="close"
|
||||
@keydown.enter.meta.prevent="close"
|
||||
@keydown.enter.ctrl.prevent="close"
|
||||
@paste="onPaste"
|
||||
>
|
||||
<div class="flex flex-col gap-2 p-4">
|
||||
|
||||
Reference in New Issue
Block a user