style:更新所有Modal弹窗样式使用自定义风格
This commit is contained in:
@@ -39,6 +39,7 @@ export default function Careers() {
|
||||
const [editingCareer, setEditingCareer] = useState<Career | null>(null);
|
||||
const [form] = Form.useForm();
|
||||
const [aiForm] = Form.useForm();
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
|
||||
// AI生成状态
|
||||
const [aiGenerating, setAiGenerating] = useState(false);
|
||||
@@ -129,9 +130,10 @@ export default function Careers() {
|
||||
};
|
||||
|
||||
const handleDelete = async (id: string) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: '确认删除',
|
||||
content: '确定要删除这个职业吗?如果有角色使用了该职业,将无法删除。',
|
||||
centered: true,
|
||||
onOk: async () => {
|
||||
try {
|
||||
await api.delete(`/careers/${id}`);
|
||||
@@ -264,7 +266,9 @@ export default function Careers() {
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
<>
|
||||
{contextHolder}
|
||||
<div style={{
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
@@ -423,6 +427,7 @@ export default function Careers() {
|
||||
title="AI生成新职业中..."
|
||||
onCancel={() => setAiGenerating(false)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -113,9 +113,10 @@ export default function MCPPluginsPage() {
|
||||
};
|
||||
|
||||
const handleDelete = (plugin: MCPPlugin) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: '删除插件',
|
||||
content: `确定要删除插件 "${plugin.display_name || plugin.plugin_name}" 吗?`,
|
||||
centered: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
okType: 'danger',
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function Relationships() {
|
||||
const [isEditMode, setIsEditMode] = useState(false);
|
||||
const [editingRelationship, setEditingRelationship] = useState<Relationship | null>(null);
|
||||
const [form] = Form.useForm();
|
||||
const [modal, contextHolder] = Modal.useModal();
|
||||
const [isMobile, setIsMobile] = useState(window.innerWidth <= 768);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
@@ -149,7 +150,7 @@ export default function Relationships() {
|
||||
};
|
||||
|
||||
const handleDeleteRelationship = async (id: string) => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: '确认删除',
|
||||
content: '确定要删除这条关系吗?',
|
||||
centered: true,
|
||||
@@ -304,8 +305,10 @@ export default function Relationships() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card
|
||||
<>
|
||||
{contextHolder}
|
||||
<div>
|
||||
<Card
|
||||
title={
|
||||
<Space wrap>
|
||||
<ApartmentOutlined />
|
||||
@@ -522,6 +525,7 @@ export default function Relationships() {
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -107,9 +107,10 @@ export default function SettingsPage() {
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: '重置设置',
|
||||
content: '确定要重置为默认值吗?',
|
||||
centered: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
@@ -127,9 +128,10 @@ export default function SettingsPage() {
|
||||
};
|
||||
|
||||
const handleDelete = () => {
|
||||
Modal.confirm({
|
||||
modal.confirm({
|
||||
title: '删除设置',
|
||||
content: '确定要删除所有设置吗?此操作不可恢复。',
|
||||
centered: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
okType: 'danger',
|
||||
|
||||
Reference in New Issue
Block a user