forked from lthn/blockchain
setting scroll, wallet title
This commit is contained in:
parent
3c333684c0
commit
cb532d4a54
9 changed files with 98 additions and 86 deletions
|
|
@ -68,6 +68,11 @@ app-wallet-details {
|
|||
app-settings {
|
||||
|
||||
.content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
|
||||
.theme-selection {
|
||||
|
||||
|
|
|
|||
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
File diff suppressed because one or more lines are too long
|
|
@ -1,98 +1,102 @@
|
|||
<div class="content">
|
||||
<div class="content scrolled-content">
|
||||
|
||||
<div class="head">
|
||||
<button type="button" class="back-btn" (click)="back()">
|
||||
<i class="icon back"></i>
|
||||
<span>{{ 'COMMON.BACK' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3 class="settings-title">{{ 'SETTINGS.TITLE' | translate }}</h3>
|
||||
|
||||
<div class="theme-selection">
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="dark" name="theme" value="dark" [checked]="theme == 'dark'" (change)="setTheme('dark')">
|
||||
<label for="dark">{{ 'SETTINGS.DARK_THEME' | translate }}</label>
|
||||
<div>
|
||||
<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="radio-block">
|
||||
<input class="style-radio" type="radio" id="white" name="theme" value="white" [checked]="theme == 'white'" (change)="setTheme('white')">
|
||||
<label for="white">{{ 'SETTINGS.WHITE_THEME' | translate }}</label>
|
||||
|
||||
<h3 class="settings-title">{{ 'SETTINGS.TITLE' | translate }}</h3>
|
||||
|
||||
<div class="theme-selection">
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="dark" name="theme" value="dark" [checked]="theme == 'dark'" (change)="setTheme('dark')">
|
||||
<label for="dark">{{ 'SETTINGS.DARK_THEME' | translate }}</label>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="white" name="theme" value="white" [checked]="theme == 'white'" (change)="setTheme('white')">
|
||||
<label for="white">{{ 'SETTINGS.WHITE_THEME' | translate }}</label>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="gray" name="theme" value="gray" [checked]="theme == 'gray'" (change)="setTheme('gray')">
|
||||
<label for="gray">{{ 'SETTINGS.GRAY_THEME' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio-block">
|
||||
<input class="style-radio" type="radio" id="gray" name="theme" value="gray" [checked]="theme == 'gray'" (change)="setTheme('gray')">
|
||||
<label for="gray">{{ 'SETTINGS.GRAY_THEME' | translate }}</label>
|
||||
|
||||
<div class="scale-selection">
|
||||
<button type="button" class="button-block" [class.active]="item.id === variablesService.settings.scale" *ngFor="let item of appScaleOptions" (click)="setScale(item.id)">
|
||||
<span class="label">{{item.name}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scale-selection">
|
||||
<button type="button" class="button-block" [class.active]="item.id === variablesService.settings.scale" *ngFor="let item of appScaleOptions" (click)="setScale(item.id)">
|
||||
<span class="label">{{item.name}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="lock-selection">
|
||||
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOCK.TITLE' | translate }}</label>
|
||||
<ng-select class="lock-selection-select"
|
||||
[items]="appLockOptions"
|
||||
bindValue="id"
|
||||
bindLabel="name"
|
||||
[(ngModel)]="variablesService.settings.appLockTime"
|
||||
[clearable]="false"
|
||||
[searchable]="false"
|
||||
(change)="onLockChange()">
|
||||
<ng-template ng-label-tmp let-item="item">
|
||||
{{item.name | translate}}
|
||||
</ng-template>
|
||||
<ng-template ng-option-tmp let-item="item" let-index="index">
|
||||
{{item.name | translate}}
|
||||
</ng-template>
|
||||
</ng-select>
|
||||
</div>
|
||||
|
||||
<div class="lock-selection">
|
||||
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOCK.TITLE' | translate }}</label>
|
||||
<ng-select class="lock-selection-select"
|
||||
[items]="appLockOptions"
|
||||
bindValue="id"
|
||||
bindLabel="name"
|
||||
[(ngModel)]="variablesService.settings.appLockTime"
|
||||
[clearable]="false"
|
||||
[searchable]="false"
|
||||
(change)="onLockChange()">
|
||||
<ng-template ng-label-tmp let-item="item">
|
||||
{{item.name | translate}}
|
||||
</ng-template>
|
||||
<ng-template ng-option-tmp let-item="item" let-index="index">
|
||||
{{item.name | translate}}
|
||||
</ng-template>
|
||||
</ng-select>
|
||||
</div>
|
||||
<form class="master-password" [formGroup]="changeForm" (ngSubmit)="onSubmitChangePass()">
|
||||
|
||||
<form class="master-password" [formGroup]="changeForm" (ngSubmit)="onSubmitChangePass()">
|
||||
<span class="master-password-title">{{ 'SETTINGS.MASTER_PASSWORD.TITLE' | translate }}</span>
|
||||
|
||||
<span class="master-password-title">{{ 'SETTINGS.MASTER_PASSWORD.TITLE' | translate }}</span>
|
||||
|
||||
<div class="input-block">
|
||||
<label for="old-password">{{ 'SETTINGS.MASTER_PASSWORD.OLD' | translate }}</label>
|
||||
<input type="password" id="old-password" formControlName="password" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['password'].invalid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched)">
|
||||
<div *ngIf="changeForm.controls['password'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
<div class="input-block">
|
||||
<label for="old-password">{{ 'SETTINGS.MASTER_PASSWORD.OLD' | translate }}</label>
|
||||
<input type="password" id="old-password" formControlName="password" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['password'].invalid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched)">
|
||||
<div *ngIf="changeForm.controls['password'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-block" *ngIf="changeForm.invalid && changeForm.controls['password'].valid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched) && changeForm.errors && changeForm.errors.pass_mismatch">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_NOT_MATCH' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-block" *ngIf="changeForm.invalid && changeForm.controls['password'].valid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched) && changeForm.errors && changeForm.errors.pass_mismatch">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_NOT_MATCH' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-block">
|
||||
<label for="new-password">{{ 'SETTINGS.MASTER_PASSWORD.NEW' | translate }}</label>
|
||||
<input type="password" id="new-password" formControlName="new_password" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['new_password'].invalid && (changeForm.controls['new_password'].dirty || changeForm.controls['new_password'].touched)">
|
||||
<div *ngIf="changeForm.controls['new_password'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
<div class="input-block">
|
||||
<label for="new-password">{{ 'SETTINGS.MASTER_PASSWORD.NEW' | translate }}</label>
|
||||
<input type="password" id="new-password" formControlName="new_password" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['new_password'].invalid && (changeForm.controls['new_password'].dirty || changeForm.controls['new_password'].touched)">
|
||||
<div *ngIf="changeForm.controls['new_password'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-block">
|
||||
<label for="confirm-password">{{ 'SETTINGS.MASTER_PASSWORD.CONFIRM' | translate }}</label>
|
||||
<input type="password" id="confirm-password" formControlName="new_confirmation" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['new_confirmation'].invalid && (changeForm.controls['new_confirmation'].dirty || changeForm.controls['new_confirmation'].touched)">
|
||||
<div *ngIf="changeForm.controls['new_confirmation'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
<div class="input-block">
|
||||
<label for="confirm-password">{{ 'SETTINGS.MASTER_PASSWORD.CONFIRM' | translate }}</label>
|
||||
<input type="password" id="confirm-password" formControlName="new_confirmation" (contextmenu)="variablesService.onContextMenuPasteSelect($event)"/>
|
||||
<div class="error-block" *ngIf="changeForm.controls['new_confirmation'].invalid && (changeForm.controls['new_confirmation'].dirty || changeForm.controls['new_confirmation'].touched)">
|
||||
<div *ngIf="changeForm.controls['new_confirmation'].errors['required']">
|
||||
{{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-block" *ngIf="changeForm.invalid && (changeForm.controls['new_confirmation'].dirty || changeForm.controls['new_confirmation'].touched) && changeForm.errors && changeForm.errors.confirm_mismatch">
|
||||
{{ 'SETTINGS.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="error-block" *ngIf="changeForm.invalid && (changeForm.controls['new_confirmation'].dirty || changeForm.controls['new_confirmation'].touched) && changeForm.errors && changeForm.errors.confirm_mismatch">
|
||||
{{ 'SETTINGS.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="blue-button" [disabled]="!changeForm.valid">{{ 'SETTINGS.MASTER_PASSWORD.BUTTON' | translate }}</button>
|
||||
<button type="submit" class="blue-button" [disabled]="!changeForm.valid">{{ 'SETTINGS.MASTER_PASSWORD.BUTTON' | translate }}</button>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="last-build">{{ 'SETTINGS.LAST_BUILD' | translate : {value: currentBuild} }}</div>
|
||||
<div>
|
||||
<div class="last-build">{{ 'SETTINGS.LAST_BUILD' | translate : {value: currentBuild} }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -84,8 +84,5 @@
|
|||
}
|
||||
|
||||
.last-build {
|
||||
position: absolute;
|
||||
bottom: 3rem;
|
||||
left: 3rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
max-width: 50rem;
|
||||
line-height: 2.7rem;
|
||||
}
|
||||
|
||||
button {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ app-wallet-details {
|
|||
app-settings {
|
||||
|
||||
.content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
|
||||
.theme-selection {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue