aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-02 10:32:11 +0200
committerChocobozzz <me@florianbigard.com>2020-07-02 10:35:05 +0200
commit57e56eb2941cce88a2a9b538b3e6a761ece6a317 (patch)
tree76cdad74997e12f7a8b419d867f3997ca7dba988 /client/src/app/+admin
parent4d45cdfa10769bb1134c466e4e5c9794f09ef342 (diff)
downloadPeerTube-57e56eb2941cce88a2a9b538b3e6a761ece6a317.tar.gz
PeerTube-57e56eb2941cce88a2a9b538b3e6a761ece6a317.tar.zst
PeerTube-57e56eb2941cce88a2a9b538b3e6a761ece6a317.zip
Fix lint
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/admin.component.ts59
1 files changed, 34 insertions, 25 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index c1c160ad1..51c64694f 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -19,22 +19,22 @@ export class AdminComponent implements OnInit {
19 ) {} 19 ) {}
20 20
21 ngOnInit () { 21 ngOnInit () {
22 const federationItems: TopMenuDropdownParam = { 22 const federationItems: TopMenuDropdownParam = {
23 label: this.i18n('Federation'), 23 label: this.i18n('Federation'),
24 children: [ 24 children: [
25 { 25 {
26 label: this.i18n('Instances you follow'), 26 label: this.i18n('Instances you follow'),
27 routerLink: '/admin/follows/following-list', 27 routerLink: '/admin/follows/following-list',
28 iconName: 'sign-out' 28 iconName: 'sign-out'
29 }, 29 },
30 { 30 {
31 label: this.i18n('Instances following you'), 31 label: this.i18n('Instances following you'),
32 routerLink: '/admin/follows/followers-list', 32 routerLink: '/admin/follows/followers-list',
33 iconName: 'sign-in' 33 iconName: 'sign-in'
34 }, 34 },
35 { 35 {
36 label: this.i18n('Video redundancies'), 36 label: this.i18n('Video redundancies'),
37 routerLink: '/admin/follows/video-redundancies-list', 37 routerLink: '/admin/follows/video-redundancies-list',
38 iconName: 'videos' 38 iconName: 'videos'
39 } 39 }
40 ] 40 ]
@@ -44,26 +44,35 @@ export class AdminComponent implements OnInit {
44 label: this.i18n('Moderation'), 44 label: this.i18n('Moderation'),
45 children: [] 45 children: []
46 } 46 }
47 if (this.hasVideoAbusesRight()) moderationItems.children.push({ 47
48 label: this.i18n('Video reports'), 48 if (this.hasVideoAbusesRight()) {
49 routerLink: '/admin/moderation/video-abuses/list', 49 moderationItems.children.push({
50 iconName: 'flag' 50 label: this.i18n('Video reports'),
51 }) 51 routerLink: '/admin/moderation/video-abuses/list',
52 if (this.hasVideoBlocklistRight()) moderationItems.children.push({ 52 iconName: 'flag'
53 label: this.i18n('Video blocks'), 53 })
54 routerLink: '/admin/moderation/video-blocks/list', 54 }
55 iconName: 'cross' 55 if (this.hasVideoBlocklistRight()) {
56 }) 56 moderationItems.children.push({
57 if (this.hasAccountsBlocklistRight()) moderationItems.children.push({ 57 label: this.i18n('Video blocks'),
58 label: this.i18n('Muted accounts'), 58 routerLink: '/admin/moderation/video-blocks/list',
59 routerLink: '/admin/moderation/blocklist/accounts', 59 iconName: 'cross'
60 iconName: 'user' 60 })
61 }) 61 }
62 if (this.hasServersBlocklistRight()) moderationItems.children.push({ 62 if (this.hasAccountsBlocklistRight()) {
63 label: this.i18n('Muted servers'), 63 moderationItems.children.push({
64 routerLink: '/admin/moderation/blocklist/servers', 64 label: this.i18n('Muted accounts'),
65 iconName: 'server' 65 routerLink: '/admin/moderation/blocklist/accounts',
66 }) 66 iconName: 'user'
67 })
68 }
69 if (this.hasServersBlocklistRight()) {
70 moderationItems.children.push({
71 label: this.i18n('Muted servers'),
72 routerLink: '/admin/moderation/blocklist/servers',
73 iconName: 'server'
74 })
75 }
67 76
68 if (this.hasUsersRight()) this.menuEntries.push({ label: this.i18n('Users'), routerLink: '/admin/users' }) 77 if (this.hasUsersRight()) this.menuEntries.push({ label: this.i18n('Users'), routerLink: '/admin/users' })
69 if (this.hasServerFollowRight()) this.menuEntries.push(federationItems) 78 if (this.hasServerFollowRight()) this.menuEntries.push(federationItems)