feat: 全站评论开关,并统一后台表单控件
关闭评论后前台隐藏评论能力;外观/设置/公告改用 AdminField 与 Stepper。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1512,6 +1512,47 @@ h1, h2, h3, h4 {
|
||||
.j13-chat-composer-input.has-value::placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* 后台输入:与聊天搜索同一套壳层聚焦(未分层,才能压过全局 :focus-visible 双线) */
|
||||
.admin-field-shell,
|
||||
.admin-stepper {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
.admin-field-shell:hover:not(:focus-within),
|
||||
.admin-stepper:hover:not(:focus-within) {
|
||||
border-color: color-mix(in srgb, var(--line-2) 40%, var(--line));
|
||||
}
|
||||
.admin-field-shell:focus-within,
|
||||
.admin-stepper:focus-within {
|
||||
border-color: var(--accent) !important;
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
background: var(--panel);
|
||||
}
|
||||
.admin-field-input,
|
||||
.admin-field-input:focus,
|
||||
.admin-field-input:focus-visible,
|
||||
.admin-stepper-input,
|
||||
.admin-stepper-input:focus,
|
||||
.admin-stepper-input:focus-visible {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
border: 0 !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
.admin-stepper-btn:focus,
|
||||
.admin-stepper-btn:focus-visible {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.admin-field-shell.is-invalid {
|
||||
border-color: var(--danger) !important;
|
||||
}
|
||||
.admin-field-shell.is-invalid:focus-within {
|
||||
box-shadow: 0 0 0 3px var(--danger-soft);
|
||||
}
|
||||
.j13-chat-composer-mirror {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -1968,6 +2009,116 @@ a.j13-mention-token:hover {
|
||||
}
|
||||
}
|
||||
|
||||
.admin-field-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.admin-field-head .field-label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.admin-field-count {
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--ink-3);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.admin-field-shell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.admin-field-shell.is-area {
|
||||
display: block;
|
||||
}
|
||||
.admin-field-input {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
padding: 10px 12px;
|
||||
color: var(--ink);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
.admin-field-input::placeholder {
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.admin-field-input:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
textarea.admin-field-input {
|
||||
display: block;
|
||||
font-family: var(--font-sans);
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
resize: vertical;
|
||||
}
|
||||
.admin-search-shell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 0 0.75rem;
|
||||
}
|
||||
.admin-search-shell .admin-field-input {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.admin-stepper {
|
||||
display: inline-flex;
|
||||
align-items: stretch;
|
||||
flex-shrink: 0;
|
||||
height: 2.5rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.admin-stepper.is-disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.admin-stepper-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2.25rem;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
cursor: pointer;
|
||||
}
|
||||
.admin-stepper-btn:hover:not(:disabled) {
|
||||
background: var(--tint);
|
||||
color: var(--ink);
|
||||
}
|
||||
.admin-stepper-btn:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.admin-stepper-input {
|
||||
width: 3.25rem;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
color: var(--ink);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
.admin-stepper-unit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding-right: 0.25rem;
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-3);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ----- 点赞按钮:未赞描边态,hover 同色系填充;已赞为浅底实心态 ----- */
|
||||
.j13-like {
|
||||
border-color: var(--line-2);
|
||||
@@ -2593,7 +2744,7 @@ a.j13-mention-token:hover {
|
||||
.j13-pulse-cell:nth-child(odd) {
|
||||
border-right: 1px solid var(--line);
|
||||
}
|
||||
.j13-pulse-cell:nth-child(-n + 2) {
|
||||
.j13-pulse-cell:nth-child(-n + 2):nth-last-child(n + 3) {
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.j13-pulse-lab {
|
||||
|
||||
Reference in New Issue
Block a user