diff options
author | crupest <crupest@outlook.com> | 2021-05-17 20:42:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-17 20:42:06 +0800 |
commit | afd3f8504f5db812c0e9689729ec884c21683e2a (patch) | |
tree | c10fbd994294c9a7f1fa2ada6d6d5b2133431a29 /FrontEnd/src | |
parent | 84cfdc6328d1fe5b0c6e169ae577d1e34f053255 (diff) | |
download | timeline-afd3f8504f5db812c0e9689729ec884c21683e2a.tar.gz timeline-afd3f8504f5db812c0e9689729ec884c21683e2a.tar.bz2 timeline-afd3f8504f5db812c0e9689729ec884c21683e2a.zip |
feat: Change the color picker in operation dialog.
Diffstat (limited to 'FrontEnd/src')
-rw-r--r-- | FrontEnd/src/app/views/common/OperationDialog.tsx | 6 | ||||
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/FrontEnd/src/app/views/common/OperationDialog.tsx b/FrontEnd/src/app/views/common/OperationDialog.tsx index 6a5228f9..40c14e9e 100644 --- a/FrontEnd/src/app/views/common/OperationDialog.tsx +++ b/FrontEnd/src/app/views/common/OperationDialog.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { Form, Button, Modal } from "react-bootstrap"; -import { ChromePicker } from "react-color"; +import { TwitterPicker } from "react-color"; import { convertI18nText, I18nText, UiLogicError } from "@/common"; @@ -63,7 +63,6 @@ export interface OperationDialogColorInput { type: "color"; label?: I18nText; initValue?: string | null; - disableAlpha?: boolean; canBeNull?: boolean; } @@ -336,10 +335,9 @@ const OperationDialog = < <Form.Label>{convertI18nText(item.label, t)}</Form.Label> )} {value !== null && ( - <ChromePicker + <TwitterPicker color={value as string} onChange={(result) => updateValue(index, result.hex)} - disableAlpha={item.disableAlpha} /> )} </Form.Group> diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx index f63b2b45..f38485eb 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx @@ -55,7 +55,6 @@ const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps> type: "color", label: "timeline.dialogChangeProperty.color", initValue: timeline.color ?? null, - disableAlpha: true, canBeNull: true, }, ] as const |