1
Fork 0
mirror of https://github.com/Steffo99/todocolors.git synced 2024-11-22 08:14:18 +00:00
This commit is contained in:
Steffo 2024-09-13 18:28:32 +02:00
parent d96cb1564e
commit 6af857346a
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
3 changed files with 16 additions and 18 deletions

View file

@ -3,6 +3,9 @@
align-items: center;
min-width: 240px;
min-height: 48px;
border-style: solid;
border-width: 0;
padding: 8px;
}
.taskImportanceHighest {
@ -46,36 +49,31 @@
}
.taskDeadlineHour {
border: 4px hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 0.45);
padding: 4px;
border-left-width: 4px;
padding-left: 4px;
}
.taskDeadlineDay {
border: 3px hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 0.25);
padding: 5px;
border-left-width: 3px;
padding-left: 5px;
}
.taskDeadlineWeek {
border: 2px hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 0.15);
padding: 6px;
border-left-width: 2px;
padding-left: 6px;
}
.taskDeadlineMonth {
border: 1px hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 0.15);
padding: 7px;
border-left-width: 1px;
padding-left: 7px;
}
.taskDeadlineNone {
border: 0;
padding: 8px;
}
.taskDeadlineIncoming {
border-style: solid;
.taskDeadlineFuture {
border-color: hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 0.25);
}
.taskDeadlinePast {
border-style: dashed;
border-color: hsl(var(--bhsl-current-hue) var(--bhsl-current-saturation) var(--bhsl-current-lightness) / 1.00);
}
@keyframes inProgress {

View file

@ -34,7 +34,7 @@ export function TaskContainer({role, className, importance, deadline, status, ..
[style.taskDeadlineDay]: deltaAbs !== null && 60 * 60 * 1000 <= deltaAbs && deltaAbs < 24 * 60 * 60 * 1000,
[style.taskDeadlineWeek]: deltaAbs !== null && 24 * 60 * 60 * 1000 <= deltaAbs && deltaAbs < 7 * 24 * 60 * 60 * 1000,
[style.taskDeadlineMonth]: deltaAbs !== null && deltaAbs >= 7 * 24 * 60 * 60 * 1000,
[style.taskDeadlineIncoming]: delta !== null && delta > 0,
[style.taskDeadlineFuture]: delta !== null && delta >= 0,
[style.taskDeadlinePast]: delta !== null && delta < 0,
[style.taskStatusNonExistent]: status === TaskSimplifiedStatus.NonExistent,
[style.taskStatusUnfinished]: status === TaskSimplifiedStatus.Unfinished,

View file

@ -36,7 +36,7 @@ const SORTING_MODE_TO_SORTING_FUNCTION = {
return TASK_IMPORTANCE_TO_VALUE[a[1].importance] - TASK_IMPORTANCE_TO_VALUE[b[1].importance]
},
[SortingMode.ByDeadline]: function sortTasksByPriority(a: TaskWithId, b: TaskWithId) {
return (a[1].deadline ?? -1) - (b[1].deadline ?? -1)
return (b[1].deadline ?? -1) - (a[1].deadline ?? -1)
},
[SortingMode.ByStatus]: function sortTasksByStatus(a: TaskWithId, b: TaskWithId) {
if(a[1].journaled_on && !b[1].journaled_on) return 1;