Commit 49281bbe authored by erio's avatar erio
Browse files

fix(websearch): hide show/copy buttons when API key is empty

Only show the inline eye/copy buttons when provider.api_key has a value.
When only api_key_configured is true (saved key, not loaded), buttons are
hidden since there's nothing to show/copy.
parent 5df73099
......@@ -1796,10 +1796,11 @@
<input
v-model="provider.api_key"
:type="apiKeyVisible[pIdx] ? 'text' : 'password'"
class="input w-full pr-16 text-sm"
class="input w-full text-sm"
:class="provider.api_key ? 'pr-16' : ''"
:placeholder="provider.api_key_configured ? '••••••••' : t('admin.settings.webSearchEmulation.apiKeyPlaceholder')"
/>
<div class="absolute inset-y-0 right-0 flex items-center pr-1.5">
<div v-if="provider.api_key" class="absolute inset-y-0 right-0 flex items-center pr-1.5">
<button
type="button"
class="rounded p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment