1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-26 17:08:33 +01: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"> [disabled]="purchaseBtn.loading" [appApiAction]="purchasePromise">
<b>{{'premiumPurchase' | i18n}}</b> <b>{{'premiumPurchase' | i18n}}</b>
</button> </button>
<button #restoreBtn type="button" class="primary" appBlurClick (click)="restore()" <button #restoreBtn type="button" appBlurClick (click)="restore()" *ngIf="canRestorePurchase"
*ngIf="canRestorePurchase" [disabled]="restoreBtn.loading" [appApiAction]="restorePromise"> [disabled]="restoreBtn.loading" [appApiAction]="restorePromise">
<b>{{'premiumRestore' | i18n}}</b> {{'restore' | i18n}}
</button> </button>
<button type="button" data-dismiss="modal">{{'close' | i18n}}</button> <button type="button" data-dismiss="modal">{{'close' | i18n}}</button>
<div class="right" *ngIf="!isPremium"> <div class="right" *ngIf="!isPremium">

View File

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

View File

@ -983,9 +983,6 @@
"premiumPurchase": { "premiumPurchase": {
"message": "Purchase Premium" "message": "Purchase Premium"
}, },
"premiumRestore": {
"message": "Restore Premium"
},
"premiumPurchaseAlert": { "premiumPurchaseAlert": {
"message": "You can purchase premium membership on the bitwarden.com web vault. Do you want to visit the website now?" "message": "You can purchase premium membership on the bitwarden.com web vault. Do you want to visit the website now?"
}, },
@ -1254,5 +1251,8 @@
}, },
"premiumUpdated": { "premiumUpdated": {
"message": "You've upgraded to premium." "message": "You've upgraded to premium."
},
"restore": {
"message": "Restore"
} }
} }