New UI Emby Settings

pull/3595/head
twanariens 5 years ago
parent 8d1b71b3bf
commit 1f81a73804

@ -8,69 +8,77 @@
</legend> </legend>
<div class="row"> <div class="row">
<div class="form-group col-md-3"> <div class="col-md-6 col-6 col-sm-6" style="float: right; width:100%; text-align:right;">
<div> <div style="float:right;text-align:left;">
<mat-checkbox [(ngModel)]="settings.enable" [checked]="settings.enable"> <div class="md-form-field">
Enable</mat-checkbox> <mat-slide-toggle [(ngModel)]="settings.enable" [checked]="settings.enable">Enable</mat-slide-toggle>
</div>
</div> </div>
</div> </div>
</div> </div>
<mat-tab-group #tabGroup [selectedIndex]="selected.value" (selectedTabChange)="addTab($event)" (selectedIndexChange)="selected.setValue($event)" animationDuration="0ms" style="display:block;">
<mat-tab-group #tabGroup [selectedIndex]="selected.value" (selectedTabChange)="addTab($event)" (selectedIndexChange)="selected.setValue($event)" animationDuration="0ms">
<mat-tab *ngFor="let server of settings.servers" [label]="server.name"> <mat-tab *ngFor="let server of settings.servers" [label]="server.name">
<div class="col-md-2" style="float: right;"> <div class="col-md-6 col-6 col-sm-6" style="float: right; width:100%; text-align:right;">
<button type="button" (click)="removeServer(server)" class="btn btn-danger-outline">Remove Server</button> <button type="button" (click)="removeServer(server)" class="mat-focus-indicator mat-flat-button mat-button-base mat-warn">Remove Server</button>
</div> </div>
<br /> <br />
<br /> <br />
<div class="col-md-10"> <div class="col-md-10 col-10 col-sm-12">
<mat-form-field class="full"> <div class="md-form-field">
<input matInput placeholder="Server Name" [(ngModel)]="server.name" value="{{server.name}}"> <mat-form-field appearance="outline" floatLabel=auto>
</mat-form-field> <mat-label>Server Name</mat-label>
<input matInput placeholder="Server Name" [(ngModel)]="server.name" value="{{server.name}}">
</mat-form-field>
</div>
<mat-form-field class="full"> <div class="md-form-field">
<input matInput placeholder="Hostname or IP" [(ngModel)]="server.ip" value="{{server.ip}}"> <mat-form-field appearance="outline" floatLabel=auto>
</mat-form-field> <mat-label>Hostname / IP</mat-label>
<input matInput placeholder="Hostname or IP" [(ngModel)]="server.ip" value="{{server.ip}}">
</mat-form-field>
<mat-form-field class="full">
<input matInput placeholder="Port" [(ngModel)]="server.port" value="{{server.port}}">
</mat-form-field> <mat-form-field appearance="outline" floatLabel=auto>
<mat-label>Port</mat-label>
<mat-checkbox [(ngModel)]="server.ssl" [checked]="server.ssl"> <input matInput placeholder="Port" [(ngModel)]="server.port" value="{{server.port}}">
SSL</mat-checkbox> </mat-form-field>
<mat-slide-toggle id="ssl" [(ngModel)]="server.ssl" [checked]="server.ssl">
<mat-form-field class="full"> SSL
<input matInput placeholder="Api Key" [(ngModel)]="server.apiKey" value="{{server.apiKey}}"> </mat-slide-toggle>
</mat-form-field> </div>
<div class="md-form-field">
<mat-form-field class="full"> <mat-form-field appearance="outline" floatLabel=auto>
<input matInput placeholder="Base Url" [(ngModel)]="server.subDir" value="{{server.subDir}}"> <mat-label>API Key</mat-label>
</mat-form-field> <input matInput placeholder="Api Key" [(ngModel)]="server.apiKey" value="{{server.apiKey}}">
</mat-form-field>
<label> Externally Facing Hostname </div>
<i class="fa fa-question-circle" <div class="md-form-field">
matTooltip="This will be the external address that users will navigate to when they press the 'View On Emby' button"></i> <mat-form-field appearance="outline" floatLabel=auto>
</label> <mat-label>Base URL</mat-label>
<mat-form-field class="full"> <input matInput placeholder="Base Url" [(ngModel)]="server.subDir" value="{{server.subDir}}">
<input matInput placeholder="e.g. https://jellyfin.server.com/" [(ngModel)]="server.serverHostname" value="{{server.serverHostname}}"> </mat-form-field>
</mat-form-field> </div>
<small> <div class="md-form-field">
<span *ngIf="server.serverHostname">Current URL: "{{server.serverHostname}}/#!/{{settings.isJellyfin ? ("itemdetails"): ("item/item")}}.html?id=1"</span> <mat-form-field appearance="outline" floatLabel=auto>
<span *ngIf="!server.serverHostname">Current URL: "https://app.emby.media/#!/{{settings.isJellyfin ? ("itemdetails"): ("item/item")}}.html?id=1</span> <mat-label>Externally Facing Hostname</mat-label>
</small> <input matInput placeholder="e.g. https://jellyfin.server.com/" [(ngModel)]="server.serverHostname" value="{{server.serverHostname}}" matTooltip="This will be the external address that users will navigate to when they press the 'View On Emby' button">
</mat-form-field>
<small>
<span *ngIf="server.serverHostname">Current URL: "{{server.serverHostname}}/#!/{{settings.isJellyfin ? ("itemdetails"): ("item/item")}}.html?id=1"</span>
<span *ngIf="!server.serverHostname">Current URL: "https://app.emby.media/#!/{{settings.isJellyfin ? ("itemdetails"): ("item/item")}}.html?id=1</span>
</small>
</div>
<div class="form-group"> <div class="form-group">
<div> <div>
<button mat-raised-button id="testEmby" type="button" (click)="test(server)" color="primary">Test Connectivity <div id="spinner"></div></button> <button mat-raised-button id="testEmby" type="button" (click)="test(server)" class="mat-focus-indicator mat-stroked-button mat-button-base">Test Connectivity <div id="spinner"></div></button>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div> <div>
<button mat-raised-button id="discover" type="button" (click)="discoverServerInfo(server)" color="accent">Discover Server Information <div id="spinner"></div></button> <button mat-raised-button id="discover" type="button" (click)="discoverServerInfo(server)" class="mat-focus-indicator mat-stroked-button mat-button-base">Discover Server Information <div id="spinner"></div></button>
</div> </div>
</div> </div>
</div> </div>
@ -82,14 +90,14 @@
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<div> <div>
<button mat-raised-button [disabled]="!hasDiscovered" (click)="save()" type="submit" id="save" color="accent">Submit</button> <button mat-raised-button [disabled]="!hasDiscovered" (click)="save()" type="submit" id="save" class="mat-focus-indicator mat-raised-button mat-button-base mat-accent">Submit</button>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<div> <div>
<button mat-raised-button (click)="runCacher()" type="button" id="save" color="primary">Manually Run Cacher</button> <button mat-raised-button (click)="runCacher()" type="button" id="save" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Cacher</button>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save