Improve OpenAI settings help
This commit is contained in:
@@ -225,6 +225,24 @@ label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
|
|||||||
width: auto;
|
width: auto;
|
||||||
margin: 0;
|
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 input[type="password"],
|
||||||
.effect-settings select {
|
.effect-settings select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
+8
-3
@@ -165,8 +165,13 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="setting-switch">Opakovat do otevreni chatu <input id="adminSoundRepeat" type="checkbox"></label>
|
<label class="setting-switch">Opakovat do otevreni chatu <input id="adminSoundRepeat" type="checkbox"></label>
|
||||||
<button id="adminSoundTest" type="button">Otestovat zvuk</button>
|
<button id="adminSoundTest" type="button">Otestovat zvuk</button>
|
||||||
<fieldset class="effect-settings">
|
<fieldset class="effect-settings ai-settings">
|
||||||
<legend>AI preklady</legend>
|
<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><input id="translationEnabled" type="checkbox"> zapnout preklady</label>
|
||||||
<label>Jazyk operatora
|
<label>Jazyk operatora
|
||||||
<select id="operatorLanguage">
|
<select id="operatorLanguage">
|
||||||
@@ -177,11 +182,11 @@
|
|||||||
<option value="de">Nemcina</option>
|
<option value="de">Nemcina</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label>OpenAI API key
|
<label class="full-row">OpenAI API key
|
||||||
<input id="openaiApiKey" type="password" autocomplete="off" placeholder="sk-...">
|
<input id="openaiApiKey" type="password" autocomplete="off" placeholder="sk-...">
|
||||||
<small id="openaiApiKeyStatus">Klic neni ulozeny.</small>
|
<small id="openaiApiKeyStatus">Klic neni ulozeny.</small>
|
||||||
</label>
|
</label>
|
||||||
<label>OpenAI model
|
<label class="full-row">OpenAI model
|
||||||
<span class="model-row">
|
<span class="model-row">
|
||||||
<select id="translationModel"></select>
|
<select id="translationModel"></select>
|
||||||
<button id="refreshAiModels" type="button">Obnovit</button>
|
<button id="refreshAiModels" type="button">Obnovit</button>
|
||||||
|
|||||||
+1
-1
@@ -397,7 +397,7 @@ function renderSite() {
|
|||||||
$("#openaiApiKey").value = "";
|
$("#openaiApiKey").value = "";
|
||||||
$("#openaiApiKeyStatus").textContent = s.translations?.hasOpenaiApiKey
|
$("#openaiApiKeyStatus").textContent = s.translations?.hasOpenaiApiKey
|
||||||
? `Klic ulozeny (${s.translations.openaiApiKeyMasked || "sk-..."})`
|
? `Klic ulozeny (${s.translations.openaiApiKeyMasked || "sk-..."})`
|
||||||
: "Klic neni ulozeny.";
|
: "Klic neni ulozeny. Bez nej AI preklady nepobezi.";
|
||||||
renderModelOptions(s.translations?.model || "gpt-5-mini");
|
renderModelOptions(s.translations?.model || "gpt-5-mini");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user