From e8ac5b759de9a47562887945f873998cc204c99e Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 6 Sep 2023 22:35:20 +0000 Subject: [PATCH] Fix emoji search case again, and render issues. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4451 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/ssb/emojis.js | 4 ++-- apps/ssb/tf-message.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/apps/ssb/emojis.js b/apps/ssb/emojis.js index 2e1f1a168..263726be6 100644 --- a/apps/ssb/emojis.js +++ b/apps/ssb/emojis.js @@ -64,7 +64,7 @@ export function picker(callback, anchor) { while (list.firstChild) { list.removeChild(list.firstChild); } - let search = input.value; + let search = input.value.toLowerCase(); let any_at_all = false; for (let row of Object.entries(json)) { let header = document.createElement('div'); @@ -74,7 +74,7 @@ export function picker(callback, anchor) { for (let entry of Object.entries(row[1])) { if (search && search.length && - entry[0].indexOf(search) == -1) { + entry[0].toLowerCase().indexOf(search) == -1) { continue; } let emoji = document.createElement('span'); diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 618585fc9..ac1fcf698 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -411,6 +411,40 @@ class TfMessageElement extends LitElement { ${this.render_children()} `; + } else if (content.type === 'issue') { + let is_encrypted = this.message?.decrypted ? html`🔓` : undefined; + let style_background = this.message?.decrypted ? 'rgba(255, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.1)'; + return html` + +
+
+ + ${is_encrypted} + + % ${new Date(this.message.timestamp).toLocaleString()} + ${raw_button} +
+ ${content.text} + ${this.render_votes()} +
+ +
+ ${this.render_children()} +
+ `; } else if (content.type === 'blog') { let self = this; tfrpc.rpc.get_blob(content.blog).then(function(data) {