+
+
-
-
-
-
- @if (bookTitle) {
+
+
+
+
+
+
-
+ (click)="clearSearch(); searchDropdown.hide()"
+ >
+
+
+
+
+
+
+
+ @if (bookTitle) {
+
+ }
+
+
-
+ @if (this.showFilter) {
+
+
+ }
+
+
+
diff --git a/booklore-ui/src/app/book/components/book-browser/book-browser.component.scss b/booklore-ui/src/app/book/components/book-browser/book-browser.component.scss
index 3c6e47201..b394092e5 100644
--- a/booklore-ui/src/app/book/components/book-browser/book-browser.component.scss
+++ b/booklore-ui/src/app/book/components/book-browser/book-browser.component.scss
@@ -20,10 +20,10 @@
.grid {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(1px, 1fr));
gap: 1.3rem;
- overflow: hidden;
align-items: start;
+ width: 100%;
}
.virtual-scroller-item {
@@ -44,19 +44,6 @@
border-width: 1px 1px 0px 1px;
}
-.topbar-items {
- display: flex;
- list-style-type: none;
- margin: 0;
- padding: 0;
- gap: 0.3rem;
- align-items: center;
-
- li {
- position: relative;
- }
-}
-
.topbar-item {
display: inline-flex;
align-items: center;
@@ -102,3 +89,54 @@
line-height: 2.5rem;
font-size: 1rem;
}
+
+.mobile-filter-mask {
+ @media (max-width: 991px) {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 998;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.4);
+ }
+}
+
+.filter-overlay-container {
+
+ @media (max-width: 991px) {
+ width: 225px;
+ position: fixed;
+ top: 3.85rem;
+ right: 0;
+ bottom: 0;
+ height: calc(100% - 3.85rem);
+ background-color: var(--card-background);
+ box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
+ transform: translateX(100%);
+ transition: transform 0.3s ease;
+ z-index: 1001;
+
+ &.active {
+ transform: translateX(0);
+ }
+ }
+
+ @media (min-width: 992px) {
+ position: relative;
+ overflow: hidden;
+ flex-shrink: 0;
+
+ &:not(.active) {
+ width: 0 !important;
+ opacity: 0;
+ pointer-events: none;
+ }
+
+ &.active {
+ width: 225px;
+ opacity: 1;
+ pointer-events: auto;
+ }
+ }
+}
diff --git a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts
index 36c9a870a..50fa45d90 100644
--- a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts
+++ b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts
@@ -26,7 +26,6 @@ import {InputText} from 'primeng/inputtext';
import {FormsModule} from '@angular/forms';
import {BookFilterComponent} from './book-filter/book-filter.component';
import {Tooltip} from 'primeng/tooltip';
-import {Fluid} from 'primeng/fluid';
import {EntityViewPreferences, UserService} from '../../../settings/user-management/user.service';
import {OverlayPanelModule} from 'primeng/overlaypanel';
import {SeriesCollapseFilter} from './filters/SeriesCollapseFilter';
@@ -74,7 +73,7 @@ const SORT_DIRECTION = {
standalone: true,
templateUrl: './book-browser.component.html',
styleUrls: ['./book-browser.component.scss'],
- imports: [Button, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Menu, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip, NgClass, Fluid, PrimeTemplate, NgStyle, OverlayPanelModule, DropdownModule, Checkbox, Popover, Slider, Select, Divider],
+ imports: [Button, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Menu, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip, NgClass, PrimeTemplate, NgStyle, OverlayPanelModule, DropdownModule, Checkbox, Popover, Slider, Select, Divider],
providers: [SeriesCollapseFilter],
animations: [
trigger('slideInOut', [
@@ -148,6 +147,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
protected metadataMenuItems: MenuItem[] | undefined;
currentBooks: Book[] = [];
lastSelectedIndex: number | null = null;
+ showFilter: boolean = false;
get currentCardSize() {
return this.coverScalePreferenceService.currentCardSize;
@@ -310,7 +310,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
: VIEW_MODES.GRID)
: (effectivePrefs.view?.toLowerCase() ?? VIEW_MODES.GRID);
- this.bookFilterComponent.showFilters = sidebarParam === 'true' || (sidebarParam === null && this.filterVisibility);
+ //this.showFilter = sidebarParam === 'true' || (sidebarParam === null && this.filterVisibility);
this.bookSorter.updateSortOptions();
@@ -323,7 +323,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
[QUERY_PARAMS.VIEW]: this.currentViewMode,
[QUERY_PARAMS.SORT]: this.bookSorter.selectedSort.field,
[QUERY_PARAMS.DIRECTION]: this.bookSorter.selectedSort.direction === SortDirection.ASCENDING ? SORT_DIRECTION.ASCENDING : SORT_DIRECTION.DESCENDING,
- [QUERY_PARAMS.SIDEBAR]: this.bookFilterComponent.showFilters.toString(),
+ [QUERY_PARAMS.SIDEBAR]: this.showFilter.toString(),
[QUERY_PARAMS.FILTER]: Object.entries(parsedFilters).map(([k, v]) => `${k}:${v.join('|')}`).join(',')
};
@@ -613,10 +613,10 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
}
toggleFilterSidebar() {
- this.bookFilterComponent.showFilters = !this.bookFilterComponent.showFilters;
+ this.showFilter = !this.showFilter;
this.router.navigate([], {
queryParams: {
- [QUERY_PARAMS.SIDEBAR]: this.bookFilterComponent.showFilters.toString()
+ [QUERY_PARAMS.SIDEBAR]: this.showFilter.toString()
},
queryParamsHandling: 'merge',
replaceUrl: true
diff --git a/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html b/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html
index 542c498d6..155b415ad 100644
--- a/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html
+++ b/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html
@@ -52,6 +52,7 @@
{{ book.metadata?.title }}
+@if (showFilter) {
+
+
+
@for (filterType of filterTypes; track filterType; let i = $index) {
-
- {{ filterLabels[filterType] || (filterType | titlecase) }}
- @if (activeFilters[filterType]?.length) {
-
- ({{ activeFilters[filterType].length }})
-
- }
-
+
+ {{ filterLabels[filterType] || (filterType | titlecase) }}
+ @if (activeFilters[filterType]?.length) {
+
+ ({{ activeFilters[filterType].length }})
+
+ }
+
+
@if (filterStreams[filterType] | async; as filters) {
@for (filter of filters; track filter) {
-
-
-
- @if (filterType === 'amazonRating') {
- @if (filterType === 'amazonRating') {
-
{{ filter.value.name }}
- } @else {
- {{ filter.value.name || filter.value }}
- }
- } @else {
- {{ filter.value.name || filter.value }}
- }
-
+
+
+ {{ filter.value.name || filter.value }}
}
diff --git a/booklore-ui/src/app/book/components/book-browser/book-filter/book-filter.component.ts b/booklore-ui/src/app/book/components/book-browser/book-filter/book-filter.component.ts
index 355faa7ba..1201e2061 100644
--- a/booklore-ui/src/app/book/components/book-browser/book-filter/book-filter.component.ts
+++ b/booklore-ui/src/app/book/components/book-browser/book-filter/book-filter.component.ts
@@ -147,10 +147,10 @@ export class BookFilterComponent implements OnInit, OnDestroy {
@Output() filterSelected = new EventEmitter
| null>();
@Output() filterModeChanged = new EventEmitter<'and' | 'or'>();
- @Input() showFilters: boolean = true;
@Input() entity$!: Observable | undefined;
@Input() entityType$!: Observable | undefined;
@Input() resetFilter$!: Subject;
+ @Input() showFilter: boolean = false;
activeFilters: Record = {};
filterStreams: Record[]>> = {};
diff --git a/booklore-ui/src/app/book/components/book-browser/filters/SeriesCollapseFilter.ts b/booklore-ui/src/app/book/components/book-browser/filters/SeriesCollapseFilter.ts
index a6cd7bc91..8892026f8 100644
--- a/booklore-ui/src/app/book/components/book-browser/filters/SeriesCollapseFilter.ts
+++ b/booklore-ui/src/app/book/components/book-browser/filters/SeriesCollapseFilter.ts
@@ -65,14 +65,13 @@ export class SeriesCollapseFilter implements BookFilter {
collapsedBooks.push(book);
}
}
-
+
for (const [seriesName, group] of seriesMap.entries()) {
const sortedGroup = group.slice().sort((a, b) => {
const aNum = a.metadata?.seriesNumber ?? Number.MAX_VALUE;
const bNum = b.metadata?.seriesNumber ?? Number.MAX_VALUE;
return aNum - bNum;
});
-
const firstBook = sortedGroup[0];
collapsedBooks.push({
...firstBook,
@@ -80,7 +79,7 @@ export class SeriesCollapseFilter implements BookFilter {
});
}
- return { ...bookState, books: collapsedBooks };
+ return {...bookState, books: collapsedBooks};
})
);
}
diff --git a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.html b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.html
index 165985467..aec7efb0c 100644
--- a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.html
+++ b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.html
@@ -1,45 +1,86 @@
-
-
diff --git a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.scss b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.scss
index 7bf1fd3ff..c1705f367 100644
--- a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.scss
+++ b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.scss
@@ -33,7 +33,6 @@
z-index: 1000;
max-height: 500px;
overflow-y: auto;
- width: 600px;
opacity: 0;
height: 0;
transition: opacity 0.3s ease, height 0.3s ease;
diff --git a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts
index c797eaaac..e85c042e2 100644
--- a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts
+++ b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts
@@ -6,10 +6,13 @@ import {FormsModule} from '@angular/forms';
import {InputTextModule} from 'primeng/inputtext';
import {BookService} from '../../service/book.service';
import {Button} from 'primeng/button';
-import { SlicePipe } from '@angular/common';
+import {SlicePipe} from '@angular/common';
import {Divider} from 'primeng/divider';
import {UrlHelperService} from '../../../utilities/service/url-helper.service';
import {Router} from '@angular/router';
+import {OverlayPanelModule} from 'primeng/overlaypanel';
+import {IconField} from 'primeng/iconfield';
+import {InputIcon} from 'primeng/inputicon';
@Component({
selector: 'app-book-searcher',
@@ -19,8 +22,11 @@ import {Router} from '@angular/router';
InputTextModule,
Button,
SlicePipe,
- Divider
-],
+ Divider,
+ OverlayPanelModule,
+ IconField,
+ InputIcon
+ ],
styleUrls: ['./book-searcher.component.scss'],
standalone: true
})
@@ -34,6 +40,16 @@ export class BookSearcherComponent implements OnInit, OnDestroy {
private router = inject(Router);
protected urlHelper = inject(UrlHelperService);
+ isSearchDropdownOpen = false;
+
+ toggleSearchInputDropdown() {
+ this.isSearchDropdownOpen = !this.isSearchDropdownOpen;
+ }
+
+ closeSearchDropdown() {
+ this.isSearchDropdownOpen = false;
+ }
+
ngOnInit(): void {
this.initializeSearch();
}
diff --git a/booklore-ui/src/app/book/components/book-sender/book-sender.component.html b/booklore-ui/src/app/book/components/book-sender/book-sender.component.html
index f8942b524..984e59c8e 100644
--- a/booklore-ui/src/app/book/components/book-sender/book-sender.component.html
+++ b/booklore-ui/src/app/book/components/book-sender/book-sender.component.html
@@ -1,4 +1,4 @@
-
+
-
- Library Details
- Select Directory
-
-
-
-
-
-
-
-
-
-
-
Monitor Folders:
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Library Details
+ Select Directories
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @if (!selectedIcon) {
+
+ } @else {
+
+ }
+
+
+
+
+
+
+
+
-
-
-
-
- | {{ folder }} |
-
-
- |
-
-
-
+ label="Next"
+ icon="pi pi-arrow-right"
+ iconPos="right"
+ (onClick)="validateLibraryNameAndProceed(activateCallback)"
+ [disabled]="!isLibraryDetailsValid()" />
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @for (folder of folders; track folder) {
+
+
+
+ {{ folder }}
+
+
+
+
+ }
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/booklore-ui/src/app/book/components/library-creator/library-creator.component.ts b/booklore-ui/src/app/book/components/library-creator/library-creator.component.ts
index 066f39e02..c694fb519 100644
--- a/booklore-ui/src/app/book/components/library-creator/library-creator.component.ts
+++ b/booklore-ui/src/app/book/components/library-creator/library-creator.component.ts
@@ -8,7 +8,6 @@ import {IconPickerComponent} from '../../../utilities/component/icon-picker/icon
import {Button} from 'primeng/button';
import {TableModule} from 'primeng/table';
import {Step, StepList, StepPanel, StepPanels, Stepper} from 'primeng/stepper';
-import {NgIf} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {InputText} from 'primeng/inputtext';
import {Library} from '../../model/library.model';
@@ -19,7 +18,7 @@ import {Tooltip} from 'primeng/tooltip';
selector: 'app-library-creator',
standalone: true,
templateUrl: './library-creator.component.html',
- imports: [Button, TableModule, StepPanel, IconPickerComponent, NgIf, FormsModule, InputText, Stepper, StepList, Step, StepPanels, ToggleSwitch, Tooltip],
+ imports: [Button, TableModule, StepPanel, IconPickerComponent, FormsModule, InputText, Stepper, StepList, Step, StepPanels, ToggleSwitch, Tooltip],
styleUrl: './library-creator.component.scss'
})
export class LibraryCreatorComponent implements OnInit {
@@ -84,6 +83,7 @@ export class LibraryCreatorComponent implements OnInit {
}
openIconPicker() {
+ console.log('aaa')
if (this.iconPicker) {
this.iconPicker.open();
}
diff --git a/booklore-ui/src/app/book/metadata/book-metadata-center/book-metadata-center.component.html b/booklore-ui/src/app/book/metadata/book-metadata-center/book-metadata-center.component.html
index 169ab0755..969a83e41 100644
--- a/booklore-ui/src/app/book/metadata/book-metadata-center/book-metadata-center.component.html
+++ b/booklore-ui/src/app/book/metadata/book-metadata-center/book-metadata-center.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/booklore-ui/src/app/book/metadata/book-metadata-center/metadata-picker/metadata-picker.component.html b/booklore-ui/src/app/book/metadata/book-metadata-center/metadata-picker/metadata-picker.component.html
index 5610a7aa5..4e8596add 100644
--- a/booklore-ui/src/app/book/metadata/book-metadata-center/metadata-picker/metadata-picker.component.html
+++ b/booklore-ui/src/app/book/metadata/book-metadata-center/metadata-picker/metadata-picker.component.html
@@ -1,5 +1,5 @@
@if (book$ | async; as book) {
-