From ab998f7b6dffbe461d830d3696cb46491ad6afb0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Feb 2018 14:36:16 +0100 Subject: Improve admin tables --- .../following-list/following-list.component.html | 38 ++++++++++++++-------- .../following-list/following-list.component.ts | 8 +++-- 2 files changed, 31 insertions(+), 15 deletions(-) (limited to 'client/src/app/+admin/follows/following-list') diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html index fc1cf0dc4..24981d3e9 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.html +++ b/client/src/app/+admin/follows/following-list/following-list.component.html @@ -1,14 +1,26 @@ - - - - - - - - - - - + + + ID + Host + State + Created + + + + + + + {{ follow.id }} + {{ follow.following.host }} + {{ follow.state }} + {{ follow.createdAt }} + + + + + + diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index ad1bd4536..873a5d965 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core' +import { Component, OnInit } from '@angular/core' import { NotificationsService } from 'angular2-notifications' import { SortMeta } from 'primeng/primeng' import { AccountFollow } from '../../../../../../shared/models/actors/follow.model' @@ -10,7 +10,7 @@ import { FollowService } from '../shared' selector: 'my-followers-list', templateUrl: './following-list.component.html' }) -export class FollowingListComponent extends RestTable { +export class FollowingListComponent extends RestTable implements OnInit { following: AccountFollow[] = [] totalRecords = 0 rowsPerPage = 10 @@ -25,6 +25,10 @@ export class FollowingListComponent extends RestTable { super() } + ngOnInit () { + this.loadSort() + } + async removeFollowing (follow: AccountFollow) { const res = await this.confirmService.confirm(`Do you really want to unfollow ${follow.following.host}?`, 'Unfollow') if (res === false) return -- cgit v1.2.3