diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html index 874b0e80..adae8a6c 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html +++ b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html @@ -1,27 +1,27 @@ -
+
-
- Filters +
+ Filters >
-
+
@for (filterType of filterTypes; track trackByFilterType(i, filterType); let i = $index) { - + {{ filterLabels[filterType] || (filterType | titlecase) }} @if (activeFilters[filterType]?.length) { - + ({{ activeFilters[filterType].length }}) } @@ -30,14 +30,12 @@ @if (filterStreams[filterType] | async; as filters) { -
+
@for (filter of filters; track trackByFilter(j, filter); let j = $index) {
{{ filter.value.name || filter.value }} @@ -45,7 +43,7 @@
} @if (truncatedFilters[filterType]) { -
+
Showing first 250 items
} @@ -56,7 +54,7 @@ } -
+
diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss index c054f7cd..0da3e0bc 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss +++ b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss @@ -2,6 +2,91 @@ --p-accordion-header-padding: 0.6rem 1rem; } -.filter-row { - align-items: flex-start; +:host ::ng-deep .p-togglebutton { + --p-togglebutton-content-padding: 0.25rem 0.5rem; +} + +.book-filter-container { + height: calc(100dvh - 6.1rem); + border-radius: 0.75rem; + overflow: hidden; + background: var(--card-background); + display: flex; + flex-direction: column; + border: 1px solid var(--p-content-border-color); +} + +.filter-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 1rem; + border-bottom: 1px solid var(--p-content-border-color); +} + +.filter-title { + font-weight: 600; +} + +.filter-mode-select { + font-size: 0.875rem; +} + +.filter-content { + flex: 1; + overflow-y: auto; + padding-bottom: 1rem; + padding-right: 0.25rem; + overscroll-behavior: contain; +} + +.filter-type-label { + display: inline-flex; + align-items: center; + gap: 0.25rem; +} + +.active-filter-count { + font-size: 0.875rem; + color: var(--primary-color); +} + +.filter-list { + max-height: 27.5rem; + overflow-y: auto; + overscroll-behavior: contain; + padding-right: 0.25rem; +} + +.filter-row { + cursor: pointer; + transition: colors 200ms ease-in-out; + padding-bottom: 0.25rem; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: 0.5rem; + + &.active { + color: var(--primary-color); + } +} + +.truncation-notice { + font-size: 0.75rem; + color: #6b7280; + text-align: center; + padding-top: 0.5rem; + border-top: 1px solid #e5e7eb; +} + +.footer-notice { + font-size: 0.75rem; + color: #6b7280; + text-align: center; + padding-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; + margin-top: 0.5rem; } diff --git a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.html b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.html index 1ba51197..b16b615d 100644 --- a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.html +++ b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.html @@ -29,7 +29,7 @@
-
+
-
- - - -
+ @if (scroller.type === 'magicShelf') { +
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
+ } +
-
- - - -
+
+ + +
diff --git a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.scss b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.scss index 14441736..caad078d 100644 --- a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.scss +++ b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.scss @@ -79,7 +79,7 @@ .scroller-fields { display: grid; - grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.5fr) minmax(120px, 1fr) minmax(100px, 1fr) 90px; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; flex: 1; @@ -98,6 +98,23 @@ display: block; margin-bottom: 0.5rem; } + + &.expanded { + flex: 1; + + @media (max-width: 768px) { + flex: unset; + } + } +} + +.max-items-field { + max-width: 9rem; + flex-shrink: 0; + + @media (max-width: 768px) { + max-width: none; + } } label {