diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index 10463956..5b73506a 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -3674,6 +3674,17 @@ } } }, + "home.editShortcuts" : { + "comment" : "Context menu action on Home shortcuts to open Home settings", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Edit Shortcuts" + } + } + } + }, "home.downloads.notAvailable" : { "comment" : "Downloads not available on tvOS", "localizations" : { diff --git a/Yattee/Views/Home/HomeView.swift b/Yattee/Views/Home/HomeView.swift index 3039de33..241d3068 100644 --- a/Yattee/Views/Home/HomeView.swift +++ b/Yattee/Views/Home/HomeView.swift @@ -382,6 +382,9 @@ struct HomeView: View { return LazyVGrid(columns: columns, spacing: gridSpacing) { ForEach(settingsManager?.visibleShortcuts() ?? HomeShortcutItem.defaultOrder) { shortcut in shortcutCardView(for: shortcut) + #if !os(tvOS) + .contextMenu { editShortcutsButton } + #endif } } #if os(iOS) @@ -404,9 +407,23 @@ struct HomeView: View { ) { shortcutRowView(for: shortcut) } + #if !os(tvOS) + .contextMenu { editShortcutsButton } + #endif } } + #if !os(tvOS) + /// Context menu action that opens the Home settings sheet to reorder/toggle shortcuts. + private var editShortcutsButton: some View { + Button { + showingCustomizeHome = true + } label: { + Label(String(localized: "home.editShortcuts"), systemImage: "gear") + } + } + #endif + @ViewBuilder private func shortcutCardView(for shortcut: HomeShortcutItem) -> some View { switch shortcut {