feat: Enhance note dialog layouts, improve text wrapping, and refine component styling.

This commit is contained in:
2025-12-29 14:23:19 +01:00
parent 5634555d89
commit 68a11ea551
5 changed files with 20 additions and 21 deletions

View File

@@ -165,21 +165,23 @@ export function NoteCard({ note }: NoteCardProps) {
</Card>
<Dialog open={editing} onOpenChange={setEditing}>
<DialogContent>
<DialogHeader>
<DialogContent className="max-w-3xl max-h-[85vh] flex flex-col p-6 gap-0 overflow-hidden">
<DialogHeader className="pb-4 shrink-0">
<DialogTitle>{t("Edit Note")}</DialogTitle>
</DialogHeader>
<NoteForm
defaultValues={{
title: note.title,
content: note.content,
is_pinned: note.is_pinned,
color: note.color,
tags: note.tags.map(t => t.name).join(", "),
}}
onSubmit={handleEdit}
submitLabel={t("Update")}
/>
<div className="flex-1 min-h-0 overflow-y-auto -mx-6 px-6">
<NoteForm
defaultValues={{
title: note.title,
content: note.content,
is_pinned: note.is_pinned,
color: note.color,
tags: note.tags.map(t => t.name).join(", "),
}}
onSubmit={handleEdit}
submitLabel={t("Update")}
/>
</div>
</DialogContent>
</Dialog>