commit 3de93670d11f1096f9e3d5be6f79a3053ceabe12
parent 13720997db6d6f6ae9c822905513b17ea4b2f2dc
Author: Michael Camilleri <[email protected]>
Date: Tue, 24 Feb 2026 04:35:44 +0900
Add hint in macOS version when there are no tasks
Co-Authored-By: Codex GPT 5.3 <[email protected]>
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/ListlessMac/Views/TaskListView.swift b/ListlessMac/Views/TaskListView.swift
@@ -33,6 +33,7 @@ struct TaskListView: View {
@State var pullOffset: CGFloat = 0
var vStackSpacing: CGFloat { 0 }
+ var isCompletelyEmpty: Bool { activeTasks.isEmpty && completedTasks.isEmpty }
var selectedIndex: Int? {
guard let currentID = selectedTaskID else { return nil }
return activeTasks.firstIndex(where: { $0.id == currentID })
@@ -215,6 +216,14 @@ struct TaskListView: View {
.onTapGesture {
handleBackgroundTap()
}
+ .overlay {
+ if isCompletelyEmpty {
+ Text("Click to create")
+ .font(.subheadline)
+ .foregroundStyle(.secondary)
+ .allowsHitTesting(false)
+ }
+ }
.focusable()
.focused($focusedField, equals: .scrollView)
.focusEffectDisabled()