ssb: Place the message collapse better with the messages it collapses.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m8s

This commit is contained in:
2025-10-01 18:06:45 -04:00
parent 2885380f40
commit b49a6cd685
2 changed files with 29 additions and 27 deletions

View File

@@ -365,32 +365,34 @@ class TfMessageElement extends LitElement {
`;
} else {
return html` <ul class="w3-container w3-margin-bottom w3-ul w3-card-4">
${repeat(
this.message.child_messages || [],
(x) => x.id,
(x) =>
html`<li style="padding: 0">
<tf-message
.message=${x}
whoami=${this.whoami}
.users=${this.users}
.drafts=${this.drafts}
.expanded=${this.expanded}
channel=${this.channel}
channel_unread=${this.channel_unread}
.recent_reactions=${this.recent_reactions}
depth=${this.depth + 1}
></tf-message>
</li>`
)}
</ul>
<button
class="w3-button w3-theme-d1 w3-block w3-bar"
style="box-sizing: border-box"
@click=${() => self.set_expanded(false)}
>
Collapse
</button>`;
${repeat(
this.message.child_messages || [],
(x) => x.id,
(x) =>
html`<li style="padding: 0">
<tf-message
.message=${x}
whoami=${this.whoami}
.users=${this.users}
.drafts=${this.drafts}
.expanded=${this.expanded}
channel=${this.channel}
channel_unread=${this.channel_unread}
.recent_reactions=${this.recent_reactions}
depth=${this.depth + 1}
></tf-message>
</li>`
)}
<li style="padding: 0" class="w3-margin-bottom">
<button
class="w3-button w3-theme-d1 w3-block w3-bar"
style="box-sizing: border-box"
@click=${() => self.set_expanded(false)}
>
Collapse
</button>
</li>
</ul>`;
}
} else {
return undefined;