From a947396bad1a87dcb3177fe900370e7fa52de733 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 24 Apr 2024 19:23:13 -0400 Subject: [PATCH] Prettier. --- apps/ssb/tf-app.js | 8 ++++- apps/ssb/tf-compose.js | 19 ++++++----- apps/ssb/tf-message.js | 5 +-- apps/ssb/tf-reactions-modal.js | 62 +++++++++++++++++++++------------- core/client.js | 9 +++-- 5 files changed, 64 insertions(+), 39 deletions(-) diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js index 95694681..9415f8be 100644 --- a/apps/ssb/tf-app.js +++ b/apps/ssb/tf-app.js @@ -236,7 +236,13 @@ class TfElement extends LitElement { console.log(by_count.sort((x, y) => y.count - x.count).slice(0, 20)); let start_time = new Date(); users = await this.fetch_about(Object.keys(following).sort(), users); - console.log('about took', (new Date() - start_time) / 1000.0, 'seconds for', Object.keys(users).length, 'users'); + console.log( + 'about took', + (new Date() - start_time) / 1000.0, + 'seconds for', + Object.keys(users).length, + 'users' + ); this.following = Object.keys(following); this.users = users; await tags; diff --git a/apps/ssb/tf-compose.js b/apps/ssb/tf-compose.js index 69703991..94ca6158 100644 --- a/apps/ssb/tf-compose.js +++ b/apps/ssb/tf-compose.js @@ -542,15 +542,16 @@ class TfComposeElement extends LitElement { ${this.render_encrypt()}
- ${draft.text} + ${draft.text}
${content_warning} diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 49840dfe..19516647 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -72,10 +72,7 @@ class TfMessageElement extends LitElement { return expression; } } - return html`
+ return html`
${(this.message.votes || []).map( (vote) => html` -
-
-
-

Reactions

- × -
-
    - ${this.votes.map(x => html` -
  • - ${x?.content?.vote?.expression} - - ${new Date(x?.timestamp).toLocaleString()} -
  • - `)} -
-
- -
-
-
-
` : undefined; + return this.votes?.length + ? html`
+
+
+
+

Reactions

+ × +
+
    + ${this.votes.map( + (x) => html` +
  • + ${x?.content?.vote?.expression} + + ${new Date(x?.timestamp).toLocaleString()} +
  • + ` + )} +
+
+ +
+
+
+
` + : undefined; } } diff --git a/core/client.js b/core/client.js index 87fc09f5..e0e692a1 100644 --- a/core/client.js +++ b/core/client.js @@ -346,8 +346,13 @@ class TfNavigationElement extends LitElement { ${this.render_permissions()} ${this.status?.message && !this.status.is_error ? html` - -
${this.status.message}
+ +
+ ${this.status.message} +
` : undefined} ${Object.keys(this.spark_lines)