Skip to content

Commit 376daf1

Browse files
authored
Merge pull request #210 from qubic/dev
chore(release): promote dev to staging
2 parents e7651c4 + 58c7dce commit 376daf1

File tree

20 files changed

+240
-164
lines changed

20 files changed

+240
-164
lines changed

src/app/balance/balance.component.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@
7575
.send-receive-indicator {
7676
min-width: 50px;
7777
text-align: center;
78-
79-
.receive {
80-
color: green;
81-
}
82-
83-
.send {
84-
color: red;
85-
}
8678
}
8779

8880
.mat-accordion .mat-expansion-panel:first-of-type {
Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import "../../../vars.scss";
2-
31
:host {
42
display: inline-flex;
53
align-items: center;
@@ -22,23 +20,3 @@
2220
}
2321
}
2422

25-
.trx-pending {
26-
color: $trx-pending-color;
27-
}
28-
29-
.transfer-success {
30-
color: $trx-success-color;
31-
}
32-
33-
.transfer-failed {
34-
color: $trx-failure-color;
35-
}
36-
37-
.trx-not-executed {
38-
color: $trx-failure-color;
39-
}
40-
41-
.trx-executed {
42-
color: $trx-success-color;
43-
}
44-

src/app/ipo/ipo.component.html

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -26,83 +26,82 @@ <h2>{{ p.name }}</h2>
2626
<button [routerLink]="['/ipo/participate/', p.index]" mat-raised-button color="primary">
2727
<mat-icon>payments</mat-icon> {{ t("ipoComponent.buttons.place-bid") }}
2828
</button>
29-
<button mat-raised-button (click)="init()">
30-
<mat-icon>refresh</mat-icon> {{ t("ipoComponent.buttons.refresh") }}
29+
<button mat-raised-button class="refresh-btn" (click)="init()" [disabled]="refreshing">
30+
<mat-spinner *ngIf="refreshing" class="refresh-spinner" diameter="20"></mat-spinner>
31+
<span class="refresh-content" [class.hidden]="refreshing">
32+
<mat-icon>refresh</mat-icon>
33+
<span>{{ t("ipoComponent.buttons.refresh") }}</span>
34+
</span>
3135
</button>
3236
<button mat-raised-button (click)="openStats(p.index)">
3337
<mat-icon>query_stats</mat-icon> {{ t("ipoComponent.livPanelHint") }}
3438
</button>
3539
<div *ngIf="ipoContracts">
3640
<h3>{{ t("ipoComponent.yourShares") }}</h3>
37-
{{ t("ipoComponent.statusValid", {tick: getBidOverview(p.index).tick | number: '1.0-0'}) }}
38-
<div *ngFor="let bid of getMyShares(p.index)" class="transaction-list">
39-
<strong>{{ bid.bids.length }} ({{ getTotalPrice(bid.bids) | number: '1.0-0'}} {{
40-
t("general.currency") }})</strong> {{ t("ipoComponent.sharesFor") }}
41-
<div [class]="{copy: true, ownId: isOwnId(bid.computorId)}">
42-
<span matTooltip="{{ t('general.copy.tooltip') }}"
43-
[cdkCopyToClipboard]="bid.computorId">{{ bid.computorId }} {{
44-
getSeedName(bid.computorId) }}</span>
41+
<div class="status-valid">({{ t("ipoComponent.statusValid", {tick: getBidOverview(p.index).tick | number: '1.0-0'}) }})</div>
42+
<ng-container *ngIf="getMyShares(p.index) as shares">
43+
<div *ngIf="shares.length === 0" class="empty-state">
44+
{{ t("ipoComponent.noShares") }}
4545
</div>
46-
</div>
46+
<div *ngFor="let bid of shares" class="transaction-list">
47+
<strong>{{ bid.bids.length }} ({{ getTotalPrice(bid.bids) | number: '1.0-0'}} {{
48+
t("general.currency") }})</strong> {{ t("ipoComponent.sharesFor") }}
49+
<div [class]="{copy: true, ownId: isOwnId(bid.computorId)}">
50+
<span matTooltip="{{ t('general.copy.tooltip') }}"
51+
[cdkCopyToClipboard]="bid.computorId">{{ bid.computorId }} {{
52+
getSeedName(bid.computorId) }}</span>
53+
</div>
54+
</div>
55+
</ng-container>
4756
</div>
4857
<div>
4958
<h3>{{ t("ipoComponent.yourBids") }}</h3>
5059

5160
<ng-container *ngIf="getContractBids(p.index) as bids">
52-
<div *ngIf="bids.length === 0">
61+
<div *ngIf="bids.length === 0" class="empty-state">
5362
{{ t("ipoComponent.noBids") }}
5463
</div>
5564

5665
<div *ngFor="let transaction of bids" class="transaction-list">
57-
<tx-status [transaction]="transaction"></tx-status>
66+
<span class="status-icon">
67+
<mat-icon *ngIf="transaction.status == 'Success'" class="trx-executed"
68+
matTooltip="{{ t('balanceComponent.transactions.status.executed.tooltip') }}">check_circle_outline</mat-icon>
69+
<mat-icon *ngIf="transaction.status == 'Failed'" class="transfer-failed"
70+
matTooltip="{{ t('balanceComponent.transactions.status.failure.tooltip') }}">highlight_off</mat-icon>
71+
<mat-icon *ngIf="transaction.status != 'Success' && transaction.status != 'Failed'" class="trx-pending"
72+
matTooltip="{{ t('balanceComponent.transactions.status.pending.tooltip') }}">schedule</mat-icon>
73+
</span>
5874
<div class="center">
5975
<div class="trans-amount currency-value">{{ transaction.price | number: '1.0-0' }}
6076
{{
6177
t("general.currency") }} / {{ transaction.quantity | number: '1.0-0' }} {{
6278
t("ipoComponent.bidStatus.pcs") }} </div>
6379
<div class="trans-date"> Tick: {{ transaction.targetTick | number: '1.0-0' }} </div>
6480
</div>
65-
<div class="send-receive-indicator">
66-
<button
67-
*ngIf="isOwnId(transaction.sourceId) && currentTick > transaction.targetTick && transaction.status !== 'Pending'"
68-
mat-icon-button matTooltip="{{ t('balanceComponent.repeatTransaction') }}"
69-
(click)="repeat(transaction)"><mat-icon>repeat</mat-icon></button>
70-
<mat-icon class="send"
71-
matTooltip="{{ t('balanceComponent.transactions.send.tooltip') }}"
72-
*ngIf="isOwnId(transaction.sourceId)">arrow_downward</mat-icon>
73-
<mat-icon class="send"
74-
matTooltip="{{ t('balanceComponent.transactions.send.tooltip') }}"
75-
*ngIf="!isOwnId(transaction.sourceId)">empty</mat-icon>
76-
<mat-icon class="receive"
77-
matTooltip="{{ t('balanceComponent.transactions.receive.tooltip') }}"
78-
*ngIf="isOwnId(transaction.destId)">arrow_upward</mat-icon>
79-
<mat-icon class="receive"
80-
matTooltip="{{ t('balanceComponent.transactions.receive.tooltip') }}"
81-
*ngIf="!isOwnId(transaction.destId)">empty</mat-icon>
82-
</div>
83-
<div>
84-
<div [class]="{copy: true, ownId: isOwnId(transaction.sourceId)}">
85-
From: <span matTooltip="{{ t('general.copy.tooltip') }}"
86-
[cdkCopyToClipboard]="transaction.sourceId">{{ transaction.sourceId }} {{
87-
getSeedName(transaction.sourceId) }}</span>
81+
<div class="address-group">
82+
<div class="send-receive-indicator">
83+
<mat-icon class="send"
84+
matTooltip="{{ t('balanceComponent.transactions.send.tooltip') }}"
85+
*ngIf="isOwnId(transaction.sourceId)">arrow_downward</mat-icon>
86+
<mat-icon class="receive"
87+
matTooltip="{{ t('balanceComponent.transactions.receive.tooltip') }}"
88+
*ngIf="isOwnId(transaction.destId)">arrow_upward</mat-icon>
89+
</div>
90+
<div>
91+
<div [class]="{copy: true, ownId: isOwnId(transaction.sourceId)}">
92+
From: <span matTooltip="{{ t('general.copy.tooltip') }}"
93+
[cdkCopyToClipboard]="transaction.sourceId">{{
94+
getAddressDisplayName(transaction.sourceId) }}</span>
95+
</div>
96+
<div [class]="{copy: true, ownId: isOwnId(transaction.destId)}">
97+
To: <span matTooltip="{{ t('general.copy.tooltip') }}"
98+
[cdkCopyToClipboard]="transaction.destId">{{
99+
getAddressDisplayName(transaction.destId) }}</span>
100+
</div>
88101
</div>
89-
<div [class]="{copy: true, ownId: isOwnId(transaction.destId)}">To: <span
90-
matTooltip="{{ t('general.copy.tooltip') }}"
91-
[cdkCopyToClipboard]="transaction.destId">{{ transaction.destId }} {{
92-
getSeedName(transaction.destId) }}</span></div>
93102
</div>
94-
<div>
95-
<span *ngIf="transaction.created">Created: {{ transaction.created | date:'short'
96-
}}<br></span>
97-
<span *ngIf="transaction.broadcasted && !transaction.stored">Broadcasted: {{
98-
transaction.broadcasted | date:'short' }}<br></span>
99-
<span *ngIf="transaction.stored">Stored: {{ transaction.stored | date:'short'
100-
}}<br></span>
101-
<span *ngIf="transaction.staged">Staged: {{ transaction.staged | date:'short'
102-
}}<br></span>
103-
<span *ngIf="transaction.confirmed">Confirmed: {{ transaction.confirmed |
104-
date:'short'
105-
}}</span>
103+
<div class="trans-dates">
104+
<span *ngIf="transaction.created">{{ transaction.created | dateTime }}</span>
106105
</div>
107106
</div>
108107
</ng-container>

src/app/ipo/ipo.component.scss

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
1-
.mostVotes{
2-
font-weight: bold;
1+
.status-icon {
2+
display: inline-flex;
3+
align-items: center;
4+
justify-content: center;
5+
padding-right: 6px;
6+
7+
mat-icon {
8+
font-size: 20px;
9+
width: 20px;
10+
height: 20px;
11+
line-height: 1;
12+
}
13+
}
14+
15+
.empty-state {
16+
color: gray;
17+
padding: 10px 0;
18+
}
19+
20+
.status-valid {
21+
font-size: 0.85em;
22+
color: gray;
23+
margin-top: -15px;
24+
margin-bottom: 16px;
325
}
26+
427
.proposal-card {
528
margin-bottom: 10px;
629
min-width: 120px;
@@ -17,25 +40,30 @@
1740
flex-wrap: wrap;
1841
align-items: center;
1942
padding: 5px;
20-
column-gap: 10px;
43+
gap: 5px;
2144
margin: 10px;
22-
23-
.send-receive-indicator {
24-
min-width: 98px;
25-
text-align: right;
26-
}
27-
28-
.receive {
29-
color: green;
45+
46+
.address-group {
47+
display: flex;
48+
align-items: center;
49+
gap: 5px;
3050
}
31-
32-
.send {
33-
color: red;
51+
52+
.send-receive-indicator {
53+
display: flex;
54+
align-items: center;
3455
}
35-
56+
3657
.trans-date {
3758
font-size: 0.9em;
3859
}
60+
61+
.trans-dates {
62+
margin-left: auto;
63+
text-align: right;
64+
font-size: 0.9em;
65+
align-self: flex-start;
66+
}
3967

4068
.trans-amount {
4169
padding: 5px;
@@ -60,7 +88,34 @@
6088
padding-bottom: 20px;
6189
}
6290

63-
.loading {
91+
.refresh-btn {
92+
position: relative;
93+
94+
.refresh-spinner {
95+
position: absolute;
96+
left: 50%;
97+
top: 50%;
98+
transform: translate(-50%, -50%);
99+
}
100+
101+
.refresh-content {
102+
display: inline-flex;
103+
align-items: center;
104+
justify-content: center;
105+
gap: 4px;
106+
vertical-align: middle;
107+
108+
mat-icon {
109+
vertical-align: middle;
110+
}
111+
112+
&.hidden {
113+
visibility: hidden;
114+
}
115+
}
116+
}
117+
118+
.loading {
64119
display: flex;
65120
justify-content: center;
66121
align-items: center;

0 commit comments

Comments
 (0)