|
1 | | -import { Button, Card, Checkbox, ColorPicker, Input, Message, Select, Space } from "@arco-design/web-react"; |
| 1 | +import { Button, Card, Checkbox, ColorPicker, Input, Message, Popover, Select, Space } from "@arco-design/web-react"; |
2 | 2 | import { IconQuestionCircleFill } from "@arco-design/web-react/icon"; |
3 | 3 | import prettier from "prettier/standalone"; |
4 | 4 | import * as babel from "prettier/parser-babel"; |
@@ -105,6 +105,7 @@ function Setting() { |
105 | 105 | for (const unhook of unhooks) unhook(); |
106 | 106 | unhooks.length = 0; |
107 | 107 | }; |
| 108 | + // eslint-disable-next-line react-hooks/exhaustive-deps |
108 | 109 | }, []); |
109 | 110 |
|
110 | 111 | return ( |
@@ -141,14 +142,19 @@ function Setting() { |
141 | 142 | <Card className="sync" title={t("script_sync")} bordered={false}> |
142 | 143 | <Space direction="vertical" className={"w-full"}> |
143 | 144 | <Space direction="horizontal" className={"w-full"}> |
144 | | - <Checkbox |
145 | | - checked={cloudSync.syncDelete} |
146 | | - onChange={(checked) => { |
147 | | - setCloudSync((cloudSync) => ({ ...cloudSync, syncDelete: checked })); |
148 | | - }} |
149 | | - > |
150 | | - {t("sync_delete")} |
151 | | - </Checkbox> |
| 145 | + <div className="flex items-center gap-2"> |
| 146 | + <Checkbox |
| 147 | + checked={cloudSync.syncDelete} |
| 148 | + onChange={(checked) => { |
| 149 | + setCloudSync((cloudSync) => ({ ...cloudSync, syncDelete: checked })); |
| 150 | + }} |
| 151 | + > |
| 152 | + {t("sync_delete")} |
| 153 | + </Checkbox> |
| 154 | + <Popover trigger="hover" content={t("sync_delete_desc")}> |
| 155 | + <IconQuestionCircleFill className="text-gray-400 cursor-help" /> |
| 156 | + </Popover> |
| 157 | + </div> |
152 | 158 | <Checkbox |
153 | 159 | checked={cloudSync.syncStatus} |
154 | 160 | onChange={(checked) => { |
|
0 commit comments