Improve OpenAI settings help

This commit is contained in:
rajchales-monito
2026-07-29 21:21:39 +02:00
parent 227fcc2084
commit d1cd58c586
3 changed files with 27 additions and 4 deletions
+18
View File
@@ -225,6 +225,24 @@ label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
width: auto;
margin: 0;
}
.effect-settings .full-row,
.effect-settings .ai-help {
grid-column: 1 / -1;
}
.effect-settings .full-row {
display: grid;
align-items: stretch;
}
.ai-help {
margin: 0;
color: var(--muted);
font-size: 12px;
line-height: 1.4;
}
.ai-help a {
color: var(--brand);
font-weight: 700;
}
.effect-settings input[type="password"],
.effect-settings select {
width: 100%;
+8 -3
View File
@@ -165,8 +165,13 @@
</label>
<label class="setting-switch">Opakovat do otevreni chatu <input id="adminSoundRepeat" type="checkbox"></label>
<button id="adminSoundTest" type="button">Otestovat zvuk</button>
<fieldset class="effect-settings">
<fieldset class="effect-settings ai-settings">
<legend>AI preklady</legend>
<p class="ai-help">
OpenAI API key vytvoris v
<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>
<label>Jazyk operatora
<select id="operatorLanguage">
@@ -177,11 +182,11 @@
<option value="de">Nemcina</option>
</select>
</label>
<label>OpenAI API key
<label class="full-row">OpenAI API key
<input id="openaiApiKey" type="password" autocomplete="off" placeholder="sk-...">
<small id="openaiApiKeyStatus">Klic neni ulozeny.</small>
</label>
<label>OpenAI model
<label class="full-row">OpenAI model
<span class="model-row">
<select id="translationModel"></select>
<button id="refreshAiModels" type="button">Obnovit</button>
+1 -1
View File
@@ -397,7 +397,7 @@ function renderSite() {
$("#openaiApiKey").value = "";
$("#openaiApiKeyStatus").textContent = s.translations?.hasOpenaiApiKey
? `Klic ulozeny (${s.translations.openaiApiKeyMasked || "sk-..."})`
: "Klic neni ulozeny.";
: "Klic neni ulozeny. Bez nej AI preklady nepobezi.";
renderModelOptions(s.translations?.model || "gpt-5-mini");
}