Format docs using linter and prettier.
This commit is contained in:
@@ -304,8 +304,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="48"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:48</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="52"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:52</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -386,8 +386,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="38"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:38</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="40"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:40</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -425,8 +425,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="59"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:59</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="63"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:63</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -464,8 +464,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="67"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:67</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="71"
|
||||
class="link-to-prism">src/app/auth/auth.component.ts:71</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -674,17 +674,17 @@
|
||||
|
||||
|
||||
<div class="tab-pane fade tab-source-code" id="c-source">
|
||||
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||
import {CustomErrorStateMatcher} from '@app/_helpers';
|
||||
import {AuthService} from '@app/_services';
|
||||
import {Router} from '@angular/router';
|
||||
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { CustomErrorStateMatcher } from '@app/_helpers';
|
||||
import { AuthService } from '@app/_services';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-auth',
|
||||
templateUrl: './auth.component.html',
|
||||
styleUrls: ['./auth.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AuthComponent implements OnInit {
|
||||
keyForm: FormGroup;
|
||||
@@ -696,7 +696,7 @@ export class AuthComponent implements OnInit {
|
||||
private authService: AuthService,
|
||||
private formBuilder: FormBuilder,
|
||||
private router: Router
|
||||
) { }
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
this.keyForm = this.formBuilder.group({
|
||||
@@ -709,12 +709,16 @@ export class AuthComponent implements OnInit {
|
||||
// }
|
||||
}
|
||||
|
||||
get keyFormStub(): any { return this.keyForm.controls; }
|
||||
get keyFormStub(): any {
|
||||
return this.keyForm.controls;
|
||||
}
|
||||
|
||||
async onSubmit(): Promise<void> {
|
||||
this.submitted = true;
|
||||
|
||||
if (this.keyForm.invalid) { return; }
|
||||
if (this.keyForm.invalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
await this.authService.setKey(this.keyFormStub.key.value);
|
||||
@@ -722,11 +726,11 @@ export class AuthComponent implements OnInit {
|
||||
}
|
||||
|
||||
login(): void {
|
||||
// TODO check if we have privatekey
|
||||
// Send us to home if we have a private key
|
||||
// talk to meta somehow
|
||||
// in the error interceptor if 401/403 handle it
|
||||
// if 200 go /home
|
||||
// TODO check if we have privatekey
|
||||
// Send us to home if we have a private key
|
||||
// talk to meta somehow
|
||||
// in the error interceptor if 401/403 handle it
|
||||
// if 200 go /home
|
||||
if (this.authService.getPrivateKey()) {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
@@ -840,8 +844,8 @@ export class AuthComponent implements OnInit {
|
||||
<script src="../js/libs/deep-iterator.js"></script>
|
||||
<script>
|
||||
var COMPONENT_TEMPLATE = '<div><div class="container"> <div class="row justify-content-center mt-5 mb-5"> <div class="col-lg-6 col-md-8 col-sm-10"> <div class="card"> <mat-card-title class="card-header pt-4 pb-4 text-center bg-dark"> <a routerLink="/"> <h1 class="text-white">CICADA</h1> </a> </mat-card-title> <div id="one" style="display: block" class="card-body p-4"> <div class="text-center w-75 m-auto"> <h4 class="text-dark-50 text-center font-weight-bold">Add Private Key</h4> </div> <form [formGroup]="keyForm" (ngSubmit)="onSubmit()"> <mat-form-field appearance="outline" class="full-width"> <mat-label>Private Key</mat-label> <textarea matInput style="height: 30rem" formControlName="key" placeholder="Enter your private key..." [errorStateMatcher]="matcher"></textarea> <div *ngIf="submitted && keyFormStub.key.errors" class="invalid-feedback"> <mat-error *ngIf="keyFormStub.key.errors.required">Private Key is required.</mat-error> </div> </mat-form-field> <button mat-raised-button matRipple color="primary" type="submit" [disabled]="loading"> <span *ngIf="loading" class="spinner-border spinner-border-sm mr-1"></span> Add Key </button> </form> </div> <div id="two" style="display: none" class="card-body p-4 align-items-center"> <div class="text-center w-75 m-auto"> <h4 id="state" class="text-dark-50 text-center font-weight-bold"></h4> <button mat-raised-button matRipple color="primary" type="submit" (click)="login()"> Login </button> </div> <div class="row mt-3"> <div class="col-12 text-center"> <p class="text-muted">Change private key? <a (click)="switchWindows()" class="text-muted ml-1"><b>Enter private key</b></a></p> </div> <!-- end col--> </div> <!-- end row --> </div> </div> </div> </div></div></div>'
|
||||
var COMPONENTS = [{'name': 'AccountDetailsComponent', 'selector': 'app-account-details'},{'name': 'AccountsComponent', 'selector': 'app-accounts'},{'name': 'AccountSearchComponent', 'selector': 'app-account-search'},{'name': 'AdminComponent', 'selector': 'app-admin'},{'name': 'AppComponent', 'selector': 'app-root'},{'name': 'AuthComponent', 'selector': 'app-auth'},{'name': 'CreateAccountComponent', 'selector': 'app-create-account'},{'name': 'ErrorDialogComponent', 'selector': 'app-error-dialog'},{'name': 'FooterComponent', 'selector': 'app-footer'},{'name': 'FooterStubComponent', 'selector': 'app-footer'},{'name': 'OrganizationComponent', 'selector': 'app-organization'},{'name': 'PagesComponent', 'selector': 'app-pages'},{'name': 'SettingsComponent', 'selector': 'app-settings'},{'name': 'SidebarComponent', 'selector': 'app-sidebar'},{'name': 'SidebarStubComponent', 'selector': 'app-sidebar'},{'name': 'TokenDetailsComponent', 'selector': 'app-token-details'},{'name': 'TokensComponent', 'selector': 'app-tokens'},{'name': 'TopbarComponent', 'selector': 'app-topbar'},{'name': 'TopbarStubComponent', 'selector': 'app-topbar'},{'name': 'TransactionDetailsComponent', 'selector': 'app-transaction-details'},{'name': 'TransactionsComponent', 'selector': 'app-transactions'}];
|
||||
var DIRECTIVES = [{'name': 'MenuSelectionDirective', 'selector': '[appMenuSelection]'},{'name': 'MenuToggleDirective', 'selector': '[appMenuToggle]'},{'name': 'PasswordToggleDirective', 'selector': '[appPasswordToggle]'},{'name': 'RouterLinkDirectiveStub', 'selector': '[routerLink]'}];
|
||||
var COMPONENTS = [{'name': 'AccountDetailsComponent', 'selector': 'app-account-details'},{'name': 'AccountsComponent', 'selector': 'app-accounts'},{'name': 'AccountSearchComponent', 'selector': 'app-account-search'},{'name': 'AdminComponent', 'selector': 'app-admin'},{'name': 'AppComponent', 'selector': 'app-root'},{'name': 'AuthComponent', 'selector': 'app-auth'},{'name': 'CreateAccountComponent', 'selector': 'app-create-account'},{'name': 'ErrorDialogComponent', 'selector': 'app-error-dialog'},{'name': 'FooterComponent', 'selector': 'app-footer'},{'name': 'FooterStubComponent', 'selector': 'app-footer'},{'name': 'NetworkStatusComponent', 'selector': 'app-network-status'},{'name': 'OrganizationComponent', 'selector': 'app-organization'},{'name': 'PagesComponent', 'selector': 'app-pages'},{'name': 'SettingsComponent', 'selector': 'app-settings'},{'name': 'SidebarComponent', 'selector': 'app-sidebar'},{'name': 'SidebarStubComponent', 'selector': 'app-sidebar'},{'name': 'TokenDetailsComponent', 'selector': 'app-token-details'},{'name': 'TokensComponent', 'selector': 'app-tokens'},{'name': 'TopbarComponent', 'selector': 'app-topbar'},{'name': 'TopbarStubComponent', 'selector': 'app-topbar'},{'name': 'TransactionDetailsComponent', 'selector': 'app-transaction-details'},{'name': 'TransactionsComponent', 'selector': 'app-transactions'}];
|
||||
var DIRECTIVES = [{'name': 'MenuSelectionDirective', 'selector': '[appMenuSelection]'},{'name': 'MenuToggleDirective', 'selector': '[appMenuToggle]'},{'name': 'PasswordToggleDirective', 'selector': '[appPasswordToggle]'},{'name': 'RouterLinkDirectiveStub', 'selector': '[appRouterLink]'}];
|
||||
var ACTUAL_COMPONENT = {'name': 'AuthComponent'};
|
||||
</script>
|
||||
<script src="../js/tree.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user