Get the QueryStatus application displaying the status more appropriately
This commit is contained in:
parent
5770abb7e8
commit
0362342419
11 changed files with 117 additions and 14 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { __ID__, filePath } from "../consts.mjs";
|
||||
import { Logger } from "../utils/Logger.mjs";
|
||||
import { QueryManager } from "../utils/QueryManager.mjs";
|
||||
|
||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||
|
|
@ -10,15 +11,22 @@ export class QueryStatus extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
__ID__,
|
||||
`QueryStatus`,
|
||||
],
|
||||
position: {
|
||||
width: 300,
|
||||
height: `auto`,
|
||||
},
|
||||
window: {
|
||||
resizable: true,
|
||||
},
|
||||
};
|
||||
|
||||
static PARTS = {
|
||||
users: {
|
||||
template: filePath(`templates/QueryStatus/users.hbs`),
|
||||
},
|
||||
// controls: {
|
||||
// template: filePath(`templates/QueryStatus/controls.hbs`),
|
||||
// },
|
||||
controls: {
|
||||
template: filePath(`templates/QueryStatus/controls.hbs`),
|
||||
},
|
||||
};
|
||||
// #endregion Options
|
||||
|
||||
|
|
@ -27,6 +35,10 @@ export class QueryStatus extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
requestID,
|
||||
...opts
|
||||
}) {
|
||||
if (!requestID) {
|
||||
Logger.error(`A requestID must be provided for QueryStatus applications`);
|
||||
return null;
|
||||
};
|
||||
super(opts);
|
||||
this.requestID = requestID;
|
||||
};
|
||||
|
|
@ -60,7 +72,7 @@ export class QueryStatus extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
users.push({
|
||||
id: userID,
|
||||
name: user.name,
|
||||
colour: user.color,
|
||||
active: user.active,
|
||||
answers: query.responses[userID] ?? null,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue