Make abuse report window more user friendly

This commit is contained in:
2021-05-17 11:16:20 +02:00
parent 5be98caadc
commit 5875d187b6
8 changed files with 92 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ function AbuseReportWindow(viewer) {
this.modal = new Modal(
document.getElementById("file_viewer"),
() => { this.toggle() },
"Report abuse", "600px", "auto",
"Report abuse", "650px", "auto",
)
this.btnReportAbuse = document.getElementById("btn_report_abuse")

View File

@@ -1,7 +1,7 @@
function AbuseViewer(viewer, file, next) {
this.viewer = viewer
this.file = file
this.next = next
this.file = file
this.next = next
this.container = document.createElement("div")
this.container.classList = "image-container"
@@ -12,17 +12,17 @@ function AbuseViewer(viewer, file, next) {
this.container.appendChild(this.title)
this.description = document.createElement("p")
this.description.innerText = "This file has received an abuse report and "+
this.description.innerText = "This file has received an abuse report and " +
"was taken down."
this.container.appendChild(this.description)
this.description2 = document.createElement("p")
this.description2.innerText = "Type of abuse: '"+file.abuse_type+"'. "+
"Reporter: '"+file.abuse_reporter_name+"'."
this.description2.innerText = "Type of abuse: " + file.abuse_type + ". " +
"Reporter: " + file.abuse_reporter_name + "."
this.container.appendChild(this.description2)
}
AbuseViewer.prototype.render = function(parent) {
AbuseViewer.prototype.render = function (parent) {
parent.appendChild(this.container)
// Disable the download button
@@ -30,7 +30,7 @@ AbuseViewer.prototype.render = function(parent) {
this.viewer.toolbar.btnDownload.style.display = "none"
}
AbuseViewer.prototype.destroy = function(parent) {
AbuseViewer.prototype.destroy = function (parent) {
// Restore the download button
this.viewer.toolbar.btnDownload.style.display = this.btnDownloadDisplay
}