This commit is contained in:
2025-07-13 21:54:09 -04:00
parent 0545f5dbc7
commit bdaa406876
33 changed files with 984 additions and 714 deletions

View File

@ -1,4 +1,5 @@
import OSLog
import SwiftUI
struct AppLogger {
private let logger: Logger
@ -34,4 +35,24 @@ struct AppLogger {
func error(_ message: String) {
logger.error("\(formattedMessage(message))")
}
func vdebug(_ message: String) -> any View {
logger.debug("\(formattedMessage(message))")
return EmptyView()
}
func vinfo(_ message: String) -> any View {
logger.info("\(formattedMessage(message))")
return EmptyView()
}
func vwarning(_ message: String) -> any View {
logger.warning("\(formattedMessage(message))")
return EmptyView()
}
func verror(_ message: String) -> any View {
logger.error("\(formattedMessage(message))")
return EmptyView()
}
}

View File

@ -19,21 +19,22 @@ struct ListItem: View {
HStack {
VStack (alignment: .leading) {
Text("\(title)")
HStack {
if let subtitle = subtitle {
Text("\(subtitle)")
.font(.footnote)
}
.font(.headline)
HStack (alignment: .bottom) {
if let badges = badges {
ForEach (badges, id: \.self) { badge in
Text("\(badge.text)")
.bold()
.padding([.leading,.trailing], 5)
.cornerRadius(4)
.background(badge.color)
.foregroundColor(.white)
.cornerRadius(4)
}
}
if let subtitle = subtitle {
Text("\(subtitle)")
.font(.footnote)
}
}
}
if let count = count {