diff options
| author | Fuwn <[email protected]> | 2025-03-15 06:00:36 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-15 06:00:36 -0700 |
| commit | 665549a703b4d1d196a7ece52a922cb990d99ce5 (patch) | |
| tree | 0eeb3e556ccf0b623fa86afb201f5d1c6f0cbaa7 | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-665549a703b4d1d196a7ece52a922cb990d99ce5.tar.xz sora-testing-665549a703b4d1d196a7ece52a922cb990d99ce5.zip | |
feat: Development commit
| -rw-r--r-- | Localizable.xcstrings | 6 | ||||
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 40 |
2 files changed, 46 insertions, 0 deletions
diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 49d84af..8d52372 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -161,6 +161,9 @@ "Manually Load Next Page" : { }, + "Next Search" : { + + }, "No Bookmarks" : { "localizations" : { "ja" : { @@ -226,6 +229,9 @@ "Preloaded Images: %lld" : { }, + "Previous Search" : { + + }, "Provider" : { "localizations" : { "ja" : { diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 9a4be18..b359e07 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -106,6 +106,46 @@ struct PostGridView: View { ToolbarItem(placement: .bottomBar) { PostGridBookmarkButtonView() } #endif } + + if manager.historyIndex > 0 { + #if os(macOS) + ToolbarItem { + Button(action: { + manager.goBackInHistory() + }) { + Label("Previous Search", systemImage: "chevron.left") + } + } + #else + ToolbarItem(placement: .bottomBar) { + Button(action: { + manager.goBackInHistory() + }) { + Label("Previous Search", systemImage: "chevron.left") + } + } + #endif + } + + if manager.historyIndex < manager.searchHistory.count - 1 { + #if os(macOS) + ToolbarItem { + Button(action: { + manager.goForwardInHistory() + }) { + Label("Next Search", systemImage: "chevron.right") + } + } + #else + ToolbarItem(placement: .bottomBar) { + Button(action: { + manager.goForwardInHistory() + }) { + Label("Next Search", systemImage: "chevron.right") + } + } + #endif + } } .navigationTitle("Posts") .refreshable { |