ssb: Show the number of accounts followed on the profile show/hide followed button.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m51s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m51s
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🦀",
|
||||
"previous": "&lX0ik2WzwWTPa2xkziPbyRZJHP9far9epKqdVIIqFM8=.sha256"
|
||||
"previous": "&bfTIcHq6RtCC3tRZhVpQ0obywbMBjABT2Mk02NLGZGk=.sha256"
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class TfProfileElement extends LitElement {
|
||||
sequence: {type: Number},
|
||||
following: {type: Boolean},
|
||||
blocking: {type: Boolean},
|
||||
show_followed: {type: Boolean},
|
||||
};
|
||||
}
|
||||
|
||||
@ -202,11 +203,7 @@ class TfProfileElement extends LitElement {
|
||||
|
||||
toggle_account_list(event) {
|
||||
let content = event.srcElement.nextElementSibling;
|
||||
if (content.classList.toggle('w3-hide')) {
|
||||
event.srcElement.innerText = 'Show Followed Accounts';
|
||||
} else {
|
||||
event.srcElement.innerText = 'Hide Followed Accounts';
|
||||
}
|
||||
this.show_followed = !this.show_followed;
|
||||
}
|
||||
|
||||
async load_follows() {
|
||||
@ -214,12 +211,13 @@ class TfProfileElement extends LitElement {
|
||||
return html`
|
||||
<div class="w3-container">
|
||||
<button
|
||||
class="w3-button w3-block w3-theme-d1"
|
||||
class="w3-button w3-block w3-theme-d1 followed_accounts"
|
||||
@click=${this.toggle_account_list}
|
||||
>
|
||||
Show Followed Accounts
|
||||
${this.show_followed ? 'Hide' : 'Show'} Followed Accounts
|
||||
(${Object.keys(accounts).length})
|
||||
</button>
|
||||
<div class="w3-hide w3-card">
|
||||
<div class=${'w3-card' + (this.show_followed ? '' : ' w3-hide')}>
|
||||
<ul class="w3-ul w3-theme-d4 w3-border-theme">
|
||||
${Object.keys(accounts).map(
|
||||
(x) => html`
|
||||
|
Reference in New Issue
Block a user