1
0
Fork 0
forked from lthn/blockchain
This commit is contained in:
wildkif 2019-03-21 17:24:26 +02:00
parent 76a2a6b259
commit b92e659b17
22 changed files with 286 additions and 15 deletions

View file

@ -104,6 +104,12 @@
"TITLE": "Make sure to keep your seed phrase in a safe place. If you forget your seed phrase you will not be able to recover your wallet.",
"BUTTON_CREATE_ACCOUNT" : "Create wallet"
},
"PROGRESS": {
"ADD_WALLET": "Add wallet",
"SELECT_LOCATION": "Select wallet location",
"CREATE_WALLET": "Create new wallet",
"RESTORE_WALLET": "Restore from backup"
},
"SETTINGS": {
"TITLE": "Settings",
"DARK_THEME": "Dark theme",

View file

@ -698,3 +698,27 @@ app-transaction-details {
}
}
}
app-progress-container {
.progress-bar-container {
@include themify($themes) {
color: themed(mainTextColor);
}
.progress-bar {
@include themify($themes) {
background-color: themed(progressBarBackgroundColor);
}
.progress-bar-full {
@include themify($themes) {
background-color: themed(progressBarFullBackgroundColor);
}
}
}
}
}

View file

@ -230,6 +230,76 @@ var ModalContainerComponent = /** @class */ (function () {
/***/ }),
/***/ "./src/app/_helpers/directives/progress-container/progress-container.component.html":
/*!******************************************************************************************!*\
!*** ./src/app/_helpers/directives/progress-container/progress-container.component.html ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"progress-bar-container\">\n <div class=\"progress-bar\">\n <div class=\"progress-bar-full\" [style.width]=\"width\"></div>\n </div>\n <div class=\"progress-labels\">\n <span *ngFor=\"let label of labels\">\n {{ label | translate }}\n </span>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/_helpers/directives/progress-container/progress-container.component.scss":
/*!******************************************************************************************!*\
!*** ./src/app/_helpers/directives/progress-container/progress-container.component.scss ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".progress-bar-container {\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 0 3rem;\n width: 100%;\n height: 3rem; }\n .progress-bar-container .progress-bar {\n position: absolute;\n top: -0.7rem;\n left: 0;\n margin: 0 3rem;\n width: calc(100% - 6rem);\n height: 0.7rem; }\n .progress-bar-container .progress-bar .progress-bar-full {\n height: 0.7rem; }\n .progress-bar-container .progress-labels {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 1.2rem;\n height: 100%; }\n .progress-bar-container .progress-labels span {\n flex: 1 0 0;\n text-align: center; }\n .progress-bar-container .progress-labels span:first-child {\n text-align: left; }\n .progress-bar-container .progress-labels span:last-child {\n text-align: right; }\n .progress-bar-container .progress-time {\n position: absolute;\n top: -3rem;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n font-size: 1.2rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvX2hlbHBlcnMvZGlyZWN0aXZlcy9wcm9ncmVzcy1jb250YWluZXIvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcX2hlbHBlcnNcXGRpcmVjdGl2ZXNcXHByb2dyZXNzLWNvbnRhaW5lclxccHJvZ3Jlc3MtY29udGFpbmVyLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCO0VBQ2xCLFNBQVM7RUFDVCxPQUFPO0VBQ1AsZUFBZTtFQUNmLFdBQVc7RUFDWCxZQUFZLEVBQUE7RUFOZDtJQVNJLGtCQUFrQjtJQUNsQixZQUFZO0lBQ1osT0FBTztJQUNQLGNBQWM7SUFDZCx3QkFBd0I7SUFDeEIsY0FBYyxFQUFBO0VBZGxCO01BaUJNLGNBQWMsRUFBQTtFQWpCcEI7SUFzQkksYUFBYTtJQUNiLG1CQUFtQjtJQUNuQiw4QkFBOEI7SUFDOUIsaUJBQWlCO0lBQ2pCLFlBQVksRUFBQTtFQTFCaEI7TUE2Qk0sV0FBVztNQUNYLGtCQUFrQixFQUFBO0VBOUJ4QjtRQWlDUSxnQkFBZ0IsRUFBQTtFQWpDeEI7UUFxQ1EsaUJBQWlCLEVBQUE7RUFyQ3pCO0lBMkNJLGtCQUFrQjtJQUNsQixVQUFVO0lBQ1YsU0FBUztJQUNULG1DQUEyQjtZQUEzQiwyQkFBMkI7SUFDM0IsaUJBQWlCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9faGVscGVycy9kaXJlY3RpdmVzL3Byb2dyZXNzLWNvbnRhaW5lci9wcm9ncmVzcy1jb250YWluZXIuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIucHJvZ3Jlc3MtYmFyLWNvbnRhaW5lciB7XHJcbiAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gIGJvdHRvbTogMDtcclxuICBsZWZ0OiAwO1xyXG4gIHBhZGRpbmc6IDAgM3JlbTtcclxuICB3aWR0aDogMTAwJTtcclxuICBoZWlnaHQ6IDNyZW07XHJcblxyXG4gIC5wcm9ncmVzcy1iYXIge1xyXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gICAgdG9wOiAtMC43cmVtO1xyXG4gICAgbGVmdDogMDtcclxuICAgIG1hcmdpbjogMCAzcmVtO1xyXG4gICAgd2lkdGg6IGNhbGMoMTAwJSAtIDZyZW0pO1xyXG4gICAgaGVpZ2h0OiAwLjdyZW07XHJcblxyXG4gICAgLnByb2dyZXNzLWJhci1mdWxsIHtcclxuICAgICAgaGVpZ2h0OiAwLjdyZW07XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAucHJvZ3Jlc3MtbGFiZWxzIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xyXG4gICAgZm9udC1zaXplOiAxLjJyZW07XHJcbiAgICBoZWlnaHQ6IDEwMCU7XHJcblxyXG4gICAgc3BhbiB7XHJcbiAgICAgIGZsZXg6IDEgMCAwO1xyXG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcblxyXG4gICAgICAmOmZpcnN0LWNoaWxkIHtcclxuICAgICAgICB0ZXh0LWFsaWduOiBsZWZ0O1xyXG4gICAgICB9XHJcblxyXG4gICAgICAmOmxhc3QtY2hpbGQge1xyXG4gICAgICAgIHRleHQtYWxpZ246IHJpZ2h0O1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAucHJvZ3Jlc3MtdGltZSB7XHJcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICB0b3A6IC0zcmVtO1xyXG4gICAgbGVmdDogNTAlO1xyXG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVYKC01MCUpO1xyXG4gICAgZm9udC1zaXplOiAxLjJyZW07XHJcbiAgfVxyXG59XHJcbiJdfQ== */"
/***/ }),
/***/ "./src/app/_helpers/directives/progress-container/progress-container.component.ts":
/*!****************************************************************************************!*\
!*** ./src/app/_helpers/directives/progress-container/progress-container.component.ts ***!
\****************************************************************************************/
/*! exports provided: ProgressContainerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressContainerComponent", function() { return ProgressContainerComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ProgressContainerComponent = /** @class */ (function () {
function ProgressContainerComponent() {
}
ProgressContainerComponent.prototype.ngOnInit = function () { };
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], ProgressContainerComponent.prototype, "width", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], ProgressContainerComponent.prototype, "labels", void 0);
ProgressContainerComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-progress-container',
template: __webpack_require__(/*! ./progress-container.component.html */ "./src/app/_helpers/directives/progress-container/progress-container.component.html"),
styles: [__webpack_require__(/*! ./progress-container.component.scss */ "./src/app/_helpers/directives/progress-container/progress-container.component.scss")]
}),
__metadata("design:paramtypes", [])
], ProgressContainerComponent);
return ProgressContainerComponent;
}());
/***/ }),
/***/ "./src/app/_helpers/directives/staking-switch/staking-switch.component.html":
@ -2993,6 +3063,9 @@ var AppComponent = /** @class */ (function () {
else {
_this.renderer.addClass(document.body, 'theme-' + _this.variablesService.defaultTheme);
}
if (_this.variablesService.settings.hasOwnProperty('scale') && [7.5, 10, 12.5, 15].indexOf(_this.variablesService.settings.scale) !== -1) {
_this.renderer.setStyle(document.documentElement, 'font-size', _this.variablesService.settings.scale + 'px');
}
}
else {
_this.variablesService.settings.theme = _this.variablesService.defaultTheme;
@ -3210,6 +3283,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _helpers_directives_transaction_details_transaction_details_component__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./_helpers/directives/transaction-details/transaction-details.component */ "./src/app/_helpers/directives/transaction-details/transaction-details.component.ts");
/* harmony import */ var ngx_contextmenu__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ngx-contextmenu */ "./node_modules/ngx-contextmenu/fesm5/ngx-contextmenu.js");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! angular-highcharts */ "./node_modules/angular-highcharts/fesm5/angular-highcharts.js");
/* harmony import */ var _helpers_directives_progress_container_progress_container_component__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./_helpers/directives/progress-container/progress-container.component */ "./src/app/_helpers/directives/progress-container/progress-container.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@ -3263,6 +3337,7 @@ function HttpLoaderFactory(httpClient) {
return new _ngx_translate_http_loader__WEBPACK_IMPORTED_MODULE_27__["TranslateHttpLoader"](httpClient, './assets/i18n/', '.json');
}
// import * as more from 'highcharts/highcharts-more.src';
// import * as exporting from 'highcharts/modules/exporting.src';
// import * as highstock from 'highcharts/modules/stock.src';
@ -3308,7 +3383,8 @@ var AppModule = /** @class */ (function () {
_helpers_directives_tooltip_directive__WEBPACK_IMPORTED_MODULE_37__["TooltipDirective"],
_helpers_directives_input_validate_input_validate_directive__WEBPACK_IMPORTED_MODULE_38__["InputValidateDirective"],
_helpers_directives_modal_container_modal_container_component__WEBPACK_IMPORTED_MODULE_40__["ModalContainerComponent"],
_helpers_directives_transaction_details_transaction_details_component__WEBPACK_IMPORTED_MODULE_41__["TransactionDetailsComponent"]
_helpers_directives_transaction_details_transaction_details_component__WEBPACK_IMPORTED_MODULE_41__["TransactionDetailsComponent"],
_helpers_directives_progress_container_progress_container_component__WEBPACK_IMPORTED_MODULE_44__["ProgressContainerComponent"]
],
imports: [
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"],
@ -3610,7 +3686,7 @@ var ContractsComponent = /** @class */ (function () {
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.CREATE_WALLET' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-create\" [formGroup]=\"createForm\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-name\">{{ 'CREATE_WALLET.NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['name'].invalid && (createForm.controls['name'].dirty || createForm.controls['name'].touched)\">\r\n <div *ngIf=\"createForm.controls['name'].errors['required']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"createForm.controls['name'].errors['duplicate']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-password\">{{ 'CREATE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'CREATE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['password'].dirty && createForm.controls['confirm'].dirty && createForm.errors\">\r\n <div *ngIf=\"createForm.errors['confirm_mismatch']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\" disabled><i class=\"icon\"></i>{{walletSavedName}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!createForm.valid\" *ngIf=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.CREATE_WALLET' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-create\" [formGroup]=\"createForm\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-name\">{{ 'CREATE_WALLET.NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['name'].invalid && (createForm.controls['name'].dirty || createForm.controls['name'].touched)\">\r\n <div *ngIf=\"createForm.controls['name'].errors['required']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"createForm.controls['name'].errors['duplicate']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-password\">{{ 'CREATE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'CREATE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['password'].dirty && createForm.controls['confirm'].dirty && createForm.errors\">\r\n <div *ngIf=\"createForm.errors['confirm_mismatch']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\" disabled><i class=\"icon\"></i>{{walletSavedName}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!createForm.valid\" *ngIf=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n\r\n<app-progress-container [width]=\"progressWidth\" [labels]=\"['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.CREATE_WALLET']\"></app-progress-container>\r\n"
/***/ }),
@ -3688,12 +3764,14 @@ var CreateWalletComponent = /** @class */ (function () {
};
this.walletSaved = false;
this.walletSavedName = '';
this.progressWidth = '9rem';
}
CreateWalletComponent.prototype.ngOnInit = function () {
};
CreateWalletComponent.prototype.createWallet = function () {
var _this = this;
this.ngZone.run(function () {
_this.progressWidth = '100%';
_this.router.navigate(['/seed-phrase'], { queryParams: { wallet_id: _this.wallet.id } });
});
};
@ -3710,6 +3788,7 @@ var CreateWalletComponent = /** @class */ (function () {
_this.variablesService.opening_wallet = new _helpers_models_wallet_model__WEBPACK_IMPORTED_MODULE_6__["Wallet"](generate_data.wallet_id, _this.createForm.get('name').value, _this.createForm.get('password').value, generate_data['wi'].path, generate_data['wi'].address, generate_data['wi'].balance, generate_data['wi'].unlocked_balance, generate_data['wi'].mined_total, generate_data['wi'].tracking_hey);
_this.ngZone.run(function () {
_this.walletSaved = true;
_this.progressWidth = '50%';
});
}
else {
@ -5006,7 +5085,7 @@ var ReceiveComponent = /** @class */ (function () {
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.RESTORE_WALLET' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-restore\" [formGroup]=\"restoreForm\">\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-name\">{{ 'RESTORE_WALLET.LABEL_NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['name'].invalid && (restoreForm.controls['name'].dirty || restoreForm.controls['name'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['name'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['name'].errors['duplicate']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-password\">{{ 'RESTORE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'RESTORE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['password'].dirty && restoreForm.controls['confirm'].dirty && restoreForm.errors\">\r\n <div *ngIf=\"restoreForm.errors['confirm_mismatch']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"phrase-key\">{{ 'RESTORE_WALLET.LABEL_PHRASE_KEY' | translate }}</label>\r\n <input type=\"text\" id=\"phrase-key\" formControlName=\"key\" [attr.disabled]=\"walletSaved ? '' : null\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['key'].invalid && (restoreForm.controls['key'].dirty || restoreForm.controls['key'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['key'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['key'].errors['key_not_valid']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_NOT_VALID' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\">{{restoreForm.controls['name'].value}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!restoreForm.valid\" *ngIf=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.RESTORE_WALLET' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-restore\" [formGroup]=\"restoreForm\">\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-name\">{{ 'RESTORE_WALLET.LABEL_NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['name'].invalid && (restoreForm.controls['name'].dirty || restoreForm.controls['name'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['name'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['name'].errors['duplicate']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-password\">{{ 'RESTORE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'RESTORE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['password'].dirty && restoreForm.controls['confirm'].dirty && restoreForm.errors\">\r\n <div *ngIf=\"restoreForm.errors['confirm_mismatch']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"phrase-key\">{{ 'RESTORE_WALLET.LABEL_PHRASE_KEY' | translate }}</label>\r\n <input type=\"text\" id=\"phrase-key\" formControlName=\"key\" [attr.disabled]=\"walletSaved ? '' : null\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['key'].invalid && (restoreForm.controls['key'].dirty || restoreForm.controls['key'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['key'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['key'].errors['key_not_valid']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_NOT_VALID' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\" disabled><i class=\"icon\"></i>{{walletSavedName}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!restoreForm.valid\" *ngIf=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n\r\n<app-progress-container [width]=\"progressWidth\" [labels]=\"['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.RESTORE_WALLET']\"></app-progress-container>\r\n"
/***/ }),
@ -5017,7 +5096,7 @@ module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".form-restore {\n margin: 2.4rem 0;\n width: 100%; }\n .form-restore .input-block.half-block {\n width: 50%; }\n .form-restore .wrap-buttons {\n display: flex;\n margin: 2.5rem -0.7rem;\n width: 50%; }\n .form-restore .wrap-buttons button {\n margin: 0 0.7rem; }\n .form-restore .wrap-buttons button.transparent-button {\n flex-basis: 50%; }\n .form-restore .wrap-buttons button.select-button {\n flex-basis: 60%; }\n .form-restore .wrap-buttons button.create-button {\n flex: 1 1 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcmVzdG9yZS13YWxsZXQvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxccmVzdG9yZS13YWxsZXRcXHJlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCO0VBQ2hCLFdBQVcsRUFBQTtFQUZiO0lBT00sVUFBVSxFQUFBO0VBUGhCO0lBWUksYUFBYTtJQUNiLHNCQUFzQjtJQUN0QixVQUFVLEVBQUE7RUFkZDtNQWlCTSxnQkFBZ0IsRUFBQTtFQWpCdEI7UUFvQlEsZUFBZSxFQUFBO0VBcEJ2QjtRQXdCUSxlQUFlLEVBQUE7RUF4QnZCO1FBNEJRLGFBQWEsRUFBQSIsImZpbGUiOiJzcmMvYXBwL3Jlc3RvcmUtd2FsbGV0L3Jlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvcm0tcmVzdG9yZSB7XHJcbiAgbWFyZ2luOiAyLjRyZW0gMDtcclxuICB3aWR0aDogMTAwJTtcclxuXHJcbiAgLmlucHV0LWJsb2NrIHtcclxuXHJcbiAgICAmLmhhbGYtYmxvY2sge1xyXG4gICAgICB3aWR0aDogNTAlO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLndyYXAtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gLTAuN3JlbTtcclxuICAgIHdpZHRoOiA1MCU7XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgbWFyZ2luOiAwIDAuN3JlbTtcclxuXHJcbiAgICAgICYudHJhbnNwYXJlbnQtYnV0dG9uIHtcclxuICAgICAgICBmbGV4LWJhc2lzOiA1MCU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYuc2VsZWN0LWJ1dHRvbiB7XHJcbiAgICAgICAgZmxleC1iYXNpczogNjAlO1xyXG4gICAgICB9XHJcblxyXG4gICAgICAmLmNyZWF0ZS1idXR0b24ge1xyXG4gICAgICAgIGZsZXg6IDEgMSA1MCU7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
module.exports = ":host {\n position: relative; }\n\n.form-restore {\n margin: 2.4rem 0;\n width: 100%; }\n\n.form-restore .input-block.half-block {\n width: 50%; }\n\n.form-restore .wrap-buttons {\n display: flex;\n margin: 2.5rem -0.7rem;\n width: 50%; }\n\n.form-restore .wrap-buttons button {\n margin: 0 0.7rem; }\n\n.form-restore .wrap-buttons button.transparent-button {\n flex-basis: 50%; }\n\n.form-restore .wrap-buttons button.select-button {\n flex-basis: 60%; }\n\n.form-restore .wrap-buttons button.create-button {\n flex: 1 1 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcmVzdG9yZS13YWxsZXQvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxccmVzdG9yZS13YWxsZXRcXHJlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCLEVBQUE7O0FBR3BCO0VBQ0UsZ0JBQWdCO0VBQ2hCLFdBQVcsRUFBQTs7QUFGYjtJQU9NLFVBQVUsRUFBQTs7QUFQaEI7SUFZSSxhQUFhO0lBQ2Isc0JBQXNCO0lBQ3RCLFVBQVUsRUFBQTs7QUFkZDtNQWlCTSxnQkFBZ0IsRUFBQTs7QUFqQnRCO1FBb0JRLGVBQWUsRUFBQTs7QUFwQnZCO1FBd0JRLGVBQWUsRUFBQTs7QUF4QnZCO1FBNEJRLGFBQWEsRUFBQSIsImZpbGUiOiJzcmMvYXBwL3Jlc3RvcmUtd2FsbGV0L3Jlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3Qge1xyXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxufVxyXG5cclxuLmZvcm0tcmVzdG9yZSB7XHJcbiAgbWFyZ2luOiAyLjRyZW0gMDtcclxuICB3aWR0aDogMTAwJTtcclxuXHJcbiAgLmlucHV0LWJsb2NrIHtcclxuXHJcbiAgICAmLmhhbGYtYmxvY2sge1xyXG4gICAgICB3aWR0aDogNTAlO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLndyYXAtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gLTAuN3JlbTtcclxuICAgIHdpZHRoOiA1MCU7XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgbWFyZ2luOiAwIDAuN3JlbTtcclxuXHJcbiAgICAgICYudHJhbnNwYXJlbnQtYnV0dG9uIHtcclxuICAgICAgICBmbGV4LWJhc2lzOiA1MCU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYuc2VsZWN0LWJ1dHRvbiB7XHJcbiAgICAgICAgZmxleC1iYXNpczogNjAlO1xyXG4gICAgICB9XHJcblxyXG4gICAgICAmLmNyZWF0ZS1idXR0b24ge1xyXG4gICAgICAgIGZsZXg6IDEgMSA1MCU7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
/***/ }),
@ -5084,12 +5163,15 @@ var RestoreWalletComponent = /** @class */ (function () {
id: ''
};
this.walletSaved = false;
this.walletSavedName = '';
this.progressWidth = '9rem';
}
RestoreWalletComponent.prototype.ngOnInit = function () {
};
RestoreWalletComponent.prototype.createWallet = function () {
var _this = this;
this.ngZone.run(function () {
_this.progressWidth = '100%';
_this.router.navigate(['/seed-phrase'], { queryParams: { wallet_id: _this.wallet.id } });
});
};
@ -5106,6 +5188,7 @@ var RestoreWalletComponent = /** @class */ (function () {
_this.backend.saveFileDialog(_this.translate.instant('RESTORE_WALLET.CHOOSE_PATH'), '*', _this.variablesService.settings.default_path, function (save_status, save_data) {
if (save_status) {
_this.variablesService.settings.default_path = save_data.path.substr(0, save_data.path.lastIndexOf('/'));
_this.walletSavedName = save_data.path.substr(save_data.path.lastIndexOf('/') + 1, save_data.path.length - 1);
_this.backend.restoreWallet(save_data.path, _this.restoreForm.get('password').value, _this.restoreForm.get('key').value, function (restore_status, restore_data) {
if (restore_status) {
_this.wallet.id = restore_data.wallet_id;
@ -5123,6 +5206,7 @@ var RestoreWalletComponent = /** @class */ (function () {
});
_this.ngZone.run(function () {
_this.walletSaved = true;
_this.progressWidth = '50%';
});
}
else {
@ -5162,7 +5246,7 @@ var RestoreWalletComponent = /** @class */ (function () {
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.SAVE_PHRASE' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <h3 class=\"seed-phrase-title\">{{ 'SEED_PHRASE.TITLE' | translate }}</h3>\r\n\r\n <div class=\"seed-phrase-content\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, seedPhrase)\">\r\n <ng-container *ngFor=\"let word of seedPhrase.split(' '); let index = index\">\r\n <div class=\"word\">{{(index + 1) + '. ' + word}}</div>\r\n </ng-container>\r\n </div>\r\n\r\n <button type=\"button\" class=\"blue-button\" (click)=\"runWallet()\">{{ 'SEED_PHRASE.BUTTON_CREATE_ACCOUNT' | translate }}</button>\r\n\r\n</div>\r\n"
module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.SAVE_PHRASE' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <h3 class=\"seed-phrase-title\">{{ 'SEED_PHRASE.TITLE' | translate }}</h3>\r\n\r\n <div class=\"seed-phrase-content\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, seedPhrase)\">\r\n <ng-container *ngFor=\"let word of seedPhrase.split(' '); let index = index\">\r\n <div class=\"word\">{{(index + 1) + '. ' + word}}</div>\r\n </ng-container>\r\n </div>\r\n\r\n <button type=\"button\" class=\"blue-button seed-phrase-button\" (click)=\"runWallet()\">{{ 'SEED_PHRASE.BUTTON_CREATE_ACCOUNT' | translate }}</button>\r\n\r\n</div>\r\n\r\n<app-progress-container [width]=\"'100%'\" [labels]=\"['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.CREATE_WALLET']\"></app-progress-container>\r\n"
/***/ }),
@ -5173,7 +5257,7 @@ module.exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".seed-phrase-title {\n line-height: 2.2rem;\n padding: 2.2rem 0; }\n\n.seed-phrase-content {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n padding: 1.4rem;\n width: 100%;\n height: 12rem; }\n\n.seed-phrase-content .word {\n line-height: 2.2rem;\n max-width: 13rem; }\n\nbutton {\n margin: 2.8rem 0;\n width: 25%;\n min-width: 1.5rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2VlZC1waHJhc2UvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcc2VlZC1waHJhc2VcXHNlZWQtcGhyYXNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsbUJBQW1CO0VBQ25CLGlCQUFpQixFQUFBOztBQUduQjtFQUNFLGFBQWE7RUFDYixzQkFBc0I7RUFDdEIsZUFBZTtFQUNmLGVBQWU7RUFDZixXQUFXO0VBQ1gsYUFBYSxFQUFBOztBQU5mO0lBU0ksbUJBQW1CO0lBQ25CLGdCQUFnQixFQUFBOztBQUlwQjtFQUNFLGdCQUFnQjtFQUNoQixVQUFVO0VBQ1YsaUJBQWlCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zZWVkLXBocmFzZS9zZWVkLXBocmFzZS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5zZWVkLXBocmFzZS10aXRsZSB7XHJcbiAgbGluZS1oZWlnaHQ6IDIuMnJlbTtcclxuICBwYWRkaW5nOiAyLjJyZW0gMDtcclxufVxyXG5cclxuLnNlZWQtcGhyYXNlLWNvbnRlbnQge1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBmbGV4LXdyYXA6IHdyYXA7XHJcbiAgcGFkZGluZzogMS40cmVtO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIGhlaWdodDogMTJyZW07XHJcblxyXG4gIC53b3JkIHtcclxuICAgIGxpbmUtaGVpZ2h0OiAyLjJyZW07XHJcbiAgICBtYXgtd2lkdGg6IDEzcmVtO1xyXG4gIH1cclxufVxyXG5cclxuYnV0dG9uIHtcclxuICBtYXJnaW46IDIuOHJlbSAwO1xyXG4gIHdpZHRoOiAyNSU7XHJcbiAgbWluLXdpZHRoOiAxLjVyZW07XHJcbn1cclxuIl19 */"
module.exports = ":host {\n position: relative; }\n\n.seed-phrase-title {\n line-height: 2.2rem;\n padding: 2.2rem 0; }\n\n.seed-phrase-content {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n padding: 1.4rem;\n width: 100%;\n height: 12rem; }\n\n.seed-phrase-content .word {\n line-height: 2.2rem;\n max-width: 13rem; }\n\n.seed-phrase-button {\n margin: 2.8rem 0;\n width: 25%;\n min-width: 1.5rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2VlZC1waHJhc2UvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcc2VlZC1waHJhc2VcXHNlZWQtcGhyYXNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCLEVBQUE7O0FBR3BCO0VBQ0UsbUJBQW1CO0VBQ25CLGlCQUFpQixFQUFBOztBQUduQjtFQUNFLGFBQWE7RUFDYixzQkFBc0I7RUFDdEIsZUFBZTtFQUNmLGVBQWU7RUFDZixXQUFXO0VBQ1gsYUFBYSxFQUFBOztBQU5mO0lBU0ksbUJBQW1CO0lBQ25CLGdCQUFnQixFQUFBOztBQUlwQjtFQUNFLGdCQUFnQjtFQUNoQixVQUFVO0VBQ1YsaUJBQWlCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zZWVkLXBocmFzZS9zZWVkLXBocmFzZS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IHtcclxuICBwb3NpdGlvbjogcmVsYXRpdmU7XHJcbn1cclxuXHJcbi5zZWVkLXBocmFzZS10aXRsZSB7XHJcbiAgbGluZS1oZWlnaHQ6IDIuMnJlbTtcclxuICBwYWRkaW5nOiAyLjJyZW0gMDtcclxufVxyXG5cclxuLnNlZWQtcGhyYXNlLWNvbnRlbnQge1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBmbGV4LXdyYXA6IHdyYXA7XHJcbiAgcGFkZGluZzogMS40cmVtO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIGhlaWdodDogMTJyZW07XHJcblxyXG4gIC53b3JkIHtcclxuICAgIGxpbmUtaGVpZ2h0OiAyLjJyZW07XHJcbiAgICBtYXgtd2lkdGg6IDEzcmVtO1xyXG4gIH1cclxufVxyXG5cclxuLnNlZWQtcGhyYXNlLWJ1dHRvbiB7XHJcbiAgbWFyZ2luOiAyLjhyZW0gMDtcclxuICB3aWR0aDogMjUlO1xyXG4gIG1pbi13aWR0aDogMS41cmVtO1xyXG59XHJcbiJdfQ== */"
/***/ }),
@ -5563,7 +5647,6 @@ var SettingsComponent = /** @class */ (function () {
this.backend.storeAppData();
};
SettingsComponent.prototype.setScale = function (scale) {
//this.renderer.removeClass(document.body, 'theme-' + this.theme);
this.scale = scale;
this.variablesService.settings.scale = this.scale;
this.renderer.setStyle(document.documentElement, 'font-size', this.scale + 'px');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
<div class="progress-bar-container">
<div class="progress-bar">
<div class="progress-bar-full" [style.width]="width"></div>
</div>
<div class="progress-labels">
<span *ngFor="let label of labels">
{{ label | translate }}
</span>
</div>
</div>

View file

@ -0,0 +1,50 @@
.progress-bar-container {
position: absolute;
bottom: 0;
left: 0;
padding: 0 3rem;
width: 100%;
height: 3rem;
.progress-bar {
position: absolute;
top: -0.7rem;
left: 0;
margin: 0 3rem;
width: calc(100% - 6rem);
height: 0.7rem;
.progress-bar-full {
height: 0.7rem;
}
}
.progress-labels {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 1.2rem;
height: 100%;
span {
flex: 1 0 0;
text-align: center;
&:first-child {
text-align: left;
}
&:last-child {
text-align: right;
}
}
}
.progress-time {
position: absolute;
top: -3rem;
left: 50%;
transform: translateX(-50%);
font-size: 1.2rem;
}
}

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProgressContainerComponent } from './progress-container.component';
describe('ProgressContainerComponent', () => {
let component: ProgressContainerComponent;
let fixture: ComponentFixture<ProgressContainerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProgressContainerComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProgressContainerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,17 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-progress-container',
templateUrl: './progress-container.component.html',
styleUrls: ['./progress-container.component.scss']
})
export class ProgressContainerComponent implements OnInit {
@Input() width: string;
@Input() labels: [];
constructor() {}
ngOnInit() {}
}

View file

@ -472,6 +472,9 @@ export class AppComponent implements OnInit, OnDestroy {
} else {
this.renderer.addClass(document.body, 'theme-' + this.variablesService.defaultTheme);
}
if (this.variablesService.settings.hasOwnProperty('scale') && [7.5, 10, 12.5, 15].indexOf(this.variablesService.settings.scale) !== -1) {
this.renderer.setStyle(document.documentElement, 'font-size', this.variablesService.settings.scale + 'px');
}
} else {
this.variablesService.settings.theme = this.variablesService.defaultTheme;
this.renderer.addClass(document.body, 'theme-' + this.variablesService.settings.theme);

View file

@ -52,6 +52,7 @@ export function HttpLoaderFactory(httpClient: HttpClient) {
import { ChartModule, HIGHCHARTS_MODULES, Highcharts} from 'angular-highcharts';
import { ProgressContainerComponent } from './_helpers/directives/progress-container/progress-container.component';
// import * as more from 'highcharts/highcharts-more.src';
// import * as exporting from 'highcharts/modules/exporting.src';
// import * as highstock from 'highcharts/modules/stock.src';
@ -95,7 +96,8 @@ Highcharts.setOptions({
TooltipDirective,
InputValidateDirective,
ModalContainerComponent,
TransactionDetailsComponent
TransactionDetailsComponent,
ProgressContainerComponent
],
imports: [
BrowserModule,

View file

@ -50,3 +50,5 @@
</form>
</div>
<app-progress-container [width]="progressWidth" [labels]="['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.CREATE_WALLET']"></app-progress-container>

View file

@ -35,6 +35,7 @@ export class CreateWalletComponent implements OnInit {
walletSaved = false;
walletSavedName = '';
progressWidth = '9rem';
constructor(
private router: Router,
@ -51,6 +52,7 @@ export class CreateWalletComponent implements OnInit {
createWallet() {
this.ngZone.run(() => {
this.progressWidth = '100%';
this.router.navigate(['/seed-phrase'], {queryParams: {wallet_id: this.wallet.id}});
});
}
@ -77,6 +79,7 @@ export class CreateWalletComponent implements OnInit {
);
this.ngZone.run(() => {
this.walletSaved = true;
this.progressWidth = '50%';
});
} else {
if (errorCode && errorCode === 'ALREADY_EXISTS') {

View file

@ -55,7 +55,7 @@
</div>
<div class="wrap-buttons">
<button type="button" class="transparent-button" *ngIf="walletSaved">{{restoreForm.controls['name'].value}}</button>
<button type="button" class="transparent-button" *ngIf="walletSaved" disabled><i class="icon"></i>{{walletSavedName}}</button>
<button type="button" class="blue-button select-button" (click)="saveWallet()" [disabled]="!restoreForm.valid" *ngIf="!walletSaved">{{ 'RESTORE_WALLET.BUTTON_SELECT' | translate }}</button>
<button type="button" class="blue-button create-button" (click)="createWallet()" [disabled]="!walletSaved">{{ 'RESTORE_WALLET.BUTTON_CREATE' | translate }}</button>
</div>
@ -63,3 +63,5 @@
</form>
</div>
<app-progress-container [width]="progressWidth" [labels]="['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.RESTORE_WALLET']"></app-progress-container>

View file

@ -1,3 +1,7 @@
:host {
position: relative;
}
.form-restore {
margin: 2.4rem 0;
width: 100%;

View file

@ -35,6 +35,8 @@ export class RestoreWalletComponent implements OnInit {
};
walletSaved = false;
walletSavedName = '';
progressWidth = '9rem';
constructor(
private router: Router,
@ -52,6 +54,7 @@ export class RestoreWalletComponent implements OnInit {
createWallet() {
this.ngZone.run(() => {
this.progressWidth = '100%';
this.router.navigate(['/seed-phrase'], {queryParams: {wallet_id: this.wallet.id}});
});
}
@ -68,6 +71,7 @@ export class RestoreWalletComponent implements OnInit {
this.backend.saveFileDialog(this.translate.instant('RESTORE_WALLET.CHOOSE_PATH'), '*', this.variablesService.settings.default_path, (save_status, save_data) => {
if (save_status) {
this.variablesService.settings.default_path = save_data.path.substr(0, save_data.path.lastIndexOf('/'));
this.walletSavedName = save_data.path.substr(save_data.path.lastIndexOf('/') + 1, save_data.path.length - 1);
this.backend.restoreWallet(save_data.path, this.restoreForm.get('password').value, this.restoreForm.get('key').value, (restore_status, restore_data) => {
if (restore_status) {
this.wallet.id = restore_data.wallet_id;
@ -95,6 +99,7 @@ export class RestoreWalletComponent implements OnInit {
});
this.ngZone.run(() => {
this.walletSaved = true;
this.progressWidth = '50%';
});
} else {
this.modalService.prepareModal('error', 'RESTORE_WALLET.NOT_CORRECT_FILE_OR_PASSWORD');

View file

@ -19,6 +19,8 @@
</ng-container>
</div>
<button type="button" class="blue-button" (click)="runWallet()">{{ 'SEED_PHRASE.BUTTON_CREATE_ACCOUNT' | translate }}</button>
<button type="button" class="blue-button seed-phrase-button" (click)="runWallet()">{{ 'SEED_PHRASE.BUTTON_CREATE_ACCOUNT' | translate }}</button>
</div>
<app-progress-container [width]="'100%'" [labels]="['PROGRESS.ADD_WALLET', 'PROGRESS.SELECT_LOCATION', 'PROGRESS.CREATE_WALLET']"></app-progress-container>

View file

@ -1,3 +1,7 @@
:host {
position: relative;
}
.seed-phrase-title {
line-height: 2.2rem;
padding: 2.2rem 0;
@ -17,7 +21,7 @@
}
}
button {
.seed-phrase-button {
margin: 2.8rem 0;
width: 25%;
min-width: 1.5rem;

View file

@ -58,7 +58,6 @@ export class SettingsComponent implements OnInit {
}
setScale(scale) {
//this.renderer.removeClass(document.body, 'theme-' + this.theme);
this.scale = scale;
this.variablesService.settings.scale = this.scale;
this.renderer.setStyle(document.documentElement, 'font-size', this.scale + 'px');

View file

@ -104,6 +104,12 @@
"TITLE": "Make sure to keep your seed phrase in a safe place. If you forget your seed phrase you will not be able to recover your wallet.",
"BUTTON_CREATE_ACCOUNT" : "Create wallet"
},
"PROGRESS": {
"ADD_WALLET": "Add wallet",
"SELECT_LOCATION": "Select wallet location",
"CREATE_WALLET": "Create new wallet",
"RESTORE_WALLET": "Restore from backup"
},
"SETTINGS": {
"TITLE": "Settings",
"DARK_THEME": "Dark theme",

View file

@ -698,3 +698,27 @@ app-transaction-details {
}
}
}
app-progress-container {
.progress-bar-container {
@include themify($themes) {
color: themed(mainTextColor);
}
.progress-bar {
@include themify($themes) {
background-color: themed(progressBarBackgroundColor);
}
.progress-bar-full {
@include themify($themes) {
background-color: themed(progressBarFullBackgroundColor);
}
}
}
}
}