import { RestPagination, RestTable } from '@app/shared'
import { SortMeta } from 'primeng/api'
import { AccountBlock, BlocklistService } from '@app/shared/blocklist'
+import { Actor } from '@app/shared/actor/actor.model'
@Component({
selector: 'my-instance-account-blocklist',
export class InstanceAccountBlocklistComponent extends RestTable implements OnInit {
blockedAccounts: AccountBlock[] = []
totalRecords = 0
- rowsPerPageOptions = [ 20, 50, 100 ]
- rowsPerPage = this.rowsPerPageOptions[0]
sort: SortMeta = { field: 'createdAt', order: -1 }
pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
return 'InstanceAccountBlocklistComponent'
}
+ switchToDefaultAvatar ($event: Event) {
+ ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL()
+ }
+
unblockAccount (accountBlock: AccountBlock) {
const blockedAccount = accountBlock.blockedAccount