From 6b265b0a8c2e45422f4a4601e041d44e5cef1c1b Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 19 Jun 2021 18:26:14 -0700 Subject: added sensitive content checkbox for upload --- static/bottom.html | 3 ++- static/js/footerscript.js | 4 ++++ static/posts.html | 41 ++++++++++++++++++++++++++++++++++------- static/sensative.png | Bin 3737 -> 0 bytes static/sensitive.png | Bin 0 -> 3737 bytes static/top.html | 1 + 6 files changed, 41 insertions(+), 8 deletions(-) delete mode 100644 static/sensative.png create mode 100644 static/sensitive.png (limited to 'static') diff --git a/static/bottom.html b/static/bottom.html index 8774419..19c82c6 100644 --- a/static/bottom.html +++ b/static/bottom.html @@ -6,11 +6,12 @@ - +

+ Mark attachment as sensitive



diff --git a/static/js/footerscript.js b/static/js/footerscript.js index b68c3b4..a63f422 100644 --- a/static/js/footerscript.js +++ b/static/js/footerscript.js @@ -3,6 +3,10 @@ var imgArray = [].slice.call(imgs); imgArray.forEach(function(img, i){ img.addEventListener("click", function(e){ + var id = img.getAttribute("id") + var media = document.getElementById("media-" + id) + var sensitive = document.getElementById("sensitive-" + id) + if(img.getAttribute("enlarge") == "0") { var attachment = img.getAttribute("attachment") diff --git a/static/posts.html b/static/posts.html index bfcc84b..a6cac44 100644 --- a/static/posts.html +++ b/static/posts.html @@ -14,14 +14,27 @@ {{ if .Attachment }} {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} [Delete Attachment] + [Mark Sensitive] {{ end }} File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }}) + +