aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-04 12:29:55 +0800
committerGitHub <noreply@github.com>2020-11-04 12:29:55 +0800
commit013baff7500c773082d79b03a44a5e2aa2072ae2 (patch)
treec03aaf0842a526e47c29e4b24a414cc7016b4d07 /FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
parentfc3c2de7b4f431f0edcabb5ead2a2e1aa79d665a (diff)
parenta20b15c1c79cd49ee4be7ac3fba80955704122d3 (diff)
downloadtimeline-013baff7500c773082d79b03a44a5e2aa2072ae2.tar.gz
timeline-013baff7500c773082d79b03a44a5e2aa2072ae2.tar.bz2
timeline-013baff7500c773082d79b03a44a5e2aa2072ae2.zip
Merge pull request #165 from crupest/timeline
Redesign timeline ui.
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx18
1 files changed, 7 insertions, 11 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
index 223525f9..ee49586e 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
@@ -6,9 +6,7 @@ import {
TimelineChangePropertyRequest,
} from "@/services/timeline";
-import OperationDialog, {
- OperationSelectInputInfoOption,
-} from "../common/OperationDialog";
+import OperationDialog from "../common/OperationDialog";
export interface TimelinePropertyInfo {
title: string;
@@ -45,12 +43,10 @@ const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps>
{
type: "select",
label: "timeline.dialogChangeProperty.visibility",
- options: kTimelineVisibilities.map<OperationSelectInputInfoOption>(
- (v) => ({
- label: labelMap[v],
- value: v,
- })
- ),
+ options: kTimelineVisibilities.map((v) => ({
+ label: labelMap[v],
+ value: v,
+ })),
initValue: props.oldInfo.visibility,
},
{
@@ -64,13 +60,13 @@ const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps>
onProcess={([newTitle, newVisibility, newDescription]) => {
const req: TimelineChangePropertyRequest = {};
if (newTitle !== props.oldInfo.title) {
- req.title = newTitle as string;
+ req.title = newTitle;
}
if (newVisibility !== props.oldInfo.visibility) {
req.visibility = newVisibility as TimelineVisibility;
}
if (newDescription !== props.oldInfo.description) {
- req.description = newDescription as string;
+ req.description = newDescription;
}
return props.onProcess(req);
}}