Tasks empty state

This commit is contained in:
Ian Gulliver
2026-10-20 22:09:20 -07:00
parent 02fb36e945
commit 627319a01f
+7 -6
View File
@@ -190,6 +190,12 @@ private struct ProjectBlock: View {
.font(Fonts.font(11))
.foregroundStyle(Palette.muted)
heading("Tasks")
if active.isEmpty {
Text("No active tasks.")
.foregroundStyle(Palette.muted)
.padding(.horizontal, 10)
.padding(.vertical, 6)
}
TaskRows(active: active.filter { !$0.background })
ForEach(active.filter(\.background), id: \.id) { task in
BackgroundRow(task: task)
@@ -230,12 +236,7 @@ private struct TaskRows: View {
@Environment(Store.self) private var store
var body: some View {
if active.isEmpty {
Text("No active tasks.")
.foregroundStyle(Palette.muted)
.padding(.horizontal, 10)
.padding(.vertical, 6)
} else {
if !active.isEmpty {
VStack(alignment: .leading, spacing: 0) {
ForEach(nested(store, active), id: \.task.id) { row in
TaskRow(task: row.task, depth: row.depth)