tvOS version in basic app settings
This commit is contained in:
parent
0b171c97a8
commit
e1763390cc
|
@ -16,14 +16,14 @@ final class BasicAppSettingsCoordinator: NavigationCoordinatable {
|
||||||
|
|
||||||
@Root
|
@Root
|
||||||
var start = makeStart
|
var start = makeStart
|
||||||
@Route(.push)
|
@Route(.push)
|
||||||
var about = makeAbout
|
var about = makeAbout
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
func makeAbout() -> some View {
|
||||||
|
AboutView()
|
||||||
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
|
||||||
func makeAbout() -> some View {
|
|
||||||
AboutView()
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
func makeStart() -> some View {
|
func makeStart() -> some View {
|
||||||
BasicAppSettingsView(viewModel: BasicAppSettingsViewModel())
|
BasicAppSettingsView(viewModel: BasicAppSettingsViewModel())
|
||||||
|
|
|
@ -24,16 +24,31 @@ struct BasicAppSettingsView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Picker(L10n.appearance, selection: $appAppearance) {
|
Button {} label: {
|
||||||
ForEach(self.viewModel.appearances, id: \.self) { appearance in
|
HStack {
|
||||||
Text(appearance.localizedName).tag(appearance.rawValue)
|
Text("Version")
|
||||||
|
Spacer()
|
||||||
|
Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} header: {
|
} header: {
|
||||||
L10n.accessibility.text
|
Text("About")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Implement once design is theme appearance friendly
|
||||||
|
// Section {
|
||||||
|
// Picker(L10n.appearance, selection: $appAppearance) {
|
||||||
|
// ForEach(self.viewModel.appearances, id: \.self) { appearance in
|
||||||
|
// Text(appearance.localizedName).tag(appearance.rawValue)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } header: {
|
||||||
|
// L10n.accessibility.text
|
||||||
|
// }
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
resetTapped = true
|
resetTapped = true
|
||||||
} label: {
|
} label: {
|
||||||
|
|
|
@ -160,13 +160,17 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {} label: {
|
Section {
|
||||||
HStack {
|
Button {} label: {
|
||||||
Text("Version")
|
HStack {
|
||||||
Spacer()
|
Text("Version")
|
||||||
Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))")
|
Spacer()
|
||||||
.foregroundColor(.secondary)
|
Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} header: {
|
||||||
|
Text("About")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,18 +30,18 @@ struct BasicAppSettingsView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
basicAppSettingsRouter.route(to: \.about)
|
basicAppSettingsRouter.route(to: \.about)
|
||||||
} label: {
|
} label: {
|
||||||
HStack {
|
HStack {
|
||||||
Text("About")
|
Text("About")
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
Spacer()
|
Spacer()
|
||||||
Image(systemName: "chevron.right")
|
Image(systemName: "chevron.right")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Picker(L10n.appearance, selection: $appAppearance) {
|
Picker(L10n.appearance, selection: $appAppearance) {
|
||||||
ForEach(self.viewModel.appearances, id: \.self) { appearance in
|
ForEach(self.viewModel.appearances, id: \.self) { appearance in
|
||||||
|
|
Loading…
Reference in New Issue