wip
This commit is contained in:
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user