This commit is contained in:
jeremygan2021
2026-02-12 17:13:30 +08:00
parent ee3e932aa5
commit 5a7b2032c4
14 changed files with 122 additions and 19 deletions

View File

@@ -175,7 +175,8 @@ const CreateTopicModal = ({ visible, onClose, onSuccess, initialValues, isEditMo
footer={null}
destroyOnClose
width={1000}
style={{ top: 20 }}
centered
maskClosable={false}
>
<Form
form={form}

View File

@@ -65,6 +65,7 @@ const LoginModal = ({ visible, onClose, onLoginSuccess }) => {
onCancel={onClose}
footer={null}
destroyOnClose
centered
>
<Form
form={form}

View File

@@ -194,7 +194,7 @@ const ForumDetail = () => {
backdropFilter: 'blur(10px)',
marginBottom: 30
}}
bodyStyle={{ padding: '30px' }}
styles={{ body: { padding: '30px' } }}
>
<div style={{ marginBottom: 20 }}>
{topic.is_pinned && <Tag color="red" style={{ marginRight: 10 }}>置顶</Tag>}
@@ -353,11 +353,13 @@ const ForumDetail = () => {
{/* Edit Modal */}
<CreateTopicModal
visible={editModalVisible}
onClose={() => setEditModalVisible(false)}
onClose={() => {
setEditModalVisible(false);
// Workaround for scroll issue: Force reload page on close
window.location.reload();
}}
onSuccess={() => {
fetchTopic();
// setEditModalVisible(false) is called in modal's submit handler wrapper?
// CreateTopicModal calls onSuccess then onClose. So we just need to refresh here.
}}
initialValues={topic}
isEditMode={true}