Misc Fixes (#1031)
* Changed the default margin for mobile in book reader to 5% * Fixed a bug where checking for update did no current version validation before sending the update to the UI. * Added some documentation to the book code * Changed token expiry to 2 weeks. * Search bar will by default not have a border outline * Cleaned up some styles for white mode hovering on search * Added missing genre search group, reworked some clearing code, fixed click handlers * Fixed genre property * Changed the series title to show bookmarks and the edit button will now take you to series * Fixed up accordion tabpanel color in dark mode * Fixed a typo of CoverArtist instead of "Cover artist" * Added some documentation changes * Fixed a bug where sort options on All-Series wasn't working * Added a thanks to Palace-Designs who hosts our infrastructure to the readme. * Fixed a bug where duplicate people for the same role would be returned * Fixed a bug where when user cleared out input manually, search would retain old search results
This commit is contained in:
parent
dc2d5b505f
commit
19e17c85fa
22 changed files with 130 additions and 55 deletions
|
|
@ -3,8 +3,8 @@ import { Component, HostListener, Inject, OnDestroy, OnInit, ViewChild } from '@
|
|||
import { Router } from '@angular/router';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { isTemplateSpan } from 'typescript';
|
||||
import { ScrollService } from '../scroll.service';
|
||||
import { CollectionTag } from '../_models/collection-tag';
|
||||
import { PersonRole } from '../_models/person';
|
||||
import { SearchResult } from '../_models/search-result';
|
||||
import { SearchResultGroup } from '../_models/search/search-result-group';
|
||||
|
|
@ -104,11 +104,13 @@ export class NavHeaderComponent implements OnInit, OnDestroy {
|
|||
let params: any = {};
|
||||
params[queryParamName] = filter;
|
||||
params['page'] = 1;
|
||||
this.clearSearch();
|
||||
this.router.navigate(['all-series'], {queryParams: params});
|
||||
}
|
||||
|
||||
goToPerson(role: PersonRole, filter: any) {
|
||||
// TODO: Move this to utility service
|
||||
this.clearSearch();
|
||||
switch(role) {
|
||||
case PersonRole.Artist:
|
||||
this.goTo('artist', filter);
|
||||
|
|
@ -147,19 +149,24 @@ export class NavHeaderComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
clearSearch() {
|
||||
this.searchViewRef.clear();
|
||||
this.searchTerm = '';
|
||||
this.searchResults = new SearchResultGroup();
|
||||
}
|
||||
|
||||
clickSearchResult(item: SearchResult) {
|
||||
console.log('Click occured');
|
||||
clickSeriesSearchResult(item: SearchResult) {
|
||||
this.clearSearch();
|
||||
const libraryId = item.libraryId;
|
||||
const seriesId = item.seriesId;
|
||||
this.searchViewRef.clear();
|
||||
this.searchResults.reset();
|
||||
this.searchTerm = '';
|
||||
this.router.navigate(['library', libraryId, 'series', seriesId]);
|
||||
}
|
||||
|
||||
clickCollectionSearchResult(item: CollectionTag) {
|
||||
this.clearSearch();
|
||||
this.router.navigate(['collections', item.id]);
|
||||
}
|
||||
|
||||
|
||||
scrollToTop() {
|
||||
window.scroll({
|
||||
top: 0,
|
||||
|
|
@ -168,7 +175,6 @@ export class NavHeaderComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
focusUpdate(searchFocused: boolean) {
|
||||
console.log('search has focus', searchFocused);
|
||||
this.searchFocused = searchFocused
|
||||
return searchFocused;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue