You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/src/app/shared/components/node-config/services-settings/loop-service-settings/loop-service-settings.compo...

29 lines
2.3 KiB
HTML

<div fxLayout="column" fxFlex="100" [perfectScrollbar]>
<div class="alert alert-info mt-1">
<fa-icon class="mr-1 alert-icon" [icon]="faInfoCircle"></fa-icon>
<span>Please ensure that <strong>loopd</strong> is running and accessible to RTL before enabling this service. Click <strong><a href="https://github.com/lightninglabs/loop" target="_blank">here</a></strong> to learn more about the installation.</span>
</div>
<form #form="ngForm" fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="settings-container page-sub-title-container mt-1">
<div fxLayout="column" fxFlex="50" fxLayoutAlign="start stretch">
<mat-slide-toggle autoFocus class="ml-2" tabindex="1" color="primary" name="loop" [(ngModel)]="enableLoop" (change)="onEnableServiceChanged($event)">Enable Loop Service</mat-slide-toggle>
<mat-form-field class="mb-2">
<mat-label>Loop Server URL</mat-label>
<input #srvrUrl="ngModel" matInput type="text" id="swapServerUrl" name="srvrUrl" tabindex="2" [required]="enableLoop" [disabled]="!enableLoop" [(ngModel)]="selNode.settings.swapServerUrl">
<mat-hint>Service url for loop server REST APIs, eg. https://127.0.0.1:8081</mat-hint>
<mat-error *ngIf="!selNode.settings.swapServerUrl && enableLoop">Loop server URL is required.</mat-error>
<mat-error *ngIf="srvrUrl?.errors?.invalid && enableLoop">Specify the loop server url with 'https://'.</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Loop Macaroon Path</mat-label>
<input matInput type="text" id="swapMacaroonPath" name="swapMacaroonPath" tabindex="3" [required]="enableLoop" [disabled]="!enableLoop" [(ngModel)]="selNode.authentication.swapMacaroonPath">
<mat-hint>Path for the folder containing service 'loop.macaroon', eg. D:\\xyz\\AppData\\Local\\Loop\\testnet</mat-hint>
<mat-error *ngIf="!selNode.authentication.swapMacaroonPath && enableLoop">Loop macaroon path is required.</mat-error>
</mat-form-field>
</div>
</form>
<div fxLayout="row" class="mt-2">
<button class="mr-1" mat-stroked-button color="primary" type="reset" tabindex="4" (click)="onReset()">Reset</button>
<button mat-flat-button color="primary" type="submit" tabindex="5" (click)="onUpdateService()">Update</button>
</div>
</div>