Did some work on the nav

pull/3895/head
tidusjar 6 years ago
parent 8f3dd86c52
commit 24bb0207d5

@ -1,3 +1,25 @@
<input class="form-control quater-width search-bar" type="text" [(ngModel)]="selectedItem" placeholder="{{'NavigationBar.Search' | translate}}" aria-label="Search" [ngbTypeahead]="searchModel" [resultFormatter]="formatter"
[inputFormatter]="formatter" (selectItem)="selected($event)">
<input class="form-control quater-width search-bar" type="text" [(ngModel)]="selectedItem"
placeholder="{{'NavigationBar.Search' | translate}}" aria-label="Search" [ngbTypeahead]="searchModel"
[resultFormatter]="formatter" [resultTemplate]="template" (selectItem)="selected($event)">
<ng-template #template let-result="result">
<div *ngIf="result.media_type === 'movie'">
<i class="fa fa-film"></i> &nbsp;
<span *ngIf="result.release_date">
{{result.title}} ({{result.release_date.slice(0,4)}})
</span>
<span *ngIf="!result.release_date">{{result.title}}</span>
</div>
<div *ngIf="result.media_type === 'tv'">
<i class="fa fa-tv"></i> &nbsp;
<span *ngIf="result.release_date">
{{result.name}} ({{result.release_date.slice(0,4)}})
</span>
<span *ngIf="!result.release_date">{{result.name}}</span>
</div>
<!-- Collection -->
<!-- <i class="fa fa-file-video-o" aria-hidden="true"></i> -->
</ng-template>

@ -19,9 +19,8 @@ $ombi-accent: #258a6d;
::ng-deep ngb-typeahead-window.dropdown-menu {
background-color: $ombi-primary;
width: 24%;
overflow: auto;
height: 500px;
height: 33em;
}
::ng-deep ngb-typeahead-window button.dropdown-item {

@ -20,7 +20,6 @@ export class NavSearchComponent {
public searching = false;
public searchFailed = false;
public formatter = (result: IMultiSearchResult) => {
if(result.media_type === "movie") {
let title = result.title;

Loading…
Cancel
Save