feat: port private messaging (私信) from upstream
- Add conversations/messages tables to schema.sql (upstream missed them) - API: GET/POST /api/conversations, GET/POST /api/conversations/[id]/messages, PUT /api/messages/[id]/read - Chat UI: conversation list modal, chat window with 3s polling, unread badge - Navbar message entry opens DM list; user profile has 发私信 button - Access control: only conversation participants (403 otherwise)
This commit is contained in:
1 parent
5ef8d4b1ff
commit
300ad5959c
11 files changed
+522
-3
No files matched your search
+7
-1
@@ -11,6 +11,7 @@ import NewPost from '@/components/NewPost';
|
||||
import AdminPage from '@/components/AdminPage';
|
||||
import SettingsPage from '@/components/SettingsPage';
|
||||
import UserProfile from '@/components/UserProfile';
|
||||
import ChatManager from '@/components/chat/ChatManager';
|
||||
import Modals from '@/components/Modals';
|
||||
|
||||
function HomeInner() {
|
||||
@@ -23,7 +24,12 @@ function HomeInner() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Navbar onOpenModal={openModal} />
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<Navbar onOpenModal={openModal} style={{ flex: 1 }} />
|
||||
<div style={{ paddingRight: 16 }}>
|
||||
<ChatManager />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="app" style={{ display: view === 'feed' ? 'flex' : 'none' }}>
|
||||
<Sidebar />
|
||||
|
||||
Reference in new issue
Block a user