[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.initEventsSection = initEventsSection;
const api_js_1 = require("../../services/api.js");
const toast_js_1 = require("../../ui/toast.js");
async function initEventsSection(guildId) {
import { api } from '../../services/api.js';
import { showToast } from '../../ui/toast.js';
export async function initEventsSection(guildId) {
const section = document.getElementById('section-events');
if (!section)
return;
section.innerHTML = '<p class="muted">Lade Events...</p>';
try {
const data = await api_js_1.api.events(guildId);
const data = await api.events(guildId);
const events = data?.events || data || [];
section.innerHTML = '<h2 class="section-title">Events</h2>';
if (!events.length) {
@@ -38,6 +35,6 @@ async function initEventsSection(guildId) {
catch (err) {
console.error(err);
section.innerHTML = '<div class="empty-state">Events konnten nicht geladen werden.</div>';
(0, toast_js_1.showToast)('Fehler beim Laden der Events', true);
showToast('Fehler beim Laden der Events', true);
}
}