diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index 70ce272d..4b5dfc65 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1710,5 +1710,8 @@ "可信": "Reliable", "所有上游数据均可信": "All upstream data is reliable", "以下上游数据可能不可信:": "The following upstream data may not be reliable: ", - "按倍率类型筛选": "Filter by ratio type" + "按倍率类型筛选": "Filter by ratio type", + "内容": "Content", + "放大编辑": "Expand editor", + "编辑公告内容": "Edit announcement content" } \ No newline at end of file diff --git a/web/src/pages/Setting/Dashboard/SettingsAnnouncements.js b/web/src/pages/Setting/Dashboard/SettingsAnnouncements.js index c15e2885..dfbad8ee 100644 --- a/web/src/pages/Setting/Dashboard/SettingsAnnouncements.js +++ b/web/src/pages/Setting/Dashboard/SettingsAnnouncements.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useRef } from 'react'; import { Button, Space, @@ -9,7 +9,9 @@ import { Divider, Modal, Tag, - Switch + Switch, + TextArea, + Tooltip } from '@douyinfe/semi-ui'; import { IllustrationNoResult, @@ -20,7 +22,8 @@ import { Edit, Trash2, Save, - Bell + Bell, + Maximize2 } from 'lucide-react'; import { API, showError, showSuccess, getRelativeTime, formatDateTimeString } from '../../../helpers'; import { useTranslation } from 'react-i18next'; @@ -33,6 +36,7 @@ const SettingsAnnouncements = ({ options, refresh }) => { const [announcementsList, setAnnouncementsList] = useState([]); const [showAnnouncementModal, setShowAnnouncementModal] = useState(false); const [showDeleteModal, setShowDeleteModal] = useState(false); + const [showContentModal, setShowContentModal] = useState(false); const [deletingAnnouncement, setDeletingAnnouncement] = useState(null); const [editingAnnouncement, setEditingAnnouncement] = useState(null); const [modalLoading, setModalLoading] = useState(false); @@ -51,6 +55,8 @@ const SettingsAnnouncements = ({ options, refresh }) => { // 面板启用状态 const [panelEnabled, setPanelEnabled] = useState(true); + const formApiRef = useRef(null); + const typeOptions = [ { value: 'default', label: t('默认') }, { value: 'ongoing', label: t('进行中') }, @@ -76,13 +82,16 @@ const SettingsAnnouncements = ({ options, refresh }) => { dataIndex: 'content', key: 'content', render: (text) => ( -