1
0
Fork 0
forked from lthn/blockchain

Merge branch 'frontend'

This commit is contained in:
wildkif 2019-05-06 10:34:22 +03:00
commit d9b286a3c3
9 changed files with 80 additions and 12 deletions

View file

@ -146,7 +146,8 @@
"PASS_NOT_MATCH": "Old password not match.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
},
"LAST_BUILD": "Current build: {{value}}"
"LAST_BUILD": "Current build: {{value}}",
"APP_LOG_TITLE": "Log level:"
},
"WALLET": {
"REGISTER_ALIAS": "Register an alias",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -604,6 +604,10 @@ export class BackendService {
});
}
setLogLevel(level) {
return this.runCommand('set_log_level', {v: level});
}
}
@ -629,10 +633,6 @@ export class BackendService {
});
},
setLogLevel: function (level) {
return this.runCommand('set_log_level', asVal(level))
},
resetWalletPass: function (wallet_id, pass, callback) {
this.runCommand('reset_wallet_password', {wallet_id: wallet_id, pass: pass}, callback);
},

View file

@ -31,6 +31,7 @@ export class VariablesService {
public settings = {
appLockTime: 15,
appLog: 0,
theme: '',
scale: 10,
language: 'en',

View file

@ -509,6 +509,8 @@ export class AppComponent implements OnInit, OnDestroy {
this.setBackendLocalization();
this.backend.setLogLevel(this.variablesService.settings.appLog);
if (this.router.url !== '/login') {
this.backend.haveSecureAppData((statusPass) => {
if (statusPass) {

View file

@ -50,6 +50,19 @@
</ng-select>
</div>
<div class="lock-selection">
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOG_TITLE' | translate }}</label>
<ng-select class="lock-selection-select"
[items]="appLogOptions"
bindValue="id"
bindLabel="id"
[(ngModel)]="variablesService.settings.appLog"
[clearable]="false"
[searchable]="false"
(change)="onLogChange()">
</ng-select>
</div>
<form class="master-password" [formGroup]="changeForm" (ngSubmit)="onSubmitChangePass()">
<span class="master-password-title">{{ 'SETTINGS.MASTER_PASSWORD.TITLE' | translate }}</span>

View file

@ -50,6 +50,26 @@ export class SettingsComponent implements OnInit {
name: '150% scale'
}
];
appLogOptions = [
{
id: -1
},
{
id: 0
},
{
id: 1
},
{
id: 2
},
{
id: 3
},
{
id: 4
}
];
currentBuild = '';
@ -118,6 +138,11 @@ export class SettingsComponent implements OnInit {
this.backend.storeAppData();
}
onLogChange() {
this.backend.setLogLevel(this.variablesService.settings.appLog);
this.backend.storeAppData();
}
back() {
this.location.back();
}

View file

@ -146,7 +146,8 @@
"PASS_NOT_MATCH": "Old password not match.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
},
"LAST_BUILD": "Current build: {{value}}"
"LAST_BUILD": "Current build: {{value}}",
"APP_LOG_TITLE": "Log level:"
},
"WALLET": {
"REGISTER_ALIAS": "Register an alias",