- 内容源管理:去掉人工录入卡片,AI 密钥保存后可返显并支持小眼睛切换,布局优化 - 内容管理:新增编辑按钮与编辑页,可调整条目全部字段与标签
This commit is contained in:
@@ -1594,6 +1594,32 @@ button.chip:hover {
|
||||
.field .input {
|
||||
width: 100%;
|
||||
}
|
||||
.ai-key-field {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ai-key-field .input {
|
||||
width: 100%;
|
||||
padding-right: 42px;
|
||||
}
|
||||
.eye-toggle {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4px;
|
||||
border: 0;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
.eye-toggle:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
.auth-row {
|
||||
margin-top: 14px;
|
||||
display: flex;
|
||||
|
||||
@@ -139,6 +139,19 @@
|
||||
});
|
||||
}
|
||||
|
||||
document.querySelectorAll("[data-eye-toggle]").forEach(function (btn) {
|
||||
btn.addEventListener("click", function () {
|
||||
var input = btn.closest("form").querySelector("input[name=key]");
|
||||
var show = input.type === "password";
|
||||
input.type = show ? "text" : "password";
|
||||
btn.setAttribute("aria-label", show ? "隐藏密钥" : "显示密钥");
|
||||
var open = btn.querySelector(".eye-open");
|
||||
var closed = btn.querySelector(".eye-closed");
|
||||
if (open) open.hidden = show;
|
||||
if (closed) closed.hidden = !show;
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll("form.source-config").forEach(function (form) {
|
||||
form.addEventListener("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user