pinafore/src/routes/_pages/blocked.html

32 wiersze
964 B
HTML

<DynamicPageBanner title="{intl.blockedUsers}" icon="#fa-ban" />
{#if $isUserLoggedIn }
<AccountsListPage {accountsFetcher} {accountActions} />
{/if}
<script>
import AccountsListPage from '../_components/AccountsListPage.html'
import { store } from '../_store/store.js'
import { getBlockedAccounts } from '../_api/blockedAndMuted.js'
import DynamicPageBanner from '../_components/DynamicPageBanner.html'
import { setAccountBlocked } from '../_actions/block.js'
export default {
data: () => ({
accountActions: [
{
icon: '#fa-unlock',
label: 'intl.unblock',
onclick: (accountId) => setAccountBlocked(accountId, false, true)
}
]
}),
computed: {
accountsFetcher: ({ $currentInstance, $accessToken }) => () => getBlockedAccounts($currentInstance, $accessToken)
},
store: () => store,
components: {
AccountsListPage,
DynamicPageBanner
}
}
</script>