Latest changes
This commit is contained in:
parent
d90fbfc5f0
commit
21d396b311
@ -12,7 +12,7 @@
|
||||
<key>AutoCat2.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>AutoCat2Mac.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
@ -22,7 +22,7 @@
|
||||
<key>AutoCat2SUI.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>AutoCat2UITests.testExample.xcscheme</key>
|
||||
<dict>
|
||||
|
||||
@ -42,7 +42,7 @@ class MainTabController: UITabBarController, UITabBarControllerDelegate {
|
||||
func showCheckPuller() {
|
||||
var attributes = EKAttributes.bottomToast
|
||||
attributes.displayDuration = .infinity
|
||||
attributes.entryBackground = .visualEffect(style: .extra) //.color(color: .standardBackground)
|
||||
attributes.entryBackground = .color(color: .init(.secondarySystemBackground)) //.visualEffect(style: .extra) //.color(color: .standardBackground)
|
||||
attributes.screenBackground = .color(color: EKColor(UIColor(white: 0, alpha: 0.7)))
|
||||
attributes.roundCorners = .top(radius: 24)
|
||||
attributes.screenInteraction = .dismiss
|
||||
|
||||
BIN
AutoCat2SUI/Fonts/RoadNumbers.otf
Normal file
BIN
AutoCat2SUI/Fonts/RoadNumbers.otf
Normal file
Binary file not shown.
BIN
AutoCat2SUI/Fonts/RoadNumbers2.0.otf
Normal file
BIN
AutoCat2SUI/Fonts/RoadNumbers2.0.otf
Normal file
Binary file not shown.
13
AutoCat2SUI/Info.plist
Normal file
13
AutoCat2SUI/Info.plist
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ATSApplicationFontsPath</key>
|
||||
<string>.</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>RoadNumbers.otf</string>
|
||||
<string>RoadNumbers2.0.otf</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -26,6 +26,7 @@ struct MainView: View {
|
||||
@State private var selectedFilterId: UUID?
|
||||
@State var selectedVehicle: CDVehicle?
|
||||
@State private var checkSheetPresented = false
|
||||
@State private var searchText = ""
|
||||
|
||||
@State var columnVisibility = NavigationSplitViewVisibility.all
|
||||
|
||||
@ -96,10 +97,12 @@ struct MainView: View {
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
Button(action: {}) {
|
||||
Image(systemName: "trash")
|
||||
Image(systemName: "line.3.horizontal.decrease.circle")
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle(filter.name)
|
||||
.navigationSubtitle("\(filtered.count) vehicles")
|
||||
}
|
||||
} else {
|
||||
EmptyView()
|
||||
@ -107,6 +110,16 @@ struct MainView: View {
|
||||
} detail: {
|
||||
if let vehicle = selectedVehicle {
|
||||
VehicleDetailView(vehicle: vehicle)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .automatic) {
|
||||
Button(action: {}) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle(vehicle.brand?.name?.original ?? "")
|
||||
.navigationSubtitle("\(vehicle.year)")
|
||||
.searchable(text: $searchText, placement: .toolbar)
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
|
||||
@ -43,6 +43,13 @@ struct VehicleDetailView: View {
|
||||
ReportTextItem(name: "STS", value: vehicle.sts)
|
||||
ReportTextItem(name: "PTS", value: vehicle.pts)
|
||||
}
|
||||
Section(header: Text("Engine")) {
|
||||
ReportTextItem(name: "Number", value: vehicle.engine?.number)
|
||||
ReportTextItem(name: "Fuel type", value: vehicle.engine?.fuelType)
|
||||
ReportTextItem(name: "Volume (cm2)", value: String(vehicle.engine?.volume ?? 0))
|
||||
ReportTextItem(name: "Power (HP)", value: String(vehicle.engine?.powerHp ?? 0))
|
||||
ReportTextItem(name: "Power (kw)", value: String(vehicle.engine?.powerKw ?? 0))
|
||||
}
|
||||
}
|
||||
.formStyle(.grouped)
|
||||
}
|
||||
|
||||
@ -16,10 +16,17 @@ struct PlateViewItem: View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(vehicle.brand?.name?.original ?? "")
|
||||
|
||||
HStack {
|
||||
PlateNumberView(number: PlateNumber(vehicle.number ?? ""),
|
||||
unrecognized: vehicle.unrecognized,
|
||||
outdated: vehicle.outdated,
|
||||
fontSize: 30)
|
||||
VStack {
|
||||
if let upDate = vehicle.updatedDate {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 2)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user