Tasks empty state
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user