feat: align with upstream — pin posts, edit marker, custom CSS, UX fixes
- Pin/unpin posts (PUT /api/posts/:id/pin, admin) with notification to author
- is_pinned/pinned_at in schema; 📌 badge on feed + detail; admin pin button
- Edited marker (已编辑) on feed + detail; edit button + modal for authors
- Custom CSS: upload/delete API + admin tab + global loader (style.css override)
- Fix: duplicate post title on detail page (remove card title, keep header)
- Fix: forum name flicker on load (localStorage cache before fetch)
- Fix: dropdown menu closes on outside click (document listener)
- Fix: document.title + <title> sync on forum rename
This commit is contained in:
1 parent
721e4bfe42
commit
48372aa14f
14 files changed
+371
-10
No files matched your search
@@ -9,6 +9,7 @@ import AdminLogs from './admin/AdminLogs';
|
||||
import AdminLinks from './admin/AdminLinks';
|
||||
import AdminForumSettings from './admin/AdminForumSettings';
|
||||
import AdminCustomPages from './admin/AdminCustomPages';
|
||||
import AdminCustomCss from './admin/AdminCustomCss';
|
||||
|
||||
const TABS = [
|
||||
{ key: 'reports', label: '举报', icon: 'shieldAlert' },
|
||||
@@ -16,6 +17,7 @@ const TABS = [
|
||||
{ key: 'logs', label: '日志', icon: 'file' },
|
||||
{ key: 'links', label: '友链', icon: 'link' },
|
||||
{ key: 'custom', label: '自定义页面', icon: 'file' },
|
||||
{ key: 'css', label: '自定义CSS', icon: 'file' },
|
||||
{ key: 'settings', label: '论坛设置', icon: 'settings' },
|
||||
];
|
||||
|
||||
@@ -44,6 +46,7 @@ export default function AdminPage() {
|
||||
{tab === 'logs' && <AdminLogs />}
|
||||
{tab === 'links' && <AdminLinks />}
|
||||
{tab === 'custom' && <AdminCustomPages />}
|
||||
{tab === 'css' && <AdminCustomCss />}
|
||||
{tab === 'settings' && <AdminForumSettings />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user