Filter location tags

This commit is contained in:
Cadence Ember 2025-04-10 14:44:17 +12:00
parent 72fda72de5
commit 62e7ccf17b
5 changed files with 93 additions and 47 deletions

View file

@ -44,6 +44,28 @@ html
.ml6 Switch account
li.s-menu--divider(role="separator")
li.s-menu--title Settings
li(role="menuitem")
if arrange === "tag"
form.s-block-link.d-flex.ai-center(hx-post="/api/settings/location-tags" hx-trigger="change" hx-indicator="#location-tags-loading" hx-select="#tag-page" hx-target="#tag-page")
span.fl-grow1.d-flex.ai-center
!= icons.get("map-pin")
.pl6 Region tags
#location-tags-loading
input(type="hidden" name="account" value=account)
.s-toggle-switch.s-toggle-switch__multiple
- const locationTagsSetting = h3.getCookie(event, "bcex-location-tags") || "all"
input#location-tags-all(type="radio" name="location_tags" value="all" autocomplete="off" checked=(locationTagsSetting === "all"))
label.px8.py6(for="location-tags-all") All
input#location-tags-hide(type="radio" name="location_tags" value="hide" autocomplete="off" checked=(locationTagsSetting === "hide"))
label.px8.py6(for="location-tags-hide") Hide
input#location-tags-only(type="radio" name="location_tags" value="only" autocomplete="off" checked=(locationTagsSetting === "only"))
label.px8.py6(for="location-tags-only") Only
else
.s-block-link.d-flex.ai-center
span.fl-grow1.d-flex.ai-center.fc-black-400
!= icons.get("map-pin")
.pl6 Region tags
a.fc-black-400.td-underline(href=and({arrange: "tag"})) Set on tags view
li(role="menuitem")
form.s-block-link.d-flex.ai-center(hx-post="/api/settings/inline-player" hx-trigger="change" hx-indicator="#inline-player-loading")
label.fl-grow1.d-flex.ai-center
@ -52,7 +74,7 @@ html
#inline-player-loading
input.s-toggle-switch#inline-player-switch(type="checkbox" name="inline_player" checked=(h3.getCookie(event, "bcex-inline-player-disabled") !== "true"))
li(role="menuitem")
form.s-block-link.d-flex.ai-center(hx-post="/api/settings/currency" hx-trigger="change" hx-select="#collection-stats" hx-target="#collection-stats" hx-indicator="#currency-loading")
form.s-block-link.py2.d-flex.ai-center(hx-post="/api/settings/currency" hx-trigger="change" hx-select="#collection-stats" hx-target="#collection-stats" hx-indicator="#currency-loading")
label.fl-grow1(for="currency-select").d-flex.ai-center
!= icons.get("coins")
.pl6 Currency