fix: restore original Feather icons across UI
- Add components/Icons.js with SVG paths extracted verbatim from the original index.html (14 unique icons) - Restore icons on navbar menu, sidebar, feed actions, post/reply, modals, admin tabs and settings - Replaces emoji placeholders from the initial migration
This commit is contained in:
1 parent
3e9d004fb6
commit
70a198ae32
14 files changed
+160
-35
No files matched your search
@@ -4,6 +4,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { API } from '@/lib/api';
|
||||
import { useApp } from '../AppProvider';
|
||||
import { Icon } from '../Icons';
|
||||
|
||||
export default function AdminForumSettings() {
|
||||
const { updateForumName } = useApp();
|
||||
@@ -29,7 +30,7 @@ export default function AdminForumSettings() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h3 style={{ marginBottom: 16 }}>⚙️ 论坛设置</h3>
|
||||
<h3 style={{ marginBottom: 16 }}><Icon name="settings" size={16} /> 论坛设置</h3>
|
||||
<div style={{ maxWidth: 400 }}>
|
||||
<label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 6 }}>论坛名称</label>
|
||||
<input
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// 管理后台 - 友情链接管理
|
||||
import { useEffect, useState } from 'react';
|
||||
import { API } from '@/lib/api';
|
||||
import { Icon } from '../Icons';
|
||||
|
||||
export default function AdminLinks() {
|
||||
const [links, setLinks] = useState([]);
|
||||
@@ -56,7 +57,9 @@ export default function AdminLinks() {
|
||||
links.map((l) => (
|
||||
<div key={l.id} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '8px 0', borderBottom: '1px solid #f1f5f9' }}>
|
||||
<span><a href={l.url} target="_blank" rel="noreferrer" style={{ color: '#6366f1', textDecoration: 'none' }}>{l.title}</a></span>
|
||||
<button className="btn-sm btn-danger" onClick={() => handleDelete(l.id)}>删除</button>
|
||||
<button className="btn-sm btn-danger" onClick={() => handleDelete(l.id)}>
|
||||
<Icon name="trash" size={12} /> 删除
|
||||
</button>
|
||||
</div>
|
||||
))
|
||||
)}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// 管理后台 - 举报处理
|
||||
import { useEffect, useState } from 'react';
|
||||
import { API } from '@/lib/api';
|
||||
import { Icon } from '../Icons';
|
||||
|
||||
const STATUS = { pending: '⏳ 待处理', approved: '✅ 已删除', rejected: '❌ 已驳回' };
|
||||
|
||||
@@ -53,8 +54,12 @@ export default function AdminReports() {
|
||||
)}
|
||||
{r.status === 'pending' && (
|
||||
<div className="report-actions">
|
||||
<button className="btn-sm btn-danger" onClick={() => handleAction(r, 'approve')}>删除帖子</button>
|
||||
<button className="btn-sm btn-secondary" onClick={() => handleAction(r, 'reject')}>驳回举报</button>
|
||||
<button className="btn-sm btn-danger" onClick={() => handleAction(r, 'approve')}>
|
||||
<Icon name="trash" size={12} /> 删除帖子
|
||||
</button>
|
||||
<button className="btn-sm btn-secondary" onClick={() => handleAction(r, 'reject')}>
|
||||
<Icon name="close" size={12} /> 驳回举报
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user