aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/menu/menu.component.html')
-rw-r--r--client/src/app/menu/menu.component.html179
1 files changed, 92 insertions, 87 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index 2011899d3..a4b4f26d0 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -1,98 +1,106 @@
1<div class="menu-wrapper"> 1<div class="menu-wrapper">
2 <menu [ngClass]="{ 'logged-in': isLoggedIn }"> 2 <menu [ngClass]="{ 'is-logged-in': isLoggedIn }">
3 <div class="top-menu"> 3 <div class="top-menu">
4 <div *ngIf="isLoggedIn" class="logged-in-block"> 4 <div *ngIf="isLoggedIn" class="logged-in-block">
5 <my-avatar-notification [user]="user" (navigate)="onSameUrlRestoreScrollPosition($event)"></my-avatar-notification> 5 <div>
6 <my-avatar-notification [user]="user" (navigate)="onSameUrlRestoreScrollPosition($event)"></my-avatar-notification>
6 7
7 <div class="logged-in-info"> 8 <div class="logged-in-info">
8 <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a> 9 <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a>
9 <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a> 10 <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a>
10 11
11 <div class="logged-in-username">{{ user.username }}</div> 12 <div class="logged-in-username">@{{ user.username }}</div>
12 </div> 13 </div>
13
14 <div class="logged-in-more" ngbDropdown [placement]="placement" container="body" autoClose="outside">
15 <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button"></my-global-icon>
16
17 <div ngbDropdownMenu>
18 <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]">
19 <my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container>
20 </a>
21
22 <div class="dropdown-divider"></div>
23
24 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings"
25 #settingsLink (click)="onSameUrlRestoreScrollPosition(settingsLink)">
26 <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> <ng-container i18n>Account settings</ng-container>
27 </a>
28
29 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/video-channels"
30 #channelsLink (click)="onSameUrlRestoreScrollPosition(channelsLink)">
31 <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> <ng-container i18n>Channels settings</ng-container>
32 </a>
33
34 <div class="dropdown-divider"></div>
35
36 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()">
37 <my-global-icon iconName="language" aria-hidden="true"></my-global-icon>
38 <span i18n>Interface:</span>
39 <span class="ml-auto text-muted">{{ language }}</span>
40 </a>
41
42 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" fragment="video-languages-subtitles"
43 #settingsLanguagesSubtitles (click)="onSameUrlRestoreScrollPosition(settingsLanguagesSubtitles)">
44 <my-global-icon iconName="video-lang" aria-hidden="true"></my-global-icon>
45 <span i18n>Videos:</span>
46 <span class="ml-auto text-muted">{{ videoLanguages.join(', ') }}</span>
47 </a>
48
49 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings"
50 fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy
51 (click)="onSameUrlRestoreScrollPosition(settingsSensitiveContentPolicy)">
52 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon>
53 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy !== 'display' }" iconName="unsensitive" aria-hidden="true"></my-global-icon>
54 <span i18n>Sensitive:</span>
55 <span class="ml-auto text-muted">{{ nsfwPolicy }}</span>
56 </a>
57
58 <a ngbDropdownItem class="dropdown-item" (click)="toggleUseP2P()">
59 <my-global-icon iconName="p2p" aria-hidden="true"></my-global-icon>
60 <ng-container i18n>Help share videos</ng-container>
61 <input type="checkbox" [checked]="user.webTorrentEnabled"/><label class="ml-auto" for="switch">Toggle p2p</label>
62 </a>
63
64 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings"
65 #settingsMoreLink (click)="onSameUrlRestoreScrollPosition(settingsMoreLink)">
66 <my-global-icon iconName="more-horizontal" aria-hidden="true"></my-global-icon> <ng-container i18n>More account settings</ng-container>
67 </a>
68
69 <div class="dropdown-divider"></div>
70
71 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openHotkeysCheatSheet()">
72 <i class="icon icon-shortcuts" aria-hidden="true"></i> <ng-container i18n>Keyboard shortcuts</ng-container>
73 </a>
74 14
75 <a ngbDropdownItem ngbDropdownToggle (click)="logout($event)" class="dropdown-item" href="#"> 15 <div class="logged-in-more" ngbDropdown [placement]="placement" container="body" autoClose="outside">
76 <my-global-icon iconName="sign-out" aria-hidden="true"></my-global-icon> <ng-container i18n>Log out</ng-container> 16 <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button"></my-global-icon>
77 </a> 17
18 <div ngbDropdownMenu>
19 <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]">
20 <my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container>
21 </a>
22
23 <div class="dropdown-divider"></div>
24
25 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/notifications">
26 <my-global-icon iconName="inbox-full" aria-hidden="true"></my-global-icon> <ng-container i18n>My notifications</ng-container>
27 </a>
28
29 <div class="dropdown-divider"></div>
30
31 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()">
32 <my-global-icon iconName="language" aria-hidden="true"></my-global-icon>
33 <span i18n>Interface:</span>
34 <span class="ml-auto text-muted">{{ language }}</span>
35 </a>
36
37 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" fragment="video-languages-subtitles"
38 #settingsLanguagesSubtitles (click)="onSameUrlRestoreScrollPosition(settingsLanguagesSubtitles)">
39 <my-global-icon iconName="video-lang" aria-hidden="true"></my-global-icon>
40 <span i18n>Videos:</span>
41 <span class="ml-auto text-muted">{{ videoLanguages.join(', ') }}</span>
42 </a>
43
44 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings"
45 fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy
46 (click)="onSameUrlRestoreScrollPosition(settingsSensitiveContentPolicy)">
47 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon>
48 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy !== 'display' }" iconName="unsensitive" aria-hidden="true"></my-global-icon>
49 <span i18n>Sensitive:</span>
50 <span class="ml-auto text-muted">{{ nsfwPolicy }}</span>
51 </a>
52
53 <a ngbDropdownItem class="dropdown-item" (click)="toggleUseP2P()">
54 <my-global-icon iconName="p2p" aria-hidden="true"></my-global-icon>
55 <ng-container i18n>Help share videos</ng-container>
56 <input type="checkbox" [checked]="user.webTorrentEnabled"/><label class="ml-auto" for="switch">Toggle p2p</label>
57 </a>
58
59 <div class="dropdown-divider"></div>
60
61 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openHotkeysCheatSheet()">
62 <i class="icon icon-shortcuts" aria-hidden="true"></i> <ng-container i18n>Keyboard shortcuts</ng-container>
63 </a>
64
65 <a ngbDropdownItem ngbDropdownToggle (click)="logout($event)" class="dropdown-item" href="#">
66 <my-global-icon iconName="sign-out" aria-hidden="true"></my-global-icon> <ng-container i18n>Log out</ng-container>
67 </a>
68 </div>
78 </div> 69 </div>
79 </div> 70 </div>
71
72 <div class="logged-in-menu">
73 <a routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onSameUrlRestoreScrollPosition(settingsLink)">
74 <my-global-icon iconName="user" aria-hidden="true"></my-global-icon>
75 <ng-container i18n>My account</ng-container>
76 </a>
77
78 <a routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onSameUrlRestoreScrollPosition(libraryLink)">
79 <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon>
80 <ng-container i18n>My library</ng-container>
81 </a>
82
83 <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
84 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
85 <ng-container i18n>Administration</ng-container>
86 </a>
87 </div>
80 </div> 88 </div>
81 89
82 <div *ngIf="!isLoggedIn" class="button-block"> 90 <div *ngIf="!isLoggedIn" class="login-buttons-block">
83 <a i18n routerLink="/login" class="login-button">Login</a> 91 <a i18n routerLink="/login" class="login-button">Login</a>
84 <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a> 92 <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a>
85 </div> 93 </div>
86 94
87 <div *ngIf="isLoggedIn" class="panel-block"> 95 <div *ngIf="isLoggedIn" class="in-my-account">
88 <div i18n class="block-title">MY LIBRARY</div> 96 <div i18n class="block-title">IN MY ACCOUNT</div>
89 97
90 <a *ngIf="user.canSeeVideosLink" routerLink="/my-account/videos" routerLinkActive="active"> 98 <a *ngIf="user.canSeeVideosLink" routerLink="/my-library/videos" routerLinkActive="active">
91 <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> 99 <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
92 <ng-container i18n>Videos</ng-container> 100 <ng-container i18n>Videos</ng-container>
93 </a> 101 </a>
94 102
95 <a routerLink="/my-account/video-playlists" routerLinkActive="active"> 103 <a routerLink="/my-library/video-playlists" routerLinkActive="active">
96 <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> 104 <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon>
97 <ng-container i18n>Playlists</ng-container> 105 <ng-container i18n>Playlists</ng-container>
98 </a> 106 </a>
@@ -102,15 +110,15 @@
102 <ng-container i18n>Subscriptions</ng-container> 110 <ng-container i18n>Subscriptions</ng-container>
103 </a> 111 </a>
104 112
105 <a routerLink="/my-account/history/videos" routerLinkActive="active"> 113 <a routerLink="/my-library/history/videos" routerLinkActive="active">
106 <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> 114 <my-global-icon iconName="history" aria-hidden="true"></my-global-icon>
107 <ng-container i18n>History</ng-container> 115 <ng-container i18n>History</ng-container>
108 </a> 116 </a>
109 117
110 </div> 118 </div>
111 119
112 <div class="panel-block"> 120 <div class="on-instance">
113 <div i18n class="block-title">VIDEOS</div> 121 <div i18n class="block-title">ON {{instanceName}}</div>
114 122
115 <a routerLink="/videos/overview" routerLinkActive="active"> 123 <a routerLink="/videos/overview" routerLinkActive="active">
116 <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon> 124 <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon>
@@ -134,22 +142,19 @@
134 142
135 <a routerLink="/videos/local" routerLinkActive="active"> 143 <a routerLink="/videos/local" routerLinkActive="active">
136 <my-global-icon iconName="home" aria-hidden="true"></my-global-icon> 144 <my-global-icon iconName="home" aria-hidden="true"></my-global-icon>
137 <ng-container i18n>Local</ng-container> 145 <ng-container i18n>Local videos</ng-container>
138 </a> 146 </a>
139 </div> 147 </div>
140 </div> 148 </div>
141 149
142 <div class="footer"> 150 <div class="footer">
143 <div class="panel-block"> 151 <div class="footer-block">
144 <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
145 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
146 <ng-container i18n>Administration</ng-container>
147 </a>
148 <a *ngIf="!isLoggedIn" (click)="openQuickSettings()"> 152 <a *ngIf="!isLoggedIn" (click)="openQuickSettings()">
149 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> 153 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
150 <ng-container i18n>Settings</ng-container> 154 <ng-container i18n>Settings</ng-container>
151 </a> 155 </a>
152 <a routerLink="/about/instance"> 156
157 <a routerLink="/about" routerLinkActive="active">
153 <my-global-icon iconName="help" aria-hidden="true"></my-global-icon> 158 <my-global-icon iconName="help" aria-hidden="true"></my-global-icon>
154 <ng-container i18n>About</ng-container> 159 <ng-container i18n>About</ng-container>
155 </a> 160 </a>
@@ -168,7 +173,7 @@
168 <a i18n href="https://joinpeertube.org/faq" i18n-title title="Frequently asked questions about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a> 173 <a i18n href="https://joinpeertube.org/faq" i18n-title title="Frequently asked questions about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a>
169 <a i18n routerLink="/about/instance" fragment="statistics">Stats</a> 174 <a i18n routerLink="/about/instance" fragment="statistics">Stats</a>
170 <a i18n href="https://docs.joinpeertube.org/api-rest-reference.html" i18n-title title="API documentation" target="_blank" rel="noopener noreferrer">API</a> 175 <a i18n href="https://docs.joinpeertube.org/api-rest-reference.html" i18n-title title="API documentation" target="_blank" rel="noopener noreferrer">API</a>
171 <a (click)="openHotkeysCheatSheet()" class="c-hand" i18n>Shortcuts</a> 176 <a (click)="openHotkeysCheatSheet()" class="c-hand" i18n>Keyboard shortcuts</a>
172 </div> 177 </div>
173 </div> 178 </div>
174 179