mirror of
https://github.com/migatu/vtt_work.git
synced 2026-07-14 21:38:39 +00:00
sync: investigation-board_v13 v0.2
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
{
|
||||
"id": "investigation-board",
|
||||
{
|
||||
"title": "Investigation Board",
|
||||
"description": "A Foundry VTT module that lets everyone create...photo notes on the scene as collaborative investigation tools.",
|
||||
"description": "A Foundry VTT module that lets everyone create, edit, and move sticky and photo notes on the scene as collaborative investigation tools.",
|
||||
"version": "1.3.2",
|
||||
"authors": [{ "name": "Gus", "url": "", "email": "" }],
|
||||
"compatibility": { "minimum": "12", "verified": "13" },
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gus",
|
||||
"url": "",
|
||||
"email": ""
|
||||
}
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": "12",
|
||||
"verified": "13"
|
||||
},
|
||||
"esmodules": [
|
||||
"scripts/settings.js",
|
||||
"scripts/investigation-board.js"
|
||||
],
|
||||
"styles": ["styles/style.css"],
|
||||
"styles": [
|
||||
"styles/style.css"
|
||||
],
|
||||
"packs": [],
|
||||
"templates": ["templates/drawing-sheet.html"],
|
||||
}
|
||||
"templates": [
|
||||
"templates/drawing-sheet.html"
|
||||
],
|
||||
"url": "https://github.com/mordachai/investigation-board",
|
||||
"manifest": "https://github.com/mordachai/investigation-board/raw/main/module.json",
|
||||
"download": "https://github.com/mordachai/investigation-board/raw/main/investigation-board.zip",
|
||||
"id": "investigation-board"
|
||||
}
|
||||
@@ -76,8 +76,8 @@ class CustomDrawingSheet extends DrawingConfig {
|
||||
|
||||
// Add activateListeners to hook up the file-picker button.
|
||||
activateListeners(element) {
|
||||
super.activateListeners(html);
|
||||
html.find(".file-picker-button").click(ev => {
|
||||
super.activateListeners(element);
|
||||
element.querySelectorAll(".file-picker-button").forEach(btn => btn.addEventListener("click", ev => {
|
||||
ev.preventDefault();
|
||||
// Open Foundry's FilePicker for images; adjust the "current" directory if needed.
|
||||
new FilePicker({
|
||||
@@ -88,7 +88,7 @@ class CustomDrawingSheet extends DrawingConfig {
|
||||
const input = element.querySelector("input[name='image']"); if (input) input.value = path;
|
||||
}
|
||||
}).browse();
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -444,13 +444,13 @@ async function createNote(noteType) {
|
||||
|
||||
|
||||
Hooks.on("getSceneControlButtons", (controls) => {
|
||||
const journalControls = controls.find((c) => c.name === "notes");
|
||||
const journalControls = Array.isArray(controls) ? controls.find((c) => c.name === "notes") : (controls["notes"] ?? controls.notes);
|
||||
if (!journalControls) return;
|
||||
|
||||
journalControls.tools.push(
|
||||
{ name: "createStickyNote", title: "Create Sticky Note", icon: "fas fa-sticky-note", onClick: () => createNote("sticky"), button: true },
|
||||
{ name: "createPhotoNote", title: "Create Photo Note", icon: "fa-solid fa-camera-polaroid", onClick: () => createNote("photo"), button: true },
|
||||
{ name: "createIndexCard", title: "Create Index Card", icon: "fa-regular fa-subtitles", onClick: () => createNote("index"), button: true }
|
||||
{ name: "createStickyNote", title: "Create Sticky Note", icon: "fa-solid fa-note-sticky", onChange: (ev, active) => { if (active) createNote("sticky"); }, button: true },
|
||||
{ name: "createPhotoNote", title: "Create Photo Note", icon: "fa-solid fa-camera-polaroid", onChange: (ev, active) => { if (active) createNote("photo"); }, button: true },
|
||||
{ name: "createIndexCard", title: "Create Index Card", icon: "fa-regular fa-rectangle-list", onChange: (ev, active) => { if (active) createNote("index"); }, button: true }
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.1
|
||||
0.2
|
||||
|
||||
Reference in New Issue
Block a user