-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/add-operation-support' into 'master'
Feat/add operation support See merge request papers/airgap/beacon-extension!5
- Loading branch information
Showing
50 changed files
with
7,112 additions
and
3,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ion-row lines="none" class="ion-no-padding ion-align-items-center"> | ||
<ion-col size="3"> | ||
<ion-row class="ion-justify-content-center"> | ||
<ion-col class="ion-justify-content-center"> | ||
<ion-avatar class="ion-justify-content-center ion-align-items-center"> | ||
<identicon [address]="address"></identicon> | ||
</ion-avatar> | ||
</ion-col> | ||
</ion-row> | ||
</ion-col> | ||
<ion-col size="9"> | ||
<ion-label position="stacked" *ngIf="label">{{ label }}</ion-label> | ||
<p class="typography--mono ion-no-margin">{{ address }}</p> | ||
</ion-col> | ||
</ion-row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
identicon { | ||
width: 48px; | ||
height: 48px; | ||
} | ||
.ion-justify-content-center { | ||
display: flex; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/app/components/address-row/address-row.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { IonicModule } from '@ionic/angular'; | ||
|
||
import { AddressRowComponent } from './address-row.component'; | ||
|
||
describe('AddressRowComponent', () => { | ||
let component: AddressRowComponent; | ||
let fixture: ComponentFixture<AddressRowComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ AddressRowComponent ], | ||
imports: [IonicModule.forRoot()] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(AddressRowComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
})); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component, Input } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'address-row', | ||
templateUrl: './address-row.component.html', | ||
styleUrls: ['./address-row.component.scss'] | ||
}) | ||
export class AddressRowComponent { | ||
@Input() | ||
public label: string | undefined | ||
|
||
@Input() | ||
public address: string | undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<ng-container *ngIf="transaction"> | ||
<address-row *ngFor="let address of transaction.from" [address]="address" label="From"></address-row> | ||
|
||
<ion-row class="ion-align-items-center"> | ||
<ion-col size="3" class="ion-no-padding"> | ||
<ion-row class="ion-justify-content-center"><div class="line"></div></ion-row> | ||
</ion-col> | ||
<ion-col size="9" class="ion-padding-bottom"> | ||
<ion-label position="stacked" class="ion-text-uppercase">AMOUNT</ion-label> | ||
<div class="ion-padding-bottom"> | ||
<span class="typography--mono ion-padding-bottom"> | ||
{{ | ||
transaction.amount | amountConverter: { protocolIdentifier: transaction.protocolIdentifier, maxDigits: 10 } | ||
}} | ||
</span> | ||
</div> | ||
|
||
<ng-container *ngIf="transaction.fee"> | ||
<ion-label position="stacked" class="ion-text-uppercase">FEE</ion-label> | ||
<div [ngClass]="transaction.timestamp || transaction.data ? 'ion-padding-bottom' : ''"> | ||
<span class="typography--mono"> | ||
{{ transaction.fee | feeConverter: { protocolIdentifier: transaction.protocolIdentifier } }} | ||
</span> | ||
</div> | ||
</ng-container> | ||
|
||
<ng-container *ngIf="transaction.timestamp"> | ||
<ion-label position="stacked" class="ion-text-uppercase"> | ||
Time | ||
</ion-label> | ||
<div [ngClass]="transaction.data ? 'ion-padding-bottom' : ''"> | ||
{{ | ||
transaction.timestamp | amFromUnix | amCalendar: { sameDay: '[Today at] HH:mm', sameElse: 'HH:mm [on] LL' } | ||
}} | ||
</div> | ||
</ng-container> | ||
|
||
<ng-container *ngIf="transaction.data"> | ||
<ion-label position="stacked" class="ion-text-uppercase">Data</ion-label> | ||
<div> | ||
{{ transaction.data }} | ||
</div> | ||
</ng-container> | ||
</ion-col> | ||
</ion-row> | ||
|
||
<address-row *ngFor="let address of transaction.to" [address]="address" label="To"></address-row> | ||
|
||
<ion-row class="rawdata--container" *ngIf="transaction.transactionDetails"> | ||
<ion-col class="ion-no-padding"> | ||
<ion-item class="ion-no-padding" lines="none"> | ||
<ion-label>Display extra transaction details</ion-label> | ||
<ion-toggle [(ngModel)]="displayRawData" slot="end"></ion-toggle> | ||
</ion-item> | ||
<pre *ngIf="displayRawData" class="ion-no-margin">{{ transaction.transactionDetails | json }}</pre> | ||
</ion-col> | ||
</ion-row> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.line { | ||
border-left: 1px solid var(--ion-color-dark); | ||
height: 96px; | ||
} | ||
.rawdata--container { | ||
pre { | ||
background-color: var(--ion-color-grayLight); | ||
padding: 8px; | ||
} | ||
} | ||
.rawdata--container.ios { | ||
margin-bottom: 48px; | ||
} | ||
.rawdata--container.md { | ||
margin-bottom: var(--margin-bottom); | ||
} |
Oops, something went wrong.