Repository navigation
Expand file tree
/
Copy pathxcodebots.html
More file actions
484 lines (428 loc) · 27.5 KB
/
Copy pathxcodebots.html
File metadata and controls
484 lines (428 loc) · 27.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XCode Bots - Discord Bot Management & Hosting</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- FontAwesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #0f172a;
color: #f8fafc;
}
.glow-purple {
box-shadow: 0 0 25px -5px rgba(124, 58, 237, 0.4);
}
.glass-panel {
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.gradient-text {
background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
</head>
<body class="min-h-screen flex flex-col justify-between selection:bg-purple-500 selection:text-white">
<!-- NAVIGATION -->
<header class="sticky top-0 z-40 glass-panel border-b border-slate-800">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center gap-3 cursor-pointer" onclick="switchTab('dashboard')">
<div class="w-10 h-10 rounded-xl bg-gradient-to-tr from-purple-600 to-indigo-500 flex items-center justify-center font-bold text-xl shadow-lg shadow-purple-500/30">
XC
</div>
<span class="text-xl font-extrabold tracking-tight">XCode <span class="gradient-text">Bots</span></span>
</div>
<nav class="hidden md:flex items-center gap-6 text-sm font-medium">
<button onclick="switchTab('dashboard')" class="text-slate-300 hover:text-purple-400 transition flex items-center gap-2">
<i class="fa-solid font-bold fa-terminal"></i> Dashboard & URLs
</button>
<a href="https://discord.gg/MUbJFJKCHu" target="_blank" class="text-slate-300 hover:text-purple-400 transition flex items-center gap-2">
<i class="fa-brands fa-discord"></i> Discord Support
</a>
</nav>
<div class="flex items-center gap-3">
<a href="https://discord.gg/MUbJFJKCHu" target="_blank" class="bg-indigo-600 hover:bg-indigo-500 text-white px-4 py-2 rounded-lg text-sm font-semibold transition flex items-center gap-2 shadow-md hover:shadow-indigo-500/20">
<i class="fa-brands fa-discord"></i> Join Community
</a>
</div>
</div>
</div>
</header>
<!-- MAIN CONTENT CONTAINER -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 flex-grow w-full">
<!-- DASHBOARD TAB -->
<section id="tab-dashboard" class="tab-content space-y-8">
<!-- HERO HERO SECTION -->
<div class="glass-panel p-8 rounded-2xl relative overflow-hidden glow-purple">
<div class="absolute -top-24 -right-24 w-96 h-96 bg-purple-600/20 rounded-full blur-3xl pointer-events-none"></div>
<div class="relative z-10 max-w-3xl">
<h1 class="text-3xl sm:text-4xl font-extrabold tracking-tight mb-3">
Verwalte deine <span class="gradient-text">Discord Bot Endpunkte</span>
</h1>
<p class="text-slate-400 text-base sm:text-lg mb-6">
Erstelle und konfiguriere automatisierte Webhook-Interaktions-URLs sowie rechtssichere Datenschutzerklärungs-URLs für deine Discord Bots.
</p>
<div class="flex flex-wrap gap-4">
<button onclick="openModal('addBotModal')" class="bg-purple-600 hover:bg-purple-500 text-white font-semibold px-5 py-2.5 rounded-xl transition flex items-center gap-2 shadow-lg shadow-purple-600/30">
<i class="fa-solid fa-plus"></i> Neuer Bot hinzufügen
</button>
<a href="https://discord.com/developers/applications" target="_blank" class="bg-slate-800 hover:bg-slate-700 text-slate-200 border border-slate-700 font-semibold px-5 py-2.5 rounded-xl transition flex items-center gap-2">
<i class="fa-solid fa-external-link"></i> Discord Developer Portal
</a>
</div>
</div>
</div>
<!-- BOTS LIST SECTION -->
<div class="space-y-4">
<div class="flex items-center justify-between">
<h2 class="text-xl font-bold text-slate-200 flex items-center gap-2">
<i class="fa-solid fa-robot text-purple-400"></i> Deine registrierten Bots
</h2>
<span id="botCountBadge" class="bg-slate-800 text-purple-400 text-xs font-semibold px-3 py-1 rounded-full border border-slate-700">0 Bots</span>
</div>
<div id="botsContainer" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Dynamic Bot Cards injected here via Javascript -->
</div>
</div>
</section>
<!-- IMPRESSUM TAB -->
<section id="tab-impressum" class="tab-content hidden glass-panel p-8 rounded-2xl space-y-6 max-w-4xl mx-auto">
<h1 class="text-3xl font-extrabold border-b border-slate-800 pb-4 text-purple-400">Impressum</h1>
<div class="space-y-4 text-slate-300">
<p class="text-sm text-slate-400">Angaben gemäß § 5 TMG / § 5 DDG</p>
<div class="bg-slate-900/50 p-4 rounded-xl border border-slate-800 space-y-1">
<p class="font-bold text-white text-lg">Johannes Ptak</p>
<p class="text-slate-400">Inhaber</p>
<p>Hauptstraße 5</p>
<p>56567 Deutschland</p>
</div>
<h3 class="text-lg font-bold text-white pt-2">Kontakt</h3>
<div class="bg-slate-900/50 p-4 rounded-xl border border-slate-800 space-y-2">
<p class="flex items-center gap-2">
<i class="fa-solid fa-envelope text-purple-400"></i>
<span>E-Mail Support:</span>
<a href="mailto:xcodeer@outlook.de" class="text-purple-400 hover:underline">xcodeer@outlook.de</a>
</p>
<p class="flex items-center gap-2">
<i class="fa-brands fa-discord text-indigo-400"></i>
<span>Discord Community & Support:</span>
<a href="https://discord.gg/MUbJFJKCHu" target="_blank" class="text-purple-400 hover:underline">discord.gg/xcode</a>
</p>
</div>
<h3 class="text-lg font-bold text-white pt-2">Haftung für Inhalte</h3>
<p class="text-sm leading-relaxed text-slate-400">
Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen.
</p>
<h3 class="text-lg font-bold text-white pt-2">Haftung für Links</h3>
<p class="text-sm leading-relaxed text-slate-400">
Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich.
</p>
</div>
</section>
<!-- DATENSCHUTZ TAB -->
<section id="tab-datenschutz" class="tab-content hidden glass-panel p-8 rounded-2xl space-y-6 max-w-4xl mx-auto">
<h1 class="text-3xl font-extrabold border-b border-slate-800 pb-4 text-purple-400">Datenschutzerklärung</h1>
<div class="space-y-6 text-slate-300 text-sm leading-relaxed">
<div>
<h3 class="text-base font-bold text-white mb-2">1. Datenschutz auf einen Blick</h3>
<p class="text-slate-400">
Die folgenden Hinweise geben einen einfachen Überblick darüber, was mit Ihren personenbezogenen Daten passiert, wenn Sie unsere Website oder unsere Discord-Bots nutzen. Personenbezogene Daten sind alle Daten, mit denen Sie persönlich identifiziert werden können.
</p>
</div>
<div class="bg-slate-900/50 p-4 rounded-xl border border-slate-800">
<h3 class="text-base font-bold text-white mb-2">2. Verantwortliche Stelle</h3>
<p>Johannes Ptak (Inhaber)</p>
<p>Hauptstraße 5, 56567 Deutschland</p>
<p>E-Mail: <a href="mailto:xcodeer@outlook.de" class="text-purple-400 hover:underline">xcodeer@outlook.de</a></p>
</div>
<div>
<h3 class="text-base font-bold text-white mb-2">3. Datenerfassung bei der Nutzung unserer Discord Bots</h3>
<p class="text-slate-400 mb-2">
Bei der Interaktion mit unseren Discord-Bots werden systembedingt technische Daten verarbeitet, um die Funktionalität zu gewährleisten:
</p>
<ul class="list-disc list-inside space-y-1 text-slate-400 pl-2">
<li>Discord User-ID (zur Identifikation von Befehlen und Rechten)</li>
<li>Discord Server-ID (Guild ID)</li>
<li>Interaktions-Logs (Eingabe von Slash-Commands)</li>
</ul>
<p class="text-slate-400 mt-2">
Diese Daten werden nicht an Dritte weitergegeben und ausschließlich zur Erbringung der Bot-Services gespeichert.
</p>
</div>
<div>
<h3 class="text-base font-bold text-white mb-2">4. Cookies & Speicherung</h3>
<p class="text-slate-400">
Diese Website nutzt den lokalen Speicher Ihres Browsers (`localStorage`), um Ihre angelegten Bots sowie Ihre Cookie-Einstellungen lokal auf Ihrem Gerät zu speichern. Es findet kein Tracking zu Werbezwecken statt.
</p>
</div>
</div>
</section>
<!-- AGB TAB -->
<section id="tab-agb" class="tab-content hidden glass-panel p-8 rounded-2xl space-y-6 max-w-4xl mx-auto">
<h1 class="text-3xl font-extrabold border-b border-slate-800 pb-4 text-purple-400">Allgemeine Geschäftsbedingungen (AGB)</h1>
<div class="space-y-6 text-slate-300 text-sm leading-relaxed">
<div>
<h3 class="text-base font-bold text-white mb-2">§ 1 Geltungsbereich</h3>
<p class="text-slate-400">
Diese Allgemeinen Geschäftsbedingungen gelten für die Nutzung der von XCode Bots (Inhaber Johannes Ptak) bereitgestellten Dienste, Webseiten und Discord-Bot-Systeme.
</p>
</div>
<div>
<h3 class="text-base font-bold text-white mb-2">§ 2 Leistungsangebot</h3>
<p class="text-slate-400">
XCode Bots stellt Infrastrukturen, Hosting-Schnittstellen und Weiterleitungen für Discord Interaktions-Endpunkte sowie Datenschutzerklärungs-URLs zur Verfügung. Ein Anspruch auf 100% Unterbrechungsfreie Verfügbarkeit besteht bei kostenfreien Diensten nicht.
</p>
</div>
<div>
<h3 class="text-base font-bold text-white mb-2">§ 3 Pflichten der Nutzer</h3>
<p class="text-slate-400">
Nutzer verpflichten sich, die bereitgestellten Bots und Endpunkte nicht für rechtswidrige Zwecke, Spam oder Angriffe auf Discord-Infrastrukturen zu missbrauchen. Bei Verstoß behalten wir uns die Sperrung vor.
</p>
</div>
<div>
<h3 class="text-base font-bold text-white mb-2">§ 4 Support</h3>
<p class="text-slate-400">
Support bezüglich der Dienste wird primär über den offiziellen Discord Support Server (<a href="https://discord.gg/MUbJFJKCHu" target="_blank" class="text-purple-400 hover:underline">discord.gg/xcode</a>) oder per E-Mail unter <a href="mailto:xcodeer@outlook.de" class="text-purple-400 hover:underline">xcodeer@outlook.de</a> geleistet.
</p>
</div>
</div>
</section>
</main>
<!-- FOOTER -->
<footer class="glass-panel border-t border-slate-800 py-8 mt-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row items-center justify-between gap-4">
<div class="flex items-center gap-2 text-sm text-slate-400">
<span>© 2026 <strong>XCode Bots</strong> – Johannes Ptak</span>
</div>
<div class="flex flex-wrap justify-center gap-6 text-sm text-slate-400">
<button onclick="switchTab('impressum')" class="hover:text-purple-400 transition">Impressum</button>
<button onclick="switchTab('datenschutz')" class="hover:text-purple-400 transition">Datenschutzerklärung</button>
<button onclick="switchTab('agb')" class="hover:text-purple-400 transition">AGB</button>
<a href="https://discord.gg/MUbJFJKCHu" target="_blank" class="text-indigo-400 hover:text-indigo-300 transition flex items-center gap-1">
<i class="fa-brands fa-discord"></i> Discord Support
</a>
</div>
</div>
</footer>
<!-- ADD BOT MODAL -->
<div id="addBotModal" class="fixed inset-0 bg-black/70 backdrop-blur-sm z-50 hidden flex items-center justify-center p-4">
<div class="glass-panel max-w-lg w-full rounded-2xl p-6 border border-slate-700 space-y-6 animate-fade-in">
<div class="flex items-center justify-between border-b border-slate-800 pb-3">
<h3 class="text-xl font-bold text-white flex items-center gap-2">
<i class="fa-solid fa-plus-circle text-purple-400"></i> Neuen Bot anlegen
</h3>
<button onclick="closeModal('addBotModal')" class="text-slate-400 hover:text-white text-lg">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<form id="botForm" onsubmit="saveBot(event)" class="space-y-4">
<div>
<label class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Bot Name</label>
<input type="text" id="botName" placeholder="z.B. Ticket Bot X" required class="w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-2.5 text-white focus:outline-none focus:border-purple-500 transition">
</div>
<div>
<label class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Discord Application ID / Client ID</label>
<input type="text" id="botAppId" placeholder="123456789012345678" required pattern="[0-9]+" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-2.5 text-white focus:outline-none focus:border-purple-500 transition">
<span class="text-xs text-slate-500 mt-1 block">Zu finden im Discord Developer Portal unter General Information.</span>
</div>
<div>
<label class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Eigener Server Host Endpoint (Optional)</label>
<input type="url" id="botCustomHost" placeholder="https://api.meinserver.de" class="w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-2.5 text-white focus:outline-none focus:border-purple-500 transition">
<span class="text-xs text-slate-500 mt-1 block">Leer lassen für Standard-XCode Endpunkt.</span>
</div>
<div class="flex justify-end gap-3 pt-4 border-t border-slate-800">
<button type="button" onclick="closeModal('addBotModal')" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition">
Abbrechen
</button>
<button type="submit" class="bg-purple-600 hover:bg-purple-500 text-white font-semibold px-5 py-2 rounded-xl transition shadow-lg shadow-purple-600/30">
Bot Hinzufügen
</button>
</div>
</form>
</div>
</div>
<!-- COOKIE BANNER -->
<div id="cookieBanner" class="fixed bottom-4 right-4 max-w-md z-50 glass-panel border border-slate-700 p-5 rounded-2xl shadow-2xl space-y-3 hidden">
<div class="flex items-start gap-3">
<div class="text-2xl text-amber-400">
<i class="fa-solid fa-cookie-bite"></i>
</div>
<div>
<h4 class="font-bold text-white text-sm">Cookie- & Speicherhinweis</h4>
<p class="text-xs text-slate-400 mt-1 leading-relaxed">
Wir verwenden ausschließlich technisch notwendige Speicherung (`localStorage`), um Ihre eingetragenen Bot-URLs und Einstellungen lokal auf Ihrem Gerät zu sichern.
</p>
</div>
</div>
<div class="flex justify-end gap-2 pt-2">
<button onclick="acceptCookies()" class="bg-purple-600 hover:bg-purple-500 text-white text-xs font-semibold px-4 py-2 rounded-lg transition shadow-md">
Akzeptieren & Speichern
</button>
</div>
</div>
<!-- TOAST NOTIFICATION -->
<div id="toast" class="fixed top-20 right-5 z-50 bg-slate-800 text-white px-4 py-3 rounded-xl border border-purple-500/40 shadow-xl flex items-center gap-3 transition transform translate-x-full opacity-0">
<i id="toastIcon" class="fa-solid fa-check text-green-400"></i>
<span id="toastMsg" class="text-sm font-medium">Benachrichtigung</span>
</div>
<!-- JAVASCRIPT APP LOGIC -->
<script>
// State Management
let bots = JSON.parse(localStorage.getItem('xcode_bots') || '[]');
// Initialize App
document.addEventListener('DOMContentLoaded', () => {
renderBots();
checkCookieConsent();
});
// Tab Switching Logic
function switchTab(tabName) {
document.querySelectorAll('.tab-content').forEach(el => el.classList.add('hidden'));
const activeTab = document.getElementById(`tab-${tabName}`);
if (activeTab) {
activeTab.classList.remove('hidden');
}
window.scrollTo({ top: 0, behavior: 'smooth' });
}
// Modal Handlers
function openModal(id) {
document.getElementById(id).classList.remove('hidden');
}
function closeModal(id) {
document.getElementById(id).classList.add('hidden');
}
// Cookie Consent
function checkCookieConsent() {
if (!localStorage.getItem('xcode_cookies_accepted')) {
document.getElementById('cookieBanner').classList.remove('hidden');
}
}
function acceptCookies() {
localStorage.setItem('xcode_cookies_accepted', 'true');
document.getElementById('cookieBanner').classList.add('hidden');
showToast('Einstellungen gespeichert');
}
// Bot Management
function saveBot(e) {
e.preventDefault();
const name = document.getElementById('botName').value.trim();
const appId = document.getElementById('botAppId').value.trim();
const customHost = document.getElementById('botCustomHost').value.trim();
const baseUrl = window.location.origin;
const host = customHost ? customHost : `${baseUrl}/api/v1`;
const newBot = {
id: Date.now().toString(),
name,
appId,
interactionUrl: `${host}/discord/interactions/${appId}`,
privacyUrl: `${baseUrl}/#datenschutz?botId=${appId}`
};
bots.push(newBot);
localStorage.setItem('xcode_bots', JSON.stringify(bots));
renderBots();
closeModal('addBotModal');
document.getElementById('botForm').reset();
showToast('Discord Bot erfolgreich hinzugefügt!');
}
function deleteBot(id) {
if (confirm('Möchtest du diesen Bot wirklich entfernen?')) {
bots = bots.filter(b => b.id !== id);
localStorage.setItem('xcode_bots', JSON.stringify(bots));
renderBots();
showToast('Bot gelöscht');
}
}
function renderBots() {
const container = document.getElementById('botsContainer');
const badge = document.getElementById('botCountBadge');
badge.innerText = `${bots.length} Bot${bots.length === 1 ? '' : 's'}`;
if (bots.length === 0) {
container.innerHTML = `
<div class="col-span-full glass-panel p-12 text-center rounded-2xl space-y-4">
<div class="w-16 h-16 bg-slate-800 text-purple-400 rounded-full flex items-center justify-center mx-auto text-2xl border border-slate-700">
<i class="fa-solid fa-robot"></i>
</div>
<h3 class="text-lg font-bold text-slate-200">Keine Bots registriert</h3>
<p class="text-slate-400 text-sm max-w-sm mx-auto">
Füge deinen ersten Discord Bot hinzu, um Interaktions-Endpunkt-URLs und Datenschutzerklärungen zu generieren.
</p>
<button onclick="openModal('addBotModal')" class="bg-purple-600 hover:bg-purple-500 text-white font-semibold px-5 py-2 rounded-xl text-sm transition">
Jetzt Bot hinzufügen
</button>
</div>
`;
return;
}
container.innerHTML = bots.map(bot => `
<div class="glass-panel p-6 rounded-2xl space-y-5 border border-slate-800 hover:border-purple-500/50 transition">
<div class="flex items-center justify-between border-b border-slate-800 pb-3">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-xl bg-purple-950/60 border border-purple-500/30 text-purple-400 flex items-center justify-center font-bold">
<i class="fa-solid fa-robot"></i>
</div>
<div>
<h3 class="font-bold text-white text-base">${escapeHtml(bot.name)}</h3>
<p class="text-xs text-slate-400">App-ID: ${escapeHtml(bot.appId)}</p>
</div>
</div>
<button onclick="deleteBot('${bot.id}')" class="text-slate-500 hover:text-red-400 transition text-sm">
<i class="fa-solid fa-trash-can"></i>
</button>
</div>
<!-- ENDPOINT URL -->
<div class="space-y-1.5">
<label class="text-xs font-semibold text-slate-400 flex items-center justify-between">
<span>Interaktions-Endpunkt-URL</span>
<span class="text-[10px] bg-purple-900/50 text-purple-300 px-2 py-0.5 rounded">Discord Portal</span>
</label>
<div class="flex items-center gap-2 bg-slate-900 border border-slate-800 rounded-xl p-2">
<input type="text" readonly value="${bot.interactionUrl}" class="bg-transparent text-xs text-purple-300 w-full focus:outline-none font-mono">
<button onclick="copyToClipboard('${bot.interactionUrl}')" class="bg-slate-800 hover:bg-purple-600 text-slate-300 hover:text-white text-xs px-3 py-1.5 rounded-lg transition flex items-center gap-1">
<i class="fa-regular fa-copy"></i> Copy
</button>
</div>
</div>
<!-- PRIVACY URL -->
<div class="space-y-1.5">
<label class="text-xs font-semibold text-slate-400 flex items-center justify-between">
<span>Datenschutzerklärung URL</span>
<span class="text-[10px] bg-indigo-900/50 text-indigo-300 px-2 py-0.5 rounded">Rechtlich</span>
</label>
<div class="flex items-center gap-2 bg-slate-900 border border-slate-800 rounded-xl p-2">
<input type="text" readonly value="${bot.privacyUrl}" class="bg-transparent text-xs text-indigo-300 w-full focus:outline-none font-mono">
<button onclick="copyToClipboard('${bot.privacyUrl}')" class="bg-slate-800 hover:bg-indigo-600 text-slate-300 hover:text-white text-xs px-3 py-1.5 rounded-lg transition flex items-center gap-1">
<i class="fa-regular fa-copy"></i> Copy
</button>
</div>
</div>
</div>
`).join('');
}
// Helper Utilities
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(() => {
showToast('URL in die Zwischenablage kopiert!');
});
}
function showToast(message) {
const toast = document.getElementById('toast');
document.getElementById('toastMsg').innerText = message;
toast.classList.remove('translate-x-full', 'opacity-0');
setTimeout(() => {
toast.classList.add('translate-x-full', 'opacity-0');
}, 3000);
}
function escapeHtml(str) {
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
}
</script>
</body>
</html>