diff --git a/web/templates/card_creator.html b/web/templates/card_creator.html
index 7c87fc5..4416567 100644
--- a/web/templates/card_creator.html
+++ b/web/templates/card_creator.html
@@ -72,9 +72,9 @@ const artistInput = document.getElementById("artistInput");
const downloadBtn = document.getElementById("downloadBtn");
// Generate a unique ID for the card based on pack and card name
-async function generateCardId(packName, cardName) {
+async function generateCardId(...args) {
const encoder = new TextEncoder();
- const data = encoder.encode(packName + ':' + cardName);
+ const data = encoder.encode(args.join(':'));
const hashBuffer = await crypto.subtle.digest('SHA-1', data);
// Convert hash to hex
@@ -130,7 +130,7 @@ function drawCard() {
}
async function drawCardId() {
- const id = await generateCardId(packInput.value, nameInput.value);
+ const id = await generateCardId(packInput.value, nameInput.value, powerInput.value, charmInput.value, witInput.value, artistInput.value);
ctx.font = "15px sans-serif";
ctx.fillText("KC-" + id, canvas.width/2, canvas.height - 30);
}