implemented "prune attachment" on post

This commit is contained in:
2026-02-21 15:36:48 -07:00
parent 94593d3637
commit f80f63a142
7 changed files with 105 additions and 2 deletions
+24
View File
@@ -31,6 +31,30 @@ messagedefs:
tone: "green"
icon: "✗"
text: "No, Cancel"
- id: "prune"
title: "Prune Message Attachment"
tone: "red"
destructive: true
message: "You are about to prune a message's attachment!"
warningIcon: "💣"
warningLines:
- text: "Warning: This action cannot be undone!"
bold: true
- text: "Pruning this message's attachment will permanently delete it from the system."
bold: false
buttons:
- id: "yes"
link: "placeholder"
confirm: true
tone: "red"
icon: "✓"
text: "Yes, Prune It"
- id: "no"
link: "placeholder"
confirm: false
tone: "green"
icon: "✗"
text: "No, Cancel"
- id: "deleteTopic"
title: "Delete Topic"
tone: "red"
+4
View File
@@ -138,6 +138,10 @@
{{ if canNuke }}
<a href="{{ topicListLink }}/op/{{ topicNum }}/nuke/{{ p.Num }}"
class="bg-red-600 hover:bg-red-700 text-white px-3 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap">Nuke</a>
{{ if post_attach.Filename != "" }}
<a href="{{ topicListLink }}/op/{{ topicNum }}/prune/{{ p.Num }}"
class="bg-red-600 hover:bg-red-700 text-white px-3 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap">Prune Attach</a>
{{ end }}
{{ end }}
{{ if canMove }}
<a href="{{ topicListLink }}/op/{{ topicNum }}/move/{{ p.Num }}"