Add ability to navigate to web server running on device.
parent
a41b8e2e93
commit
d1f19d2b05
|
@ -43,7 +43,10 @@
|
|||
</ng-container>
|
||||
<account-device-info [device]="device"></account-device-info>
|
||||
<mat-card-actions>
|
||||
<button mat-flat-button color="primary" [routerLink]="['./', device.id]">
|
||||
<button *ngIf="device.platform === 'mycroft_mark_2'" mat-flat-button color="primary" (click)="goToExternal()">
|
||||
EDIT
|
||||
</button>
|
||||
<button *ngIf="device.platform != 'mycroft_mark_2'" mat-flat-button color="primary" [routerLink]="['./', device.id]">
|
||||
EDIT
|
||||
</button>
|
||||
<button mat-flat-button color="warn" (click)="onRemove(device, i)">
|
||||
|
|
|
@ -97,4 +97,9 @@ export class DeviceListComponent implements OnInit {
|
|||
const knownPlatform = this.platforms[device.platform];
|
||||
return knownPlatform ? knownPlatform.icon : '../assets/generic-device-icon-blue.svg';
|
||||
}
|
||||
|
||||
goToExternal() {
|
||||
const url = 'http://192.168.4.103:8080';
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue