From be97e14f9e761630527ff1ba3067316e07f34148 Mon Sep 17 00:00:00 2001 From: Aleksandr Soloshenko Date: Fri, 31 Jul 2026 07:45:51 +0700 Subject: [PATCH] [attachments] inline images support --- frontend/src/app.css | 5 + .../src/lib/components/CommentForm.svelte | 55 ++++++-- .../src/lib/components/CommentList.svelte | 102 ++++++++++++-- .../lib/components/InlineImageButton.svelte | 39 ++++++ frontend/src/lib/components/TaskForm.svelte | 59 ++++++++- .../src/lib/inline-image-editor.svelte.ts | 124 ++++++++++++++++++ frontend/src/lib/pages/task-detail.svelte | 42 +++--- frontend/src/lib/pages/task-edit.svelte | 1 + frontend/src/lib/resolve-attachment-refs.ts | 29 ++++ frontend/src/lib/upload-image.ts | 67 ++++++++++ internal/attachments/service.go | 6 + internal/storage/service.go | 1 + 12 files changed, 483 insertions(+), 47 deletions(-) create mode 100644 frontend/src/lib/components/InlineImageButton.svelte create mode 100644 frontend/src/lib/inline-image-editor.svelte.ts create mode 100644 frontend/src/lib/resolve-attachment-refs.ts create mode 100644 frontend/src/lib/upload-image.ts diff --git a/frontend/src/app.css b/frontend/src/app.css index 054b4ce..118d0e6 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -94,4 +94,9 @@ .prose a:hover { color: hsl(var(--muted-foreground)); } + .prose img { + max-width: 100%; + height: auto; + border-radius: 0.375rem; + } } \ No newline at end of file diff --git a/frontend/src/lib/components/CommentForm.svelte b/frontend/src/lib/components/CommentForm.svelte index 8d6f63b..d5fd8f5 100644 --- a/frontend/src/lib/components/CommentForm.svelte +++ b/frontend/src/lib/components/CommentForm.svelte @@ -1,25 +1,41 @@
-