fix: Unable to Delete Jellyfin Server (#4705) (#4780)

[skip ci]
pull/4786/head
Wesley King 2 years ago committed by GitHub
parent b4a14c2d28
commit 76a0d0d268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,11 +10,11 @@
<div class="row">
<div class="col-md-6 col-6 col-sm-6">
<div class="md-form-field">
<mat-slide-toggle [(ngModel)]="settings.enable" [checked]="settings.enable">Enable
<mat-slide-toggle [(ngModel)]="settings.enable" (change)="toggle()" [checked]="settings.enable">Enable
</mat-slide-toggle>
</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" style="display:block;">
<mat-tab *ngFor="let server of settings.servers" [label]="server.name">
<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="mat-focus-indicator mat-flat-button mat-button-base mat-warn">Remove Server</button>
@ -56,7 +56,7 @@
<input matInput placeholder="Api Key" [(ngModel)]="server.apiKey" value="{{server.apiKey}}">
</mat-form-field>
</div>
<div class="md-form-field">
<div class="md-form-field">
<mat-form-field appearance="outline" floatLabel=auto>
<mat-label>Base URL</mat-label>
<input matInput placeholder="Base Url" [(ngModel)]="server.subDir" value="{{server.subDir}}">
@ -125,7 +125,7 @@
</mat-tab>
<mat-tab label="" disabled=true> </mat-tab>
<mat-tab label="Add Server" position=100> </mat-tab>
</mat-tab-group>
<div class="row">
<div class="col-md-2">

@ -72,6 +72,7 @@ export class EmbyComponent implements OnInit {
if (index > -1) {
this.settings.servers.splice(index, 1);
this.selected.setValue(this.settings.servers.length - 1);
this.toggle();
}
}

@ -10,13 +10,13 @@
<div class="row">
<div class="col-md-6 col-6 col-sm-6">
<div class="md-form-field">
<mat-slide-toggle [(ngModel)]="settings.enable" [checked]="settings.enable">Enable
<mat-slide-toggle [(ngModel)]="settings.enable" (change)="toggle()" [checked]="settings.enable">Enable
</mat-slide-toggle>
</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" style="display:block;">
<mat-tab *ngFor="let server of settings.servers" [label]="server.name">
<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="mat-focus-indicator mat-flat-button mat-button-base mat-warn">Remove Server</button>

@ -73,6 +73,7 @@ export class JellyfinComponent implements OnInit {
if (index > -1) {
this.settings.servers.splice(index, 1);
this.selected.setValue(this.settings.servers.length - 1);
this.toggle();
}
}

Loading…
Cancel
Save