feat(dnfs,static): 新增管理员特殊节点(链接/网页代码/图片/文件)
- 信封格式:content 为 {"_sp":...} JSON,普通 Markdown 节点不受影响
- dnfs:add_note/update_note 按 is_admin 强制特殊节点发布权(非管理员 403),
字段与大小校验(url≤2048、code≤512KB、base64≤3.5M 字符),AI 审核剔除 base64 负载
- dnfs:修复存量 bug —— 模块级 _sys.path.insert 未定义导致 import 即 NameError
- static:新增 GET /api/favicon 服务端代理(SSRF 防护:内网地址拦截 + 重定向校验 + 512KB 上限)
- 前端:管理员可见节点类型选择器;链接 favicon 卡片 / 网页可审计可运行 / 图片直显 / 文件下载
- theme.css 补充 select 与特殊节点样式;两个 README 同步更新
This commit is contained in:
1 parent
b79044d631
commit
e007990594
7 files changed
+497
-16
No files matched your search
@@ -119,6 +119,21 @@ textarea:focus {
|
||||
input::placeholder, textarea::placeholder { color: var(--muted); }
|
||||
textarea { min-height: 80px; resize: vertical; }
|
||||
|
||||
select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.6rem 0.9rem;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 0.9rem;
|
||||
font-family: inherit;
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
|
||||
|
||||
/* ===== Buttons ===== */
|
||||
button, input[type="submit"], input[type="reset"], input[type="button"] {
|
||||
padding: 0.55rem 1.3rem;
|
||||
@@ -492,6 +507,30 @@ input[type="button"]:disabled {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* ===== Special Nodes (dnfs,管理员发布的特殊节点) ===== */
|
||||
.sp-link { display: flex; align-items: center; gap: 0.5rem; }
|
||||
.sp-favicon { width: 20px; height: 20px; flex: none; border-radius: 4px; }
|
||||
.sp-anchor { color: var(--accent); word-break: break-all; }
|
||||
.sp-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
|
||||
.sp-code {
|
||||
max-height: 320px;
|
||||
overflow: auto;
|
||||
margin-top: 0.5rem;
|
||||
padding: 0.75rem;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
.sp-image { display: block; max-width: 100%; border-radius: var(--radius-sm); }
|
||||
.sp-note { font-size: 0.82rem; color: var(--fg-secondary); margin-top: 0.4rem; }
|
||||
#sp-panel { margin-top: 0.4rem; }
|
||||
#sp-panel select { margin-bottom: 0.4rem; }
|
||||
#sp-file-tip { font-size: 0.78rem; }
|
||||
|
||||
/* ===== Node Form (dnfs) ===== */
|
||||
.node-form { margin-top: 1rem; }
|
||||
.node-form .form-actions { margin-top: 0.75rem; }
|
||||
|
||||
Reference in new issue
Block a user