diff --git a/apps/ssb.json b/apps/ssb.json index 4c02f3716..bc7336505 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&sPU6rF2WYaSdq1SBw5XyxOjiahAxtGUbeg0LOpkQ6Eg=.sha256" + "previous": "&LZizSyrgaKYbjRKj2FfmnCTnkB39ndQ9AVWVC4o3AQk=.sha256" } diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index a8071e12a..c1db855ef 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -368,21 +368,125 @@ class TfMessageElement extends LitElement { : 'w3-theme-d4'; } - render_small_frame(inner) { - let self = this; + get_content() { + let content = this.message?.content; + if (this.message?.decrypted?.type == 'post') { + content = this.message.decrypted; + } + return content; + } + + render_raw_button() { + let content = this.get_content(); + let raw_button; + switch (this.format) { + case 'raw': + if (content?.type == 'post' || content?.type == 'blog') { + raw_button = html``; + } else { + raw_button = html``; + } + break; + case 'md': + raw_button = html``; + break; + case 'decrypted': + raw_button = html``; + break; + default: + if (this.message.decrypted) { + raw_button = html``; + } else { + raw_button = html``; + } + break; + } + return raw_button; + } + + render_header() { + let is_encrypted = this.message?.decrypted + ? html`🔓` + : undefined; return html` -