Genericize the paginated data browser to allow working with artists easier
This commit is contained in:
parent
4d138cbdfe
commit
1c32a71db9
6 changed files with 66 additions and 45 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue