From 523c9c9ad2624720cdc69bdb07d116ef8def729a Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 15 May 2024 19:25:48 -0400 Subject: [PATCH] Move mime type shenanigans from JS => C. --- apps/ssb/tf-user.js | 9 ++- core/client.js | 5 +- core/core.js | 141 ++--------------------------------- src/httpd.js.c | 175 +++++++++++++++++++++++++++++++++++++------- 4 files changed, 164 insertions(+), 166 deletions(-) diff --git a/apps/ssb/tf-user.js b/apps/ssb/tf-user.js index 6ed97528..dcdcccb1 100644 --- a/apps/ssb/tf-user.js +++ b/apps/ssb/tf-user.js @@ -22,7 +22,8 @@ class TfUserElement extends LitElement { let image = html`?`; + >?`; let name = this.users?.[this.id]?.name; name = name !== undefined @@ -31,7 +32,8 @@ class TfUserElement extends LitElement { if (this.users[this.id]) { let image_link = this.users[this.id].image; - image_link = typeof image_link == 'string' ? image_link : image_link?.link; + image_link = + typeof image_link == 'string' ? image_link : image_link?.link; if (image_link !== undefined) { image = html` - ${image} - ${name} + ${image} ${name} `; } } diff --git a/core/client.js b/core/client.js index 15ad38b0..792c68e0 100644 --- a/core/client.js +++ b/core/client.js @@ -208,7 +208,10 @@ class TfNavigationElement extends LitElement { `; - } else if (this.credentials?.session?.name && this.credentials.session.name !== 'guest') { + } else if ( + this.credentials?.session?.name && + this.credentials.session.name !== 'guest' + ) { return html`