From 37e2786c5e55595e56e07d2bcd6e8514d0c5899d Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Thu, 24 Mar 2022 08:55:20 -0400
Subject: [PATCH] Add faq tab placeholder
---
frontend/src/app/app-routing.module.ts | 4 ++++
.../src/app/components/docs/docs.component.html | 17 +++++++++++++----
.../src/app/components/docs/docs.component.ts | 11 ++++++++++-
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index 003bbcf0d..37fb1d62d 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -127,6 +127,10 @@ let routes: Routes = [
path: 'docs/api/:type',
component: DocsComponent
},
+ {
+ path: 'docs/faq',
+ component: DocsComponent
+ },
{
path: 'docs/api',
redirectTo: 'docs/api/rest'
diff --git a/frontend/src/app/components/docs/docs.component.html b/frontend/src/app/components/docs/docs.component.html
index 8dc4a9e72..d6b43f064 100644
--- a/frontend/src/app/components/docs/docs.component.html
+++ b/frontend/src/app/components/docs/docs.component.html
@@ -4,9 +4,18 @@
Documentation
+
+ -
+ FAQ
+
-
-
- API - REST
+
FAQ placeholder
+
+
+
+
+ -
+ API - REST
@@ -14,8 +23,8 @@
- -
- API - WebSocket
+
-
+ API - WebSocket
diff --git a/frontend/src/app/components/docs/docs.component.ts b/frontend/src/app/components/docs/docs.component.ts
index 605a453ab..f75900dc2 100644
--- a/frontend/src/app/components/docs/docs.component.ts
+++ b/frontend/src/app/components/docs/docs.component.ts
@@ -12,6 +12,7 @@ export class DocsComponent implements OnInit {
activeTab = 0;
env: Env;
showWebSocketTab = true;
+ showFaqTab = true;
constructor(
private route: ActivatedRoute,
@@ -20,8 +21,16 @@ export class DocsComponent implements OnInit {
ngOnInit(): void {
const url = this.route.snapshot.url;
- this.activeTab = ( url[2].path === "rest" ) ? 0 : 1;
+ if( url[1].path === "faq" ) {
+ this.activeTab = 0;
+ } else if( url[2].path === "rest" ) {
+ this.activeTab = 1;
+ } else {
+ this.activeTab = 2;
+ }
+
this.env = this.stateService.env;
this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
+ this.showFaqTab = ( ( this.stateService.network === "" ) || ( this.stateService.network === "signet" ) || ( this.stateService.network === "testnet" ) ) ? true : false;
}
}