Pinafore-Web-Client-Frontend/src/routes/_pages/blocked.html

32 lines
955 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'
import { getBlockedAccounts } from '../_api/blockedAndMuted'
import DynamicPageBanner from '../_components/DynamicPageBanner.html'
import { setAccountBlocked } from '../_actions/block'
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>