added thumbs generation for performation and also added a new deck format for registration

This commit is contained in:
2026-03-08 05:40:53 -07:00
parent 78abb582dd
commit 4713bbd54b
11 changed files with 1255 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
(function () {
const { resolveTarotCardImage, getTarotCardDisplayName, getTarotCardSearchAliases } = window.TarotCardImages || {};
const { resolveTarotCardImage, resolveTarotCardThumbnail, getTarotCardDisplayName, getTarotCardSearchAliases } = window.TarotCardImages || {};
const tarotHouseUi = window.TarotHouseUi || {};
const tarotRelationsUi = window.TarotRelationsUi || {};
const tarotCardDerivations = window.TarotCardDerivations || {};
@@ -339,6 +339,7 @@
getMonthRefsByCardId: () => state.monthRefsByCardId,
getMagickDataset: () => state.magickDataset,
resolveTarotCardImage,
resolveTarotCardThumbnail,
getDisplayCardName,
buildTypeLabel,
clearChildren,
@@ -751,6 +752,7 @@
tarotHouseUi.init?.({
resolveTarotCardImage,
resolveTarotCardThumbnail,
getDisplayCardName,
clearChildren,
normalizeTarotCardLookupName,
@@ -934,11 +936,16 @@
if (elements.tarotDetailImageEl) {
elements.tarotDetailImageEl.addEventListener("click", () => {
const src = elements.tarotDetailImageEl.getAttribute("src") || "";
if (!src || elements.tarotDetailImageEl.style.display === "none") {
if (elements.tarotDetailImageEl.style.display === "none" || !state.selectedCardId) {
return;
}
window.TarotUiLightbox?.open?.(src, elements.tarotDetailImageEl.alt || "Tarot card enlarged image");
const request = buildLightboxCardRequestById(state.selectedCardId);
if (!request?.src) {
return;
}
window.TarotUiLightbox?.open?.(request);
});
}