Add electrum rpc doc tab for official instance
This commit is contained in:
parent
e14fff45d6
commit
cb576ce601
@ -106,6 +106,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="electrs" *ngIf="whichTab === 'electrs'">
|
||||||
|
<div class="doc-content no-sidebar">
|
||||||
|
<div class="doc-item-container">
|
||||||
|
<ng-container #default_electrs_note *ngIf="network.val === '' || network.val === 'mainnet' || network.val === 'testnet'; else signet_electrs_note">
|
||||||
|
<p class="center note">This part of the API is available to <a href='/enterprise'>sponsors</a> only—whitelisting is required.</p>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #signet_electrs_note>
|
||||||
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
.text-small {
|
.text-small {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@ -116,6 +124,10 @@ li.nav-item {
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.doc-content.no-sidebar {
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
margin: 2rem 0 0 0;
|
margin: 2rem 0 0 0;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,15 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li [ngbNavItem]="3" *ngIf="showElectrsTab" role="presentation">
|
||||||
|
<a ngbNavLink [routerLink]="['/docs/api/electrs' | relativeUrl]" role="tab">API - Electrum RPC</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
|
|
||||||
|
<app-api-docs [whichTab]="'electrs'"></app-api-docs>
|
||||||
|
|
||||||
|
</ng-template>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="main-tab-content" [ngbNavOutlet]="nav"></div>
|
<div id="main-tab-content" [ngbNavOutlet]="nav"></div>
|
||||||
|
@ -15,6 +15,7 @@ export class DocsComponent implements OnInit {
|
|||||||
env: Env;
|
env: Env;
|
||||||
showWebSocketTab = true;
|
showWebSocketTab = true;
|
||||||
showFaqTab = true;
|
showFaqTab = true;
|
||||||
|
showElectrsTab = true;
|
||||||
|
|
||||||
@HostBinding('attr.dir') dir = 'ltr';
|
@HostBinding('attr.dir') dir = 'ltr';
|
||||||
|
|
||||||
@ -34,14 +35,18 @@ export class DocsComponent implements OnInit {
|
|||||||
} else if( url[1].path === "rest" ) {
|
} else if( url[1].path === "rest" ) {
|
||||||
this.activeTab = 1;
|
this.activeTab = 1;
|
||||||
this.seoService.setTitle($localize`:@@e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4:API`);
|
this.seoService.setTitle($localize`:@@e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4:API`);
|
||||||
} else {
|
} else if( url[1].path === "websocket" ) {
|
||||||
this.activeTab = 2;
|
this.activeTab = 2;
|
||||||
this.seoService.setTitle($localize`:@@e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4:API`);
|
this.seoService.setTitle($localize`:@@e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4:API`);
|
||||||
|
} else {
|
||||||
|
this.activeTab = 3;
|
||||||
|
this.seoService.setTitle($localize`:@@e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4:API`);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.env = this.stateService.env;
|
this.env = this.stateService.env;
|
||||||
this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
||||||
this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false;
|
this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false;
|
||||||
|
this.showElectrsTab = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && ( this.stateService.network === "" || this.stateService.network === "mainnet" || this.stateService.network === "testnet" || this.stateService.network === "signet" );
|
||||||
|
|
||||||
document.querySelector<HTMLElement>( "html" ).style.scrollBehavior = "smooth";
|
document.querySelector<HTMLElement>( "html" ).style.scrollBehavior = "smooth";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user