Skip to content

Let's use AI to Earn!

feat: 样式调整

牛文政6225f8922f06
diff --git a/src/assets/logoAI.png b/src/assets/logoAI.png
new file mode 100644
index 00000000..0c58db7f
Binary files /dev/null and b/src/assets/logoAI.png differ
diff --git a/src/views/reply/components/addAutoRun.tsx b/src/views/reply/components/addAutoRun.tsx
index b57c22de..18385e68 100644
--- a/src/views/reply/components/addAutoRun.tsx
+++ b/src/views/reply/components/addAutoRun.tsx
@@ -45,7 +45,7 @@ const Com = forwardRef<AddAutoRunRef>((props: any, ref) => {
open={isModalOpen}
onCancel={handleCancel}
footer={null}
- width={800}
+ width={300}
>
<p>账号ID{accountId}</p>
<p>账号ID{accountId}</p>
diff --git a/src/views/reply/components/replyWorks.tsx b/src/views/reply/components/replyWorks.tsx
index 9bd56f84..cc0fe936 100644
--- a/src/views/reply/components/replyWorks.tsx
+++ b/src/views/reply/components/replyWorks.tsx
@@ -1,7 +1,10 @@
import { toolsApi } from '@/api/tools';
import { icpCreateComment, WorkData } from '@/icp/reply';
-import { Button, Form, Input, Modal } from 'antd';
+import { Button, Form, Input, Modal, Tooltip } from 'antd';
import { forwardRef, useImperativeHandle, useState } from 'react';
+import logoAi from '@/assets/logoAi.png';
+import { SendOutlined } from '@ant-design/icons';
+import '../reply.module.scss';
export interface ReplyWorksRef {
init: (accountId: number, inWorkData: WorkData) => Promise<void>;
@@ -63,40 +66,50 @@ const Com = forwardRef<ReplyWorksRef>((props: any, ref) => {
return (
<>
<Modal
- title={null}
+ title="作品评论"
open={isModalOpen}
onCancel={handleCancel}
footer={null}
- width={800}
+ width={400}
>
- <Form
- form={form}
- name="basic"
- labelCol={{ span: 8 }}
- wrapperCol={{ span: 16 }}
- initialValues={{ remember: true }}
- onFinish={onFinish}
- onFinishFailed={onFinishFailed}
- autoComplete="off"
- >
- <Form.Item
- label="评论"
- name="content"
- rules={[{ required: true, message: '请输入评论!' }]}
+ <div className="p-5">
+ <Form
+ form={form}
+ name="basic"
+ labelCol={{ span: 8 }}
+ wrapperCol={{ span: 16 }}
+ initialValues={{ remember: true }}
+ onFinish={onFinish}
+ onFinishFailed={onFinishFailed}
+ autoComplete="off"
>
- <Input />
- </Form.Item>
+ <Form.Item
+ label="评论"
+ name="content"
+ rules={[{ required: true, message: '请输入评论!' }]}
+ >
+ <Input />
+ </Form.Item>
+ <p className="text-right">
+ <Tooltip title="获取AI建议">
+ <img
+ src={logoAi}
+ alt="logo"
+ width={40}
+ onClick={getAiContent}
+ />
+ </Tooltip>
- <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
- <Button type="primary" onClick={getAiContent}>
- AI建议
- </Button>
-
- <Button type="primary" htmlType="submit">
- 提交评论
- </Button>
- </Form.Item>
- </Form>
+ <Tooltip title="发送">
+ <Button
+ shape="circle"
+ htmlType="submit"
+ icon={<SendOutlined />}
+ />
+ </Tooltip>
+ </p>
+ </Form>
+ </div>
</Modal>
</>
);
diff --git a/src/views/reply/reply.module.scss b/src/views/reply/reply.module.scss
index be859e55..1ed9cb64 100644
--- a/src/views/reply/reply.module.scss
+++ b/src/views/reply/reply.module.scss
@@ -2,4 +2,15 @@
height: 100%;
:global {
}
-}
\ No newline at end of file
+}
+
+.action-container {
+ display: flex;
+ justify-content: center; /* 水平居中 */
+ align-items: center; /* 垂直居中 */
+ width: 100%; /* 确保占满容器宽度 */
+}
+
+.action-container .ant-tooltip {
+ margin-left: auto; /* 将按钮推到右侧 */
+}