]>
Commit | Line | Data |
---|---|---|
8afc19a6 | 1 | <div class="menu-wrapper"> |
17119e4a | 2 | <menu [ngClass]="{ 'is-logged-in': isLoggedIn }"> |
8afc19a6 C |
3 | <div class="top-menu"> |
4 | <div *ngIf="isLoggedIn" class="logged-in-block"> | |
17119e4a | 5 | <div> |
51a83970 K |
6 | <div class="logged-in-more" ngbDropdown #dropdown="ngbDropdown" placement="bottom-left" [container]="dropdownContainer" (openChange)="onDropdownOpenChange($event)" autoClose="outside"> |
7 | <div ngbDropdownToggle> | |
8 | <img [src]="user.accountAvatarUrl" alt="Avatar" /> | |
9 | <div class="logged-in-info"> | |
10 | <div class="logged-in-display-name">{{ user.account?.displayName }}</div> | |
11 | ||
12 | <div class="logged-in-username">@{{ user.username }}</div> | |
13 | </div> | |
14 | ||
15 | <div class="dropdown-toggle-indicator"> | |
16 | <span class="glyphicon glyphicon-chevron-down"></span> | |
17 | </div> | |
18 | </div> | |
17119e4a C |
19 | |
20 | <div ngbDropdownMenu> | |
51a83970 K |
21 | <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]" |
22 | #profile (click)="onActiveLinkScrollToAnchor(profile)"> | |
17119e4a C |
23 | <my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container> |
24 | </a> | |
25 | ||
26 | <div class="dropdown-divider"></div> | |
27 | ||
17119e4a C |
28 | <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()"> |
29 | <my-global-icon iconName="language" aria-hidden="true"></my-global-icon> | |
30 | <span i18n>Interface:</span> | |
68f6c87a | 31 | <span class="ml-auto text-muted">{{ currentInterfaceLanguage }}</span> |
17119e4a C |
32 | </a> |
33 | ||
34 | <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" fragment="video-languages-subtitles" | |
f3081d64 | 35 | #settingsLanguagesSubtitles (click)="onActiveLinkScrollToAnchor(settingsLanguagesSubtitles)"> |
17119e4a C |
36 | <my-global-icon iconName="video-lang" aria-hidden="true"></my-global-icon> |
37 | <span i18n>Videos:</span> | |
38 | <span class="ml-auto text-muted">{{ videoLanguages.join(', ') }}</span> | |
39 | </a> | |
40 | ||
51a83970 | 41 | <a ngbDropdownItem ngbDropdownToggle class="dropdown-item settings-sensitive" routerLink="/my-account/settings" |
17119e4a | 42 | fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy |
f3081d64 | 43 | (click)="onActiveLinkScrollToAnchor(settingsSensitiveContentPolicy)"> |
17119e4a C |
44 | <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon> |
45 | <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy !== 'display' }" iconName="unsensitive" aria-hidden="true"></my-global-icon> | |
46 | <span i18n>Sensitive:</span> | |
47 | <span class="ml-auto text-muted">{{ nsfwPolicy }}</span> | |
48 | </a> | |
49 | ||
50 | <a ngbDropdownItem class="dropdown-item" (click)="toggleUseP2P()"> | |
51 | <my-global-icon iconName="p2p" aria-hidden="true"></my-global-icon> | |
52 | <ng-container i18n>Help share videos</ng-container> | |
4f926722 C |
53 | |
54 | <my-input-switch class="ml-auto" [checked]="user.webTorrentEnabled"></my-input-switch> | |
17119e4a C |
55 | </a> |
56 | ||
57 | <div class="dropdown-divider"></div> | |
58 | ||
51a83970 | 59 | <a *ngIf="!isInMobileView" ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openHotkeysCheatSheet()"> |
805bec52 C |
60 | <my-global-icon iconName="command" aria-hidden="true"></my-global-icon> |
61 | <ng-container i18n>Keyboard shortcuts</ng-container> | |
17119e4a C |
62 | </a> |
63 | ||
64 | <a ngbDropdownItem ngbDropdownToggle (click)="logout($event)" class="dropdown-item" href="#"> | |
805bec52 C |
65 | <my-global-icon iconName="sign-out" aria-hidden="true"></my-global-icon> |
66 | <ng-container i18n>Log out</ng-container> | |
17119e4a C |
67 | </a> |
68 | </div> | |
63347a0f | 69 | </div> |
51a83970 K |
70 | |
71 | <my-notification (navigate)="onActiveLinkScrollToAnchor($event)"></my-notification> | |
8afc19a6 | 72 | </div> |
17119e4a C |
73 | |
74 | <div class="logged-in-menu"> | |
f3081d64 | 75 | <a routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)"> |
17119e4a C |
76 | <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> |
77 | <ng-container i18n>My account</ng-container> | |
78 | </a> | |
79 | ||
f3081d64 | 80 | <a routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)"> |
17119e4a C |
81 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> |
82 | <ng-container i18n>My library</ng-container> | |
83 | </a> | |
84 | ||
85 | <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active"> | |
86 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> | |
87 | <ng-container i18n>Administration</ng-container> | |
88 | </a> | |
89 | </div> | |
8afc19a6 C |
90 | </div> |
91 | ||
17119e4a | 92 | <div *ngIf="!isLoggedIn" class="login-buttons-block"> |
8afc19a6 C |
93 | <a i18n routerLink="/login" class="login-button">Login</a> |
94 | <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a> | |
95 | </div> | |
b33f657c | 96 | |
f0048d5e C |
97 | <div *ngIf="isLoggedIn" class="in-my-library"> |
98 | <div i18n class="block-title">IN MY LIBRARY</div> | |
a55052c9 | 99 | |
17119e4a | 100 | <a *ngIf="user.canSeeVideosLink" routerLink="/my-library/videos" routerLinkActive="active"> |
6ad971d5 | 101 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> |
a55052c9 C |
102 | <ng-container i18n>Videos</ng-container> |
103 | </a> | |
104 | ||
17119e4a | 105 | <a routerLink="/my-library/video-playlists" routerLinkActive="active"> |
6ad971d5 | 106 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> |
a55052c9 C |
107 | <ng-container i18n>Playlists</ng-container> |
108 | </a> | |
b33f657c | 109 | |
a55052c9 | 110 | <a routerLink="/videos/subscriptions" routerLinkActive="active"> |
6ad971d5 | 111 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> |
22a16e36 C |
112 | <ng-container i18n>Subscriptions</ng-container> |
113 | </a> | |
114 | ||
17119e4a | 115 | <a routerLink="/my-library/history/videos" routerLinkActive="active"> |
6ad971d5 | 116 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> |
a55052c9 C |
117 | <ng-container i18n>History</ng-container> |
118 | </a> | |
119 | ||
120 | </div> | |
121 | ||
17119e4a C |
122 | <div class="on-instance"> |
123 | <div i18n class="block-title">ON {{instanceName}}</div> | |
a55052c9 | 124 | |
2d3741d6 | 125 | <a routerLink="/videos/overview" routerLinkActive="active"> |
6ad971d5 | 126 | <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon> |
4913295f | 127 | <ng-container i18n>Discover</ng-container> |
2d3741d6 C |
128 | </a> |
129 | ||
8afc19a6 | 130 | <a routerLink="/videos/trending" routerLinkActive="active"> |
6ad971d5 | 131 | <my-global-icon iconName="trending" aria-hidden="true"></my-global-icon> |
8afc19a6 C |
132 | <ng-container i18n>Trending</ng-container> |
133 | </a> | |
b33f657c | 134 | |
c07eb946 | 135 | <a routerLink="/videos/most-liked" routerLinkActive="active"> |
6ad971d5 | 136 | <my-global-icon iconName="like" aria-hidden="true"></my-global-icon> |
c07eb946 JM |
137 | <ng-container i18n>Most liked</ng-container> |
138 | </a> | |
139 | ||
8afc19a6 | 140 | <a routerLink="/videos/recently-added" routerLinkActive="active"> |
6ad971d5 | 141 | <my-global-icon iconName="recently-added" aria-hidden="true"></my-global-icon> |
8afc19a6 C |
142 | <ng-container i18n>Recently added</ng-container> |
143 | </a> | |
b33f657c | 144 | |
8afc19a6 | 145 | <a routerLink="/videos/local" routerLinkActive="active"> |
6ad971d5 | 146 | <my-global-icon iconName="home" aria-hidden="true"></my-global-icon> |
17119e4a | 147 | <ng-container i18n>Local videos</ng-container> |
8afc19a6 C |
148 | </a> |
149 | </div> | |
d3217560 | 150 | </div> |
066e94c5 | 151 | |
d3217560 | 152 | <div class="footer"> |
17119e4a | 153 | <div class="footer-block"> |
d3217560 | 154 | <a *ngIf="!isLoggedIn" (click)="openQuickSettings()"> |
6ad971d5 | 155 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> |
dfed7846 | 156 | <ng-container i18n>My settings</ng-container> |
d3217560 | 157 | </a> |
17119e4a C |
158 | |
159 | <a routerLink="/about" routerLinkActive="active"> | |
6ad971d5 | 160 | <my-global-icon iconName="help" aria-hidden="true"></my-global-icon> |
8afc19a6 C |
161 | <ng-container i18n>About</ng-container> |
162 | </a> | |
163 | </div> | |
ffb321be | 164 | |
14f83c68 C |
165 | <div class="bottom-links"> |
166 | ||
d3217560 | 167 | <div class="footer-links"> |
14f83c68 | 168 | <div *ngIf="isLoggedIn === false"> |
68f6c87a | 169 | <span role="button" (click)="openLanguageChooser()" class="c-hand" i18n>Interface: {{ currentInterfaceLanguage }}</span> |
14f83c68 C |
170 | </div> |
171 | ||
172 | <div> | |
173 | <a i18n routerLink="/about/instance">Contact</a> | |
174 | <a i18n href="https://joinpeertube.org/help" i18n-title title="Get help using PeerTube" target="_blank" rel="noopener noreferrer">Help</a> | |
175 | <a i18n href="https://joinpeertube.org/faq" i18n-title title="Frequently asked questions about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a> | |
176 | <a i18n routerLink="/about/instance" fragment="statistics">Stats</a> | |
177 | <a i18n href="https://docs.joinpeertube.org/api-rest-reference.html" i18n-title title="API documentation" target="_blank" rel="noopener noreferrer">API</a> | |
17119e4a | 178 | <a (click)="openHotkeysCheatSheet()" class="c-hand" i18n>Keyboard shortcuts</a> |
14f83c68 | 179 | </div> |
d3217560 | 180 | </div> |
14f83c68 | 181 | |
d3217560 | 182 | <div class="footer-copyleft"> |
9bb720f3 | 183 | <small class="d-inline" i18n-title title="powered by PeerTube - CopyLeft 2015-2021"> |
d6d951dd | 184 | <a href="https://joinpeertube.org" class="mr-1" target="_blank" rel="noopener noreferrer" i18n>powered by PeerTube</a> |
14f83c68 | 185 | |
d6d951dd | 186 | <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" target="_blank" rel="noopener noreferrer"> |
9bb720f3 | 187 | <span aria-label="copyleft" class="d-inline-block" style="transform: rotateY(180deg)">©</span> 2015-2021 |
d3217560 RK |
188 | </a> |
189 | </small> | |
190 | </div> | |
191 | </div> | |
8afc19a6 C |
192 | </div> |
193 | </menu> | |
194 | </div> | |
36f9424f | 195 | |
2f1548fd | 196 | <my-language-chooser #languageChooserModal></my-language-chooser> |
d3217560 | 197 | <my-quick-settings #quickSettingsModal></my-quick-settings> |