[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,11 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initSelectionView = initSelectionView;
const api_js_1 = require("../services/api.js");
const store_js_1 = require("../state/store.js");
const toast_js_1 = require("../ui/toast.js");
async function initSelectionView() {
const cfg = (0, store_js_1.getConfig)();
import { api } from '../services/api.js';
import { getConfig } from '../state/store.js';
import { showToast } from '../ui/toast.js';
export async function initSelectionView() {
const cfg = getConfig();
const grid = document.getElementById('guildGrid');
const logoutBtn = document.getElementById('logoutBtn');
const userInfo = document.getElementById('userInfo');
@@ -15,7 +12,7 @@ async function initSelectionView() {
});
}
try {
const me = await api_js_1.api.me();
const me = await api.me();
if (userInfo && me?.user)
userInfo.textContent = `${me.user.username}#${me.user.discriminator}`;
}
@@ -26,7 +23,7 @@ async function initSelectionView() {
return;
grid.innerHTML = '<div class="muted">Lade Guilds...</div>';
try {
const data = await api_js_1.api.guilds();
const data = await api.guilds();
grid.innerHTML = '';
(data.guilds || []).forEach((g) => {
const card = document.createElement('div');
@@ -54,6 +51,6 @@ async function initSelectionView() {
catch (err) {
console.error(err);
grid.innerHTML = '<div class="empty-state">Fehler beim Laden der Guilds</div>';
(0, toast_js_1.showToast)('Guilds konnten nicht geladen werden', true);
showToast('Guilds konnten nicht geladen werden', true);
}
}