[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,15 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderAutomations = renderAutomations;
const api_js_1 = require("../../services/api.js");
const toast_js_1 = require("../../ui/toast.js");
async function renderAutomations(guildId) {
import { api } from '../../services/api.js';
import { showToast } from '../../ui/toast.js';
export async function renderAutomations(guildId) {
const container = document.getElementById('tickets-automations');
if (!container)
return;
container.innerHTML = '<p class="muted">Lade Automationen...</p>';
try {
const data = await api_js_1.api.automations(guildId);
const data = await api.automations(guildId);
const rules = data?.rules || data || [];
if (!rules.length) {
container.innerHTML = '<div class="empty-state">Keine Regeln angelegt.</div>';
@@ -37,6 +34,6 @@ async function renderAutomations(guildId) {
catch (err) {
console.error(err);
container.innerHTML = '<div class="empty-state">Automationen konnten nicht geladen werden.</div>';
(0, toast_js_1.showToast)('Fehler beim Laden der Automationen', true);
showToast('Fehler beim Laden der Automationen', true);
}
}