diff --git a/src/gui/qt-daemon/html_source/src/app/_helpers/services/backend.service.ts b/src/gui/qt-daemon/html_source/src/app/_helpers/services/backend.service.ts index 5a771d7c..224141e3 100644 --- a/src/gui/qt-daemon/html_source/src/app/_helpers/services/backend.service.ts +++ b/src/gui/qt-daemon/html_source/src/app/_helpers/services/backend.service.ts @@ -146,6 +146,9 @@ export class BackendService { case 'ALREADY_EXISTS': error_translate = 'ERRORS.FILE_EXIST'; break; + case 'FAILED': + BackendService.Debug(0, `Error: (${error}) was triggered by command: ${command}`); + break; default: error_translate = error; } diff --git a/src/gui/qt-daemon/html_source/src/app/_helpers/services/utils.service.ts b/src/gui/qt-daemon/html_source/src/app/_helpers/services/utils.service.ts new file mode 100644 index 00000000..bfd8a9fd --- /dev/null +++ b/src/gui/qt-daemon/html_source/src/app/_helpers/services/utils.service.ts @@ -0,0 +1,14 @@ +import {Injectable} from '@angular/core'; + +@Injectable() +export class UtilsService { + getMinWidthByScale(scale: number) { + switch (scale) { + case 7.5 : return 900; + case 10 : return 1200; + case 12.5 : return 1500; + case 15 : return 1800; + default : return 1200; + } + } +} diff --git a/src/gui/qt-daemon/html_source/src/app/app.component.ts b/src/gui/qt-daemon/html_source/src/app/app.component.ts index 2a27d9d3..5a09767c 100644 --- a/src/gui/qt-daemon/html_source/src/app/app.component.ts +++ b/src/gui/qt-daemon/html_source/src/app/app.component.ts @@ -8,11 +8,13 @@ import {ContextMenuComponent} from 'ngx-contextmenu'; import {IntToMoneyPipe} from './_helpers/pipes/int-to-money.pipe'; import {BigNumber} from 'bignumber.js'; import {ModalService} from './_helpers/services/modal.service'; +import {UtilsService} from './_helpers/services/utils.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], + providers: [UtilsService] }) export class AppComponent implements OnInit, OnDestroy { @@ -37,7 +39,8 @@ export class AppComponent implements OnInit, OnDestroy { public variablesService: VariablesService, private ngZone: NgZone, private intToMoneyPipe: IntToMoneyPipe, - private modalService: ModalService + private modalService: ModalService, + private utilsService: UtilsService ) { translate.addLangs(['en', 'fr', 'de', 'it', 'pt']); translate.setDefaultLang('en'); @@ -553,6 +556,9 @@ export class AppComponent implements OnInit, OnDestroy { 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) { + const width = this.utilsService.getMinWidthByScale(this.variablesService.settings.scale); + const app = document.documentElement.querySelector('app-root'); + this.renderer.setStyle(app, 'min-width', width + 'px'); this.renderer.setStyle(document.documentElement, 'font-size', this.variablesService.settings.scale + 'px'); } } else { diff --git a/src/gui/qt-daemon/html_source/src/app/history/history.component.scss b/src/gui/qt-daemon/html_source/src/app/history/history.component.scss index 416d5623..9dfdc68a 100644 --- a/src/gui/qt-daemon/html_source/src/app/history/history.component.scss +++ b/src/gui/qt-daemon/html_source/src/app/history/history.component.scss @@ -71,9 +71,16 @@ } &.received { - .status-transaction { - mask: url(../../assets/icons/receive.svg) no-repeat center; + background-color: transparent; + } + + .status-transaction::after { + display: block; + content:''; + background:url("../../assets/icons/receive-green.svg") no-repeat center; + width: 13px; + height: 13px; } } } diff --git a/src/gui/qt-daemon/html_source/src/app/settings/settings.component.ts b/src/gui/qt-daemon/html_source/src/app/settings/settings.component.ts index ed0a7940..f45bf75d 100644 --- a/src/gui/qt-daemon/html_source/src/app/settings/settings.component.ts +++ b/src/gui/qt-daemon/html_source/src/app/settings/settings.component.ts @@ -4,11 +4,13 @@ import {BackendService} from '../_helpers/services/backend.service'; import {FormControl, FormGroup, Validators} from '@angular/forms'; import {Location} from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; +import {UtilsService} from '../_helpers/services/utils.service'; @Component({ selector: 'app-settings', templateUrl: './settings.component.html', - styleUrls: ['./settings.component.scss'] + styleUrls: ['./settings.component.scss'], + providers: [UtilsService] }) export class SettingsComponent implements OnInit { @@ -103,7 +105,8 @@ export class SettingsComponent implements OnInit { private backend: BackendService, private location: Location, public translate: TranslateService, - private ngZone: NgZone + private ngZone: NgZone, + private utilsService: UtilsService ) { this.theme = this.variablesService.settings.theme; this.scale = this.variablesService.settings.scale; @@ -147,6 +150,9 @@ export class SettingsComponent implements OnInit { setScale(scale) { this.scale = scale; this.variablesService.settings.scale = this.scale; + const width = this.utilsService.getMinWidthByScale(this.scale); + const app = document.documentElement.querySelector('app-root'); + this.renderer.setStyle(app, 'min-width', width + 'px'); this.renderer.setStyle(document.documentElement, 'font-size', this.scale + 'px'); this.backend.storeAppData(); } diff --git a/src/gui/qt-daemon/html_source/src/assets/icons/receive-green.svg b/src/gui/qt-daemon/html_source/src/assets/icons/receive-green.svg new file mode 100644 index 00000000..1db438b2 --- /dev/null +++ b/src/gui/qt-daemon/html_source/src/assets/icons/receive-green.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/src/gui/qt-daemon/html_source/src/assets/icons/send-red.svg b/src/gui/qt-daemon/html_source/src/assets/icons/send-red.svg new file mode 100644 index 00000000..d96d08f4 --- /dev/null +++ b/src/gui/qt-daemon/html_source/src/assets/icons/send-red.svg @@ -0,0 +1,10 @@ + + + + + +