working on getting watch app to actually work

This commit is contained in:
breadone
2024-07-10 11:44:58 +12:00
parent f2de4ae7cc
commit a174b096fd
14 changed files with 130 additions and 54 deletions

View File

@@ -12,6 +12,7 @@ struct MainViewPresenter: View {
@Environment(\.modelContext) private var modelContext
@Query private var items: [OCProject]
@AppStorage(Preferences.themeColour) var themeColor = Color.blue.toHex()!
@State private var newProjectName = ""
@State private var addNewProject = false
@@ -23,13 +24,19 @@ struct MainViewPresenter: View {
CueCardViewPresenter(project: project)
} label: {
VStack(alignment: .leading) {
Text("\(project.name)")
.bold()
.font(.title2)
.foregroundStyle(Color(hex: project.color) ?? .white)
if (project.color == Color.clear.toHex()!) {
Text("\(project.name)")
.bold()
.font(.title2)
.foregroundStyle(Color(hex: themeColor) ?? .blue)
} else {
Text("\(project.name)")
.bold()
.font(.title2)
.foregroundStyle(Color(hex: project.color) ?? .white)
}
Text("\(project.cards?.count ?? 0) \(project.cards?.count ?? 0 == 1 ? "Card" : "Cards")")
}
}
} }
.padding(.vertical, 3)
}