mirror of
https://github.com/somegeekintn/SimDirs.git
synced 2026-04-27 14:57:40 +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 {
|
var body: some View {
|
||||||
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
Text(title)
|
Text(title)
|
||||||
.fontWeight(.semibold)
|
.fontWeight(.semibold)
|
||||||
.foregroundColor(Color("ContentHeader"))
|
.foregroundColor(Color("ContentHeader"))
|
||||||
.padding(.top)
|
.padding(.top)
|
||||||
.padding(.bottom, 4.0)
|
Divider()
|
||||||
|
}
|
||||||
|
.padding(.bottom, 4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@ struct AppContent: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 0.0) {
|
VStack(alignment: .leading, spacing: 0.0) {
|
||||||
Text("PATHS")
|
ContentHeader("Paths")
|
||||||
.fontWeight(.semibold)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
|
|
||||||
PathRow(title: "Bundle Path", path: app.bundlePath)
|
PathRow(title: "Bundle Path", path: app.bundlePath)
|
||||||
if let sandboxPath = app.sandboxPath {
|
if let sandboxPath = app.sandboxPath {
|
||||||
|
|
|
||||||
|
|
@ -83,14 +83,14 @@ struct DeviceContent: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 3.0) {
|
VStack(alignment: .leading, spacing: 3.0) {
|
||||||
ContentHeader("Paths")
|
|
||||||
Group {
|
|
||||||
if !device.isAvailable {
|
if !device.isAvailable {
|
||||||
ErrorView(
|
ErrorView(
|
||||||
title: "\(device.name) is unavailable",
|
title: "\(device.name) is unavailable",
|
||||||
description: device.availabilityError ?? "Unknown Error")
|
description: device.availabilityError ?? "Unknown Error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ContentHeader("Paths")
|
||||||
|
Group {
|
||||||
PathRow(title: "Data Path", path: device.dataPath)
|
PathRow(title: "Data Path", path: device.dataPath)
|
||||||
PathRow(title: "Log Path", path: device.logPath)
|
PathRow(title: "Log Path", path: device.logPath)
|
||||||
}
|
}
|
||||||
|
|
@ -113,6 +113,7 @@ struct DeviceContent: View {
|
||||||
}
|
}
|
||||||
.buttonStyle(.systemIcon("record.circle", active: device.isRecording))
|
.buttonStyle(.systemIcon("record.circle", active: device.isRecording))
|
||||||
}
|
}
|
||||||
|
.environment(\.isEnabled, isBooted)
|
||||||
|
|
||||||
ContentHeader("UI")
|
ContentHeader("UI")
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
|
|
@ -136,8 +137,8 @@ struct DeviceContent: View {
|
||||||
.opacity(isBooted ? 1.0 : 0.5)
|
.opacity(isBooted ? 1.0 : 0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.environment(\.isEnabled, isBooted)
|
.environment(\.isEnabled, isBooted)
|
||||||
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
device.discoverUI()
|
device.discoverUI()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ struct DeviceTypeContent: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 0.0) {
|
VStack(alignment: .leading, spacing: 0.0) {
|
||||||
|
ContentHeader("Paths")
|
||||||
PathRow(title: "Bundle Path", path: deviceType.bundlePath)
|
PathRow(title: "Bundle Path", path: deviceType.bundlePath)
|
||||||
}
|
}
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
|
|
|
||||||
|
|
@ -30,17 +30,12 @@ struct RuntimeContent: View {
|
||||||
description: runtime.availabilityError ?? "Unknown Error")
|
description: runtime.availabilityError ?? "Unknown Error")
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("PATHS")
|
ContentHeader("Paths")
|
||||||
.fontWeight(.semibold)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
if !runtime.bundlePath.isEmpty {
|
if !runtime.bundlePath.isEmpty {
|
||||||
PathRow(title: "Bundle Path", path: runtime.bundlePath)
|
PathRow(title: "Bundle Path", path: runtime.bundlePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("SUPPORTED DEVICES \(runtime.isPlaceholder ? "(partial list)" : "")")
|
ContentHeader("Supported devices\(runtime.isPlaceholder ? " (partial list)" : "")")
|
||||||
.fontWeight(.semibold)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
.padding(.top, 8.0)
|
|
||||||
ForEach(items) { item in
|
ForEach(items) { item in
|
||||||
Text("• \(item.name)")
|
Text("• \(item.name)")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue