diff options
Diffstat (limited to 'Sora')
| -rw-r--r-- | Sora/Views/ContentView.swift | 4 | ||||
| -rw-r--r-- | Sora/Views/GenericItemView.swift | 46 | ||||
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 1 |
3 files changed, 28 insertions, 23 deletions
diff --git a/Sora/Views/ContentView.swift b/Sora/Views/ContentView.swift index b232e18..c907ff3 100644 --- a/Sora/Views/ContentView.swift +++ b/Sora/Views/ContentView.swift @@ -22,6 +22,9 @@ struct ContentView: View { BookmarksView(selectedTab: $selectedTabIndex) case 2: + PostGridSearchHistoryView(selectedTab: $selectedTabIndex) + + case 3: SettingsView() default: @@ -35,6 +38,7 @@ struct ContentView: View { .foregroundColor(.secondary) } } + .onAppear { tabs.append("Search History") } #if DEBUG .onAppear { tabs.append("Settings") } #endif diff --git a/Sora/Views/GenericItemView.swift b/Sora/Views/GenericItemView.swift index f2d70cb..34ce88a 100644 --- a/Sora/Views/GenericItemView.swift +++ b/Sora/Views/GenericItemView.swift @@ -6,35 +6,35 @@ struct GenericItemView<T: ItemViewModel>: View { let removeAction: (UUID) -> Void var body: some View { -#if os(macOS) - HStack { - VStack(alignment: .leading) { - Text(item.tags.joined(separator: ", ").lowercased()) + #if os(macOS) + HStack { + VStack(alignment: .leading) { + Text(item.tags.joined(separator: ", ").lowercased()) + + Spacer() + + Text("On \(item.date.formatted()) from \(item.provider.rawValue)") + .font(.caption) + .foregroundStyle(Color.secondary) + } Spacer() + Button { + removeAction(item.id) + } label: { + Image(systemName: "trash") + } + } + .padding() + #else + VStack(alignment: .leading) { + Text(item.tags.joined(separator: ", ").lowercased()) + Text("On \(item.date.formatted()) from \(item.provider.rawValue)") .font(.caption) .foregroundStyle(Color.secondary) } - - Spacer() - - Button { - removeAction(item.id) - } label: { - Image(systemName: "trash") - } - } - .padding() -#else - VStack(alignment: .leading) { - Text(item.tags.joined(separator: ", ").lowercased()) - - Text("On \(item.date.formatted()) from \(item.provider.rawValue)") - .font(.caption) - .foregroundStyle(Color.secondary) - } -#endif + #endif } } diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 0921c2e..76bfa7c 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -113,6 +113,7 @@ struct PostGridView: View { .scrollDisabled(manager.isLoading) .sheet(isPresented: $isSearchHistoryPresented) { PostGridSearchHistoryView(selectedTab: .constant(0)) + .frame(minHeight: 250) } } } |