diff --git a/apps/ssb.json b/apps/ssb.json index e2865eaed..ac359c4a1 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&mZcElHJkLDuyk+ITEdBh8cCtCVq8XgdohH5OWLmEom4=.sha256" + "previous": "&RltKappiEl1sZ1CJpZus2OwLLUWcyJN/wFkOJOd9n7w=.sha256" } diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 6ffcce3ec..bd7ba5213 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -436,7 +436,9 @@ class TfMessageElement extends LitElement { render_header() { let is_encrypted = this.message?.decrypted - ? html`🔓` + ? html`🔓` + : typeof(this.message?.content) == 'string' + ? html`🔒` : undefined; return html`
@@ -486,7 +488,7 @@ class TfMessageElement extends LitElement { let self = this; return this.render_frame(html` ${self.render_header()} - ${self.format == 'raw' ? self.render_raw() : inner} + ${self.format == 'raw' ? html`
${self.render_raw()}
` : inner} ${self.render_votes()} ${(self.message.child_messages || []).map( (x) => html` @@ -576,7 +578,7 @@ class TfMessageElement extends LitElement { > ` )}`); - } else if (typeof (content?.type === 'string')) { + } else if (typeof(content?.type) === 'string') { if (content.type == 'about') { let name; let image; @@ -665,9 +667,6 @@ class TfMessageElement extends LitElement { ? html` ${content_warning} ${content_html} ` : content_warning : content_html; - let is_encrypted = this.message?.decrypted - ? html`🔓` - : undefined; return this.render_frame(html` ${this.render_header()}
${payload}
@@ -675,9 +674,6 @@ class TfMessageElement extends LitElement { `); } else if (content.type === 'issue') { - let is_encrypted = this.message?.decrypted - ? html`🔓` - : undefined; return this.render_frame(html` ${this.render_header()} ${content.text} ${this.render_votes()} @@ -756,26 +752,28 @@ class TfMessageElement extends LitElement { > `); - } else if (typeof this.message.content == 'string') { + } else if (typeof(this.message.content) == 'string') { if (this.message?.decrypted) { if (this.format == 'decrypted') { return this.render_small_frame( - html`🔓 ${this.render_json(this.message.decrypted)}` + html`🔓 ${this.render_json(this.message.decrypted)}` ); } else { return this.render_small_frame( - html`🔓 -
${this.message.decrypted.type}
` + html`🔓 +
${this.message.decrypted.type}
` ); } } else { - return this.render_small_frame(html`🔒`); + return this.render_small_frame(); } } else { return this.render_small_frame( - html`
type: ${content.type}
` + html`
type: ${content.type}
` ); } + } else if (typeof(this.message.content) == 'string') { + return this.render_small_frame(); } else { return this.render_small_frame(this.render_raw()); }