update ui and add new audio components

This commit is contained in:
2026-03-14 00:45:15 -07:00
parent aa3f23c92c
commit 843c2fe96f
13 changed files with 2458 additions and 155 deletions

View File

@@ -19,6 +19,7 @@
|| typeof nowUiHelpers.getSignStartDate !== "function"
|| typeof nowUiHelpers.getDisplayTarotName !== "function"
|| typeof nowUiHelpers.setNowCardImage !== "function"
|| typeof nowUiHelpers.renderNowPlanetPositions !== "function"
|| typeof nowUiHelpers.updateNowStats !== "function"
) {
throw new Error("NowUiHelpers module must load before ui-now.js");
@@ -41,19 +42,10 @@
function renderNowStatsFromSnapshot(elements, stats) {
if (elements.nowStatsPlanetsEl) {
elements.nowStatsPlanetsEl.replaceChildren();
const planetPositions = Array.isArray(stats?.planetPositions) ? stats.planetPositions : [];
if (!planetPositions.length) {
elements.nowStatsPlanetsEl.textContent = "--";
} else {
planetPositions.forEach((position) => {
const item = document.createElement("div");
item.className = "now-stats-planet";
item.textContent = String(position?.label || "").trim() || "--";
elements.nowStatsPlanetsEl.appendChild(item);
});
}
nowUiHelpers.renderNowPlanetPositions(
elements.nowStatsPlanetsEl,
Array.isArray(stats?.planetPositions) ? stats.planetPositions : []
);
}
if (elements.nowStatsSabianEl) {