narrow desktop breakpoint constraint relaxed somewhat to accomodate more fringe-case window aspect ratios; #id_gear_btn now, like #id_kit_btn, restyles to contain --quaUser rgb value when menu is active; dashboard.html include ordering switched for #id_dash_applet_menu & #id_gear_btn, to fix an issue causing the menu to overlay the btn instead of the other way around
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Disco DeDisco
2026-03-15 16:39:14 -04:00
parent 2e24175ec8
commit ff7b71792f
8 changed files with 79 additions and 50 deletions

View File

@@ -9,8 +9,10 @@
});
btn.addEventListener('click', function () {
if (dialog.open) {
dialog.close();
if (btn.classList.contains('active')) {
dialog.removeAttribute('open');
btn.classList.remove('active');
clearSelection();
return;
}
fetch(btn.dataset.kitUrl, {
@@ -61,9 +63,9 @@
});
function attachCardListeners() {
dialog.querySelectorAll('.kit-card').forEach(function (card) {
dialog.querySelectorAll('.token[data-token-id]').forEach(function (card) {
card.addEventListener('click', function () {
dialog.querySelectorAll('.kit-card.selected').forEach(function (c) {
dialog.querySelectorAll('.token[data-token-id].selected').forEach(function (c) {
c.classList.remove('selected');
});
card.classList.add('selected');
@@ -71,6 +73,21 @@
var slot = document.querySelector('.token-slot');
if (slot) slot.classList.add('ready');
});
card.addEventListener('mouseenter', function () {
var tooltip = card.querySelector('.token-tooltip');
if (!tooltip) return;
var rect = card.getBoundingClientRect();
tooltip.style.position = 'fixed';
tooltip.style.bottom = (window.innerHeight - rect.top + 8) + 'px';
tooltip.style.left = rect.left + 'px';
tooltip.style.display = 'block';
});
card.addEventListener('mouseleave', function () {
var tooltip = card.querySelector('.token-tooltip');
if (tooltip) tooltip.style.display = '';
});
});
}