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",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&lX0ik2WzwWTPa2xkziPbyRZJHP9far9epKqdVIIqFM8=.sha256"
|
"previous": "&bfTIcHq6RtCC3tRZhVpQ0obywbMBjABT2Mk02NLGZGk=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ class TfProfileElement extends LitElement {
|
|||||||
sequence: {type: Number},
|
sequence: {type: Number},
|
||||||
following: {type: Boolean},
|
following: {type: Boolean},
|
||||||
blocking: {type: Boolean},
|
blocking: {type: Boolean},
|
||||||
|
show_followed: {type: Boolean},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,11 +203,7 @@ class TfProfileElement extends LitElement {
|
|||||||
|
|
||||||
toggle_account_list(event) {
|
toggle_account_list(event) {
|
||||||
let content = event.srcElement.nextElementSibling;
|
let content = event.srcElement.nextElementSibling;
|
||||||
if (content.classList.toggle('w3-hide')) {
|
this.show_followed = !this.show_followed;
|
||||||
event.srcElement.innerText = 'Show Followed Accounts';
|
|
||||||
} else {
|
|
||||||
event.srcElement.innerText = 'Hide Followed Accounts';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async load_follows() {
|
async load_follows() {
|
||||||
@ -214,12 +211,13 @@ class TfProfileElement extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="w3-container">
|
<div class="w3-container">
|
||||||
<button
|
<button
|
||||||
class="w3-button w3-block w3-theme-d1"
|
class="w3-button w3-block w3-theme-d1 followed_accounts"
|
||||||
@click=${this.toggle_account_list}
|
@click=${this.toggle_account_list}
|
||||||
>
|
>
|
||||||
Show Followed Accounts
|
${this.show_followed ? 'Hide' : 'Show'} Followed Accounts
|
||||||
|
(${Object.keys(accounts).length})
|
||||||
</button>
|
</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">
|
<ul class="w3-ul w3-theme-d4 w3-border-theme">
|
||||||
${Object.keys(accounts).map(
|
${Object.keys(accounts).map(
|
||||||
(x) => html`
|
(x) => html`
|
||||||
|
Reference in New Issue
Block a user