Unify admin setting switch layout

This commit is contained in:
rajchales-monito
2026-07-30 11:06:04 +02:00
parent e29b3a71ae
commit 4ea110ee11
2 changed files with 24 additions and 15 deletions
+11 -4
View File
@@ -152,6 +152,9 @@ label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.switch { display: flex; align-items: center; gap: 8px; }
.switch input { width: auto; }
.setting-switch {
display: flex;
align-items: center;
gap: 10px;
justify-content: space-between;
flex-direction: row-reverse;
border: 1px solid var(--line);
@@ -336,21 +339,25 @@ label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.telegram-settings input {
width: 100%;
}
.telegram-top-row {
.settings-top-row {
grid-column: 1 / -1;
display: grid;
grid-template-columns: minmax(140px, .8fr) minmax(160px, 1fr);
grid-template-columns: minmax(150px, .78fr) minmax(170px, 1fr);
gap: 10px;
align-items: end;
}
.telegram-top-row .setting-switch {
.settings-top-row .setting-switch {
min-height: 39px;
padding: 8px 10px;
}
.telegram-top-row label:not(.setting-switch) {
.settings-top-row label:not(.setting-switch) {
display: grid;
gap: 6px;
}
.settings-top-row select,
.settings-top-row input:not([type="checkbox"]) {
width: 100%;
}
.settings-actions {
display: flex;
align-items: center;
+4 -2
View File
@@ -201,7 +201,8 @@
<a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener noreferrer">OpenAI Platform / API keys</a>.
Klic se ulozi jen pro tento projekt a v BO se potom zobrazi jen maskovane.
</p>
<label><input id="translationEnabled" type="checkbox"> zapnout preklady</label>
<div class="settings-top-row">
<label class="setting-switch">zapnout preklady <input id="translationEnabled" type="checkbox"></label>
<label>Jazyk operatora
<select id="operatorLanguage">
<option value="cs">Cestina</option>
@@ -211,6 +212,7 @@
<option value="de">Nemcina</option>
</select>
</label>
</div>
<label class="full-row">OpenAI API key
<input id="openaiApiKey" type="password" autocomplete="off" placeholder="sk-...">
<small id="openaiApiKeyStatus">Klic neni ulozeny.</small>
@@ -231,7 +233,7 @@
<p class="ai-help">
Bot vytvoris v Telegramu pres BotFather. Webhook URL zkopiruj do setWebhook nebo ji pouzijeme pri nastaveni serveru.
</p>
<div class="telegram-top-row">
<div class="settings-top-row">
<label class="setting-switch">zapnout Telegram <input id="telegramEnabled" type="checkbox"></label>
<label>Nick v chatu <input id="telegramOperatorName" autocomplete="off" placeholder="Alex"></label>
</div>