ssb: Layout the message expand/collapse buttons better.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m47s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m47s
This commit is contained in:
parent
946941d95e
commit
41cbde934a
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🦀",
|
||||
"previous": "&D/qe/rryIyx9bNbsyuNvsYJt1H7b28iWxR65Ql2lF5Q=.sha256"
|
||||
"previous": "&mHXzUyx8vCpgyzOdGjGQlL1qrbsoc32knUR066aIzTM=.sha256"
|
||||
}
|
||||
|
@ -310,19 +310,18 @@ class TfMessageElement extends LitElement {
|
||||
let self = this;
|
||||
if (this.message.child_messages?.length) {
|
||||
if (!this.expanded[this.message.id]) {
|
||||
return html`<button
|
||||
class="w3-button w3-theme-d1"
|
||||
@click=${() => self.set_expanded(true)}
|
||||
>
|
||||
+ ${this.total_child_messages(this.message) + ' More'}
|
||||
</button>`;
|
||||
} else {
|
||||
return html`<button
|
||||
class="w3-button w3-theme-d1"
|
||||
@click=${() => self.set_expanded(false)}
|
||||
return html`
|
||||
<button
|
||||
class="w3-button w3-theme-d1 w3-block w3-bar"
|
||||
style="box-sizing: border-box"
|
||||
@click=${() => self.set_expanded(true)}
|
||||
>
|
||||
Collapse</button
|
||||
>${repeat(
|
||||
+ ${this.total_child_messages(this.message) + ' More'}
|
||||
</button>
|
||||
`;
|
||||
} else {
|
||||
return html`
|
||||
${repeat(
|
||||
this.message.child_messages || [],
|
||||
(x) => x.id,
|
||||
(x) =>
|
||||
@ -335,7 +334,14 @@ class TfMessageElement extends LitElement {
|
||||
channel=${this.channel}
|
||||
channel_unread=${this.channel_unread}
|
||||
></tf-message>`
|
||||
)}`;
|
||||
)}
|
||||
<button
|
||||
class="w3-button w3-theme-d1 w3-block w3-bar"
|
||||
style="box-sizing: border-box"
|
||||
@click=${() => self.set_expanded(false)}
|
||||
>
|
||||
Collapse</button
|
||||
>`;
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
@ -546,8 +552,11 @@ class TfMessageElement extends LitElement {
|
||||
: undefined;
|
||||
return html`
|
||||
<div class="w3-section w3-container">
|
||||
${reply} ${this.render_children()}
|
||||
${reply}
|
||||
</div>
|
||||
<footer>
|
||||
${this.render_children()}
|
||||
</footer>
|
||||
`;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user