Foundry v13 migraton, WIP

This commit is contained in:
2025-05-14 22:09:35 +02:00
parent cc4cbbc771
commit 6b053b189b
33 changed files with 151 additions and 96 deletions

View File

@ -5,12 +5,12 @@ import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
/**
* Class providing helper methods to get the list of users, and
* Class providing helper methods to get the list of users, and
*/
export class ChatUtility {
static async init() {
Hooks.on("renderChatMessage", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
Hooks.on("renderChatMessageHTML", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
Hooks.on("createChatMessage", async (chatMessage, options, id) => await ChatUtility.onCreateChatMessage(chatMessage, options, id))
}
@ -190,8 +190,8 @@ export class ChatUtility {
if (rddTimestamp) {
const timestamp = new RdDTimestamp(rddTimestamp);
const timestampData = timestamp.toCalendrier();
const dateHeure = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
html.find('header.message-header .message-sender').after(dateHeure)
const dateHeure = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
$(html).find('header.message-header .message-sender').after(dateHeure)
}
}