UI-Polish: Telegram-Bot-Page und Agent-Page aufgeräumt

- Telegram-Bot-Page: Webhook-Secret und Webhook-Section immer sichtbar (hidden-Logik entfernt)
- Agent-Page: Public-Checkbox in scrollbaren Bereich verschoben, Sichtbarkeit-Label hinzugefügt
- Konsistente Bezeichnung: Public → Öffentlich mit Hint-Text
- Session-Page: Redundantes Telegram-Label entfernt
- Telegram-Bots-Überschrift: Icon entfernt (konsistent mit anderen Sektionen)
This commit is contained in:
Meleki committed 2026-03-09 06:59:03 +01:00
1 parent 8357bc66c5
commit 42d366ea47
2 files changed
+21 -33

No files matched your search

+20 -23
View File
@@ -85,7 +85,7 @@
</section> </section>
<section> <section>
<div class="section-header"> <div class="section-header">
<h2><i class="fa fa-paper-plane"></i> Telegram Bots</h2> <h2>Telegram Bots</h2>
<button id="newTelegramBotBtn" class="section-add-btn"><i class="fa fa-plus"></i> Neuer Bot</button> <button id="newTelegramBotBtn" class="section-add-btn"><i class="fa fa-plus"></i> Neuer Bot</button>
</div> </div>
<div class="card-grid" id="telegramBotCards"></div> <div class="card-grid" id="telegramBotCards"></div>
@@ -150,7 +150,6 @@
<label>Benutzerdefinierte Befehle</label> <label>Benutzerdefinierte Befehle</label>
<div class="custom-commands" id="customCommandsList"></div> <div class="custom-commands" id="customCommandsList"></div>
<button type="button" id="addCommandBtn" class="add-cmd-btn">+ Befehl hinzufügen</button> <button type="button" id="addCommandBtn" class="add-cmd-btn">+ Befehl hinzufügen</button>
<label><i class="fa fa-paper-plane"></i> <b>Telegram</b></label>
<label>Telegram Bot</label> <label>Telegram Bot</label>
<div id="telegramBotSelectCard" class="agent-select-card"> <div id="telegramBotSelectCard" class="agent-select-card">
<div class="agent-select-empty"><i class="fa fa-paper-plane"></i> Kein Bot zugewiesen</div> <div class="agent-select-empty"><i class="fa fa-paper-plane"></i> Kein Bot zugewiesen</div>
@@ -241,12 +240,13 @@
<label>Benutzerdefinierte Befehle</label> <label>Benutzerdefinierte Befehle</label>
<div class="custom-commands" id="agentCommandsList"></div> <div class="custom-commands" id="agentCommandsList"></div>
<button type="button" id="agentAddCommandBtn" class="add-cmd-btn">+ Befehl hinzufügen</button> <button type="button" id="agentAddCommandBtn" class="add-cmd-btn">+ Befehl hinzufügen</button>
<label>Sichtbarkeit</label>
<label class="checkbox-label">
<input type="checkbox" id="agentIsPublic">
Öffentlich <span class="checkbox-hint">(andere User können diesen Agent in ihren Sessions verwenden)</span>
</label>
</div> </div>
</div> </div>
<label class="checkbox-label">
<input type="checkbox" id="agentIsPublic">
Public <span class="checkbox-hint">(andere User können diesen Agent in ihren Sessions verwenden)</span>
</label>
<div class="form-actions"> <div class="form-actions">
<button id="agentSaveBtn">Speichern</button> <button id="agentSaveBtn">Speichern</button>
<button id="agentCancelBtn">Abbrechen</button> <button id="agentCancelBtn">Abbrechen</button>
@@ -323,26 +323,23 @@
<label>Bot-Token</label> <label>Bot-Token</label>
<input type="text" id="tgBotToken" placeholder="123456:ABC-DEF..." autocomplete="off"> <input type="text" id="tgBotToken" placeholder="123456:ABC-DEF..." autocomplete="off">
<small class="form-hint">Erstelle einen Bot via <a href="https://t.me/BotFather" target="_blank">@BotFather</a></small> <small class="form-hint">Erstelle einen Bot via <a href="https://t.me/BotFather" target="_blank">@BotFather</a></small>
<label>Webhook-Secret</label>
<div class="input-with-btn">
<input type="text" id="tgBotSecret" readonly>
<button type="button" id="tgBotCopySecret" class="icon-btn" title="Kopieren"><i class="fa fa-clipboard"></i></button>
</div>
<label><i class="fa fa-plug"></i> <b>Webhook</b></label>
<div id="tgBotWebhookStatus" class="form-status-box"></div>
<div class="form-actions-inline">
<button type="button" id="tgBotWebhookRegister" class="positive-btn"><i class="fa fa-plug"></i> Registrieren</button>
<button type="button" id="tgBotWebhookInfo"><i class="fa fa-info-circle"></i> Status prüfen</button>
<button type="button" id="tgBotWebhookDelete" class="danger-btn"><i class="fa fa-unlink"></i> Entfernen</button>
</div>
<label>Sichtbarkeit</label>
<label class="checkbox-label"> <label class="checkbox-label">
<input type="checkbox" id="tgBotPublic"> <input type="checkbox" id="tgBotPublic">
<span>Public – andere User können diesen Bot in ihren Sessions verwenden</span> Öffentlich <span class="checkbox-hint">(andere User können diesen Bot in ihren Sessions verwenden)</span>
</label> </label>
<div id="tgBotSecretRow" hidden>
<label>Webhook-Secret</label>
<div class="input-with-btn">
<input type="text" id="tgBotSecret" readonly>
<button type="button" id="tgBotCopySecret" class="icon-btn" title="Kopieren"><i class="fa fa-clipboard"></i></button>
</div>
</div>
<div id="tgBotWebhookSection" hidden>
<label><i class="fa fa-plug"></i> <b>Webhook</b></label>
<div id="tgBotWebhookStatus" class="form-status-box"></div>
<div class="form-actions-inline">
<button type="button" id="tgBotWebhookRegister" class="positive-btn"><i class="fa fa-plug"></i> Registrieren</button>
<button type="button" id="tgBotWebhookInfo"><i class="fa fa-info-circle"></i> Status prüfen</button>
<button type="button" id="tgBotWebhookDelete" class="danger-btn"><i class="fa fa-unlink"></i> Entfernen</button>
</div>
</div>
<div class="form-actions"> <div class="form-actions">
<button id="tgBotSaveBtn">Speichern</button> <button id="tgBotSaveBtn">Speichern</button>
<button id="tgBotCancelBtn">Abbrechen</button> <button id="tgBotCancelBtn">Abbrechen</button>
+1 -10
View File
@@ -8,10 +8,8 @@ registerPage('telegram-bot', {
var titleEl = document.getElementById('telegramBotPageTitle'); var titleEl = document.getElementById('telegramBotPageTitle');
var nameInput = document.getElementById('tgBotName'); var nameInput = document.getElementById('tgBotName');
var tokenInput = document.getElementById('tgBotToken'); var tokenInput = document.getElementById('tgBotToken');
var secretRow = document.getElementById('tgBotSecretRow');
var secretInput = document.getElementById('tgBotSecret'); var secretInput = document.getElementById('tgBotSecret');
var copySecretBtn = document.getElementById('tgBotCopySecret'); var copySecretBtn = document.getElementById('tgBotCopySecret');
var webhookSection = document.getElementById('tgBotWebhookSection');
var webhookStatus = document.getElementById('tgBotWebhookStatus'); var webhookStatus = document.getElementById('tgBotWebhookStatus');
var webhookRegisterBtn = document.getElementById('tgBotWebhookRegister'); var webhookRegisterBtn = document.getElementById('tgBotWebhookRegister');
var webhookInfoBtn = document.getElementById('tgBotWebhookInfo'); var webhookInfoBtn = document.getElementById('tgBotWebhookInfo');
@@ -35,14 +33,7 @@ registerPage('telegram-bot', {
publicCheckbox.checked = bot.isPublic || false; publicCheckbox.checked = bot.isPublic || false;
deleteBtn.hidden = false; deleteBtn.hidden = false;
// Webhook-Secret anzeigen secretInput.value = bot.webhookSecret || ``;
if (bot.webhookSecret) {
secretRow.hidden = false;
secretInput.value = bot.webhookSecret;
}
// Webhook-Section anzeigen
webhookSection.hidden = false;
_loadWebhookStatus(bot.botId, webhookStatus); _loadWebhookStatus(bot.botId, webhookStatus);
} else { } else {
titleEl.textContent = 'Neuer Telegram Bot'; titleEl.textContent = 'Neuer Telegram Bot';