Fix dashboard buttons on tvOS
This commit is contained in:
@@ -35,7 +35,7 @@ public struct NavigationButtonsView: View {
|
|||||||
|
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
private var tvOSBody: some View {
|
private var tvOSBody: some View {
|
||||||
HStack {
|
Group {
|
||||||
if showConnectionsButton {
|
if showConnectionsButton {
|
||||||
Button {
|
Button {
|
||||||
onConnectionsTap()
|
onConnectionsTap()
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ import SwiftUI
|
|||||||
|
|
||||||
@ToolbarContentBuilder private var toolbar: some ToolbarContent {
|
@ToolbarContentBuilder private var toolbar: some ToolbarContent {
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
ToolbarItem(placement: .topBarLeading) {
|
ToolbarItemGroup(placement: .topBarLeading) {
|
||||||
navigationButtons
|
navigationButtons
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -312,7 +312,7 @@ import SwiftUI
|
|||||||
Button {
|
Button {
|
||||||
showCardManagement = true
|
showCardManagement = true
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "line.3.horizontal.circle")
|
Image(systemName: "square.grid.2x2")
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ import SwiftUI
|
|||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .topBarTrailing) {
|
ToolbarItem(placement: .topBarTrailing) {
|
||||||
TVToolbarButton(title: "Reset") {
|
TVToolbarButton(title: String(localized: "Reset")) {
|
||||||
Task {
|
Task {
|
||||||
await configuration.resetToDefault()
|
await configuration.resetToDefault()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ struct ProfilePickerSheet: View {
|
|||||||
.environment(\.editMode, $editMode)
|
.environment(\.editMode, $editMode)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .confirmationAction) {
|
ToolbarItem(placement: .confirmationAction) {
|
||||||
TVToolbarButton(title: editMode.isEditing ? "Done" : "Edit") {
|
TVToolbarButton(title: editMode.isEditing ? String(localized: "Done"): String(localized: "Edit")) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
if editMode.isEditing {
|
if editMode.isEditing {
|
||||||
movingProfileID = nil
|
movingProfileID = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user