forked from lthn/blockchain
fixes
This commit is contained in:
parent
87be459ccc
commit
76a2a6b259
21 changed files with 135 additions and 49 deletions
|
|
@ -434,7 +434,7 @@
|
|||
"CORE_BUSY": "Internal error (core is busy)",
|
||||
"DAEMON_BUSY": "Internal error: deamon is busy",
|
||||
"NO_MONEY_REMOVE_OFFER": "There is no fee for deleting an offer, but in order to protect the network against flood transactions you need to have at least {{fee}} {{currency}} in your wallet",
|
||||
"NOT_ENOUGH_OUTPUTS_TO_MIX": "For the sake of security, mixed transaction will take several days",
|
||||
"NOT_ENOUGH_OUTPUTS_TO_MIX": "Mix-in number is too big for current blockchain state. There are not enough unspent outputs to mix with",
|
||||
"TRANSACTION_IS_TO_BIG": "Transaction exceeds network limit, send required amount with multiple transactions",
|
||||
"TRANSFER_ATTEMPT": "There is no connection to Zano network",
|
||||
"ACCESS_DENIED": "Access denied",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -31,6 +31,7 @@ export class VariablesService {
|
|||
public settings = {
|
||||
appLockTime: 15,
|
||||
theme: '',
|
||||
scale: 10,
|
||||
language: 'en',
|
||||
default_path: '/',
|
||||
viewedContracts: [],
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<span [routerLink]="['/wallet/' + wallet.wallet_id + '/history']">{{ wallet.name }}</span>
|
||||
<span>{{ 'BREADCRUMBS.ASSIGN_ALIAS' | translate }}</span>
|
||||
</div>
|
||||
<button class="back-btn" (click)="back()">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<span [routerLink]="['/main']">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>
|
||||
<span>{{ 'BREADCRUMBS.CREATE_WALLET' | translate }}</span>
|
||||
</div>
|
||||
<a class="back-btn" [routerLink]="['/main']">
|
||||
<button type="button" class="back-btn" [routerLink]="['/main']">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form class="form-create" [formGroup]="createForm">
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
|
||||
<div class="wrap-buttons">
|
||||
<button type="button" class="transparent-button" *ngIf="walletSaved" disabled><i class="icon"></i>{{createForm.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]="!createForm.valid" *ngIf="!walletSaved">{{ 'CREATE_WALLET.BUTTON_SELECT' | translate }}</button>
|
||||
<button type="button" class="blue-button create-button" (click)="createWallet()" [disabled]="!walletSaved">{{ 'CREATE_WALLET.BUTTON_CREATE' | translate }}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
:host {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-create {
|
||||
margin: 2.4rem 0;
|
||||
width: 50%;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export class CreateWalletComponent implements OnInit {
|
|||
};
|
||||
|
||||
walletSaved = false;
|
||||
walletSavedName = '';
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
|
@ -59,6 +60,7 @@ export class CreateWalletComponent implements OnInit {
|
|||
this.backend.saveFileDialog(this.translate.instant('CREATE_WALLET.TITLE_SAVE'), '*', this.variablesService.settings.default_path, (file_status, file_data) => {
|
||||
if (file_status) {
|
||||
this.variablesService.settings.default_path = file_data.path.substr(0, file_data.path.lastIndexOf('/'));
|
||||
this.walletSavedName = file_data.path.substr(file_data.path.lastIndexOf('/') + 1, file_data.path.length - 1);
|
||||
this.backend.generateWallet(file_data.path, this.createForm.get('password').value, (generate_status, generate_data, errorCode) => {
|
||||
if (generate_status) {
|
||||
this.wallet.id = generate_data.wallet_id;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<span [routerLink]="['/wallet/' + wallet.wallet_id + '/history']">{{ wallet.name }}</span>
|
||||
<span>{{ 'BREADCRUMBS.EDIT_ALIAS' | translate }}</span>
|
||||
</div>
|
||||
<button class="back-btn" (click)="back()">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
<div class="content">
|
||||
|
||||
<div class="head">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="add-wallet">
|
||||
<h3 class="add-wallet-title">{{ 'MAIN.TITLE' | translate }}</h3>
|
||||
<div class="add-wallet-buttons">
|
||||
|
|
@ -10,4 +18,5 @@
|
|||
<i class="icon"></i><span>{{ 'MAIN.HELP' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
.content {
|
||||
padding: 3rem;
|
||||
min-height: 100%;
|
||||
|
||||
.head {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.add-wallet {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {Component, NgZone, OnInit} from '@angular/core';
|
||||
import {Location} from "@angular/common";
|
||||
import {BackendService} from '../_helpers/services/backend.service';
|
||||
import {VariablesService} from '../_helpers/services/variables.service';
|
||||
import {Router} from '@angular/router';
|
||||
|
|
@ -13,6 +14,7 @@ export class MainComponent implements OnInit {
|
|||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private backend: BackendService,
|
||||
private variablesService: VariablesService,
|
||||
private ngZone: NgZone,
|
||||
|
|
@ -38,4 +40,8 @@ export class MainComponent implements OnInit {
|
|||
this.backend.openUrlInBrowser('docs.zano.org/v1.0/docs/how-to-create-wallet');
|
||||
}
|
||||
|
||||
back() {
|
||||
this.location.back()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<span [routerLink]="['/main']">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>
|
||||
<span>{{ 'BREADCRUMBS.OPEN_WALLET' | translate }}</span>
|
||||
</div>
|
||||
<a class="back-btn" [routerLink]="['/main']">
|
||||
<button type="button" class="back-btn" [routerLink]="['/main']">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form class="form-open" [formGroup]="openForm">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<span [routerLink]="['/main']">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>
|
||||
<span>{{ 'BREADCRUMBS.RESTORE_WALLET' | translate }}</span>
|
||||
</div>
|
||||
<a class="back-btn" [routerLink]="['/main']">
|
||||
<button type="button" class="back-btn" [routerLink]="['/main']">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form class="form-restore" [formGroup]="restoreForm">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<span [routerLink]="['/main']">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>
|
||||
<span>{{ 'BREADCRUMBS.SAVE_PHRASE' | translate }}</span>
|
||||
</div>
|
||||
<a class="back-btn" [routerLink]="['/main']">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3 class="seed-phrase-title">{{ 'SEED_PHRASE.TITLE' | translate }}</h3>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {Component, NgZone, OnDestroy, OnInit} from '@angular/core';
|
||||
import {Location} from "@angular/common";
|
||||
import {BackendService} from '../_helpers/services/backend.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {VariablesService} from '../_helpers/services/variables.service';
|
||||
|
|
@ -18,6 +19,7 @@ export class SeedPhraseComponent implements OnInit, OnDestroy {
|
|||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private backend: BackendService,
|
||||
private variablesService: VariablesService,
|
||||
private modalService: ModalService,
|
||||
|
|
@ -72,6 +74,10 @@ export class SeedPhraseComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
back() {
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.queryRouting.unsubscribe();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,25 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="theme-selection">
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="75%" name="scale" value="dark" [checked]="scale == 7.5" (change)="setScale(7.5)">
|
||||
<label for="75%">75% scale</label>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="100%" name="scale" value="white" [checked]="scale == 10" (change)="setScale(10)">
|
||||
<label for="100%">100% scale</label>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="125%" name="scale" value="gray" [checked]="scale == 12.5" (change)="setScale(12.5)">
|
||||
<label for="125%">125% scale</label>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="150%" name="scale" value="gray" [checked]="scale == 15" (change)="setScale(15)">
|
||||
<label for="150%">150% scale</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lock-selection">
|
||||
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOCK.TITLE' | translate }}</label>
|
||||
<ng-select class="lock-selection-select"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import {Location} from '@angular/common';
|
|||
export class SettingsComponent implements OnInit {
|
||||
|
||||
theme: string;
|
||||
scale: number;
|
||||
changeForm: any;
|
||||
appLockOptions = [
|
||||
{
|
||||
|
|
@ -34,6 +35,7 @@ export class SettingsComponent implements OnInit {
|
|||
|
||||
constructor(private renderer: Renderer2, public variablesService: VariablesService, private backend: BackendService, private location: Location) {
|
||||
this.theme = this.variablesService.settings.theme;
|
||||
this.scale = this.variablesService.settings.scale;
|
||||
this.changeForm = new FormGroup({
|
||||
password: new FormControl('', Validators.required),
|
||||
new_password: new FormControl('', Validators.required),
|
||||
|
|
@ -55,6 +57,14 @@ export class SettingsComponent implements OnInit {
|
|||
this.backend.storeAppData();
|
||||
}
|
||||
|
||||
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');
|
||||
this.backend.storeAppData();
|
||||
}
|
||||
|
||||
onSubmitChangePass() {
|
||||
if (this.changeForm.valid) {
|
||||
this.variablesService.appPass = this.changeForm.get('new_password').value;
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@
|
|||
justify-content: center;
|
||||
border-radius: 1rem;
|
||||
font-size: 1rem;
|
||||
min-width: 24px;
|
||||
height: 16px;
|
||||
padding: 0 5px;
|
||||
min-width: 2.4rem;
|
||||
height: 1.6rem;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<span [routerLink]="['/wallet/' + wallet.wallet_id + '/history']">{{ wallet.name }}</span>
|
||||
<span>{{ 'BREADCRUMBS.TRANSFER_ALIAS' | translate }}</span>
|
||||
</div>
|
||||
<button class="back-btn" (click)="back()">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@
|
|||
"CORE_BUSY": "Internal error (core is busy)",
|
||||
"DAEMON_BUSY": "Internal error: deamon is busy",
|
||||
"NO_MONEY_REMOVE_OFFER": "There is no fee for deleting an offer, but in order to protect the network against flood transactions you need to have at least {{fee}} {{currency}} in your wallet",
|
||||
"NOT_ENOUGH_OUTPUTS_TO_MIX": "For the sake of security, mixed transaction will take several days",
|
||||
"NOT_ENOUGH_OUTPUTS_TO_MIX": "Mix-in number is too big for current blockchain state. There are not enough unspent outputs to mix with",
|
||||
"TRANSACTION_IS_TO_BIG": "Transaction exceeds network limit, send required amount with multiple transactions",
|
||||
"TRANSFER_ATTEMPT": "There is no connection to Zano network",
|
||||
"ACCESS_DENIED": "Access denied",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue