Skip to content

Agent Zero AI framework

Avoid password prompts for credential fields

Alessandro64427163b5a5
diff --git a/plugins/_model_config/webui/api-keys.html b/plugins/_model_config/webui/api-keys.html
index 497a79171..2ae82c8dd 100644
--- a/plugins/_model_config/webui/api-keys.html
+++ b/plugins/_model_config/webui/api-keys.html
@@ -70,7 +70,8 @@
<div class="field-title" x-text="provider.label"></div>
</div>
<div class="field-control" style="position:relative;" x-data="{ showKey: false }">
- <input :type="showKey ? 'text' : 'password'"
+ <input type="text"
+ :class="{ 'masked-text-input': !showKey }"
:value="$store.modelConfig.apiKeyValues[provider.value]"
:placeholder="provider.has_key ? '••••••••••••' : ''"
autocomplete="off"
diff --git a/plugins/_model_config/webui/model-field.html b/plugins/_model_config/webui/model-field.html
index a0703ddb3..c54f528fa 100644
--- a/plugins/_model_config/webui/model-field.html
+++ b/plugins/_model_config/webui/model-field.html
@@ -86,7 +86,8 @@
<div class="field-description">Authentication key for this provider. Shared across all model slots using the same provider.</div>
</div>
<div class="field-control" style="position:relative;" x-data="{ showKey: false }">
- <input :type="showKey ? 'text' : 'password'"
+ <input type="text"
+ :class="{ 'masked-text-input': !showKey }"
:value="$store.modelConfig.apiKeyValues[_prov]"
:placeholder="$store.modelConfig.apiKeyStatus[_prov] ? '&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;' : ''"
autocomplete="off"
@@ -113,7 +114,7 @@
<div class="field-description">Authentication key for this provider. Shared across all model slots using the same provider.</div>
</div>
<div class="field-control" style="position:relative;" x-data="{ showKey: false, _revealed: '' }">
- <input :type="showKey ? 'text' : 'password'" x-model="model.api_key" autocomplete="off"
+ <input type="text" :class="{ 'masked-text-input': !showKey }" x-model="model.api_key" autocomplete="off"
:placeholder="$store.modelConfig.apiKeyStatus[_prov] ? '&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;&#x2022;' : ''"
style="padding-right:32px;" />
<x-icon class="eye-toggle"
diff --git a/plugins/_oauth/webui/config.html b/plugins/_oauth/webui/config.html
index cebd2814a..f650a6dab 100644
--- a/plugins/_oauth/webui/config.html
+++ b/plugins/_oauth/webui/config.html
@@ -106,7 +106,8 @@
<label class="oauth-provider-input">
<span>OAuth client secret</span>
<input
- type="password"
+ type="text"
+ class="masked-text-input"
x-model="$store.oauthConfig.providerUiFor(card.provider_id).client_secret"
name="oauth_client_secret"
autocomplete="off"
@@ -369,7 +370,7 @@
</label>
<label>
<span>Codex proxy token</span>
- <input type="password" x-model="$store.oauthConfig.codex().proxy_token" autocomplete="off" />
+ <input type="text" class="masked-text-input" x-model="$store.oauthConfig.codex().proxy_token" autocomplete="off" />
</label>
</div>
</details>
diff --git a/plugins/_onboarding/webui/onboarding.html b/plugins/_onboarding/webui/onboarding.html
index e5a99273e..7c2fefe97 100644
--- a/plugins/_onboarding/webui/onboarding.html
+++ b/plugins/_onboarding/webui/onboarding.html
@@ -773,7 +773,7 @@
</label>
<label class="field">
<span>OAuth client secret</span>
- <input type="password" autocomplete="off" x-model="$store.onboarding.oauthProviderUiFor($store.onboarding.selectedProviderId).client_secret" placeholder="Google Cloud OAuth client secret">
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="$store.onboarding.oauthProviderUiFor($store.onboarding.selectedProviderId).client_secret" placeholder="Google Cloud OAuth client secret">
</label>
<label class="field" x-show="$store.onboarding.oauthProviderStatus($store.onboarding.selectedProviderId)?.supports_quota_project">
<span>Quota project</span>
@@ -800,7 +800,8 @@
API key <span x-show="$store.onboarding.providerKeyOptional($store.onboarding.selectedProviderId)">(optional)</span>
</label>
<input id="onboarding-api-key"
- type="password"
+ type="text"
+ class="masked-text-input"
autocomplete="off"
x-model="$store.modelConfig.apiKeyValues[$store.onboarding.selectedProviderId]"
:placeholder="$store.modelConfig.apiKeyStatus[$store.onboarding.selectedProviderId] ? 'Key already saved' : 'Paste your API key'"
diff --git a/plugins/_plugin_installer/webui/install-git.html b/plugins/_plugin_installer/webui/install-git.html
index 92d5f46c4..23d08fbef 100644
--- a/plugins/_plugin_installer/webui/install-git.html
+++ b/plugins/_plugin_installer/webui/install-git.html
@@ -20,7 +20,7 @@
<div class="pi-form-group">
<label class="pi-label">Access Token <span class="pi-optional">(optional, for private repos)</span></label>
- <input type="password" class="pi-input"
+ <input type="text" class="pi-input masked-text-input" autocomplete="off"
x-model="$store.pluginInstallStore.gitToken"
:disabled="$store.pluginInstallStore.loading"
placeholder="ghp_xxxx or glpat-xxxx">
diff --git a/plugins/_telegram_integration/webui/config.html b/plugins/_telegram_integration/webui/config.html
index ab7fed42a..09396ab44 100644
--- a/plugins/_telegram_integration/webui/config.html
+++ b/plugins/_telegram_integration/webui/config.html
@@ -85,7 +85,7 @@
<div class="field-description">Paste the token you got from @BotFather.</div>
</div>
<div class="field-control">
- <input type="password" x-model="bot.token"
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="bot.token"
placeholder="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11" />
</div>
</div>
@@ -274,7 +274,7 @@
<div class="field-description">Optional shared secret for webhook verification.</div>
</div>
<div class="field-control">
- <input type="password" x-model="bot.webhook_secret" />
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="bot.webhook_secret" />
</div>
</div>
@@ -677,4 +677,4 @@
</style>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/webui/components/projects/project-create.html b/webui/components/projects/project-create.html
index 8a82de463..f96846fb5 100644
--- a/webui/components/projects/project-create.html
+++ b/webui/components/projects/project-create.html
@@ -29,7 +29,7 @@
<div class="projects-form-group">
<label class="projects-form-label">Access Token (optional)</label>
<span class="projects-form-description">For private repositories. Token is used only for cloning and will not be stored.</span>
- <input class="projects-form-input" type="password"
+ <input class="projects-form-input masked-text-input" type="text" autocomplete="off"
x-model="$store.projects.selectedProject.git_token"
:disabled="$store.projects.selectedProject._cloning"
placeholder="ghp_xxxx or glpat-xxxx">
diff --git a/webui/css/settings.css b/webui/css/settings.css
index 011743671..ac7970d7b 100644
--- a/webui/css/settings.css
+++ b/webui/css/settings.css
@@ -76,6 +76,10 @@ textarea:focus {
-webkit-text-security: disc;
}
+.masked-text-input::placeholder {
+ -webkit-text-security: none;
+}
+
.light-mode input[type="text"]:focus,
.light-mode input[type="number"]:focus,
.light-mode input[type="password"]:focus,