feat: set disable style of device name in side menu (#656)

* feat: visualise disabled state of the 'Device name' input control

* fix: original value handling
This commit is contained in:
Róbert Kiss
2018-05-27 02:30:41 +02:00
committed by László Monda
parent 8e20c85e07
commit ee53a0df9b
9 changed files with 161 additions and 53 deletions

View File

@@ -2,13 +2,11 @@
<li class="sidebar__level-0--item">
<div class="sidebar__level-0">
<i class="uhk-icon uhk-icon-0401-usb-stick rotate-right"></i>
<input #deviceName cancelable
class="pane-title__name"
type="text"
[readonly]="state.restoreUserConfiguration"
(change)="editDeviceName($event.target.value)"
(keyup.enter)="deviceName.blur()"
(keyup)="calculateHeaderTextWidth($event.target.value)">
<auto-grow-input [ngModel]="state.deviceName"
[maxParentWidthPercent]="0.65"
[css]="'side-menu-pane-title__name'"
[disabled]="state.restoreUserConfiguration || state.updatingFirmware"
(ngModelChange)="editDeviceName($event)"></auto-grow-input>
<i class="fa fa-chevron-up pull-right" (click)="toggleHide($event, 'device')"></i>
</div>
<ul [@toggler]="animation['device']">