Make the default collapsed state of grid filters configurable through a variable
This commit is contained in:
parent
6ec4f160f7
commit
6011173c1f
@ -226,6 +226,10 @@
|
|||||||
# Default: sets
|
# Default: sets
|
||||||
# BK_SETS_FOLDER=sets
|
# BK_SETS_FOLDER=sets
|
||||||
|
|
||||||
|
# Optional: Make the grid filters displayed by default, rather than collapsed
|
||||||
|
# Default: false
|
||||||
|
# BK_SHOW_GRID_FILTERS=true
|
||||||
|
|
||||||
# Optional: Skip saving or displaying spare parts
|
# Optional: Skip saving or displaying spare parts
|
||||||
# Default: false
|
# Default: false
|
||||||
# BK_SKIP_SPARE_PARTS=true
|
# BK_SKIP_SPARE_PARTS=true
|
||||||
|
@ -52,6 +52,7 @@ CONFIG: Final[list[dict[str, Any]]] = [
|
|||||||
{'n': 'RETIRED_SETS_PATH', 'd': './retired_sets.csv'},
|
{'n': 'RETIRED_SETS_PATH', 'd': './retired_sets.csv'},
|
||||||
{'n': 'SETS_DEFAULT_ORDER', 'd': '"rebrickable_sets"."number" DESC, "rebrickable_sets"."version" ASC'}, # noqa: E501
|
{'n': 'SETS_DEFAULT_ORDER', 'd': '"rebrickable_sets"."number" DESC, "rebrickable_sets"."version" ASC'}, # noqa: E501
|
||||||
{'n': 'SETS_FOLDER', 'd': 'sets', 's': True},
|
{'n': 'SETS_FOLDER', 'd': 'sets', 's': True},
|
||||||
|
{'n': 'SHOW_GRID_FILTERS', 'c': bool},
|
||||||
{'n': 'SKIP_SPARE_PARTS', 'c': bool},
|
{'n': 'SKIP_SPARE_PARTS', 'c': bool},
|
||||||
{'n': 'SOCKET_NAMESPACE', 'd': 'bricksocket'},
|
{'n': 'SOCKET_NAMESPACE', 'd': 'bricksocket'},
|
||||||
{'n': 'SOCKET_PATH', 'd': '/bricksocket/'},
|
{'n': 'SOCKET_PATH', 'd': '/bricksocket/'},
|
||||||
|
@ -36,13 +36,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#grid-filter" aria-expanded="false" aria-controls="grid-filter">
|
<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#grid-filter" aria-expanded="{% if config['SHOW_GRID_FILTERS'] %}true{% else %}false{% endif %}" aria-controls="grid-filter">
|
||||||
<i class="ri-filter-line"></i> Filters
|
<i class="ri-filter-line"></i> Filters
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="grid-filter" class="collapse row row-cols-lg-auto g-1 justify-content-center align-items-center pb-2">
|
<div id="grid-filter" class="collapse {% if config['SHOW_GRID_FILTERS'] %}show{% endif %} row row-cols-lg-auto g-1 justify-content-center align-items-center pb-2">
|
||||||
<div class="col-12 flex-grow-1">
|
<div class="col-12 flex-grow-1">
|
||||||
<label class="visually-hidden" for="grid-status">Status</label>
|
<label class="visually-hidden" for="grid-status">Status</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
Loading…
Reference in New Issue
Block a user