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:
1 parent
8357bc66c5
commit
42d366ea47
2 files changed
+21
-33
No files matched your search
+20
-23
@@ -85,7 +85,7 @@
|
||||
</section>
|
||||
<section>
|
||||
<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>
|
||||
</div>
|
||||
<div class="card-grid" id="telegramBotCards"></div>
|
||||
@@ -150,7 +150,6 @@
|
||||
<label>Benutzerdefinierte Befehle</label>
|
||||
<div class="custom-commands" id="customCommandsList"></div>
|
||||
<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>
|
||||
<div id="telegramBotSelectCard" class="agent-select-card">
|
||||
<div class="agent-select-empty"><i class="fa fa-paper-plane"></i> Kein Bot zugewiesen</div>
|
||||
@@ -241,12 +240,13 @@
|
||||
<label>Benutzerdefinierte Befehle</label>
|
||||
<div class="custom-commands" id="agentCommandsList"></div>
|
||||
<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>
|
||||
<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">
|
||||
<button id="agentSaveBtn">Speichern</button>
|
||||
<button id="agentCancelBtn">Abbrechen</button>
|
||||
@@ -323,26 +323,23 @@
|
||||
<label>Bot-Token</label>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
<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">
|
||||
<button id="tgBotSaveBtn">Speichern</button>
|
||||
<button id="tgBotCancelBtn">Abbrechen</button>
|
||||
|
||||
@@ -8,10 +8,8 @@ registerPage('telegram-bot', {
|
||||
var titleEl = document.getElementById('telegramBotPageTitle');
|
||||
var nameInput = document.getElementById('tgBotName');
|
||||
var tokenInput = document.getElementById('tgBotToken');
|
||||
var secretRow = document.getElementById('tgBotSecretRow');
|
||||
var secretInput = document.getElementById('tgBotSecret');
|
||||
var copySecretBtn = document.getElementById('tgBotCopySecret');
|
||||
var webhookSection = document.getElementById('tgBotWebhookSection');
|
||||
var webhookStatus = document.getElementById('tgBotWebhookStatus');
|
||||
var webhookRegisterBtn = document.getElementById('tgBotWebhookRegister');
|
||||
var webhookInfoBtn = document.getElementById('tgBotWebhookInfo');
|
||||
@@ -35,14 +33,7 @@ registerPage('telegram-bot', {
|
||||
publicCheckbox.checked = bot.isPublic || false;
|
||||
deleteBtn.hidden = false;
|
||||
|
||||
// Webhook-Secret anzeigen
|
||||
if (bot.webhookSecret) {
|
||||
secretRow.hidden = false;
|
||||
secretInput.value = bot.webhookSecret;
|
||||
}
|
||||
|
||||
// Webhook-Section anzeigen
|
||||
webhookSection.hidden = false;
|
||||
secretInput.value = bot.webhookSecret || ``;
|
||||
_loadWebhookStatus(bot.botId, webhookStatus);
|
||||
} else {
|
||||
titleEl.textContent = 'Neuer Telegram Bot';
|
||||
|
||||
Reference in new issue
Block a user