Max 1000 items without consent

This commit is contained in:
Cadence Ember 2025-04-17 14:47:38 +12:00
parent 199a44a8a7
commit 368d05349a
5 changed files with 42 additions and 3 deletions

View file

@ -45,6 +45,15 @@ html
.ml6 Switch account
li.s-menu--divider(role="separator")
li.s-menu--title Settings
if query && query.show
li(role="menuitem")
.s-block-link.d-flex.ai-center.py2
span.fl-grow1.d-flex.ai-center
!= icons.get("eye")
.pl6 Showing all items
a.s-btn.s-btn__filled.s-btn__sm.d-flex.ai-center(href=and({show: null}))
!= icons.get("undo", 16)
span.pl6 Undo
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")
@ -144,6 +153,9 @@ html
include collection-stats.pug
main.fl-grow1
if items && items.length >= 1000
//- a great deal of performance is spent on htmx's bfcache emulation when navigating away from large pages
div(hx-history="false")
block view
#player-container.ps-fixed.r16.ws340.z-modal(class="md:t64 md:l16 md:r16 md:b16" hx-preserve="true")

17
pug/too-many-items.pug Normal file
View file

@ -0,0 +1,17 @@
extends includes/layout.pug
block view
.mx-auto.w100.wmx11.fs-body1.d-flex.jc-center#content
.s-notice.s-notice__warning
.d-flex.gx16.ai-center
!= icons.get("warning-triangle")
div This page has #{itemCount} items, which might slow down your browser.
.d-flex.gx8.mt16
button.s-btn.s-btn__filled(hx-get=and({}) hx-headers='{"BCEX-Show": "true"}') Show them anyway
a.s-btn.s-btn__outlined(href=and({show: true})) Always show
p.mt16 Other things to try:
ul.mb4
li Search for specific items
if arrange !== "label"
li View items grouped together, like the #[a(href=and({arrange: "label"})) labels tab]
li Use #[a(href=and({shape: "list"}) hx-headers='{"BCEX-Show": "true"}') list view], which may be faster