1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

tweaks to restore

This commit is contained in:
Kyle Spearrin
2019-09-19 11:05:40 -04:00
parent 5baea84a6a
commit 12edd8dcdb
3 changed files with 10 additions and 8 deletions

View File

@@ -55,9 +55,9 @@
[disabled]="purchaseBtn.loading" [appApiAction]="purchasePromise">
<b>{{'premiumPurchase' | i18n}}</b>
</button>
<button #restoreBtn type="button" class="primary" appBlurClick (click)="restore()"
*ngIf="canRestorePurchase" [disabled]="restoreBtn.loading" [appApiAction]="restorePromise">
<b>{{'premiumRestore' | i18n}}</b>
<button #restoreBtn type="button" appBlurClick (click)="restore()" *ngIf="canRestorePurchase"
[disabled]="restoreBtn.loading" [appApiAction]="restorePromise">
{{'restore' | i18n}}
</button>
<button type="button" data-dismiss="modal">{{'close' | i18n}}</button>
<div class="right" *ngIf="!isPremium">

View File

@@ -73,9 +73,11 @@ export class PremiumComponent extends BasePremiumComponent {
break;
case 'failed':
// tslint:disable-next-line
console.log(`Failed to purchase ${payment.productIdentifier}.` +
console.log(`Failed to purchase ${payment.productIdentifier}. ` +
`${transaction.errorCode} = ${transaction.errorMessage}`);
this.platformUtilsService.showToast('error', null, transaction.errorMessage);
if (transaction.errorCode !== 2) {
this.platformUtilsService.showToast('error', null, transaction.errorMessage);
}
// Finish the transaction.
remote.inAppPurchase.finishTransactionByDate(transaction.transactionDate);
break;