no <pre> if there is no reason

pull/34/head
Zlatin Balevsky 2019-12-17 12:39:35 +00:00
parent 7d67573c92
commit 3d710cebe5
2 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,10 @@ class Persona {
userHtml += "<div class='centercomment' id='distrusted-" + this.userB64 + "'></div>"
mapping.set("Trusted User", userHtml)
mapping.set("Distrusted User", userHtml)
mapping.set("Reason", "<pre class='comment'>" + this.reason + "</pre>")
var reason = ""
if (this.reason != "")
reason = "<pre class='comment'>" + this.reason + "</pre>"
mapping.set("Reason", reason)
mapping.set("Your Trust", this.status)
return mapping

View File

@ -29,7 +29,10 @@ class Persona {
}
mapping.set("User", nameHtml)
mapping.set("Reason", "<pre class='comment'>" + this.reason + "</pre>")
var reason = ""
if (this.reason != "")
reason = "<pre class='comment'>" + this.reason + "</pre>"
mapping.set("Reason", reason)
if (trusted) {
var subscribeHtml = _t("Subscribed")