diff --git a/src/components/task.css b/src/components/task.css index d759e7a..5f92175 100644 --- a/src/components/task.css +++ b/src/components/task.css @@ -1,3 +1,7 @@ +.task { + position: relative; +} + .task-cm > .cm-mountpoint { padding: 0; } @@ -33,6 +37,11 @@ margin-right: 0 !important; } +.floating-task-action { + position: absolute; + transform: translateX(-18px) scale(0.8); +} + .task-action:hover { color: var(--foreground-color); } diff --git a/src/components/task.jsx b/src/components/task.jsx index 85eded8..51176bb 100644 --- a/src/components/task.jsx +++ b/src/components/task.jsx @@ -82,7 +82,7 @@ export default function Task( { task, initialFocus, onFocusChange } ) { const deffered = (task.start && new Date(task.start) > today); return ( -
+
{ @@ -107,6 +107,22 @@ export default function Task( { task, initialFocus, onFocusChange } ) { }} onClose={() => setDeferOpen(false)} ref={deferRef} /> + +
{ + // TODO completing tasks is a bit of a thing so + // TODO supporting repeating tasks, etc. + dispatch(edit({id: task.id, completed: !task.completed})); + setHasFocus(false); + }} + > + +
+ +
+ +
-
{ - // TODO completing tasks is a bit of a thing so - // TODO supporting repeating tasks, etc. - dispatch(edit({id: task.id, completed: !task.completed})); - setHasFocus(false); - }} - > - -
setScheduleOpen(true)} data-tooltip-id={hasFocus? "rootp" : "notp"}