From 7e1621dfb4dca771eb8c936d4e47c08de1400b6b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sat, 29 Nov 2025 10:17:13 -0500 Subject: [PATCH] ssb: Slight improvements to blog header display. --- apps/ssb.json | 2 +- apps/ssb/tf-message.js | 56 ++++++++++++------------------------------ 2 files changed, 17 insertions(+), 41 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 1f350390..72fd8ab8 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&t4hk+Y6NB+TftzDLhJ9gUKLPU5YcFYvTEbJuTT2qPCQ=.sha256" + "previous": "&QdW1N8dMttww41AFP9qNRor9P9Rsiamnl/YQSJiviQE=.sha256" } diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 4c968597..704439f8 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -196,26 +196,6 @@ class TfMessageElement extends LitElement { ); } - flag(event) { - let reason = prompt( - 'What is the reason for reporting this content (spam, nsfw, ...)?', - 'offensive' - ); - if (reason !== undefined) { - tfrpc.rpc - .appendMessage(this.whoami, { - type: 'flag', - flag: { - link: this.message.id, - reason: reason.length ? reason : undefined, - }, - }) - .catch(function (error) { - alert(error?.message); - }); - } - } - show_image(link) { let div = document.createElement('div'); div.style.left = 0; @@ -519,14 +499,11 @@ class TfMessageElement extends LitElement { ` : undefined} - ${formats.map( ([format, name]) => html` @@ -988,11 +965,7 @@ class TfMessageElement extends LitElement { style="cursor: pointer" @click=${(x) => this.toggle_expanded(':cw')} > -

- ${this.message.flags - ? `Caution: This message has been flagged ${this.message.flags.length} time${this.message.flags.length == 1 ? '' : 's'}.` - : content.contentWarning} -

+

${content.contentWarning}

${this.is_expanded(':cw') ? 'Show less' : 'Show more'}

@@ -1003,12 +976,11 @@ class TfMessageElement extends LitElement {
${body}
${this.render_mentions()} `; - let payload = - this.message.flags || content.contentWarning - ? self.expanded[(this.message.id || '') + ':cw'] - ? html` ${content_warning} ${content_html} ` - : content_warning - : content_html; + let payload = content.contentWarning + ? self.expanded[(this.message.id || '') + ':cw'] + ? html` ${content_warning} ${content_html} ` + : content_warning + : content_html; return this.render_frame(html` ${this.render_header()}
${payload}
@@ -1048,11 +1020,15 @@ class TfMessageElement extends LitElement { case 'message': body = html`
self.toggle_expanded(':blog')}> + class="w3-border w3-theme-d4 w3-round" + style="padding: 8px; margin: 4px; cursor: pointer" + @click=${(x) => self.toggle_expanded(':blog')} + >

${content.title}

-
- +
+ ${content.thumbnail + ? html`` + : undefined} ${content.summary}