2018-03-14 00:14:57 +00:00
|
|
|
<DynamicPageBanner title="Blocked users" icon="#fa-ban" />
|
2019-02-16 08:48:45 +00:00
|
|
|
{#if $isUserLoggedIn }
|
|
|
|
<AccountsListPage {accountsFetcher} {accountActions} />
|
|
|
|
{/if}
|
2018-03-14 00:14:57 +00:00
|
|
|
<script>
|
2018-12-11 15:31:48 +00:00
|
|
|
import AccountsListPage from '../_components/AccountsListPage.html'
|
|
|
|
import { store } from '../_store/store'
|
|
|
|
import { getBlockedAccounts } from '../_api/blockedAndMuted'
|
|
|
|
import DynamicPageBanner from '../_components/DynamicPageBanner.html'
|
2018-04-28 21:19:39 +00:00
|
|
|
import { setAccountBlocked } from '../_actions/block'
|
2018-03-14 00:14:57 +00:00
|
|
|
|
|
|
|
export default {
|
2018-04-28 21:19:39 +00:00
|
|
|
data: () => ({
|
|
|
|
accountActions: [
|
|
|
|
{
|
|
|
|
icon: '#fa-unlock',
|
|
|
|
label: 'Unblock',
|
|
|
|
onclick: (accountId) => setAccountBlocked(accountId, false, true)
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
2018-03-14 00:14:57 +00:00
|
|
|
computed: {
|
2018-05-02 00:05:36 +00:00
|
|
|
accountsFetcher: ({ $currentInstance, $accessToken }) => () => getBlockedAccounts($currentInstance, $accessToken)
|
2018-03-14 00:14:57 +00:00
|
|
|
},
|
|
|
|
store: () => store,
|
|
|
|
components: {
|
|
|
|
AccountsListPage,
|
|
|
|
DynamicPageBanner
|
|
|
|
}
|
|
|
|
}
|
2018-04-22 18:20:05 +00:00
|
|
|
</script>
|