aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/home/TimelineBoard.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-12-31 22:21:29 +0800
committercrupest <crupest@outlook.com>2020-12-31 22:21:29 +0800
commit0a84c4c86e27e61af4a437f3c173adb220d9f62a (patch)
tree1f4e590600be9ca15cb5199c7bd87f8595c74f16 /FrontEnd/src/app/views/home/TimelineBoard.tsx
parentdf262700e05f1daccb4905629d3eeaac61492830 (diff)
downloadtimeline-0a84c4c86e27e61af4a437f3c173adb220d9f62a.tar.gz
timeline-0a84c4c86e27e61af4a437f3c173adb220d9f62a.tar.bz2
timeline-0a84c4c86e27e61af4a437f3c173adb220d9f62a.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/home/TimelineBoard.tsx')
-rw-r--r--FrontEnd/src/app/views/home/TimelineBoard.tsx25
1 files changed, 21 insertions, 4 deletions
diff --git a/FrontEnd/src/app/views/home/TimelineBoard.tsx b/FrontEnd/src/app/views/home/TimelineBoard.tsx
index 0195f1b5..a83095d4 100644
--- a/FrontEnd/src/app/views/home/TimelineBoard.tsx
+++ b/FrontEnd/src/app/views/home/TimelineBoard.tsx
@@ -14,7 +14,7 @@ interface TimelineBoardItemProps {
// If not null, will disable navigation on click.
actions?: {
onDelete: () => void;
- onMove: (e: React.MouseEvent) => void;
+ onMove: (e: React.PointerEvent) => void;
};
}
@@ -41,8 +41,8 @@ const TimelineBoardItem: React.FC<TimelineBoardItemProps> = ({
</div>
{actions != null ? (
<div>
- <i className="bi-trash icon-button text-danger" />
- <i className="bi-grip-vertical icon-button text-danger" />
+ <i className="bi-trash icon-button text-danger px-2" />
+ <i className="bi-grip-vertical icon-button text-gray px-2" />
</div>
) : null}
</>
@@ -82,6 +82,7 @@ const TimelineBoardUI: React.FC<TimelineBoardUIProps> = (props) => {
editable &&
(editing ? (
<div
+ className="flat-button text-primary"
onClick={() => {
setEditing(false);
}}
@@ -90,6 +91,7 @@ const TimelineBoardUI: React.FC<TimelineBoardUIProps> = (props) => {
</div>
) : (
<div
+ className="flat-button text-primary"
onClick={() => {
setEditing(true);
}}
@@ -127,7 +129,22 @@ const TimelineBoardUI: React.FC<TimelineBoardUIProps> = (props) => {
} else {
return timelines.map((timeline) => {
return (
- <TimelineBoardItem key={timeline.name} timeline={timeline} />
+ <TimelineBoardItem
+ key={timeline.name}
+ timeline={timeline}
+ actions={
+ editHandler != null && editing
+ ? {
+ onDelete: () => {
+ //TODO: Implement this.
+ },
+ onMove: () => {
+ //TODO: Implement this.
+ },
+ }
+ : undefined
+ }
+ />
);
});
}