diff options
Diffstat (limited to 'client/src/app/menu')
-rw-r--r-- | client/src/app/menu/menu.component.html | 41 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.scss | 426 | ||||
-rw-r--r-- | client/src/app/menu/menu.component.ts | 5 | ||||
-rw-r--r-- | client/src/app/menu/notification.component.scss | 3 |
4 files changed, 222 insertions, 253 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index 9aa397edd..df5c7971d 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html | |||
@@ -5,7 +5,7 @@ | |||
5 | <div> | 5 | <div> |
6 | <div class="logged-in-more" ngbDropdown #dropdown="ngbDropdown" placement="bottom-left" [container]="dropdownContainer" (openChange)="onDropdownOpenChange($event)" autoClose="outside"> | 6 | <div class="logged-in-more" ngbDropdown #dropdown="ngbDropdown" placement="bottom-left" [container]="dropdownContainer" (openChange)="onDropdownOpenChange($event)" autoClose="outside"> |
7 | <div ngbDropdownToggle> | 7 | <div ngbDropdownToggle> |
8 | <img [src]="user.accountAvatarUrl" alt="Avatar" /> | 8 | <my-account-avatar [account]="user.account" size="34"></my-account-avatar> |
9 | <div class="logged-in-info"> | 9 | <div class="logged-in-info"> |
10 | <div class="logged-in-display-name">{{ user.account?.displayName }}</div> | 10 | <div class="logged-in-display-name">{{ user.account?.displayName }}</div> |
11 | 11 | ||
@@ -40,9 +40,10 @@ | |||
40 | 40 | ||
41 | <a ngbDropdownItem ngbDropdownToggle class="dropdown-item settings-sensitive" routerLink="/my-account/settings" | 41 | <a ngbDropdownItem ngbDropdownToggle class="dropdown-item settings-sensitive" routerLink="/my-account/settings" |
42 | fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy | 42 | fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy |
43 | (click)="onActiveLinkScrollToAnchor(settingsSensitiveContentPolicy)"> | 43 | (click)="onActiveLinkScrollToAnchor(settingsSensitiveContentPolicy)" |
44 | <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon> | 44 | > |
45 | <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy !== 'display' }" iconName="unsensitive" aria-hidden="true"></my-global-icon> | 45 | <my-global-icon class="hover-display-toggle" [hidden]="user.nsfwPolicy === 'display'" iconName="sensitive" aria-hidden="true"></my-global-icon> |
46 | <my-global-icon class="hover-display-toggle" [hidden]="user.nsfwPolicy !== 'display'" iconName="unsensitive" aria-hidden="true"></my-global-icon> | ||
46 | <span i18n>Sensitive:</span> | 47 | <span i18n>Sensitive:</span> |
47 | <span class="ml-auto text-muted">{{ nsfwPolicy }}</span> | 48 | <span class="ml-auto text-muted">{{ nsfwPolicy }}</span> |
48 | </a> | 49 | </a> |
@@ -72,17 +73,17 @@ | |||
72 | </div> | 73 | </div> |
73 | 74 | ||
74 | <div class="logged-in-menu"> | 75 | <div class="logged-in-menu"> |
75 | <a routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)"> | 76 | <a class="menu-link" routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)"> |
76 | <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> | 77 | <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> |
77 | <ng-container i18n>My account</ng-container> | 78 | <ng-container i18n>My account</ng-container> |
78 | </a> | 79 | </a> |
79 | 80 | ||
80 | <a routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)"> | 81 | <a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)"> |
81 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> | 82 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> |
82 | <ng-container i18n>My library</ng-container> | 83 | <ng-container i18n>My library</ng-container> |
83 | </a> | 84 | </a> |
84 | 85 | ||
85 | <a *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active"> | 86 | <a class="menu-link" *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active"> |
86 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> | 87 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> |
87 | <ng-container i18n>Administration</ng-container> | 88 | <ng-container i18n>Administration</ng-container> |
88 | </a> | 89 | </a> |
@@ -90,29 +91,29 @@ | |||
90 | </div> | 91 | </div> |
91 | 92 | ||
92 | <div *ngIf="!isLoggedIn" class="login-buttons-block"> | 93 | <div *ngIf="!isLoggedIn" class="login-buttons-block"> |
93 | <a i18n routerLink="/login" class="login-button">Login</a> | 94 | <a i18n routerLink="/login" class="peertube-button-link orange-button">Login</a> |
94 | <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="create-account-button">Create an account</a> | 95 | <a i18n *ngIf="isRegistrationAllowed()" routerLink="/signup" class="peertube-button-link">Create an account</a> |
95 | </div> | 96 | </div> |
96 | 97 | ||
97 | <div *ngIf="isLoggedIn" class="in-my-library"> | 98 | <div *ngIf="isLoggedIn" class="in-my-library"> |
98 | <div i18n class="block-title">IN MY LIBRARY</div> | 99 | <div i18n class="block-title">IN MY LIBRARY</div> |
99 | 100 | ||
100 | <a *ngIf="user.canSeeVideosLink" routerLink="/my-library/videos" routerLinkActive="active"> | 101 | <a *ngIf="user.canSeeVideosLink" class="menu-link" routerLink="/my-library/videos" routerLinkActive="active"> |
101 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> | 102 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> |
102 | <ng-container i18n>Videos</ng-container> | 103 | <ng-container i18n>Videos</ng-container> |
103 | </a> | 104 | </a> |
104 | 105 | ||
105 | <a routerLink="/my-library/video-playlists" routerLinkActive="active"> | 106 | <a class="menu-link" routerLink="/my-library/video-playlists" routerLinkActive="active"> |
106 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> | 107 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> |
107 | <ng-container i18n>Playlists</ng-container> | 108 | <ng-container i18n>Playlists</ng-container> |
108 | </a> | 109 | </a> |
109 | 110 | ||
110 | <a routerLink="/videos/subscriptions" routerLinkActive="active"> | 111 | <a class="menu-link" routerLink="/videos/subscriptions" routerLinkActive="active"> |
111 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> | 112 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> |
112 | <ng-container i18n>Subscriptions</ng-container> | 113 | <ng-container i18n>Subscriptions</ng-container> |
113 | </a> | 114 | </a> |
114 | 115 | ||
115 | <a routerLink="/my-library/history/videos" routerLinkActive="active"> | 116 | <a class="menu-link" routerLink="/my-library/history/videos" routerLinkActive="active"> |
116 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> | 117 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> |
117 | <ng-container i18n>History</ng-container> | 118 | <ng-container i18n>History</ng-container> |
118 | </a> | 119 | </a> |
@@ -122,22 +123,22 @@ | |||
122 | <div class="on-instance"> | 123 | <div class="on-instance"> |
123 | <div i18n class="block-title">ON {{instanceName}}</div> | 124 | <div i18n class="block-title">ON {{instanceName}}</div> |
124 | 125 | ||
125 | <a routerLink="/videos/overview" routerLinkActive="active"> | 126 | <a class="menu-link" routerLink="/videos/overview" routerLinkActive="active"> |
126 | <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon> | 127 | <my-global-icon iconName="globe" aria-hidden="true"></my-global-icon> |
127 | <ng-container i18n>Discover</ng-container> | 128 | <ng-container i18n>Discover</ng-container> |
128 | </a> | 129 | </a> |
129 | 130 | ||
130 | <a routerLink="/videos/trending" routerLinkActive="active"> | 131 | <a class="menu-link" routerLink="/videos/trending" routerLinkActive="active"> |
131 | <my-global-icon iconName="trending" aria-hidden="true"></my-global-icon> | 132 | <my-global-icon iconName="trending" aria-hidden="true"></my-global-icon> |
132 | <ng-container i18n>Trending</ng-container> | 133 | <ng-container i18n>Trending</ng-container> |
133 | </a> | 134 | </a> |
134 | 135 | ||
135 | <a routerLink="/videos/recently-added" routerLinkActive="active"> | 136 | <a class="menu-link" routerLink="/videos/recently-added" routerLinkActive="active"> |
136 | <my-global-icon iconName="recently-added" aria-hidden="true"></my-global-icon> | 137 | <my-global-icon iconName="recently-added" aria-hidden="true"></my-global-icon> |
137 | <ng-container i18n>Recently added</ng-container> | 138 | <ng-container i18n>Recently added</ng-container> |
138 | </a> | 139 | </a> |
139 | 140 | ||
140 | <a routerLink="/videos/local" routerLinkActive="active"> | 141 | <a class="menu-link" routerLink="/videos/local" routerLinkActive="active"> |
141 | <my-global-icon iconName="home" aria-hidden="true"></my-global-icon> | 142 | <my-global-icon iconName="home" aria-hidden="true"></my-global-icon> |
142 | <ng-container i18n>Local videos</ng-container> | 143 | <ng-container i18n>Local videos</ng-container> |
143 | </a> | 144 | </a> |
@@ -146,18 +147,18 @@ | |||
146 | 147 | ||
147 | <div class="footer"> | 148 | <div class="footer"> |
148 | <div class="footer-block"> | 149 | <div class="footer-block"> |
149 | <a *ngIf="!isLoggedIn" (click)="openQuickSettings()"> | 150 | <a *ngIf="!isLoggedIn" class="menu-link" (click)="openQuickSettings()"> |
150 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> | 151 | <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon> |
151 | <ng-container i18n>My settings</ng-container> | 152 | <ng-container i18n>My settings</ng-container> |
152 | </a> | 153 | </a> |
153 | 154 | ||
154 | <a routerLink="/about" routerLinkActive="active"> | 155 | <a class="menu-link" routerLink="/about" routerLinkActive="active"> |
155 | <my-global-icon iconName="help" aria-hidden="true"></my-global-icon> | 156 | <my-global-icon iconName="help" aria-hidden="true"></my-global-icon> |
156 | <ng-container i18n>About</ng-container> | 157 | <ng-container i18n>About</ng-container> |
157 | </a> | 158 | </a> |
158 | </div> | 159 | </div> |
159 | 160 | ||
160 | <div class="bottom-links"> | 161 | <div class="footer-bottom"> |
161 | 162 | ||
162 | <div class="footer-links"> | 163 | <div class="footer-links"> |
163 | <div *ngIf="isLoggedIn === false"> | 164 | <div *ngIf="isLoggedIn === false"> |
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss index 2ea66e57d..00d1a1f69 100644 --- a/client/src/app/menu/menu.component.scss +++ b/client/src/app/menu/menu.component.scss | |||
@@ -3,8 +3,11 @@ | |||
3 | 3 | ||
4 | $menu-link-icon-size: 22px; | 4 | $menu-link-icon-size: 22px; |
5 | $menu-link-icon-margin-right: 18px; | 5 | $menu-link-icon-margin-right: 18px; |
6 | $footer-links-base-opacity: .8; | ||
7 | |||
8 | .menu-link { | ||
9 | @include disable-default-a-behaviour; | ||
6 | 10 | ||
7 | @mixin menu-link { | ||
8 | display: flex; | 11 | display: flex; |
9 | align-items: center; | 12 | align-items: center; |
10 | padding-left: $menu-lateral-padding; | 13 | padding-left: $menu-lateral-padding; |
@@ -90,169 +93,158 @@ menu { | |||
90 | display: flex; | 93 | display: flex; |
91 | align-items: center; | 94 | align-items: center; |
92 | justify-content: left; | 95 | justify-content: left; |
96 | } | ||
97 | } | ||
93 | 98 | ||
94 | .logged-in-more { | 99 | my-notification { |
95 | $main-radius: 25px; | 100 | margin-left: auto; |
101 | margin-right: 15px; | ||
102 | } | ||
96 | 103 | ||
97 | flex: 1; | 104 | .logged-in-more { |
98 | margin-left: 13px; | 105 | @mixin display-hints($is-mobile: false) { |
99 | border-radius: $main-radius; | 106 | background-color: rgba(255, 255, 255, 0.15); |
100 | transition: all .1s ease-in-out; | ||
101 | cursor: pointer; | ||
102 | 107 | ||
103 | *, & { | 108 | @if $is-mobile { |
104 | line-height: 1; | 109 | .dropdown-toggle-indicator { |
110 | display: inherit !important; | ||
105 | } | 111 | } |
106 | 112 | .dropdown-toggle:first-child { | |
107 | &.show { | 113 | padding-right: 30px !important; |
108 | background-color: rgba(255, 255, 255, 0.20); | ||
109 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .325); | ||
110 | } | 114 | } |
115 | } | ||
116 | } | ||
111 | 117 | ||
112 | @mixin display-hints($is-mobile: false) { | 118 | $main-radius: 25px; |
113 | background-color: rgba(255, 255, 255, 0.15); | ||
114 | |||
115 | @if $is-mobile { | ||
116 | .dropdown-toggle-indicator { | ||
117 | display: inherit !important; | ||
118 | } | ||
119 | .dropdown-toggle:first-child { | ||
120 | padding-right: 30px !important; | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | 119 | ||
125 | &:hover { | 120 | flex: 1; |
126 | @include display-hints; | 121 | margin-left: 13px; |
127 | } | 122 | border-radius: $main-radius; |
123 | transition: all .1s ease-in-out; | ||
124 | cursor: pointer; | ||
125 | line-height: 1; | ||
128 | 126 | ||
129 | /* smartphones and touchscreens */ | 127 | &.show { |
130 | @media (hover: none) and (pointer: coarse) { | 128 | background-color: rgba(255, 255, 255, 0.20); |
131 | @include display-hints($is-mobile: true); | 129 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .325); |
130 | } | ||
132 | 131 | ||
133 | /* fill space when on mobile */ | 132 | &:hover { |
134 | max-width: calc(100% - 80px); | 133 | @include display-hints; |
135 | .dropdown-toggle { | 134 | } |
136 | max-width: 100%; | ||
137 | } | ||
138 | .logged-in-info { | ||
139 | max-width: calc(100% - 45px) !important; | ||
140 | } | ||
141 | 135 | ||
142 | } | 136 | /* smartphones and touchscreens */ |
137 | @media (hover: none) and (pointer: coarse) { | ||
138 | @include display-hints($is-mobile: true); | ||
143 | 139 | ||
144 | .dropdown-toggle-indicator { | 140 | /* fill space when on mobile */ |
145 | position: relative; | 141 | max-width: calc(100% - 80px); |
146 | width: 0; | ||
147 | display: none; | ||
148 | |||
149 | span { | ||
150 | position: absolute; | ||
151 | right: -35px; | ||
152 | top: -8px; | ||
153 | color: grey; | ||
154 | width: $main-radius; | ||
155 | } | ||
156 | } | ||
157 | 142 | ||
158 | .dropdown-toggle { | 143 | .dropdown-toggle { |
159 | &::after { | 144 | max-width: 100%; |
160 | border: none; | 145 | } |
161 | } | ||
162 | } | ||
163 | 146 | ||
164 | .dropdown-toggle:first-child { | 147 | .logged-in-info { |
165 | display: flex; | 148 | max-width: calc(100% - 45px) !important; |
166 | align-items: center; | 149 | } |
167 | padding: 5px 7px; | 150 | } |
168 | border-radius: $main-radius; | ||
169 | } | ||
170 | 151 | ||
171 | img { | 152 | .dropdown-toggle-indicator { |
172 | @include avatar(34px); | 153 | position: relative; |
154 | width: 0; | ||
155 | display: none; | ||
173 | 156 | ||
174 | margin-right: 10px; | 157 | span { |
175 | } | 158 | position: absolute; |
159 | right: -35px; | ||
160 | top: -8px; | ||
161 | color: grey; | ||
162 | width: $main-radius; | ||
163 | } | ||
164 | } | ||
176 | 165 | ||
177 | .logged-in-info { | 166 | .dropdown-toggle { |
178 | max-width: 105px; | 167 | &::after { |
168 | border: none; | ||
169 | } | ||
170 | } | ||
179 | 171 | ||
180 | flex-grow: 1; | 172 | .dropdown-toggle:first-child { |
173 | display: flex; | ||
174 | align-items: center; | ||
175 | padding: 5px 7px; | ||
176 | border-radius: $main-radius; | ||
177 | } | ||
178 | } | ||
181 | 179 | ||
182 | .logged-in-display-name, | 180 | my-account-avatar { |
183 | .logged-in-username { | 181 | margin-right: 10px; |
184 | @include ellipsis; | 182 | } |
185 | } | ||
186 | 183 | ||
187 | .logged-in-display-name { | 184 | .logged-in-info { |
188 | font-size: 16px; | 185 | max-width: 105px; |
189 | font-weight: $font-semibold; | ||
190 | color: pvar(--menuForegroundColor); | ||
191 | 186 | ||
192 | @include disable-default-a-behaviour; | 187 | flex-grow: 1; |
193 | } | 188 | } |
194 | 189 | ||
195 | .logged-in-username { | 190 | .logged-in-display-name, |
196 | font-size: 13px; | 191 | .logged-in-username { |
197 | color: #C6C6C6; | 192 | @include ellipsis; |
198 | margin-top: 3px; | 193 | } |
199 | } | ||
200 | } | ||
201 | } | ||
202 | 194 | ||
203 | my-notification { | 195 | .logged-in-display-name { |
204 | margin-left: auto; | 196 | font-size: 16px; |
205 | margin-right: 15px; | 197 | font-weight: $font-semibold; |
206 | } | 198 | color: pvar(--menuForegroundColor); |
207 | } | ||
208 | 199 | ||
209 | .logged-in-menu { | 200 | @include disable-default-a-behaviour; |
210 | display: flex; | 201 | } |
211 | flex-direction: column; | ||
212 | align-items: flex-start; | ||
213 | border-top: 1px solid var(--greyForegroundColor); | ||
214 | line-height: $line-height-normal; | ||
215 | 202 | ||
216 | a { | 203 | .logged-in-username { |
217 | @include menu-link; | 204 | font-size: 13px; |
218 | @include disable-default-a-behaviour; | 205 | color: #C6C6C6; |
206 | margin-top: 3px; | ||
207 | } | ||
219 | 208 | ||
220 | $icon-size: 13px; | 209 | .logged-in-menu { |
221 | $additional-margin: ($menu-link-icon-size - $icon-size) / 2; | 210 | display: flex; |
211 | flex-direction: column; | ||
212 | align-items: flex-start; | ||
213 | border-top: 1px solid var(--greyForegroundColor); | ||
214 | line-height: $line-height-normal; | ||
222 | 215 | ||
223 | font-size: 14px; | 216 | a { |
224 | width: 100%; | 217 | $icon-size: 13px; |
225 | min-height: 35px; | 218 | $additional-margin: ($menu-link-icon-size - $icon-size) / 2; |
226 | 219 | ||
227 | my-global-icon { | 220 | font-size: 14px; |
228 | width: $icon-size; | 221 | width: 100%; |
229 | height: $icon-size; | 222 | min-height: 35px; |
230 | 223 | ||
231 | // Keep aligned with other icons | 224 | my-global-icon { |
232 | margin-left: $additional-margin; | 225 | width: $icon-size; |
226 | height: $icon-size; | ||
233 | 227 | ||
234 | &[iconName="channel"] { | 228 | // Keep aligned with other icons |
235 | margin-top: -2px; | 229 | margin-left: $additional-margin; |
236 | } | 230 | } |
237 | } | ||
238 | 231 | ||
239 | &.active, | 232 | &.active, |
240 | &:hover, | 233 | &:hover, |
241 | &:focus-visible { | 234 | &:focus-visible { |
242 | my-global-icon { | 235 | my-global-icon { |
243 | @include apply-svg-color(var(--menuForegroundColor)); | 236 | @include apply-svg-color(var(--menuForegroundColor)); |
244 | } | ||
245 | } | 237 | } |
238 | } | ||
246 | 239 | ||
247 | &.active { | 240 | &.active { |
248 | $border-left-width: 4px; | 241 | $border-left-width: 4px; |
249 | 242 | ||
250 | font-weight: $font-semibold; | 243 | font-weight: $font-semibold; |
251 | border-left: $border-left-width solid var(--mainColor); | 244 | border-left: $border-left-width solid var(--mainColor); |
252 | 245 | ||
253 | my-global-icon { | 246 | my-global-icon { |
254 | margin-left: $additional-margin - $border-left-width; | 247 | margin-left: $additional-margin - $border-left-width; |
255 | } | ||
256 | } | 248 | } |
257 | } | 249 | } |
258 | } | 250 | } |
@@ -261,27 +253,22 @@ menu { | |||
261 | .login-buttons-block { | 253 | .login-buttons-block { |
262 | margin: 30px 25px 35px 25px; | 254 | margin: 30px 25px 35px 25px; |
263 | 255 | ||
264 | .login-button { | 256 | > a { |
265 | @include peertube-button-link; | ||
266 | @include orange-button; | ||
267 | |||
268 | display: block; | 257 | display: block; |
269 | width: 100%; | 258 | width: 100%; |
270 | margin-bottom: 10px; | ||
271 | } | ||
272 | 259 | ||
273 | .create-account-button { | 260 | :not(:last-child) { |
274 | @include peertube-button-link; | 261 | margin-bottom: 10px; |
275 | 262 | } | |
276 | display: block; | 263 | } |
277 | width: 100%; | 264 | } |
278 | 265 | ||
279 | color: #fff; | 266 | .create-account-button { |
280 | background-color: rgba(255, 255, 255, 0.25); | 267 | color: #fff; |
268 | background-color: rgba(255, 255, 255, 0.25); | ||
281 | 269 | ||
282 | &:hover { | 270 | &:hover { |
283 | background-color: rgba(255, 255, 255, 0.28); | 271 | background-color: rgba(255, 255, 255, 0.28); |
284 | } | ||
285 | } | 272 | } |
286 | } | 273 | } |
287 | 274 | ||
@@ -291,92 +278,57 @@ menu { | |||
291 | margin-bottom: 15px; | 278 | margin-bottom: 15px; |
292 | 279 | ||
293 | .block-title { | 280 | .block-title { |
281 | @include ellipsis; | ||
282 | |||
294 | text-transform: uppercase; | 283 | text-transform: uppercase; |
295 | font-weight: $font-bold; // Bold | 284 | font-weight: $font-bold; // Bold |
296 | font-size: 13px; | 285 | font-size: 13px; |
297 | margin-bottom: 25px; | 286 | margin-bottom: 25px; |
298 | margin-left: 26px; | 287 | margin-left: 26px; |
299 | |||
300 | @include ellipsis; | ||
301 | |||
302 | margin-right: 30px; | 288 | margin-right: 30px; |
303 | } | 289 | } |
304 | 290 | ||
305 | a { | 291 | a { |
306 | @include menu-link; | ||
307 | @include disable-default-a-behaviour; | ||
308 | |||
309 | min-height: 40px; | 292 | min-height: 40px; |
310 | |||
311 | my-global-icon { | ||
312 | &[iconName="playlists"] { | ||
313 | height: 24px; | ||
314 | width: 24px; | ||
315 | |||
316 | margin-right: 16px; | ||
317 | } | ||
318 | |||
319 | &[iconName="videos"] { | ||
320 | position: relative; | ||
321 | right: -1px; | ||
322 | } | ||
323 | } | ||
324 | } | 293 | } |
325 | } | 294 | } |
326 | 295 | ||
327 | .footer { | 296 | .footer { |
328 | width: $menu-width; | 297 | width: $menu-width; |
329 | padding-bottom: 15px; | 298 | padding-bottom: 15px; |
299 | } | ||
300 | |||
301 | .footer-bottom { | ||
302 | display: flex; | ||
303 | flex-direction: column; | ||
304 | padding: 0 $menu-lateral-padding; | ||
305 | } | ||
330 | 306 | ||
331 | .bottom-links { | 307 | .footer-links { |
308 | &, > div { | ||
332 | display: flex; | 309 | display: flex; |
333 | flex-direction: column; | 310 | flex-wrap: wrap; |
334 | padding: 0 $menu-lateral-padding; | ||
335 | } | 311 | } |
336 | 312 | ||
337 | $footer-links-base-opacity: .8; | 313 | a, |
338 | 314 | span[role=button] { | |
339 | .footer-links { | 315 | display: inline-block; |
340 | &, > div { | 316 | text-decoration: none; |
341 | display: flex; | 317 | color: pvar(--menuForegroundColor); |
342 | flex-wrap: wrap; | 318 | opacity: $footer-links-base-opacity; |
343 | } | 319 | white-space: nowrap; |
344 | 320 | font-size: 90%; | |
345 | a, span[role=button] { | 321 | font-weight: 500; |
346 | display: inline-block; | 322 | line-height: 1.4rem; |
347 | text-decoration: none; | 323 | margin-right: 8px; |
348 | color: pvar(--menuForegroundColor); | ||
349 | opacity: $footer-links-base-opacity; | ||
350 | white-space: nowrap; | ||
351 | font-size: 90%; | ||
352 | font-weight: 500; | ||
353 | line-height: 1.4rem; | ||
354 | margin-right: 8px; | ||
355 | |||
356 | &.inline-global-icon { | ||
357 | display: inline-flex; | ||
358 | align-items: center; | ||
359 | white-space: nowrap; | ||
360 | height: 1.4rem; | ||
361 | |||
362 | my-global-icon { | ||
363 | @include apply-svg-color(pvar(--menuForegroundColor)); | ||
364 | |||
365 | display: flex; | ||
366 | width: auto; | ||
367 | height: 90%; | ||
368 | margin-right: .2rem; | ||
369 | } | ||
370 | } | ||
371 | } | ||
372 | } | 324 | } |
325 | } | ||
373 | 326 | ||
374 | .footer-copyleft small a { | 327 | .footer-copyleft small a { |
375 | @include disable-default-a-behaviour; | 328 | @include disable-default-a-behaviour; |
376 | 329 | ||
377 | color: pvar(--menuForegroundColor); | 330 | color: pvar(--menuForegroundColor); |
378 | opacity: $footer-links-base-opacity - .2; | 331 | opacity: $footer-links-base-opacity - .2; |
379 | } | ||
380 | } | 332 | } |
381 | 333 | ||
382 | .dropdown { | 334 | .dropdown { |
@@ -398,32 +350,13 @@ menu { | |||
398 | opacity: .4; | 350 | opacity: .4; |
399 | } | 351 | } |
400 | 352 | ||
401 | my-global-icon { | ||
402 | &[iconName="cog"], | ||
403 | &[iconName="sign-out"] { | ||
404 | position: relative; | ||
405 | right: -2px; | ||
406 | height: 20px; | ||
407 | width: 20px; | ||
408 | } | ||
409 | } | ||
410 | |||
411 | my-global-icon.not-displayed { | ||
412 | display: none; | ||
413 | } | ||
414 | |||
415 | &:hover { | 353 | &:hover { |
416 | my-global-icon.hover-display-toggle.not-displayed { | 354 | .hover-display-toggle { |
417 | display: inherit; | ||
418 | } | ||
419 | my-global-icon.hover-display-toggle { | ||
420 | display: none; | 355 | display: none; |
421 | } | 356 | } |
422 | 357 | ||
423 | &.settings-sensitive { | 358 | .hover-display-toggle[hidden] { |
424 | my-global-icon ::ng-deep svg { | 359 | display: inherit !important; |
425 | margin-top: 2px !important; | ||
426 | } | ||
427 | } | 360 | } |
428 | } | 361 | } |
429 | } | 362 | } |
@@ -443,7 +376,8 @@ menu { | |||
443 | } | 376 | } |
444 | } | 377 | } |
445 | 378 | ||
446 | .top-menu, .footer { | 379 | .top-menu, |
380 | .footer { | ||
447 | width: 100% !important; | 381 | width: 100% !important; |
448 | } | 382 | } |
449 | 383 | ||
@@ -451,9 +385,35 @@ menu { | |||
451 | width: calc(100vw - 30px); | 385 | width: calc(100vw - 30px); |
452 | } | 386 | } |
453 | 387 | ||
454 | .dropdown-item:hover, .dropdown-item:active { | 388 | .dropdown-item:hover, |
389 | .dropdown-item:active { | ||
455 | &.settings-sensitive my-global-icon ::ng-deep svg { | 390 | &.settings-sensitive my-global-icon ::ng-deep svg { |
456 | margin-top: 0px !important; | 391 | margin-top: 0px !important; |
457 | } | 392 | } |
458 | } | 393 | } |
459 | } | 394 | } |
395 | |||
396 | my-global-icon { | ||
397 | &[iconName="playlists"] { | ||
398 | height: 24px; | ||
399 | width: 24px; | ||
400 | |||
401 | margin-right: 16px; | ||
402 | } | ||
403 | |||
404 | &[iconName="videos"] { | ||
405 | position: relative; | ||
406 | right: -1px; | ||
407 | } | ||
408 | |||
409 | &[iconName="channel"] { | ||
410 | margin-top: -2px; | ||
411 | } | ||
412 | |||
413 | &[iconName="sign-out"] { | ||
414 | position: relative; | ||
415 | right: -2px; | ||
416 | height: 20px; | ||
417 | width: 20px; | ||
418 | } | ||
419 | } | ||
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index ed20d9c01..9b6b7cda5 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -10,6 +10,7 @@ import { LanguageChooserComponent } from '@app/menu/language-chooser.component' | |||
10 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' | 10 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' |
11 | import { ServerConfig, UserRight, VideoConstant } from '@shared/models' | 11 | import { ServerConfig, UserRight, VideoConstant } from '@shared/models' |
12 | import { NgbDropdown, NgbDropdownConfig } from '@ng-bootstrap/ng-bootstrap' | 12 | import { NgbDropdown, NgbDropdownConfig } from '@ng-bootstrap/ng-bootstrap' |
13 | import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' | ||
13 | 14 | ||
14 | const logger = debug('peertube:menu:MenuComponent') | 15 | const logger = debug('peertube:menu:MenuComponent') |
15 | 16 | ||
@@ -54,6 +55,7 @@ export class MenuComponent implements OnInit { | |||
54 | private hotkeysService: HotkeysService, | 55 | private hotkeysService: HotkeysService, |
55 | private screenService: ScreenService, | 56 | private screenService: ScreenService, |
56 | private menuService: MenuService, | 57 | private menuService: MenuService, |
58 | private modalService: PeertubeModalService, | ||
57 | private dropdownConfig: NgbDropdownConfig, | 59 | private dropdownConfig: NgbDropdownConfig, |
58 | private router: Router | 60 | private router: Router |
59 | ) { | 61 | ) { |
@@ -130,6 +132,9 @@ export class MenuComponent implements OnInit { | |||
130 | this.authService.userInformationLoaded | 132 | this.authService.userInformationLoaded |
131 | .subscribe(() => this.buildUserLanguages()) | 133 | .subscribe(() => this.buildUserLanguages()) |
132 | }) | 134 | }) |
135 | |||
136 | this.modalService.openQuickSettingsSubject | ||
137 | .subscribe(() => this.openQuickSettings()) | ||
133 | } | 138 | } |
134 | 139 | ||
135 | isRegistrationAllowed () { | 140 | isRegistrationAllowed () { |
diff --git a/client/src/app/menu/notification.component.scss b/client/src/app/menu/notification.component.scss index 40feb9e66..c65787779 100644 --- a/client/src/app/menu/notification.component.scss +++ b/client/src/app/menu/notification.component.scss | |||
@@ -1,6 +1,9 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .content { | ||
5 | scrollbar-color: auto; | ||
6 | } | ||
4 | 7 | ||
5 | .notification-inbox-popover { | 8 | .notification-inbox-popover { |
6 | padding: 10px; | 9 | padding: 10px; |