Change how always-on bridges are represented UI-wise

This commit is contained in:
turt2live 2017-06-10 14:56:29 -06:00
parent b0ab80e33e
commit a007e553a5
2 changed files with 2 additions and 5 deletions

View File

@ -6,11 +6,8 @@
<div class="switch" *ngIf="integration.type !== 'bridge'"> <div class="switch" *ngIf="integration.type !== 'bridge'">
<ui-switch [checked]="integration.isEnabled" size="small" [disabled]="integration.isBroken" (change)="update()"></ui-switch> <ui-switch [checked]="integration.isEnabled" size="small" [disabled]="integration.isBroken" (change)="update()"></ui-switch>
</div> </div>
<div class="switch" *ngIf="integration.type == 'bridge' && integration.isEnabled">
<ui-switch [checked]="true" size="small" [disabled]="true" ngbTooltip="This integration is always enabled. Click the cog to configure it."></ui-switch>
</div>
<div class="switch" *ngIf="integration.type == 'bridge' && !integration.isEnabled"> <div class="switch" *ngIf="integration.type == 'bridge' && !integration.isEnabled">
<ui-switch [checked]="false" size="small" [disabled]="true" ngbTooltip="{{ integration.bridgeError }}"></ui-switch> <i class="fa fa-warning text-warning" ngbTooltip="{{ integration.bridgeError }}"></i>
</div> </div>
<div class="toolbar"> <div class="toolbar">
<i class="fa fa-question-circle text-info" ngbTooltip="{{integration.about}}" *ngIf="integration.about"></i> <i class="fa fa-question-circle text-info" ngbTooltip="{{integration.about}}" *ngIf="integration.about"></i>

View File

@ -68,7 +68,7 @@ export class RiotComponent {
integration.isBroken = false; integration.isBroken = false;
}, error => { }, error => {
console.error(error); console.error(error);
integration.bridgeError = error.message; integration.bridgeError = error.message || error;
integration.isEnabled = false; integration.isEnabled = false;
integration.isBroken = false; integration.isBroken = false;
}); });