Genericize the paginated data browser to allow working with artists easier

This commit is contained in:
Oliver 2026-02-01 18:30:36 -07:00
parent 4d138cbdfe
commit 1c32a71db9
6 changed files with 66 additions and 45 deletions

View file

@ -16,6 +16,7 @@ export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
classes: [
__ID__,
`ArtBrowser`,
`data-browser`,
],
position: {},
window: {},
@ -56,6 +57,10 @@ export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
this.#onSubmit = onSubmit;
};
get page() {
return this.#page;
};
async setPage(page) {
if (this.#page == page) { return };
this.#page = page;
@ -215,7 +220,6 @@ export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
};
_prepareImagesContext(ctx) {
ctx.images = [];
const allImages = Object.entries(deepClone(this.#imagesDB.data));
const images = [];