From ca13d9109ce309012e225bda1b01526a36405763 Mon Sep 17 00:00:00 2001
From: Priyansh <43826321+priyanshiiit@users.noreply.github.com>
Date: Wed, 18 Aug 2021 21:48:12 +0530
Subject: [PATCH] Updated mobile view for dropdown (#717)
Dropdown menu with dynamic positioning
---
.../bisq-master-page/bisq-master-page.component.html | 4 ++--
.../bisq-master-page/bisq-master-page.component.ts | 7 ++++++-
.../liquid-master-page/liquid-master-page.component.html | 4 ++--
.../liquid-master-page/liquid-master-page.component.ts | 4 ++++
.../app/components/master-page/master-page.component.html | 4 ++--
.../app/components/master-page/master-page.component.ts | 4 ++++
6 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/frontend/src/app/components/bisq-master-page/bisq-master-page.component.html b/frontend/src/app/components/bisq-master-page/bisq-master-page.component.html
index 44a3bc178..9904b41c3 100644
--- a/frontend/src/app/components/bisq-master-page/bisq-master-page.component.html
+++ b/frontend/src/app/components/bisq-master-page/bisq-master-page.component.html
@@ -10,11 +10,11 @@
-
+
-
+
Mainnet
Signet
Testnet
diff --git a/frontend/src/app/components/bisq-master-page/bisq-master-page.component.ts b/frontend/src/app/components/bisq-master-page/bisq-master-page.component.ts
index 4d828dbac..4bb21a414 100644
--- a/frontend/src/app/components/bisq-master-page/bisq-master-page.component.ts
+++ b/frontend/src/app/components/bisq-master-page/bisq-master-page.component.ts
@@ -11,7 +11,8 @@ export class BisqMasterPageComponent implements OnInit {
connectionState$: Observable
;
navCollapsed = false;
env: Env;
-
+ isMobile = window.innerWidth <= 767.98;
+
constructor(
private stateService: StateService,
) { }
@@ -24,4 +25,8 @@ export class BisqMasterPageComponent implements OnInit {
collapse(): void {
this.navCollapsed = !this.navCollapsed;
}
+
+ onResize(event: any) {
+ this.isMobile = window.innerWidth <= 767.98;
+ }
}
diff --git a/frontend/src/app/components/liquid-master-page/liquid-master-page.component.html b/frontend/src/app/components/liquid-master-page/liquid-master-page.component.html
index c2710cf3a..02a7adeca 100644
--- a/frontend/src/app/components/liquid-master-page/liquid-master-page.component.html
+++ b/frontend/src/app/components/liquid-master-page/liquid-master-page.component.html
@@ -10,11 +10,11 @@
-
+
-
+
Mainnet
Signet
Testnet
diff --git a/frontend/src/app/components/liquid-master-page/liquid-master-page.component.ts b/frontend/src/app/components/liquid-master-page/liquid-master-page.component.ts
index 1b9e72e4f..4d495c34e 100644
--- a/frontend/src/app/components/liquid-master-page/liquid-master-page.component.ts
+++ b/frontend/src/app/components/liquid-master-page/liquid-master-page.component.ts
@@ -26,4 +26,8 @@ export class LiquidMasterPageComponent implements OnInit {
collapse(): void {
this.navCollapsed = !this.navCollapsed;
}
+
+ onResize(event: any) {
+ this.isMobile = window.innerWidth <= 767.98;
+ }
}
diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html
index 2eb6fd0df..6e6379f49 100644
--- a/frontend/src/app/components/master-page/master-page.component.html
+++ b/frontend/src/app/components/master-page/master-page.component.html
@@ -11,11 +11,11 @@
-
+
-