Revert "Log cleanup"

This reverts commit a4e26de6e5.

revert log changes
This commit is contained in:
Garth Vander Houwen 2024-06-23 06:05:25 -07:00
parent a4e26de6e5
commit a4c5890147
3 changed files with 23 additions and 40 deletions

View file

@ -15,16 +15,6 @@ struct LogDetail: View {
@Environment(\.dismiss) private var dismiss
private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom }
var log: OSLogEntryLog
var font: Font = .title2
private let dateFormatStyle = Date.FormatStyle()
.day(.defaultDigits)
.month(.defaultDigits)
.year(.twoDigits)
.hour(.twoDigits(amPM: .abbreviated))
.minute()
.second()
.secondFraction(.fractional(3))
var body: some View {
@ -40,10 +30,9 @@ struct LogDetail: View {
/// Time
Label {
Text("log.time".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
Text(log.date.formatted(dateFormatStyle))
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
LastHeardText(lastHeard: log.date)
.font(idiom == .phone ? .callout : .title)
} icon: {
Image(systemName: "timer")
.symbolRenderingMode(.hierarchical)
@ -56,14 +45,13 @@ struct LogDetail: View {
/// Subsystem
Label {
Text("log.subsystem".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
.font(idiom == .phone ? .callout : .title)
Text(log.subsystem)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
} icon: {
Image(systemName: "gear")
.symbolRenderingMode(.hierarchical)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
.frame(width: 35)
}
.padding(.bottom, 5)
@ -71,14 +59,13 @@ struct LogDetail: View {
/// Process
Label {
Text("log.process".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
.font(idiom == .phone ? .callout : .title)
Text(log.process)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
} icon: {
Image(systemName: "tag")
.symbolRenderingMode(.hierarchical)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
.frame(width: 35)
}
.padding(.bottom, 5)
@ -86,14 +73,13 @@ struct LogDetail: View {
/// Category
Label {
Text("log.category".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
.font(idiom == .phone ? .callout : .title)
Text(log.category)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
} icon: {
Image(systemName: "square.grid.2x2")
.symbolRenderingMode(.hierarchical)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
.frame(width: 35)
}
.padding(.bottom, 5)
@ -101,14 +87,13 @@ struct LogDetail: View {
/// Level
Label {
Text("log.level".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
.font(idiom == .phone ? .callout : .title)
Text(log.level.description)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
} icon: {
Image(systemName: "stairs")
.symbolRenderingMode(.hierarchical)
.font(idiom == .phone ? .caption : .title)
.font(idiom == .phone ? .callout : .title)
.frame(width: 35)
}
.padding(.bottom, 5)
@ -116,11 +101,10 @@ struct LogDetail: View {
/// message
Label {
Text("log.message".localized + ":")
.font(idiom == .phone ? .caption : .title)
.frame(width: idiom == .phone ? 90 : 190, alignment: .trailing)
.font(idiom == .phone ? .callout : .title)
Text(log.composedMessage)
.textSelection(.enabled)
.font(idiom == .phone ? .body : .title)
.font(idiom == .phone ? .callout : .title)
.padding(.bottom, 5)
} icon: {

View file

@ -210,11 +210,6 @@ struct NodeMapSwiftUI: View {
private func setupMapView() {
UIApplication.shared.isIdleTimerDisabled = true
if let coordinate = mostRecent?.coordinate {
position = .camera(MapCamera(centerCoordinate: coordinate, distance: 12000, heading: 0, pitch: 60))
} else {
position = .automatic
}
switch selectedMapLayer {
case .standard:
mapStyle = MapStyle.standard(elevation: .flat, pointsOfInterest: showPointsOfInterest ? .all : .excludingAll, showsTraffic: showTraffic)
@ -225,7 +220,11 @@ struct NodeMapSwiftUI: View {
case .offline:
mapStyle = MapStyle.hybrid(elevation: .flat, pointsOfInterest: showPointsOfInterest ? .all : .excludingAll, showsTraffic: showTraffic)
}
if node.positions?.count ?? 0 > 1 {
position = .automatic
} else if let coordinate = mostRecent?.coordinate {
position = .camera(MapCamera(centerCoordinate: coordinate, distance: 8000, heading: 0, pitch: 60))
}
if scene == nil, let coordinate = mostRecent?.coordinate {
Task {
scene = try await fetchScene(for: coordinate)

View file

@ -177,7 +177,7 @@
"interval.seventytwo.hours"="Seventy Two Hours";
"keyboard.type"="Keyboard Type";
"logging"="Logging";
"log.time"="Timestamp";
"log.time"="Time";
"log.subsystem"="Subsystem";
"log.process"="Process";
"log.category"="Category";