Format docs using linter and prettier.
This commit is contained in:
@@ -366,8 +366,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="71"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:71</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="85"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:85</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -405,8 +405,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="49"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:49</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="55"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:55</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -446,8 +446,8 @@
|
||||
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="57"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:57</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="65"
|
||||
class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:65</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -818,7 +818,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="46" class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:46</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="48" class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:48</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -840,7 +840,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-md-4">
|
||||
<div class="io-line">Defined in <a href="" data-line="47" class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:47</a></div>
|
||||
<div class="io-line">Defined in <a href="" data-line="51" class="link-to-prism">src/app/pages/accounts/account-search/account-search.component.ts:51</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -852,18 +852,18 @@
|
||||
|
||||
<div class="tab-pane fade tab-source-code" id="c-source">
|
||||
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||
import {CustomErrorStateMatcher} from '@app/_helpers';
|
||||
import {UserService} from '@app/_services';
|
||||
import {Router} from '@angular/router';
|
||||
import {strip0x} from '@src/assets/js/ethtx/dist/hex';
|
||||
import {environment} from '@src/environments/environment';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { CustomErrorStateMatcher } from '@app/_helpers';
|
||||
import { UserService } from '@app/_services';
|
||||
import { Router } from '@angular/router';
|
||||
import { strip0x } from '@src/assets/js/ethtx/dist/hex';
|
||||
import { environment } from '@src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-account-search',
|
||||
templateUrl: './account-search.component.html',
|
||||
styleUrls: ['./account-search.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AccountSearchComponent implements OnInit {
|
||||
nameSearchForm: FormGroup;
|
||||
@@ -880,8 +880,8 @@ export class AccountSearchComponent implements OnInit {
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private userService: UserService,
|
||||
private router: Router,
|
||||
) { }
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.nameSearchForm = this.formBuilder.group({
|
||||
@@ -895,13 +895,21 @@ export class AccountSearchComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
get nameSearchFormStub(): any { return this.nameSearchForm.controls; }
|
||||
get phoneSearchFormStub(): any { return this.phoneSearchForm.controls; }
|
||||
get addressSearchFormStub(): any { return this.addressSearchForm.controls; }
|
||||
get nameSearchFormStub(): any {
|
||||
return this.nameSearchForm.controls;
|
||||
}
|
||||
get phoneSearchFormStub(): any {
|
||||
return this.phoneSearchForm.controls;
|
||||
}
|
||||
get addressSearchFormStub(): any {
|
||||
return this.addressSearchForm.controls;
|
||||
}
|
||||
|
||||
onNameSearch(): void {
|
||||
this.nameSearchSubmitted = true;
|
||||
if (this.nameSearchForm.invalid) { return; }
|
||||
if (this.nameSearchForm.invalid) {
|
||||
return;
|
||||
}
|
||||
this.nameSearchLoading = true;
|
||||
this.userService.searchAccountByName(this.nameSearchFormStub.name.value);
|
||||
this.nameSearchLoading = false;
|
||||
@@ -909,11 +917,17 @@ export class AccountSearchComponent implements OnInit {
|
||||
|
||||
async onPhoneSearch(): Promise<void> {
|
||||
this.phoneSearchSubmitted = true;
|
||||
if (this.phoneSearchForm.invalid) { return; }
|
||||
if (this.phoneSearchForm.invalid) {
|
||||
return;
|
||||
}
|
||||
this.phoneSearchLoading = true;
|
||||
(await this.userService.getAccountByPhone(this.phoneSearchFormStub.phoneNumber.value, 100)).subscribe(async res => {
|
||||
(
|
||||
await this.userService.getAccountByPhone(this.phoneSearchFormStub.phoneNumber.value, 100)
|
||||
).subscribe(async (res) => {
|
||||
if (res !== undefined) {
|
||||
await this.router.navigateByUrl(`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
|
||||
await this.router.navigateByUrl(
|
||||
`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
|
||||
);
|
||||
} else {
|
||||
alert('Account not found!');
|
||||
}
|
||||
@@ -923,11 +937,17 @@ export class AccountSearchComponent implements OnInit {
|
||||
|
||||
async onAddressSearch(): Promise<void> {
|
||||
this.addressSearchSubmitted = true;
|
||||
if (this.addressSearchForm.invalid) { return; }
|
||||
if (this.addressSearchForm.invalid) {
|
||||
return;
|
||||
}
|
||||
this.addressSearchLoading = true;
|
||||
(await this.userService.getAccountByAddress(this.addressSearchFormStub.address.value, 100)).subscribe(async res => {
|
||||
(
|
||||
await this.userService.getAccountByAddress(this.addressSearchFormStub.address.value, 100)
|
||||
).subscribe(async (res) => {
|
||||
if (res !== undefined) {
|
||||
await this.router.navigateByUrl(`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`);
|
||||
await this.router.navigateByUrl(
|
||||
`/accounts/${strip0x(res.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0])}`
|
||||
);
|
||||
} else {
|
||||
alert('Account not found!');
|
||||
}
|
||||
@@ -1034,8 +1054,8 @@ export class AccountSearchComponent implements OnInit {
|
||||
<script src="../js/libs/deep-iterator.js"></script>
|
||||
<script>
|
||||
var COMPONENT_TEMPLATE = '<div><!-- Begin page --><div class="wrapper"> <app-sidebar></app-sidebar> <!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div id="content"> <app-topbar></app-topbar> <!-- Start Content--> <div class="container-fluid" appMenuSelection> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a routerLink="/home">Home</a></li> <li class="breadcrumb-item"><a routerLink="/accounts">Accounts</a></li> <li class="breadcrumb-item active" aria-current="page">Search</li> </ol> </nav> <div class="card"> <mat-card-title class="card-header"> Accounts </mat-card-title> <div class="card-body"> <mat-tab-group> <mat-tab label="Phone Number"> <form [formGroup]="phoneSearchForm" (ngSubmit)="onPhoneSearch()"> <mat-form-field appearance="outline"> <mat-label> Search </mat-label> <input matInput type="text" placeholder="Search by phone number" formControlName="phoneNumber" [errorStateMatcher]="matcher"> <mat-error *ngIf="phoneSearchSubmitted && phoneSearchFormStub.phoneNumber.errors">Phone Number is required.</mat-error> <mat-icon matSuffix>phone</mat-icon> <mat-hint>Phone Number</mat-hint> </mat-form-field> <button mat-raised-button color="primary" type="submit" class="btn btn-outline-primary ml-3"> SEARCH </button> </form> </mat-tab> <mat-tab label="Account Address"> <form [formGroup]="addressSearchForm" (ngSubmit)="onAddressSearch()"> <mat-form-field appearance="outline"> <mat-label> Search </mat-label> <input matInput type="text" placeholder="Search by account address" formControlName="address" [errorStateMatcher]="matcher"> <mat-error *ngIf="addressSearchSubmitted && addressSearchFormStub.address.errors">Account Address is required.</mat-error> <mat-icon matSuffix>view_in_ar</mat-icon> <mat-hint>Account Address</mat-hint> </mat-form-field> <button mat-raised-button color="primary" type="submit" class="btn btn-outline-primary ml-3"> SEARCH </button> </form> </mat-tab> </mat-tab-group> </div> </div> </div> <app-footer appMenuSelection></app-footer> </div> <!-- ============================================================== --> <!-- End Page content --> <!-- ============================================================== --></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': 'AccountSearchComponent'};
|
||||
</script>
|
||||
<script src="../js/tree.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user