Add a way to choose whether a sheet is the toggled mode or the always-editing mode. #20

Merged
Oliver merged 3 commits from feature/edit-mode-setting into main 2026-01-10 21:47:24 +00:00
Showing only changes of commit c7775e7a99 - Show all commits

View file

@ -1,34 +0,0 @@
const rolls = {};
const response = await taf.QueryManager.query(
{
id: `test-data-request`,
question: `Test Data`,
inputs: [
{
type: `input`,
inputType: `number`,
key: `statBase`,
label: `Stat Base`,
}
],
},
{
onSubmit: async (userID, answers) => {
rolls[userID] = [];
const diceHTML = [];
for (let i = 0; i < answers.statBase; i++) {
const rolled = Math.floor(Math.random() * 6) + 1;
rolls[userID].push(rolled);
diceHTML.push(`<li class="roll dice d6">${rolled}</li>`);
};
const content = `Rolls:<div class="dice-tooltip"><ol class="dice-rolls">${diceHTML.join(`\n`)}</ol></div>`;
await taf.QueryManager.notify(userID, content);
},
}
);
console.log({ response, rolls });