mirror of
https://github.com/somegeekintn/SimDirs.git
synced 2026-03-25 08:55:54 +00:00
A few UI tweaks around section headers mostly.
This commit is contained in:
parent
4d67317ebb
commit
762f0b7bc0
5 changed files with 20 additions and 22 deletions
|
|
@ -15,11 +15,14 @@ struct ContentHeader: View {
|
|||
}
|
||||
|
||||
var body: some View {
|
||||
Text(title)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(Color("ContentHeader"))
|
||||
.padding(.top)
|
||||
.padding(.bottom, 4.0)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(title)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(Color("ContentHeader"))
|
||||
.padding(.top)
|
||||
Divider()
|
||||
}
|
||||
.padding(.bottom, 4)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ struct AppContent: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0.0) {
|
||||
Text("PATHS")
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.secondary)
|
||||
ContentHeader("Paths")
|
||||
|
||||
PathRow(title: "Bundle Path", path: app.bundlePath)
|
||||
if let sandboxPath = app.sandboxPath {
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@ struct DeviceContent: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 3.0) {
|
||||
if !device.isAvailable {
|
||||
ErrorView(
|
||||
title: "\(device.name) is unavailable",
|
||||
description: device.availabilityError ?? "Unknown Error")
|
||||
}
|
||||
|
||||
ContentHeader("Paths")
|
||||
Group {
|
||||
if !device.isAvailable {
|
||||
ErrorView(
|
||||
title: "\(device.name) is unavailable",
|
||||
description: device.availabilityError ?? "Unknown Error")
|
||||
}
|
||||
|
||||
PathRow(title: "Data Path", path: device.dataPath)
|
||||
PathRow(title: "Log Path", path: device.logPath)
|
||||
}
|
||||
|
|
@ -113,6 +113,7 @@ struct DeviceContent: View {
|
|||
}
|
||||
.buttonStyle(.systemIcon("record.circle", active: device.isRecording))
|
||||
}
|
||||
.environment(\.isEnabled, isBooted)
|
||||
|
||||
ContentHeader("UI")
|
||||
HStack(spacing: 16) {
|
||||
|
|
@ -136,8 +137,8 @@ struct DeviceContent: View {
|
|||
.opacity(isBooted ? 1.0 : 0.5)
|
||||
}
|
||||
}
|
||||
.environment(\.isEnabled, isBooted)
|
||||
}
|
||||
.environment(\.isEnabled, isBooted)
|
||||
.onAppear {
|
||||
device.discoverUI()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ struct DeviceTypeContent: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0.0) {
|
||||
ContentHeader("Paths")
|
||||
PathRow(title: "Bundle Path", path: deviceType.bundlePath)
|
||||
}
|
||||
.font(.subheadline)
|
||||
|
|
|
|||
|
|
@ -30,17 +30,12 @@ struct RuntimeContent: View {
|
|||
description: runtime.availabilityError ?? "Unknown Error")
|
||||
}
|
||||
|
||||
Text("PATHS")
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.secondary)
|
||||
ContentHeader("Paths")
|
||||
if !runtime.bundlePath.isEmpty {
|
||||
PathRow(title: "Bundle Path", path: runtime.bundlePath)
|
||||
}
|
||||
|
||||
Text("SUPPORTED DEVICES \(runtime.isPlaceholder ? "(partial list)" : "")")
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.top, 8.0)
|
||||
ContentHeader("Supported devices\(runtime.isPlaceholder ? " (partial list)" : "")")
|
||||
ForEach(items) { item in
|
||||
Text("• \(item.name)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue