pull/2937/head
Chocobozzz 2020-07-02 10:32:11 +02:00
parent 4d45cdfa10
commit 57e56eb294
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 36 additions and 27 deletions

View File

@ -19,22 +19,22 @@ export class AdminComponent implements OnInit {
) {} ) {}
ngOnInit () { ngOnInit () {
const federationItems: TopMenuDropdownParam = { const federationItems: TopMenuDropdownParam = {
label: this.i18n('Federation'), label: this.i18n('Federation'),
children: [ children: [
{ {
label: this.i18n('Instances you follow'), label: this.i18n('Instances you follow'),
routerLink: '/admin/follows/following-list', routerLink: '/admin/follows/following-list',
iconName: 'sign-out' iconName: 'sign-out'
}, },
{ {
label: this.i18n('Instances following you'), label: this.i18n('Instances following you'),
routerLink: '/admin/follows/followers-list', routerLink: '/admin/follows/followers-list',
iconName: 'sign-in' iconName: 'sign-in'
}, },
{ {
label: this.i18n('Video redundancies'), label: this.i18n('Video redundancies'),
routerLink: '/admin/follows/video-redundancies-list', routerLink: '/admin/follows/video-redundancies-list',
iconName: 'videos' iconName: 'videos'
} }
] ]
@ -44,26 +44,35 @@ export class AdminComponent implements OnInit {
label: this.i18n('Moderation'), label: this.i18n('Moderation'),
children: [] children: []
} }
if (this.hasVideoAbusesRight()) moderationItems.children.push({
label: this.i18n('Video reports'), if (this.hasVideoAbusesRight()) {
routerLink: '/admin/moderation/video-abuses/list', moderationItems.children.push({
iconName: 'flag' label: this.i18n('Video reports'),
}) routerLink: '/admin/moderation/video-abuses/list',
if (this.hasVideoBlocklistRight()) moderationItems.children.push({ iconName: 'flag'
label: this.i18n('Video blocks'), })
routerLink: '/admin/moderation/video-blocks/list', }
iconName: 'cross' if (this.hasVideoBlocklistRight()) {
}) moderationItems.children.push({
if (this.hasAccountsBlocklistRight()) moderationItems.children.push({ label: this.i18n('Video blocks'),
label: this.i18n('Muted accounts'), routerLink: '/admin/moderation/video-blocks/list',
routerLink: '/admin/moderation/blocklist/accounts', iconName: 'cross'
iconName: 'user' })
}) }
if (this.hasServersBlocklistRight()) moderationItems.children.push({ if (this.hasAccountsBlocklistRight()) {
label: this.i18n('Muted servers'), moderationItems.children.push({
routerLink: '/admin/moderation/blocklist/servers', label: this.i18n('Muted accounts'),
iconName: 'server' routerLink: '/admin/moderation/blocklist/accounts',
}) iconName: 'user'
})
}
if (this.hasServersBlocklistRight()) {
moderationItems.children.push({
label: this.i18n('Muted servers'),
routerLink: '/admin/moderation/blocklist/servers',
iconName: 'server'
})
}
if (this.hasUsersRight()) this.menuEntries.push({ label: this.i18n('Users'), routerLink: '/admin/users' }) if (this.hasUsersRight()) this.menuEntries.push({ label: this.i18n('Users'), routerLink: '/admin/users' })
if (this.hasServerFollowRight()) this.menuEntries.push(federationItems) if (this.hasServerFollowRight()) this.menuEntries.push(federationItems)

View File

@ -77,7 +77,7 @@ import { MyAccountComponent } from './my-account.component'
MyAccountVideoPlaylistCreateComponent, MyAccountVideoPlaylistCreateComponent,
MyAccountVideoPlaylistUpdateComponent, MyAccountVideoPlaylistUpdateComponent,
MyAccountVideoPlaylistsComponent, MyAccountVideoPlaylistsComponent,
MyAccountVideoPlaylistElementsComponent, MyAccountVideoPlaylistElementsComponent
], ],
exports: [ exports: [

View File

@ -83,7 +83,7 @@ import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
ListOverflowComponent, ListOverflowComponent,
TopMenuDropdownComponent, TopMenuDropdownComponent,
UserNotificationsComponent, UserNotificationsComponent
], ],
exports: [ exports: [