fix-232: drop attachment-preview img for non-image files (alt text painted duplicate filename); widen chip name max-width to 560px
CI / test (pull_request) Successful in 42s
CI / docker (pull_request) Skipped

This commit is contained in:
fen
2026-09-10 17:02:54 -05:00
parent e059ca1554
commit ca59c19fa4
2 changed files with 5 additions and 11 deletions
+1 -1
View File
@@ -823,7 +823,7 @@ button[type="submit"]:focus-visible,
} }
.attachment-bar .attachment-chip:hover { border-color: var(--accent); } .attachment-bar .attachment-chip:hover { border-color: var(--accent); }
.attachment-bar .attachment-chip .attachment-name { .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. */ /* #221: images scale to fit the viewer box, aspect ratio preserved. */
.attachment-preview { .attachment-preview {
+4 -10
View File
@@ -41,17 +41,11 @@
<div class="attachment-bar"> <div class="attachment-bar">
{{if .AttachmentImage}} {{if .AttachmentImage}}
<div class="attachment-preview"><img src="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" alt="{{.Attachment.Filename}}"></div> <div class="attachment-preview"><img src="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" alt="{{.Attachment.Filename}}"></div>
<a class="attachment-chip" href="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" data-mime="{{.Attachment.Mime}}">
<span class="attachment-name">{{.Attachment.Filename}}</span>
<span class="attachment-size">{{.Attachment.SizeHuman}}</span>
</a>
{{else}}
<a class="attachment-chip" href="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" data-mime="{{.Attachment.Mime}}">
<span class="attachment-name">{{.Attachment.Filename}}</span>
<span class="attachment-size">{{.Attachment.SizeHuman}}</span>
</a>
<div class="attachment-preview"><img src="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" alt="{{.Attachment.Filename}}"></div>
{{end}} {{end}}
<a class="attachment-chip" href="/f/{{.Attachment.ID}}/{{.Attachment.Filename}}" data-mime="{{.Attachment.Mime}}">
<span class="attachment-name">{{.Attachment.Filename}}</span>
<span class="attachment-size">{{.Attachment.SizeHuman}}</span>
</a>
</div> </div>
</div> </div>
{{end}} {{end}}