diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 0ad66ee2d..fec2866b2 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -14,7 +14,7 @@ import { AssetsComponent } from './assets/assets.component'; import { StatusViewComponent } from './components/status-view/status-view.component'; import { DashboardComponent } from './dashboard/dashboard.component'; import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component'; -import { ApiDocsComponent } from './components/api-docs/api-docs.component'; +import { DocsComponent } from './components/docs/docs.component'; import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component'; import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component'; import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component'; @@ -66,9 +66,21 @@ let routes: Routes = [ path: 'about', component: AboutComponent, }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, { path: 'terms-of-service', @@ -146,9 +158,21 @@ let routes: Routes = [ path: 'assets', component: AssetsComponent, }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, ], }, @@ -212,9 +236,21 @@ let routes: Routes = [ children: [], component: AddressComponent }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, ], }, @@ -278,9 +314,21 @@ let routes: Routes = [ children: [], component: AddressComponent }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, ], }, @@ -380,9 +428,21 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { path: 'assets', component: AssetsComponent, }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, { path: 'about', @@ -429,3 +489,4 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { exports: [RouterModule] }) export class AppRoutingModule { } + diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index bb6383421..0b7c072f6 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -48,9 +48,10 @@ import { FeesBoxComponent } from './components/fees-box/fees-box.component'; import { DashboardComponent } from './dashboard/dashboard.component'; import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faDatabase, faExchangeAlt, faInfoCircle, - faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'; -import { ApiDocsComponent } from './components/api-docs/api-docs.component'; -import { CodeTemplateComponent } from './components/api-docs/code-template.component'; + faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook } from '@fortawesome/free-solid-svg-icons'; +import { ApiDocsComponent } from './components/docs/api-docs.component'; +import { DocsComponent } from './components/docs/docs.component'; +import { CodeTemplateComponent } from './components/docs/code-template.component'; import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component'; import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component'; import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component'; @@ -100,6 +101,7 @@ import { PushTransactionComponent } from './components/push-transaction/push-tra TrademarkPolicyComponent, SponsorComponent, PushTransactionComponent, + DocsComponent, ], imports: [ BrowserModule.withServerTransition({ appId: 'serverApp' }), @@ -158,5 +160,6 @@ export class AppModule { library.addIcons(faCaretDown); library.addIcons(faAngleRight); library.addIcons(faAngleLeft); + library.addIcons(faBook); } } diff --git a/frontend/src/app/bisq/bisq.routing.module.ts b/frontend/src/app/bisq/bisq.routing.module.ts index bebf99867..73dffee51 100644 --- a/frontend/src/app/bisq/bisq.routing.module.ts +++ b/frontend/src/app/bisq/bisq.routing.module.ts @@ -7,7 +7,7 @@ import { BisqBlockComponent } from './bisq-block/bisq-block.component'; import { BisqBlocksComponent } from './bisq-blocks/bisq-blocks.component'; import { BisqAddressComponent } from './bisq-address/bisq-address.component'; import { BisqStatsComponent } from './bisq-stats/bisq-stats.component'; -import { ApiDocsComponent } from '../components/api-docs/api-docs.component'; +import { DocsComponent } from '../components/docs/docs.component'; import { BisqDashboardComponent } from './bisq-dashboard/bisq-dashboard.component'; import { BisqMarketComponent } from './bisq-market/bisq-market.component'; import { BisqMainDashboardComponent } from './bisq-main-dashboard/bisq-main-dashboard.component'; @@ -60,9 +60,21 @@ const routes: Routes = [ path: 'about', component: AboutComponent, }, + { + path: 'docs/api/:type', + component: DocsComponent + }, + { + path: 'docs/api', + redirectTo: 'docs/api/rest' + }, + { + path: 'docs', + redirectTo: 'docs/api/rest' + }, { path: 'api', - component: ApiDocsComponent, + redirectTo: 'docs/api/rest' }, { path: 'terms-of-service', diff --git a/frontend/src/app/components/api-docs/api-docs.component.html b/frontend/src/app/components/api-docs/api-docs.component.html deleted file mode 100644 index 3b2a8cd37..000000000 --- a/frontend/src/app/components/api-docs/api-docs.component.html +++ /dev/null @@ -1,899 +0,0 @@ - -
-
-

{{ network.val === '' ? 'Bitcoin' : network.val.charAt(0).toUpperCase() + network.val.slice(1) }} API Service

-
- - - -
- -
- - - -
-
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 9904b41c3..427a7d1c3 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 @@ -38,8 +38,8 @@ - -