Tweak UI for dashboard settings and book filter
This commit is contained in:
+43
-41
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<div class="scroller-fields">
|
||||
<div class="scroller-field">
|
||||
<div class="scroller-field" [class.expanded]="scroller.type !== 'magicShelf'">
|
||||
<label>Type</label>
|
||||
<p-select
|
||||
fluid
|
||||
@@ -41,49 +41,51 @@
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
<div class="scroller-field" [style.visibility]="scroller.type === 'magicShelf' ? 'visible' : 'hidden'">
|
||||
<label>Magic Shelf</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="(magicShelves$ | async)!"
|
||||
[(ngModel)]="scroller.magicShelfId"
|
||||
placeholder="Select magic shelf"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
@if (scroller.type === 'magicShelf') {
|
||||
<div class="scroller-field">
|
||||
<label>Magic Shelf</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="(magicShelves$ | async)!"
|
||||
[(ngModel)]="scroller.magicShelfId"
|
||||
placeholder="Select magic shelf"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
<div class="scroller-field" [style.visibility]="scroller.type === 'magicShelf' ? 'visible' : 'hidden'">
|
||||
<label>Sort Field</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="sortFieldOptions"
|
||||
[(ngModel)]="scroller.sortField"
|
||||
placeholder="Select field"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
<div class="scroller-field">
|
||||
<label>Sort Field</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="sortFieldOptions"
|
||||
[(ngModel)]="scroller.sortField"
|
||||
placeholder="Select field"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
<div class="scroller-field" [style.visibility]="scroller.type === 'magicShelf' ? 'visible' : 'hidden'">
|
||||
<label>Direction</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="sortDirectionOptions"
|
||||
[(ngModel)]="scroller.sortDirection"
|
||||
placeholder="Select direction"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
<div class="scroller-field">
|
||||
<label>Direction</label>
|
||||
<p-select
|
||||
fluid
|
||||
[options]="sortDirectionOptions"
|
||||
[(ngModel)]="scroller.sortDirection"
|
||||
placeholder="Select direction"
|
||||
appendTo="body">
|
||||
</p-select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="scroller-field">
|
||||
<label>Max Items</label>
|
||||
<p-inputNumber
|
||||
fluid
|
||||
[(ngModel)]="scroller.maxItems"
|
||||
[min]="MIN_ITEMS"
|
||||
[max]="MAX_ITEMS"
|
||||
[showButtons]="true">
|
||||
</p-inputNumber>
|
||||
</div>
|
||||
<div class="scroller-field max-items-field">
|
||||
<label>Max Items</label>
|
||||
<p-inputNumber
|
||||
fluid
|
||||
[(ngModel)]="scroller.maxItems"
|
||||
[min]="MIN_ITEMS"
|
||||
[max]="MAX_ITEMS"
|
||||
[showButtons]="true">
|
||||
</p-inputNumber>
|
||||
</div>
|
||||
|
||||
<div class="scroller-controls-right">
|
||||
|
||||
+18
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user