Add actions for finishing early and cancelling the request entirely
This commit is contained in:
parent
d60448640f
commit
6a2cc1170d
1 changed files with 9 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import { __ID__, filePath } from "../consts.mjs";
|
import { __ID__, filePath } from "../consts.mjs";
|
||||||
import { get as getQuery, requery } from "../utils/QueryManager.mjs";
|
import { cancel, finish, get as getQuery, requery } from "../utils/QueryManager.mjs";
|
||||||
import { Logger } from "../utils/Logger.mjs";
|
import { Logger } from "../utils/Logger.mjs";
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
@ -20,6 +20,8 @@ export class QueryStatus extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
promptUser: this.promptUser,
|
promptUser: this.promptUser,
|
||||||
|
finishEarly: this.finishEarly,
|
||||||
|
cancelRequest: this.cancelRequest,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -96,9 +98,13 @@ export class QueryStatus extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @this {QueryStatus} */
|
/** @this {QueryStatus} */
|
||||||
static async cancelRequest() {};
|
static async cancelRequest() {
|
||||||
|
cancel(this.#requestID);
|
||||||
|
};
|
||||||
|
|
||||||
/** @this {QueryStatus} */
|
/** @this {QueryStatus} */
|
||||||
static async finishEarly() {};
|
static async finishEarly() {
|
||||||
|
finish(this.#requestID);
|
||||||
|
};
|
||||||
// #endregion Actions
|
// #endregion Actions
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue