[deploy] Emit frontend bundle as ESM for browser
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.renderServerStatsModule = renderServerStatsModule;
|
||||
const api_js_1 = require("../../services/api.js");
|
||||
const toast_js_1 = require("../../ui/toast.js");
|
||||
async function renderServerStatsModule(guildId) {
|
||||
import { api } from '../../services/api.js';
|
||||
import { showToast } from '../../ui/toast.js';
|
||||
export async function renderServerStatsModule(guildId) {
|
||||
const container = document.getElementById('module-serverstats');
|
||||
if (!container)
|
||||
return;
|
||||
container.innerHTML = '<p class="muted">Lade Server Stats...</p>';
|
||||
try {
|
||||
const data = await api_js_1.api.serverStats(guildId);
|
||||
const data = await api.serverStats(guildId);
|
||||
const cfg = data?.config || data || {};
|
||||
const items = cfg.items || [];
|
||||
container.innerHTML = `
|
||||
@@ -22,6 +19,6 @@ async function renderServerStatsModule(guildId) {
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
container.innerHTML = '<div class="empty-state">Server Stats konnten nicht geladen werden.</div>';
|
||||
(0, toast_js_1.showToast)('Fehler beim Laden der Server Stats', true);
|
||||
showToast('Fehler beim Laden der Server Stats', true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user