-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shared scss file for widgets & overview
- Loading branch information
Showing
12 changed files
with
205 additions
and
106 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
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
30 changes: 30 additions & 0 deletions
30
src/app/overview/widgets/coldstake/coldstake.component.html
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,30 @@ | ||
<div class="cold-staking"> | ||
<app-header> | ||
<ul class="header-nav"> | ||
<li class="section-title">Cold Staking</li> | ||
</ul> | ||
</app-header> | ||
|
||
<md-card class="multiple staking-node"> | ||
<div class="title"> | ||
<md-icon fontSet="faIcon" class="cs-icon" fontIcon="fa-snowflake-o"></md-icon> | ||
Cold Staking <span class="not-enabled">not enabled</span> | ||
</div> | ||
<button class="mat-raised-button mat-primary pull-right"> | ||
<md-icon fontSet="faIcon" fontIcon="fa-plus"></md-icon> | ||
<strong>Add</strong> node key | ||
</button> | ||
</md-card> | ||
|
||
<md-card class="multiple staking-node"> | ||
<div class="title"> | ||
<md-icon fontSet="faIcon" class="cs-icon" fontIcon="fa-snowflake-o"></md-icon> | ||
Cold Staking <span class="enabled">enabled</span> | ||
</div> | ||
<button class="mat-button pull-right"> | ||
<md-icon fontSet="faIcon" fontIcon="fa-pencil"></md-icon> | ||
<strong>Edit</strong> node key | ||
</button> | ||
</md-card> | ||
|
||
</div><!-- .cold-staking --> |
27 changes: 27 additions & 0 deletions
27
src/app/overview/widgets/coldstake/coldstake.component.scss
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,27 @@ | ||
@import '../shared/shared.scss'; | ||
|
||
.cold-staking { | ||
.staking-node { | ||
padding: 24px 24px 30px; | ||
.cs-icon { // snowflake | ||
font-size: 40px; | ||
color: $bg-shadow; | ||
position: relative; | ||
top: 9px; | ||
width: auto; | ||
height: auto; | ||
margin: -11px 15px 0 0; | ||
} | ||
.title { | ||
display: inline-block; | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
& > .enabled { color: $color; } | ||
& > .not-enabled { color: $color-alert; } | ||
} | ||
button { | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/overview/widgets/coldstake/coldstake.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ColdstakeComponent } from './coldstake.component'; | ||
|
||
describe('ColdstakeComponent', () => { | ||
let component: ColdstakeComponent; | ||
let fixture: ComponentFixture<ColdstakeComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ColdstakeComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ColdstakeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
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,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-coldstake', | ||
templateUrl: './coldstake.component.html', | ||
styleUrls: ['./coldstake.component.scss'] | ||
}) | ||
export class ColdstakeComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
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 @@ | ||
/* | ||
Values shared among widgets | ||
*/ | ||
$color: #02E8B0; // primary green-ish color | ||
$color-alert: #EE494D; | ||
$bg-shadow: #E9E9E9; // lines under titles etc. | ||
|
||
|
||
$text-muted: #7E8790; // grey (for section titles, descriptions etc.) | ||
|
||
.header-nav { // section titles | ||
padding: 0 0 20px; margin: 30px 0 30px; | ||
border-bottom: 1px solid $bg-shadow; | ||
} | ||
|
||
/* | ||
Shared among widgets | ||
*/ | ||
|
||
span.point { color: $color; } | ||
|
||
md-card.multiple { | ||
margin-bottom: 20px; | ||
} |
49 changes: 47 additions & 2 deletions
49
src/app/overview/widgets/stakinginfo/stakinginfo.component.html
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 |
---|---|---|
@@ -1,2 +1,47 @@ | ||
<h4>STAKING REWARD: ~{{dynamicStakingReward}}%</h4> | ||
<h4>NETWORK WEIGHT: ~{{curWeight}}</h4> | ||
<app-header> | ||
<ul class="header-nav"> | ||
<li>Staking Information</li> | ||
</ul> | ||
<ul class="header-nav pull-right"> | ||
<!-- <li><a href="javascript:void(0)"><span class="icon fa fa-cog color-green"></span></a></li> --> | ||
</ul> | ||
</app-header> | ||
<md-card class="multiple"> | ||
<div fxFlex [fxLayout]="'row'"> | ||
<div class="one flexitem" fxFlex> | ||
<div class="stat-box"> | ||
<div class="value">~3 h</div> | ||
<div class="description">Next reward</div> | ||
</div> | ||
</div> | ||
<div class="two flexitem" fxFlex> | ||
<div class="stat-box"> | ||
<div class="value">{{dynamicStakingReward}}<span class="point">.</span><small>{{getAfterDot(dynamicStakingReward)}}</small> %</div> | ||
<div class="description">Stake percentage</div> | ||
</div> | ||
</div> | ||
<div class="three flexitem" fxFlex> | ||
<div class="stat-box"> | ||
<div class="value">1<span class="point">.</span><small>4949327</small> PART</div> | ||
<div class="description">Stake reward</div> | ||
</div> | ||
</div> | ||
</div> | ||
</md-card> | ||
|
||
<md-card class="multiple"> | ||
<div fxFlex [fxLayout]="'row'"> | ||
<div class="two flexitem" fxFlex> | ||
<div class="stat-box"> | ||
<div class="value">2254764680994</div> | ||
<div class="description">Your Stake weight</div> | ||
</div> | ||
</div> | ||
<div class="two flexitem" fxFlex> | ||
<div class="stat-box"> | ||
<div class="value">434972889332496</div> | ||
<div class="description">Network Stake weight</div> | ||
</div> | ||
</div> | ||
</div> | ||
</md-card> |
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,12 @@ | ||
@import '../shared/shared.scss'; | ||
|
||
.stat-box { | ||
& > .value { | ||
font-size: 24px; | ||
} | ||
& > .description { | ||
color: $text-muted; | ||
text-transform: uppercase; | ||
margin-top: 15px; | ||
} | ||
} |
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