From ca59c19fa4132302cb348dd997a7dad1ec8b8d3d Mon Sep 17 00:00:00 2001 From: fen Date: Thu, 10 Sep 2026 17:02:54 -0500 Subject: [PATCH 1/2] fix-232: drop attachment-preview img for non-image files (alt text painted duplicate filename); widen chip name max-width to 560px --- internal/web/static/app.css | 2 +- internal/web/templates/paste.html | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/internal/web/static/app.css b/internal/web/static/app.css index 587f47a..e363ede 100644 --- a/internal/web/static/app.css +++ b/internal/web/static/app.css @@ -823,7 +823,7 @@ button[type="submit"]:focus-visible, } .attachment-bar .attachment-chip:hover { border-color: var(--accent); } .attachment-bar .attachment-chip .attachment-name { - max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + max-width: 720px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* #221: images scale to fit the viewer box, aspect ratio preserved. */ .attachment-preview { diff --git a/internal/web/templates/paste.html b/internal/web/templates/paste.html index b549f3b..320ca10 100644 --- a/internal/web/templates/paste.html +++ b/internal/web/templates/paste.html @@ -41,17 +41,11 @@
{{if .AttachmentImage}}
{{.Attachment.Filename}}
- - {{.Attachment.Filename}} - {{.Attachment.SizeHuman}} - - {{else}} - - {{.Attachment.Filename}} - {{.Attachment.SizeHuman}} - -
{{.Attachment.Filename}}
{{end}} + + {{.Attachment.Filename}} + {{.Attachment.SizeHuman}} +
{{end}} -- 2.54.0 From 9a5eaed00be8ed3faf3223f0008319fd20fb895a Mon Sep 17 00:00:00 2001 From: fen Date: Thu, 10 Sep 2026 17:05:18 -0500 Subject: [PATCH 2/2] #232: file pill shows filename twice on non-image files; drop duplicate, let long names truncate wider and reveal on hover --- internal/web/static/app.css | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/web/static/app.css b/internal/web/static/app.css index e363ede..66f6510 100644 --- a/internal/web/static/app.css +++ b/internal/web/static/app.css @@ -823,7 +823,21 @@ button[type="submit"]:focus-visible, } .attachment-bar .attachment-chip:hover { border-color: var(--accent); } .attachment-bar .attachment-chip .attachment-name { - max-width: 720px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + min-width: 0; + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +/* #232: long filenames are truncated but the pill stays a reasonable + width; on narrow viewports it shrinks to the container instead of + overflowing the card. */ +.attachment-bar .attachment-chip { + max-width: 100%; +} +.attachment-bar .attachment-chip .attachment-name:hover { + white-space: normal; + overflow-wrap: anywhere; } /* #221: images scale to fit the viewer box, aspect ratio preserved. */ .attachment-preview { -- 2.54.0