- if (this.hasUsersRight()) this.items.push({ label: this.i18n('Users'), routerLink: '/admin/users' })
- if (this.hasServerFollowRight()) this.items.push({ label: this.i18n('Follows & redundancies'), routerLink: '/admin/follows' })
- if (this.hasVideoAbusesRight() || this.hasVideoBlocklistRight()) this.items.push({ label: this.i18n('Moderation'), routerLink: '/admin/moderation' })
- if (this.hasConfigRight()) this.items.push({ label: this.i18n('Configuration'), routerLink: '/admin/config' })
- if (this.hasPluginsRight()) this.items.push({ label: this.i18n('Plugins/Themes'), routerLink: '/admin/plugins' })
- if (this.hasJobsRight() || this.hasLogsRight() || this.hasDebugRight()) this.items.push({ label: this.i18n('System'), routerLink: '/admin/system' })
+ const federationItems: TopMenuDropdownParam = {
+ label: this.i18n('Federation'),
+ children: [
+ {
+ label: this.i18n('Instances you follow'),
+ routerLink: '/admin/follows/following-list',
+ iconName: 'following'
+ },
+ {
+ label: this.i18n('Instances following you'),
+ routerLink: '/admin/follows/followers-list',
+ iconName: 'follower'
+ },
+ {
+ label: this.i18n('Video redundancies'),
+ routerLink: '/admin/follows/video-redundancies-list',
+ iconName: 'videos'
+ }
+ ]
+ }
+
+ const moderationItems: TopMenuDropdownParam = {
+ label: this.i18n('Moderation'),
+ children: []
+ }
+
+ if (this.hasVideoAbusesRight()) {
+ moderationItems.children.push({
+ label: this.i18n('Video reports'),
+ routerLink: '/admin/moderation/video-abuses/list',
+ iconName: 'flag'
+ })
+ }
+ if (this.hasVideoBlocklistRight()) {
+ moderationItems.children.push({
+ label: this.i18n('Video blocks'),
+ routerLink: '/admin/moderation/video-blocks/list',
+ iconName: 'cross'
+ })
+ }
+ if (this.hasAccountsBlocklistRight()) {
+ moderationItems.children.push({
+ label: this.i18n('Muted accounts'),
+ 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.hasServerFollowRight()) this.menuEntries.push(federationItems)
+ if (this.hasVideoAbusesRight() || this.hasVideoBlocklistRight()) this.menuEntries.push(moderationItems)
+ if (this.hasConfigRight()) this.menuEntries.push({ label: this.i18n('Configuration'), routerLink: '/admin/config' })
+ if (this.hasPluginsRight()) this.menuEntries.push({ label: this.i18n('Plugins/Themes'), routerLink: '/admin/plugins' })
+ if (this.hasJobsRight() || this.hasLogsRight() || this.hasDebugRight()) this.menuEntries.push({ label: this.i18n('System'), routerLink: '/admin/system' })