Skip to content

Commit

Permalink
Merge branch 'master' into fix-receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoElement committed Feb 28, 2025
2 parents d57971c + f45e1b2 commit 795ee1a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ export const NAVIGATION_LIST = [
link: 'retrodrop',
target: '_blank',
imagePath: `${defaultSrc}retrodrop.svg`
},
{
translateKey: 'Testnet App',
type: 'external',
link: EXTERNAL_LINKS.TESTNET_APP,
imagePath: `${defaultSrc}test.svg`
}
] as NavigationItem[];

Expand Down Expand Up @@ -79,6 +73,11 @@ export const MOBILE_NAVIGATION_LIST: { [key in Section]: NavigationItem[] } = {
}
],
['More']: [
{
translateKey: 'Testnet App',
type: 'external',
link: EXTERNAL_LINKS.TESTNET_APP
},
{
translateKey: 'Documentation',
type: 'external',
Expand All @@ -98,11 +97,6 @@ export const MOBILE_NAVIGATION_LIST: { [key in Section]: NavigationItem[] } = {
translateKey: 'About',
type: 'external',
link: EXTERNAL_LINKS.LANDING
},
{
translateKey: 'Testnet App',
type: 'external',
link: EXTERNAL_LINKS.TESTNET_APP
}
],
['Social']: [
Expand Down
11 changes: 5 additions & 6 deletions src/app/core/header/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@
</button>

<button
*ngIf="!useLargeIframe"
class="staking-button"
*ngIf="!useLargeIframe && !isMobile"
class="testnets-button"
tuiButton
appearance="secondary"
type="button"
[pseudoActive]="isStakingPage"
size="m"
routerLink="/staking"
(click)="navigateToTestnets()"
>
Staking
Tesnets
</button>

<!-- <button-->
Expand Down Expand Up @@ -116,6 +115,6 @@
</div>

<ng-container *noFrame>
<app-mobile-menu *ngIf="isMobile$ | async"></app-mobile-menu>
<app-mobile-menu *ngIf="isMobile"></app-mobile-menu>
</ng-container>
</header>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
}

.staking-button {
.testnets-button {
margin-right: auto;
}

Expand Down
15 changes: 10 additions & 5 deletions src/app/core/header/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export class HeaderComponent implements AfterViewInit {

public readonly isMobileMenuOpened$: Observable<boolean>;

public readonly isMobile$: Observable<boolean>;

public currentUser$: Observable<UserInterface>;

public readonly swapType$: Observable<SWAP_PROVIDER_TYPE>;
Expand Down Expand Up @@ -78,6 +76,10 @@ export class HeaderComponent implements AfterViewInit {
);
}

public get isMobile(): boolean {
return this.headerStore.isMobile;
}

public readonly isDarkTheme$ = this.themeService.theme$.pipe(
startWith('dark'),
map(theme => theme === 'dark')
Expand All @@ -100,7 +102,6 @@ export class HeaderComponent implements AfterViewInit {
this.advertisementType = 'default';
this.currentUser$ = this.authService.currentUser$;
this.isMobileMenuOpened$ = this.headerStore.getMobileMenuOpeningStatus();
this.isMobile$ = this.headerStore.getMobileDisplayStatus();
this.headerStore.setMobileDisplayStatus(this.window.innerWidth <= this.headerStore.mobileWidth);
if (isPlatformBrowser(platformId)) {
this.zone.runOutsideAngular(() => {
Expand Down Expand Up @@ -133,8 +134,12 @@ export class HeaderComponent implements AfterViewInit {
this.headerStore.setMobileDisplayStatus(this.window.innerWidth <= this.headerStore.mobileWidth);
}

public async navigateToSwaps(): Promise<void> {
await this.router.navigate(['/'], { queryParamsHandling: 'merge' });
public navigateToSwaps(): void {
this.router.navigate(['/'], { queryParamsHandling: 'merge' });
}

public navigateToTestnets(): void {
this.window.open('https://testnet.rubic.exchange', '_blank');
}

public handleMenuButtonClick(): void {
Expand Down

0 comments on commit 795ee1a

Please # to comment.