mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 10:55:03 +00:00
Add clear history menu to tvOS History view
This commit is contained in:
@@ -93,6 +93,21 @@ struct HistoryListView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Label(String(localized: "viewOptions.title"), systemImage: "slider.horizontal.3")
|
Label(String(localized: "viewOptions.title"), systemImage: "slider.horizontal.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !history.isEmpty {
|
||||||
|
Menu {
|
||||||
|
ForEach(ClearHistoryOption.allCases, id: \.self) { option in
|
||||||
|
Button(role: .destructive) {
|
||||||
|
selectedClearOption = option
|
||||||
|
showingClearConfirmation = true
|
||||||
|
} label: {
|
||||||
|
Label(option.localizedTitle, systemImage: option.systemImage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Label(String(localized: "home.history.clear"), systemImage: "trash")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.focusSection()
|
.focusSection()
|
||||||
.padding(.horizontal, 48)
|
.padding(.horizontal, 48)
|
||||||
|
|||||||
Reference in New Issue
Block a user