fix(admin): 修复设置页面 CSP style-src 违规导致加载失败
Some checks failed
CI / Lint + Build (push) Has been cancelled

- 移除 site-settings 模板中的内联 style 属性(display:none, width:100px)
- 将内联样式迁移至 site-settings.css 的 CSS 类中
- site-settings-theme.js 用 className 替代 style.display 操作
This commit is contained in:
2026-06-30 18:19:50 +08:00
parent b10828c851
commit ecbae7c4fa
5 changed files with 11 additions and 5 deletions

View File

@ -141,6 +141,13 @@
font-size: 13px; color: var(--text-muted);
}
/* --- 隐藏工具类 --- */
#theme-status { display: none; }
#theme-status.visible { display: block; }
/* --- 窄输入框 --- */
.setting-input-narrow { width: 100px; }
/* --- 主题状态提示 --- */
.status-success .section-body {
background: #e8f5e9; border-left: 3px solid #4caf50;

View File

@ -95,8 +95,7 @@
}
function showStatus(msg, type) {
statusSection.style.display = 'block';
statusSection.className = 'settings-section';
statusSection.className = 'settings-section visible';
if (type === 'success') {
statusSection.classList.add('status-success');
} else if (type === 'error') {