|
1 | 1 | <mat-toolbar> |
2 | 2 | @if (device?.useTLS && !isCloudMode) { |
3 | | - <div style="padding-right: 12px"> |
4 | | - <button |
5 | | - [color]="isPinned() ? 'primary' : 'warn'" |
6 | | - mat-icon-button |
7 | | - [matTooltip]="isPinned() ? 'TLS w/ Pinned Certificate' : 'TLS (not pinned)'" |
8 | | - (click)="getDeviceCert()"> |
9 | | - <mat-icon>lock</mat-icon> |
10 | | - </button> |
11 | | - </div> |
| 3 | + <div style="padding-right: 12px"> |
| 4 | + <button [color]="isPinned() ? 'primary' : 'warn'" mat-icon-button [matTooltip]="isPinned() ? 'TLS w/ Pinned Certificate' : 'TLS (not pinned)'" (click)="getDeviceCert()"> |
| 5 | + <mat-icon>lock</mat-icon> |
| 6 | + </button> |
| 7 | + </div> |
12 | 8 | } |
13 | 9 | <span> |
14 | 10 | @if (device?.friendlyName) { |
15 | | - <span>{{ device?.friendlyName }}</span> |
| 11 | + <span>{{ device?.friendlyName }}</span> |
16 | 12 | } @else { |
17 | | - <span>{{ device?.hostname }}</span> |
| 13 | + <span>{{ device?.hostname }}</span> |
18 | 14 | } |
19 | 15 | <div class="mat-caption"> |
20 | 16 | @if (isCloudMode) { |
21 | | - {{ deviceId }} |
| 17 | + {{ deviceId }} |
22 | 18 | } |
23 | 19 | @if (device?.friendlyName) { |
24 | | - <span> |
25 | | - @if (isCloudMode) { |
26 | | - - |
27 | | - } |
28 | | - {{ device?.hostname }}</span |
29 | | - > |
| 20 | + <span> |
| 21 | + @if (isCloudMode) { |
| 22 | + - |
| 23 | + } |
| 24 | + {{ device?.hostname }}</span> |
30 | 25 | } |
31 | 26 | </div> |
32 | 27 | </span> |
33 | 28 | <mat-chip-set class="flex-1 pad-15"> |
34 | 29 | @for (tag of device?.tags; track tag) { |
35 | | - <mat-chip>{{ tag }}</mat-chip> |
| 30 | + <mat-chip>{{ tag }}</mat-chip> |
36 | 31 | } |
37 | 32 | </mat-chip-set> |
38 | 33 | <button mat-icon-button matTooltip="Edit device" (click)="editDevice()"> |
|
42 | 37 | <mat-icon>delete</mat-icon> |
43 | 38 | </button> |
44 | 39 | <mat-divider style="height: 40px" vertical="true"></mat-divider> |
45 | | - |
| 40 | + @if(!isLoading){ |
| 41 | + <mat-icon (click)="getPowerState()" style="padding:0 18px 0 12px;cursor: pointer;" [style.color]="powerState === 'Power: On' ? 'green' : powerState === 'Power: Sleep' ? 'yellow' : 'red'" [matTooltip]="powerState">mode_standby</mat-icon> |
| 42 | + } |
46 | 43 | <mat-divider style="height: 40px" vertical="true"></mat-divider> |
47 | 44 | <button mat-icon-button matTooltip="Power up the device" (click)="sendPowerAction(2)"> |
48 | 45 | <mat-icon>power</mat-icon> |
|
58 | 55 | </button> |
59 | 56 | <mat-menu #menu="matMenu"> |
60 | 57 | @for (option of powerOptions; track option) { |
61 | | - <button mat-menu-item (click)="sendPowerAction(option.action)"> |
62 | | - <span>{{ option.label }}</span> |
63 | | - </button> |
| 58 | + <button mat-menu-item (click)="sendPowerAction(option.action)"> |
| 59 | + <span>{{ option.label }}</span> |
| 60 | + </button> |
64 | 61 | } |
65 | 62 | </mat-menu> |
66 | 63 | </mat-toolbar> |
67 | 64 | @if (isLoading) { |
68 | | - <mat-progress-bar mode="indeterminate"></mat-progress-bar> |
| 65 | +<mat-progress-bar mode="indeterminate"></mat-progress-bar> |
69 | 66 | } |
0 commit comments