Small improvements

pull/4069/head v4.0.1120
tidusjar 4 years ago
parent 094e1ce69f
commit 68078271d9

@ -36,5 +36,7 @@ namespace Ombi.Core.Models.UI
{
public string Id { get; set; }
public string Username { get; set; }
public string Email { get; set; }
}
}

@ -28,6 +28,7 @@ export interface IUser {
export interface IUserDropdown {
username: string;
id: string;
email: string;
}
export interface IUserQualityProfiles {

@ -190,7 +190,6 @@ export class MovieDetailsComponent {
const folders = this.radarrService.getRootFoldersFromSettings();
forkJoin([profile, folders]).subscribe(x => {
debugger;
const radarrProfiles = x[0];
const radarrRootFolders = x[1];

@ -2,7 +2,7 @@
Advanced Options</h1>
<div mat-dialog-content>
<mat-form-field>
<mat-form-field appearance="outline" floatLabel=auto>
<mat-label>{{'MediaDetails.QualityProfilesSelect' | translate }}</mat-label>
<mat-select [(value)]="data.profileId">
<mat-option *ngFor="let profile of radarrProfiles" value="{{profile.id}}">{{profile.name}}</mat-option>
@ -10,7 +10,7 @@
</mat-form-field>
</div>
<div mat-dialog-content>
<mat-form-field>
<mat-form-field appearance="outline" floatLabel=auto>
<mat-label>{{'MediaDetails.RootFolderSelect' | translate }}</mat-label>
<mat-select [(value)]="data.rootFolderId">
<mat-option *ngFor="let profile of radarrRootFolders" value="{{profile.id}}">{{profile.path}}</mat-option>

@ -1,22 +1,23 @@
<h1 mat-dialog-title>{{ 'MediaDetails.RequestOnBehalf' | translate}}</h1>
<div mat-dialog-content>
<form class="example-form">
<mat-form-field class="example-full-width">
<mat-form-field class="example-full-width" appearance="outline" floatLabel=auto>
<mat-label>{{ 'MediaDetails.PleaseSelectUser' | translate}}</mat-label>
<input type="text"
placeholder="{{ 'MediaDetails.PleaseSelectUser' | translate}}"
aria-label="Number"
matInput
[formControl]="myControl"
[matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option">
{{option.username}}
{{displayFn(option)}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
</div>
<div mat-dialog-actions>
<button mat-raised-button (click)="onNoClick()"> Cancel</button>
<button mat-raised-button (click)="onNoClick()">{{'Common.Cancel' | translate}}</button>
<button mat-raised-button (click)="request()" color="accent" [mat-dialog-close]="userId" cdkFocusInitial>{{'Common.Request' | translate}}</button>
</div>
</div>

@ -41,7 +41,9 @@ export class RequestBehalfComponent implements OnInit {
}
public displayFn(user: IUserDropdown): string {
return user?.username ? user.username : '';
const username = user?.username ? user.username : '';
const email = user?.email ? `(${user.email})` : '';
return `${username} ${email}`;
}
private _filter(value: string|IUserDropdown): IUserDropdown[] {

@ -27,7 +27,8 @@ td.mat-cell {
.mat-dialog-container,
.mat-menu-content,
.mat-table,
.mat-paginator {
.mat-paginator,
.mat-select-panel {
background: $ombi-background-accent;
}

@ -299,7 +299,8 @@ namespace Ombi.Controllers.V1
model.Add(new UserViewModelDropdown
{
Id = user.Id,
Username = user.UserName
Username = user.UserName,
Email = user.Email
});
}

Loading…
Cancel
Save