Add settings for currency and inline player

This commit is contained in:
Cadence Ember 2025-04-08 14:45:18 +12:00
parent 6cc0003120
commit 82234f9706
10 changed files with 104 additions and 15 deletions

View file

@ -29,9 +29,36 @@ html
#page(hx-history-elt)
header.s-topbar.ps-sticky.t0
.s-topbar--container.wmx9
.s-topbar--logo
button.s-topbar--logo.s-btn.s-btn__muted.s-btn__dropdown.pr24.bar0.fc-black(popovertarget="menu")
!= icons.get("compass-solid", 24)
.ml4 BC Explorer
.ml6 BC Explorer
#menu(popover data-popper-placement="bottom" style="display: revert;").s-popover.overflow-visible.px0.py8
.s-popover--arrow.s-popover--arrow__tc
ul.s-menu(role="menu")
li(role="menuitem")
a.s-block-link.d-flex.ai-center.fc-black(href="/" hx-boost="false")
!= icons.get("log-out")
.ml6 Switch account
li.s-menu--divider(role="separator")
li.s-menu--title Settings
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
!= icons.get("layout-right")
.pl6(for="inline-player-switch") Inline player
#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")
label.fl-grow1(for="currency-select").d-flex.ai-center
!= icons.get("coins")
.pl6 Currency
#currency-loading
input(type="hidden" name="account" value=account)
.s-select
select#currency-select(name="currency")
each currency in currencies
option(selected=(currency === count.displayCurrency))= currency
.fl-grow1
nav
ul.s-navigation
@ -79,7 +106,7 @@ html
#collection-sync.d-none
.s-sidebarwidget
#collection-stats.s-sidebarwidget
.s-sidebarwidget--header Collection
.s-sidebarwidget--action
input(type="hidden" name="account" value=account)
@ -125,7 +152,7 @@ html
tr.s-sidebarwidget--item
th value
td
= `${count.displayCurrencySymbol}${count.value} `
= `${count.value} `
span.fc-black-400 #{count.displayCurrency}
tr.s-sidebarwidget--item
th diversity