Skip to content

Commit dd09282

Browse files
committed
Merge branch 'feat/sidenav-refine-5242' into 'master'
Sidenav refinements #5242 See merge request minds/front!1775
2 parents c893d7e + b4646ed commit dd09282

File tree

8 files changed

+9
-118
lines changed

8 files changed

+9
-118
lines changed

src/app/common/components/chat-icon/chat-icon.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<ng-template #iconAndBubble>
2-
<m-icon iconId="chat_bubble" [sizeFactor]="5"></m-icon>
2+
<m-icon iconId="chat_bubble" [sizeFactor]="27"></m-icon>
33
<div class="m-chatIcon__unreadBubble" *ngIf="unread > 0">
44
<span *ngIf="unread > 99">99+</span>
55
<span *ngIf="unread <= 99">{{ unread }}</span>

src/app/common/layout/sidebar-more/sidebar-more.component.ng.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
li.m-sidebarMoreDropdown__item {
2323
padding: 0;
24-
font-size: 15px;
24+
font-size: 16px;
2525
line-height: 20px;
2626
border: 0 !important;
2727

@@ -53,6 +53,7 @@
5353
::ng-deep m-icon,
5454
i {
5555
margin-right: 15px;
56+
font-size: 22px;
5657
@include m-theme() {
5758
color: themed($m-textColor--secondary);
5859
fill: themed($m-textColor--secondary);
@@ -96,7 +97,7 @@
9697
span {
9798
text-decoration: none;
9899
font-size: 13px;
99-
line-height: 20px;
100+
line-height: 16px;
100101
width: auto;
101102
white-space: pre-wrap;
102103
word-break: break-all;

src/app/common/layout/sidebar/navigation.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
[anchor]="'left'"
8080
[useParentPosition]="true"
8181
>
82-
<m-icon iconId="home" [sizeFactor]="8" m-tooltip--icon></m-icon
82+
<m-icon iconId="home" [sizeFactor]="27" m-tooltip--icon></m-icon
8383
><ng-container i18n="@@COMMON__NEWSFEED"
8484
>Newsfeed</ng-container
8585
></m-tooltip
@@ -164,7 +164,7 @@
164164
>
165165
<m-icon
166166
iconId="account_balance"
167-
[sizeFactor]="8"
167+
[sizeFactor]="27"
168168
m-tooltip--icon
169169
></m-icon>
170170
<ng-container i18n="@@COMMON__WALLET">Wallet</ng-container>
@@ -223,7 +223,7 @@
223223
[anchor]="'left'"
224224
[useParentPosition]="true"
225225
>
226-
<m-icon iconId="group" [sizeFactor]="8" m-tooltip--icon></m-icon>
226+
<m-icon iconId="group" [sizeFactor]="27" m-tooltip--icon></m-icon>
227227
<ng-container i18n="@@COMMON__GROUPS">Groups</ng-container>
228228
</m-tooltip>
229229
<span

src/app/common/layout/v3-topbar/user-menu/user-menu.component.html

-85
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,6 @@
5454
Upgrade
5555
</a>
5656
</li>
57-
58-
<li
59-
class="
60-
m-dropdownList__item
61-
m-userMenuDropdown__item
62-
m-userMenuDropdownItem__buyTokens
63-
"
64-
*ngIf="getCurrentUser()"
65-
(click)="closeMenu()"
66-
>
67-
<a
68-
routerLink="/token"
69-
i18n="verb|@@COMMON__BUY_TOKENS"
70-
data-ref="topnav-usermenu-buytokens"
71-
>Buy tokens</a
72-
>
73-
</li>
74-
75-
<li
76-
class="
77-
m-dropdownList__item
78-
m-userMenuDropdown__item m-userMenuDropdown__spacer
79-
"
80-
*ngIf="getCurrentUser()"
81-
></li>
82-
8357
<li
8458
class="m-dropdownList__item m-userMenuDropdown__item"
8559
*ngIf="!getCurrentUser()"
@@ -100,18 +74,6 @@
10074
</a>
10175
</li>
10276

103-
<ng-container>
104-
<li
105-
class="m-dropdownList__item m-userMenuDropdown__item"
106-
*ngIf="getCurrentUser()"
107-
(click)="toggleTheme()"
108-
data-ref="topnav-usermenu-themechange"
109-
>
110-
<span i18n="@@COMMON__LIGHT_MODE" *ngIf="isDark">Enter Light Mode</span>
111-
<span i18n="@@COMMON__DARK_MODE" *ngIf="!isDark">Enter Dark Mode</span>
112-
</li>
113-
</ng-container>
114-
11577
<li
11678
class="m-dropdownList__item m-userMenuDropdown__item"
11779
(click)="closeMenu()"
@@ -158,53 +120,6 @@
158120
<span i18n="@@COMMON__LOGOUT">Logout</span>
159121
</a>
160122
</li>
161-
162-
<li
163-
class="
164-
m-dropdownList__item
165-
m-userMenuDropdown__item m-userMenuDropdown__spacer
166-
"
167-
></li>
168-
169-
<li
170-
class="
171-
m-dropdownList__item
172-
m-userMenuDropdown__item m-userMenuDropdown__footer
173-
"
174-
*ngIf="showFooterLinks"
175-
>
176-
<ng-container
177-
*ngFor="let link of footerLinks.slice(0, maxFooterLinks); let i = index"
178-
>
179-
<a
180-
*ngIf="link.routerLink"
181-
[routerLink]="link.routerLink"
182-
(click)="closeMenu()"
183-
[data-ref]="'topnav-usermenu-footer' + link.label"
184-
>
185-
{{ link.label }}
186-
</a>
187-
<a
188-
*ngIf="link.href"
189-
[href]="link.href"
190-
target="_blank"
191-
(click)="closeMenu()"
192-
>
193-
{{ link.label }}
194-
</a>
195-
<span> · </span>
196-
</ng-container>
197-
<a (click)="toggleFooterLinks()">
198-
<ng-container
199-
*ngIf="maxFooterLinks === 5; else lessView"
200-
i18n="@@COMMON__MORE"
201-
>More</ng-container
202-
>
203-
<ng-template #lessView>
204-
<ng-container i18n="@@COMMON__LESS">Less</ng-container>
205-
</ng-template>
206-
</a>
207-
</li>
208123
</ul>
209124
</div>
210125

src/app/common/layout/v3-topbar/user-menu/user-menu.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ m-usermenu__v3 {
2222
margin: 34px 0 0;
2323
top: 15px;
2424
right: -20px;
25+
padding: 18px 0;
2526

2627
@include m-theme() {
2728
background-color: themed($m-bgColor--secondary);
@@ -56,7 +57,6 @@ m-usermenu__v3 {
5657
}
5758

5859
&.m-userMenuDropdown__username {
59-
margin-top: 18px;
6060
padding-top: 8px;
6161
padding-bottom: 8px;
6262

src/app/common/layout/v3-topbar/user-menu/user-menu.component.spec.ts

-14
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,4 @@ describe('UserMenuV3Component', () => {
9797
// fixture.debugElement.query(By.css('.m-userMenuDropdownItem__upgrade'))
9898
// ).toBeNull();
9999
});
100-
101-
it('should have a "buy tokens" option that redirects to /token', () => {
102-
comp.toggleMenu();
103-
expect(
104-
fixture.debugElement.query(By.css('.m-userMenuDropdownItem__buyTokens'))
105-
).not.toBeNull();
106-
107-
const link = fixture.debugElement.query(
108-
By.css('.m-userMenuDropdownItem__buyTokens a')
109-
);
110-
expect(link).not.toBeNull();
111-
112-
expect(link.nativeElement.getAttribute('routerLink')).toEqual('/token');
113-
});
114100
});

src/app/common/layout/v3-topbar/user-menu/user-menu.component.ts

-11
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import {
99
import { Session } from '../../../../services/session';
1010
import { ThemeService } from '../../../../common/services/theme.service';
1111
import { Subscription } from 'rxjs';
12-
import { Navigation as NavigationService } from '../../../../services/navigation';
13-
import { RouterLink } from '@angular/router';
1412
import { FeaturesService } from '../../../../services/features.service';
1513
import { MindsUser } from '../../../../interfaces/entities';
1614
import { UserMenuService } from './user-menu.service';
@@ -22,7 +20,6 @@ import { UserMenuService } from './user-menu.service';
2220
})
2321
export class UserMenuV3Component implements OnInit, OnDestroy {
2422
@Input() useAvatar: boolean = false;
25-
@Input() showFooterLinks: boolean = false;
2623

2724
isDark: boolean = false;
2825
themeSubscription: Subscription;
@@ -86,14 +83,6 @@ export class UserMenuV3Component implements OnInit, OnDestroy {
8683
this.themeService.toggleUserThemePreference();
8784
}
8885

89-
toggleFooterLinks(): void {
90-
if (this.maxFooterLinks === 5) {
91-
this.maxFooterLinks = Infinity;
92-
} else {
93-
this.maxFooterLinks = 5;
94-
}
95-
}
96-
9786
ngOnDestroy(): void {
9887
this.closeMenu();
9988
this.themeSubscription.unsubscribe();

src/app/common/layout/v3-topbar/v3-topbar.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<ng-content select="[icons]"></ng-content>
123123
<m-usermenu__v3
124124
[useAvatar]="true"
125-
[showFooterLinks]="true"
125+
*ngIf="getCurrentUser()"
126126
></m-usermenu__v3>
127127
</div>
128128

0 commit comments

Comments
 (0)