diff --git a/src/pages/home/home.scss b/src/pages/home/home.scss index 79db40b5c..f2a162181 100644 --- a/src/pages/home/home.scss +++ b/src/pages/home/home.scss @@ -36,7 +36,4 @@ page-home { .error { color: color($colors, danger); } - .has-refresher > .scroll-content { - border-top: 0; - } } diff --git a/src/pages/receive/receive.html b/src/pages/receive/receive.html index 609e60b35..cb53ee68e 100644 --- a/src/pages/receive/receive.html +++ b/src/pages/receive/receive.html @@ -8,8 +8,8 @@ -
- +
+ Wallet not backed up
@@ -57,4 +57,4 @@
{{wallet.name}}
- \ No newline at end of file + diff --git a/src/pages/wallet-details/wallet-details.html b/src/pages/wallet-details/wallet-details.html index bef0b9a68..dcd5080e6 100644 --- a/src/pages/wallet-details/wallet-details.html +++ b/src/pages/wallet-details/wallet-details.html @@ -5,10 +5,14 @@ - - + + + + + +
- - -
+ + WARNING: Key derivation is not working on this device/wallet. Actions cannot be performed on this wallet. -
- + + Proposals Unsent transactions - - - - -

Total Locked Balance

-

- {{wallet.status.lockedBalanceStr}} - {{wallet.status.lockedBalanceAlternative}} {{wallet.status.alternativeIsoCode}} -

-
-
-
+ + + + Total Locked Balance +
+ {{wallet.status.lockedBalanceStr}} + ({{wallet.status.lockedBalanceAlternative}} {{wallet.status.alternativeIsoCode}}) +
+
+ - - - {{'No transactions yet' | translate}} - - +
+ {{'No transactions yet' | translate}} +
- - - {{'Could not update transaction history' | translate}} - - +
+ {{'Could not update transaction history' | translate}} +
- - - Updating transaction history. Please stand by. -
- {{updatingTxHistoryProgress}} transactions downloaded -
-
+
+ Updating transaction history. Please stand by. +
+ {{updatingTxHistoryProgress}} transactions downloaded +
- - - - - +
+ diff --git a/src/pages/wallet-details/wallet-details.scss b/src/pages/wallet-details/wallet-details.scss index 0c30c282c..fd5b9fa90 100644 --- a/src/pages/wallet-details/wallet-details.scss +++ b/src/pages/wallet-details/wallet-details.scss @@ -1,5 +1,5 @@ page-wallet-details { - .card.balance-card { + .balance-card { background: color($colors, primary); } .balance-header { @@ -59,10 +59,19 @@ page-wallet-details { } } + .middle-message { + height: 50%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + } + .wallet-info { font-weight: 500; color: color($colors, light); - height: 25px; + height: 35px; img { float: left; margin-right: 4px; @@ -103,6 +112,7 @@ page-wallet-details { float: right; width: 20px; height: 20px; + margin: 5px 5px 0 0; &.spinner-crescent circle { stroke: color($colors, light); } diff --git a/src/pages/wallet-details/wallet-details.ts b/src/pages/wallet-details/wallet-details.ts index 81a3af2bd..e5b335fe0 100644 --- a/src/pages/wallet-details/wallet-details.ts +++ b/src/pages/wallet-details/wallet-details.ts @@ -7,6 +7,7 @@ import { WalletProvider } from '../../providers/wallet/wallet'; import { ProfileProvider } from '../../providers/profile/profile'; import { AddressBookProvider } from '../../providers/address-book/address-book'; import { BwcErrorProvider } from '../../providers/bwc-error/bwc-error'; +import { TimeProvider } from '../../providers/time/time'; //pages import { TxDetailsPage } from '../../pages/tx-details/tx-details'; @@ -46,7 +47,8 @@ export class WalletDetailsPage { private addressbookProvider: AddressBookProvider, private bwcError: BwcErrorProvider, private events: Events, - private logger: Logger + private logger: Logger, + private timeProvider: TimeProvider ) { let clearCache = this.navParams.data.clearCache; this.wallet = this.profileProvider.getWallet(this.navParams.data.walletId); @@ -215,4 +217,45 @@ export class WalletDetailsPage { this.navCtrl.push(WalletAddressesPage, { walletId: this.wallet.credentials.walletId }); } + public doRefresh(refresher) { + this.updateAll(true); + setTimeout(() => { + refresher.complete(); + }, 1000); + } + + public getDate(txCreated) { + let date = new Date(txCreated * 1000); + return date; + }; + + public trackByFn(index, tx) { + return index; + }; + + public isFirstInGroup(index) { + if (index === 0) { + return true; + } + let curTx = this.history[index]; + let prevTx = this.history[index - 1]; + return !this.createdDuringSameMonth(curTx, prevTx); + }; + + private createdDuringSameMonth(curTx, prevTx) { + return this.timeProvider.withinSameMonth(curTx.time * 1000, prevTx.time * 1000); + }; + + public isDateInCurrentMonth(date) { + return this.timeProvider.isDateInCurrentMonth(date); + }; + + public createdWithinPastDay(time) { + return this.timeProvider.withinPastDay(time); + }; + + public isUnconfirmed(tx) { + return !tx.confirmations || tx.confirmations === 0; + }; + } diff --git a/src/providers/on-going-process/on-going-process.ts b/src/providers/on-going-process/on-going-process.ts index 4d61c4e3c..b54a11712 100644 --- a/src/providers/on-going-process/on-going-process.ts +++ b/src/providers/on-going-process/on-going-process.ts @@ -74,6 +74,7 @@ export class OnGoingProcessProvider { return; } this.loading = this.loadingCtrl.create({ + spinner: 'hide', content: showName }); this.loading.present(); diff --git a/src/theme/global.scss b/src/theme/global.scss index 8175d18da..bc55d0143 100644 --- a/src/theme/global.scss +++ b/src/theme/global.scss @@ -32,6 +32,11 @@ $global-colors: ( height: 70px; } +// Hide border when refresh +.has-refresher > .scroll-content { + border-top: none !important; +} + // This style prevents the names of the tabs from disappear .tabbar .tab-button .tab-button-text { display: block; @@ -84,30 +89,34 @@ $global-colors: ( } .box-notification { - padding: 0.5rem; - border: 1px solid; + cursor: pointer; + padding: 10px 0; + border: none; margin: 10px; + text-align: center; + color: color($colors, light); a { - color: #fff; + display: block; + color: color($colors, light); + } + .icon { + vertical-align: middle; + margin: 0 5px; + } + &.no-margin { + margin: 0; } &.notice { - border-color: #b2b2b2; - background-color: #f8f8f8; - color: #444; + background-color: color($colors, grey); } - &.warning { - border-color: #e6b500; - background-color: #ffc900; - color: #fff; + &.warn { + background-color: color($colors, warning); &.warning-red{ - border-color: #EB475A; background-color: color($global-colors, warning); } } &.error { - background-color: #ef473a; - border-color: #e42112; - color: #fff; + background-color: color($colors, danger); } }