feat: markdown rendering + dark mode input fixes + DM icon align
- Add marked dependency; render post/reply content and signature via
marked.parse (matches upstream). lib/markdown.js helper + CSS for
code/pre/blockquote/tables in glass theme
- Fix hardcoded #e2e8f0 white inputs in dark mode: NewPost title/content,
Modals report select, ReplyList, AdminForumSettings/Links/Users/Logs
- DM button: replace ✉️ emoji with upstream SVG chat bubble icon
This commit is contained in:
1 parent
bd6314be38
commit
1a8a588d60
14 files changed
+98
-22
No files matched your search
@@ -36,7 +36,7 @@ export default function AdminForumSettings() {
|
||||
<label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 6 }}>论坛名称</label>
|
||||
<input
|
||||
type="text"
|
||||
style={{ width: '100%', padding: '10px 14px', border: '1.5px solid #e2e8f0', borderRadius: 6, fontSize: 15, marginBottom: 12, fontFamily: 'inherit' }}
|
||||
style={{ width: '100%', padding: '10px 14px', border: '1.5px solid var(--border)', borderRadius: 6, fontSize: 15, marginBottom: 12, fontFamily: 'inherit', background: 'var(--bg)', color: 'var(--text)' }}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
/>
|
||||
|
||||
@@ -40,12 +40,12 @@ export default function AdminLinks() {
|
||||
<div style={{ marginBottom: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }}>
|
||||
<input
|
||||
type="text" placeholder="链接名称"
|
||||
style={{ flex: 1, minWidth: 120, padding: '8px 12px', border: '1px solid #e2e8f0', borderRadius: 4 }}
|
||||
style={{ flex: 1, minWidth: 120, padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--bg)', color: 'var(--text)' }}
|
||||
value={title} onChange={(e) => setTitle(e.target.value)}
|
||||
/>
|
||||
<input
|
||||
type="url" placeholder="链接地址"
|
||||
style={{ flex: 2, minWidth: 160, padding: '8px 12px', border: '1px solid #e2e8f0', borderRadius: 4 }}
|
||||
style={{ flex: 2, minWidth: 160, padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--bg)', color: 'var(--text)' }}
|
||||
value={url} onChange={(e) => setUrl(e.target.value)}
|
||||
/>
|
||||
<button className="btn-primary" style={{ padding: '8px 16px' }} onClick={handleAdd}>添加</button>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function AdminLogs() {
|
||||
return (
|
||||
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 13 }}>
|
||||
<thead>
|
||||
<tr style={{ textAlign: 'left', borderBottom: '1px solid #e2e8f0' }}>
|
||||
<tr style={{ textAlign: 'left', borderBottom: '1px solid var(--border)' }}>
|
||||
<th>时间</th><th>用户</th><th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function AdminUsers() {
|
||||
<div style={{ overflowX: 'auto' }}>
|
||||
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 14 }}>
|
||||
<thead>
|
||||
<tr style={{ textAlign: 'left', borderBottom: '2px solid #e2e8f0' }}>
|
||||
<tr style={{ textAlign: 'left', borderBottom: '2px solid var(--border)' }}>
|
||||
<th style={{ padding: '10px 12px' }}>用户</th>
|
||||
<th style={{ padding: '10px 12px' }}>角色</th>
|
||||
<th style={{ padding: '10px 12px' }}>注册时间</th>
|
||||
@@ -65,7 +65,7 @@ export default function AdminUsers() {
|
||||
<td style={{ padding: '10px 12px' }}>
|
||||
<span style={{
|
||||
display: 'inline-block', padding: '2px 10px', borderRadius: 4, fontSize: 12, fontWeight: 500,
|
||||
...(isAdmin ? { background: '#6366f1', color: '#fff' } : { background: '#e2e8f0', color: '#64748b' }),
|
||||
...(isAdmin ? { background: '#6366f1', color: '#fff' } : { background: 'var(--border)', color: 'var(--text-secondary)' }),
|
||||
}}>
|
||||
{isAdmin ? '管理员' : '普通用户'}
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user