unified header_title template values across dashboard applet destination pages; styled &/ added applet titles across all applets
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-11 14:50:08 -04:00
parent 50ee983e27
commit 8807d31274
12 changed files with 52 additions and 21 deletions

View File

@@ -23,15 +23,22 @@ const initWallet = () => {
const section = addBtn.closest('section');
const rowPx = 3 * parseFloat(getComputedStyle(document.documentElement).fontSize);
const updateRows = () => {
const rows = Math.ceil(section.scrollHeight / rowPx) + 1;
const sectionTop = section.getBoundingClientRect().top;
let maxBottom = sectionTop;
for (const child of section.children) {
if (child.hidden) continue;
maxBottom = Math.max(maxBottom, child.getBoundingClientRect().bottom);
}
const padBot = parseFloat(getComputedStyle(section).paddingBottom);
const rows = Math.ceil((maxBottom - sectionTop + padBot) / rowPx) + 1;
section.style.setProperty('--applet-rows', String(rows));
};
paymentEl.on('ready', () => {
updateRows();
const iframe = document.querySelector('#id_stripe_payment_element iframe');
if (iframe) {
const obs = new MutationObserver(updateRows);
obs.observe(iframe, { attributes: true, attributeFilter: ['style'] });
const stripeContainer = document.getElementById('id_stripe_payment_element');
if (stripeContainer) {
const obs = new ResizeObserver(updateRows);
obs.observe(stripeContainer);
section._stripeObs = obs;
}
});