站内消息支持三种类型,admin发送,mobile订阅

This commit is contained in:
yourname
2025-05-15 12:06:17 +00:00
parent 2f171d4335
commit f3042583df
4 changed files with 143 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ import 'dayjs/locale/zh-cn';
import { MessageAPI , UserAPI } from './api/index.ts';
import type { UserMessage } from '../share/types.ts';
import { MessageStatusNameMap , MessageStatus} from '../share/types.ts';
import { MessageStatusNameMap , MessageStatus, MessageType } from '../share/types.ts';
import { useAuth } from "./hooks_sys.tsx";
export const MessagesPage = () => {
@@ -222,9 +222,9 @@ export const MessagesPage = () => {
style={{ width: 120 }}
allowClear
options={[
{ value: 'SYSTEM', label: '系统消息' },
{ value: 'NOTICE', label: '公告' },
{ value: 'PERSONAL', label: '个人消息' },
{ value: MessageType.SYSTEM, label: '系统消息' },
{ value: MessageType.ANNOUNCE, label: '公告' },
{ value: MessageType.PRIVATE, label: '个人消息' },
]}
/>
</Form.Item>
@@ -233,8 +233,8 @@ export const MessagesPage = () => {
style={{ width: 120 }}
allowClear
options={[
{ value: 'UNREAD', label: '未读' },
{ value: 'READ', label: '已读' },
{ value: MessageStatus.UNREAD, label: '未读' },
{ value: MessageStatus.READ, label: '已读' },
]}
/>
</Form.Item>
@@ -290,9 +290,9 @@ export const MessagesPage = () => {
>
<Select
options={[
{ value: 'SYSTEM', label: '系统消息' },
{ value: 'NOTICE', label: '公告' },
{ value: 'PERSONAL', label: '个人消息' },
{ value: MessageType.SYSTEM, label: '系统消息' },
{ value: MessageType.ANNOUNCE, label: '公告' },
{ value: MessageType.PRIVATE, label: '个人消息' },
]}
/>
</Form.Item>