diff --git a/pkg/config/enum.go b/pkg/config/enum.go index 10e0031..2c7eff4 100644 --- a/pkg/config/enum.go +++ b/pkg/config/enum.go @@ -237,6 +237,12 @@ var ( Label: "No image sharing privileges ('Shy Accounts')", Help: "The user can not share or see any image shared on chat.", }, + { + Value: "nodvd", + Label: "[Support] Exempt this user from the dark video detector", + Help: "A special case if a user reaches out that the dark video detector on chat is misfiring for their camera. " + + "This will exempt the user from their camera being cut for being too dark.", + }, } ) diff --git a/web/templates/photo/gallery.html b/web/templates/photo/gallery.html index 7ec77e7..51c0c3a 100644 --- a/web/templates/photo/gallery.html +++ b/web/templates/photo/gallery.html @@ -898,10 +898,12 @@ }); {{end}} + // Lightbox modal controls. document.addEventListener("DOMContentLoaded", () => { // Get our modal to trigger it on click of a detail img. let $modal = document.querySelector("#detail-modal"), - $altText = $modal.getElementsByTagName("button")[0]; + $altText = $modal.getElementsByTagName("button")[0], + cls = "is-active"; function setModalImage(url, altText) { let $modalImg = document.querySelector("#detailImg"), @@ -964,7 +966,7 @@ node.addEventListener("click", (e) => { e.preventDefault(); setModalImage(node.dataset.url, altText); - $modal.classList.add("is-active"); + $modal.classList.add(cls); // Log a view of this photo. markImageViewed(photoID); @@ -976,6 +978,15 @@ markImageViewed(photoID); }); }); + + // Key bindings to control the modal. + window.addEventListener('keydown', (e) => { + if ($modal.classList.contains(cls)) { + if (e.key == 'Escape') { + $modal.classList.remove(cls); + } + } + }); });