]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-account/my-account.component.ts
Translated using Weblate (Russian)
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account.component.ts
CommitLineData
ba430d75 1import { Component, OnInit } from '@angular/core'
17119e4a 2import { AuthUser, ScreenService } from '@app/core'
0a4cb95c 3import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component'
4bb6886d
C
4
5@Component({
0626e7af 6 selector: 'my-my-account',
4c8e4e04
C
7 templateUrl: './my-account.component.html',
8 styleUrls: [ './my-account.component.scss' ]
4bb6886d 9})
ba430d75 10export class MyAccountComponent implements OnInit {
ddb83e49 11 menuEntries: TopMenuDropdownParam[] = []
dfe3f7b7 12 user: AuthUser
d7639f66 13
5d08a6a7 14 constructor (
66357162 15 private screenService: ScreenService
9df52d66 16 ) { }
ba430d75 17
7034b3c9 18 get isBroadcastMessageDisplayed () {
19 return this.screenService.isBroadcastMessageDisplayed
20 }
21
ba430d75 22 ngOnInit (): void {
17119e4a 23 this.buildMenu()
dfe3f7b7
K
24 }
25
26 private buildMenu () {
17119e4a
C
27 const moderationEntries: TopMenuDropdownParam = {
28 label: $localize`Moderation`,
ddb83e49
C
29 children: [
30 {
66357162 31 label: $localize`Muted accounts`,
a55052c9 32 routerLink: '/my-account/blocklist/accounts',
345b4a22 33 iconName: 'user-x'
ddb83e49
C
34 },
35 {
66357162 36 label: $localize`Muted servers`,
a55052c9 37 routerLink: '/my-account/blocklist/servers',
345b4a22 38 iconName: 'peertube-x'
ddb83e49 39 },
94148c90 40 {
17119e4a 41 label: $localize`Abuse reports`,
94148c90
C
42 routerLink: '/my-account/abuses',
43 iconName: 'flag'
ddb83e49
C
44 }
45 ]
46 }
4c8e4e04 47
ddb83e49
C
48 this.menuEntries = [
49 {
17119e4a 50 label: $localize`Settings`,
ddb83e49
C
51 routerLink: '/my-account/settings'
52 },
17119e4a 53
2f1548fd 54 {
17119e4a 55 label: $localize`Notifications`,
2f1548fd
C
56 routerLink: '/my-account/notifications'
57 },
17119e4a 58
5beb89f2
RK
59 {
60 label: $localize`Applications`,
61 routerLink: '/my-account/applications'
62 },
63
17119e4a 64 moderationEntries
ddb83e49 65 ]
d7639f66 66 }
5d08a6a7 67}