Add settings page tabs and show env API keys with last four digits.
System settings now use the same CSS tab layout as env config; sensitive env fields display masked values from .env while keeping save-on-empty behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -179,10 +179,24 @@
|
||||
} else {
|
||||
input = document.createElement("input");
|
||||
input.id = "env-f-" + field.key;
|
||||
input.type = field.sensitive ? "password" : "text";
|
||||
if (field.sensitive && field.has_value) {
|
||||
input.placeholder = field.masked || "留空不修改";
|
||||
input.type = "password";
|
||||
input.autocomplete = "off";
|
||||
if (field.sensitive) {
|
||||
if (field.has_value) {
|
||||
const cur = document.createElement("div");
|
||||
cur.className = "env-sensitive-current muted";
|
||||
const labelSpan = document.createElement("span");
|
||||
labelSpan.textContent = "已配置 ";
|
||||
const masked = document.createElement("span");
|
||||
masked.className = "env-masked-value";
|
||||
masked.textContent = field.masked || "";
|
||||
cur.appendChild(labelSpan);
|
||||
cur.appendChild(masked);
|
||||
row.appendChild(cur);
|
||||
}
|
||||
input.placeholder = field.has_value ? "修改时填写新值,留空不修改" : "请输入";
|
||||
} else {
|
||||
input.type = "text";
|
||||
input.value = field.current || field.default || "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user