mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Did some work on the nav
This commit is contained in:
parent
8f3dd86c52
commit
24bb0207d5
3 changed files with 25 additions and 5 deletions
|
@ -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"
|
<input class="form-control quater-width search-bar" type="text" [(ngModel)]="selectedItem"
|
||||||
[inputFormatter]="formatter" (selectItem)="selected($event)">
|
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>
|
||||||
|
<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>
|
||||||
|
<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 {
|
::ng-deep ngb-typeahead-window.dropdown-menu {
|
||||||
background-color: $ombi-primary;
|
background-color: $ombi-primary;
|
||||||
width: 24%;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 500px;
|
height: 33em;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep ngb-typeahead-window button.dropdown-item {
|
::ng-deep ngb-typeahead-window button.dropdown-item {
|
||||||
|
|
|
@ -20,7 +20,6 @@ export class NavSearchComponent {
|
||||||
public searching = false;
|
public searching = false;
|
||||||
public searchFailed = false;
|
public searchFailed = false;
|
||||||
|
|
||||||
|
|
||||||
public formatter = (result: IMultiSearchResult) => {
|
public formatter = (result: IMultiSearchResult) => {
|
||||||
if(result.media_type === "movie") {
|
if(result.media_type === "movie") {
|
||||||
let title = result.title;
|
let title = result.title;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue