diff options
| author | crupest <crupest@outlook.com> | 2022-04-10 16:04:03 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-04-10 16:04:03 +0800 |
| commit | 928ba0ce419bacba113951095278a5138ead34cf (patch) | |
| tree | ad4bc6b985c21e751199a25a77f36da7163a47c5 /FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx | |
| parent | 86160e4a5697615452a7e06dc78f8be4c8b2515f (diff) | |
| download | timeline-928ba0ce419bacba113951095278a5138ead34cf.tar.gz timeline-928ba0ce419bacba113951095278a5138ead34cf.tar.bz2 timeline-928ba0ce419bacba113951095278a5138ead34cf.zip | |
...
Diffstat (limited to 'FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx')
| -rw-r--r-- | FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx b/FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx deleted file mode 100644 index c1dd416c..00000000 --- a/FrontEnd/src/views/timeline-common/PostPropertyChangeDialog.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; - -import { getHttpTimelineClient, HttpTimelinePostInfo } from "@/http/timeline"; - -import OperationDialog from "../common/dailog/OperationDialog"; - -function PostPropertyChangeDialog(props: { - open: boolean; - onClose: () => void; - post: HttpTimelinePostInfo; - onSuccess: (post: HttpTimelinePostInfo) => void; -}): React.ReactElement | null { - const { open, onClose, post, onSuccess } = props; - - return ( - <OperationDialog - title="timeline.changePostPropertyDialog.title" - onClose={onClose} - open={open} - inputScheme={[ - { - label: "timeline.changePostPropertyDialog.time", - type: "datetime", - initValue: post.time, - }, - ]} - onProcess={([time]) => { - return getHttpTimelineClient().patchPost(post.timelineName, post.id, { - time: time === "" ? undefined : new Date(time).toISOString(), - }); - }} - onSuccessAndClose={onSuccess} - /> - ); -} - -export default PostPropertyChangeDialog; |
