Multiple accounts support, load tags online
This commit is contained in:
parent
cd2827791f
commit
26ea869285
14 changed files with 295 additions and 124 deletions
|
@ -63,14 +63,15 @@ html
|
|||
ul.s-navigation
|
||||
li: +navi("arrange", "album", "album", "Album")
|
||||
li: +navi("arrange", "artist", "people-tag", "Artist")
|
||||
li: +navi("arrange", "label", "component", "Label")
|
||||
li: +navi("arrange", "label", "flower", "Label")
|
||||
//- asana, flower, component, circle-spark, rhombus, sphere, union-alt, color-wheel, community, combine
|
||||
li: +navi("arrange", "tag", "label", "Tag")
|
||||
li: +navi("arrange", "track", "music-note", "Track")
|
||||
.px16
|
||||
nav
|
||||
ul.s-navigation.s-navigation__toggle.g0
|
||||
li: +navi("shape", "grid").brr0!= icons.get("view-grid")
|
||||
li: +navi("shape", "list").blr0!= icons.get("table-rows")
|
||||
li: +navi("shape", "list").blr0!= icons.get("align-justify")
|
||||
.fl-grow1
|
||||
#player(hx-preserve)
|
||||
button.s-btn.s-btn__outlined.s-btn__xs!= icons.get("play")
|
||||
|
@ -80,12 +81,17 @@ html
|
|||
block view
|
||||
|
||||
div
|
||||
.ps-sticky.d-flex.fd-column.g12(style="top: 80px")
|
||||
.ps-sticky.d-flex.fd-column.g12.wmx4(style="top: 80px")
|
||||
if arrange === "tag"
|
||||
include tag-status.pug
|
||||
if filter
|
||||
.s-sidebarwidget.s-sidebarwidget__blue.d-flex.ai-center.gx16.jc-space-between.p8.pl16
|
||||
!= icons.get("search")
|
||||
div Searching for #[strong= filter]
|
||||
.fl-grow1
|
||||
.fl-shrink0!= icons.get("search")
|
||||
.fl-grow1= `Searching for `
|
||||
if filter_field === "item_id"
|
||||
strong= items[0].item_title
|
||||
else
|
||||
strong= filter
|
||||
a.s-btn.s-notice--btn(href=and({filter: null, filter_field: null})) Clear
|
||||
.s-sidebarwidget.wmn3
|
||||
.s-sidebarwidget--header Collection
|
||||
|
|
32
pug/includes/tag-status.pug
Normal file
32
pug/includes/tag-status.pug
Normal file
|
@ -0,0 +1,32 @@
|
|||
if downloader.total > 0
|
||||
.d-flex.jc-center#tag-download
|
||||
if !downloader.running && !downloader.outcome
|
||||
form.s-notice.s-notice__info.d-flex.ai-center.p8.gx16.pl16(role="status" hx-swap="outerHTML" hx-target="#tag-download" hx-post="/api/tag-download")
|
||||
!= icons.get("info-circle")
|
||||
div Tag data needs to be downloaded. This will take a while.
|
||||
input(type="hidden" name="account" value=account)
|
||||
button.s-btn.s-btn__outlined Download now
|
||||
|
||||
else if !downloader.outcome
|
||||
.s-notice.p16(role="status" hx-swap="outerHTML" hx-target="#tag-download" hx-get=`/api/tag-download?account=${account}` hx-trigger="every 5s")
|
||||
.d-flex.gx16.ai-center
|
||||
!= icons.get("cloud-download")
|
||||
div Downloading tags...
|
||||
p.mt12 You can keep using BC Explorer while this continues in the background.
|
||||
.s-progress.mt16
|
||||
.s-progress--bar(style=`width: ${downloader.processed/downloader.total*100}%`)
|
||||
.d-flex.jc-space-between.fs-fine
|
||||
span= downloader.processed
|
||||
span= downloader.total
|
||||
|
||||
else if downloader.outcome === "Success"
|
||||
.s-notice.s-notice__success.p8.gx16.pl16.d-flex.ai-center.wmn3
|
||||
!= icons.get("cloud-check")
|
||||
.fl-grow1 Tags downloaded.
|
||||
- downloadManager.resolve(account)
|
||||
a.s-btn.s-btn__outlined(href="") Refresh
|
||||
|
||||
else
|
||||
.s-notice.s-notice__danger.p8.gx16.pl16.d-flex.ai-center.wmn3
|
||||
!= icons.get("cloud-xmark")
|
||||
.fl-grow1= downloader.outcome
|
Loading…
Add table
Add a link
Reference in a new issue