mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Finsh up the log fonts
This commit is contained in:
parent
4d375a1e43
commit
91817a72e3
2 changed files with 21 additions and 11 deletions
|
|
@ -40,7 +40,8 @@ struct LogDetail: View {
|
|||
.frame(width: 35)
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
.listRowSeparator(.visible)
|
||||
.listSectionSeparator(.hidden, edges: .top)
|
||||
.listSectionSeparator(.visible, edges: .bottom)
|
||||
/// Subsystem
|
||||
Label {
|
||||
Text("log.subsystem".localized + ":")
|
||||
|
|
@ -76,7 +77,7 @@ struct LogDetail: View {
|
|||
Text(log.category)
|
||||
.font(idiom == .phone ? .callout : .title)
|
||||
} icon: {
|
||||
Image(systemName: "rectangle.3.group")
|
||||
Image(systemName: "square.grid.2x2")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(idiom == .phone ? .callout : .title)
|
||||
.frame(width: 35)
|
||||
|
|
@ -101,6 +102,10 @@ struct LogDetail: View {
|
|||
Label {
|
||||
Text("log.message".localized + ":")
|
||||
.font(idiom == .phone ? .callout : .title)
|
||||
Text(log.composedMessage)
|
||||
.textSelection(.enabled)
|
||||
.font(idiom == .phone ? .callout : .title)
|
||||
.padding(.bottom, 5)
|
||||
|
||||
} icon: {
|
||||
Image(systemName: "text.bubble")
|
||||
|
|
@ -109,11 +114,10 @@ struct LogDetail: View {
|
|||
.frame(width: 35)
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
Text(log.composedMessage)
|
||||
.font(idiom == .phone ? .callout : .title)
|
||||
.padding(.bottom, 5)
|
||||
|
||||
}
|
||||
.listStyle(.plain)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
|
@ -131,6 +135,7 @@ struct LogDetail: View {
|
|||
.padding(.bottom)
|
||||
#endif
|
||||
}
|
||||
.monospaced()
|
||||
.presentationDetents([.fraction(0.65), .fraction(0.75), .fraction(0.85)])
|
||||
.presentationDragIndicator(.visible)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import OSLog
|
|||
struct AppLog: View {
|
||||
|
||||
@State private var logs: [OSLogEntryLog] = []
|
||||
@State private var sortOrder = [KeyPathComparator(\OSLogEntryLog.date, order: .forward)]
|
||||
@State private var sortOrder = [KeyPathComparator(\OSLogEntryLog.date, order: .reverse)]
|
||||
@State private var selection: OSLogEntry.ID?
|
||||
@State private var selectedLog: OSLogEntryLog?
|
||||
@State private var presentingErrorDetails: Bool = false
|
||||
|
|
@ -41,18 +41,22 @@ struct AppLog: View {
|
|||
TableColumn("log.time", value: \.date) { value in
|
||||
Text(value.date.formatted(dateFormatStyle))
|
||||
}
|
||||
.width(min: 100, max: 125)
|
||||
.width(min: 125, max: 150)
|
||||
TableColumn("log.category", value: \.category)
|
||||
.width(min: 100, max: 125)
|
||||
.width(min: 125, max: 150)
|
||||
TableColumn("log.level") { value in
|
||||
Text(value.level.description)
|
||||
}
|
||||
.width(min: 50, max: 100)
|
||||
.width(min: 75, max: 100)
|
||||
}
|
||||
TableColumn("log.message", value: \.composedMessage)
|
||||
.width(ideal: 200, max: .infinity)
|
||||
TableColumn("log.message", value: \.composedMessage) { value in
|
||||
Text(value.composedMessage)
|
||||
}
|
||||
.width(ideal: 200, max: .infinity)
|
||||
|
||||
|
||||
}
|
||||
.monospaced()
|
||||
.searchable(text: $searchTerm, placement: .navigationBarDrawer, prompt: "Search")
|
||||
.disabled(selection != nil)
|
||||
.overlay {
|
||||
|
|
@ -78,6 +82,7 @@ struct AppLog: View {
|
|||
}
|
||||
.task {
|
||||
logs = await fetchLogs()
|
||||
logs.sort(using: sortOrder)
|
||||
}
|
||||
.fileExporter(
|
||||
isPresented: $isExporting,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue