[deploy] Emit frontend bundle as ESM for browser
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s

This commit is contained in:
Pascal Prießnitz
2025-12-04 17:06:27 +01:00
parent 18a47c0426
commit 7a296f7b4a
28 changed files with 185 additions and 273 deletions

View File

@@ -1,18 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toggleSwitch = toggleSwitch;
exports.getSwitch = getSwitch;
exports.setSwitch = setSwitch;
function toggleSwitch(el, force) {
export function toggleSwitch(el, force) {
if (!el)
return;
const next = force === undefined ? !el.classList.contains('on') : force;
el.classList.toggle('on', next);
}
function getSwitch(el) {
export function getSwitch(el) {
return el?.classList.contains('on') ?? false;
}
function setSwitch(el, value) {
export function setSwitch(el, value) {
if (!el)
return;
el.classList.toggle('on', value);