mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
more ui work !wip
This commit is contained in:
parent
33fdffdd0f
commit
fa60a2b826
4 changed files with 21 additions and 5 deletions
|
@ -11,7 +11,7 @@
|
|||
<a href="" target="_blank">
|
||||
<h4>{{result.title}}</h4>
|
||||
</a>
|
||||
<a href="" target="_blank">
|
||||
<a href="" (click)="selectArtist($event, result.foreignArtistId)">
|
||||
<h4>{{result.artistName}}</h4>
|
||||
</a>
|
||||
<span class="tags">
|
||||
|
@ -22,6 +22,9 @@
|
|||
|
||||
<a *ngIf="result.trailer" href="{{result.trailer}}" id="trailerLabel" target="_blank"><span class="label label-info" [translate]="'Search.Movies.Trailer'"></span></a> -->
|
||||
|
||||
<ng-template [ngIf]="result.releaseDate"><span class="label label-info" id="availableLabel">Release Date: {{result.releaseDate | date:'yyyy-MM-dd'}}</span></ng-template>
|
||||
|
||||
|
||||
<ng-template [ngIf]="result.available"><span class="label label-success" id="availableLabel" [translate]="'Common.Available'"></span></ng-template>
|
||||
<ng-template [ngIf]="result.approved && !result.available"><span class="label label-info" id="processingRequestLabel" [translate]="'Common.ProcessingRequest'"></span></ng-template>
|
||||
<ng-template [ngIf]="result.requested && !result.approved && !result.available"><span class="label label-warning" id="pendingApprovalLabel" [translate]="'Common.PendingApproval'"></span></ng-template>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, Input } from "@angular/core";
|
||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
|
||||
import { AuthService } from "../../auth/auth.service";
|
||||
|
@ -16,12 +16,19 @@ export class AlbumSearchComponent {
|
|||
public engineResult: IRequestEngineResult;
|
||||
@Input() public defaultPoster: string;
|
||||
|
||||
@Output() public setSearch = new EventEmitter<string>();
|
||||
|
||||
constructor(
|
||||
private requestService: RequestService,
|
||||
private notificationService: NotificationService, private authService: AuthService,
|
||||
private readonly translate: TranslateService) {
|
||||
}
|
||||
|
||||
public selectArtist(event: Event, artistId: string) {
|
||||
event.preventDefault();
|
||||
this.setSearch.emit(artistId);
|
||||
}
|
||||
|
||||
public request(searchResult: ISearchMovieResult) {
|
||||
searchResult.requested = true;
|
||||
searchResult.requestProcessing = true;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Artist" name="Mode" checked="checked" (click)="searchMode(false)">
|
||||
<input type="radio" id="Artist" name="Mode" [checked]="!searchAlbum" (click)="searchMode(false)">
|
||||
<label for="Artist">Artist Search</label>
|
||||
<input type="radio" id="Album" name="Mode" (click)="searchMode(true)">
|
||||
<input type="radio" id="Album" name="Mode" [checked]="searchAlbum" (click)="searchMode(true)">
|
||||
<label for="Album">Album Search</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<br/>
|
||||
</div>
|
||||
<div *ngFor="let result of albumResult">
|
||||
<album-search [result]="result" [defaultPoster]="defaultPoster"></album-search>
|
||||
<album-search [result]="result" [defaultPoster]="defaultPoster" (setSearch)="setArtistSearch($event)"></album-search>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
|
|
@ -100,6 +100,12 @@ export class MusicSearchComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
public setArtistSearch(artistId: string) {
|
||||
this.searchAlbum = false;
|
||||
this.clearAlbumResults();
|
||||
this.searchChanged.next(`lidarr:${artistId}`);
|
||||
}
|
||||
|
||||
public request(searchResult: ISearchMovieResult) {
|
||||
searchResult.requested = true;
|
||||
searchResult.requestProcessing = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue