diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/WebReaderContent.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/WebReaderContent.kt index 1a96641c6..cf8993799 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/WebReaderContent.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/WebReaderContent.kt @@ -7,7 +7,7 @@ import com.google.gson.Gson enum class WebFont(val displayText: String, val rawValue: String) { INTER("Inter", "Inter"), - SYSTEM("System Default", "unset"), + SYSTEM("System Default", "system-ui"), OPEN_DYSLEXIC("Open Dyslexic", "OpenDyslexic"), MERRIWEATHER("Merriweather", "Merriweather"), LORA("Lora", "Lora"), diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift index 0b8ebc851..23027e2b8 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift @@ -16,7 +16,7 @@ import Views @AppStorage(UserDefaultKey.lastSelectedFeaturedItemFilter.rawValue) var featureFilter = FeaturedItemFilter.continueReading.rawValue - var limit = 10 + var limit = 6 var cursor: String? var totalCount: Int? diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 055ef67f2..7814e5ad8 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -147,7 +147,6 @@ struct AnimatingCellHeight: AnimatableModifier { @State var isListScrolled = false @State var listTitle = "" @State var isEditMode: EditMode = .inactive - @State var showOpenAIVoices = false @State var showExpandedAudioPlayer = false @EnvironmentObject var dataService: DataService @@ -155,7 +154,6 @@ struct AnimatingCellHeight: AnimatableModifier { @Environment(\.horizontalSizeClass) var horizontalSizeClass @AppStorage(UserDefaultKey.homeFeedlayoutPreference.rawValue) var prefersListLayout = true - @AppStorage(UserDefaultKey.openAIPrimerDisplayed.rawValue) var openAIPrimerDisplayed = false @ObservedObject var viewModel: HomeFeedViewModel @State private var selection = Set() @@ -249,6 +247,11 @@ struct AnimatingCellHeight: AnimatableModifier { }, toastOperationHandler: nil) } } + .sheet(isPresented: $showAddLinkView) { + NavigationView { + LibraryAddLinkView() + } + } .fullScreenCover(isPresented: $showExpandedAudioPlayer) { ExpandedAudioPlayer( delete: { @@ -287,11 +290,6 @@ struct AnimatingCellHeight: AnimatableModifier { .fullScreenCover(isPresented: $searchPresented) { LibrarySearchView(homeFeedViewModel: self.viewModel) } - .sheet(isPresented: $showAddLinkView) { - NavigationView { - LibraryAddLinkView() - } - } .task { await viewModel.loadFilters(dataService: dataService) if viewModel.appliedFilter == nil { diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/OpenAIVoicesModal.swift b/apple/OmnivoreKit/Sources/App/Views/Home/OpenAIVoicesModal.swift deleted file mode 100644 index e920387c3..000000000 --- a/apple/OmnivoreKit/Sources/App/Views/Home/OpenAIVoicesModal.swift +++ /dev/null @@ -1,135 +0,0 @@ -// swiftlint:disable line_length -#if os(iOS) - import Foundation - import Models - import Services - import SwiftUI - import Views - - struct OpenAIVoiceItem { - let name: String - let key: String - } - - public struct OpenAIVoicesModal: View { - @Environment(\.dismiss) private var dismiss - - let audioController: AudioController - - let message: String = """ - We've added six new voices powered by OpenAI and enabled them for all users. If you are already using our Ultra Realistic voices, don't worry, trying these voices will not remove you from the ultra realistic beta. - - [Tell your friends about Omnivore](https://omnivore.app) - """ - - @State var playbackSample: String? - - let voices = [ - OpenAIVoiceItem(name: "Alloy", key: "openai-alloy"), - OpenAIVoiceItem(name: "Echo", key: "openai-echo"), - OpenAIVoiceItem(name: "Fable", key: "openai-fable"), - OpenAIVoiceItem(name: "Onyx", key: "openai-onyx"), - OpenAIVoiceItem(name: "Nova", key: "openai-nova"), - OpenAIVoiceItem(name: "Shimmer", key: "openai-shimmer") - ] - - var closeButton: some View { - Button(action: { - dismiss() - }, label: { - ZStack { - Circle() - .foregroundColor(Color.circleButtonBackground) - .frame(width: 30, height: 30) - - Image(systemName: "xmark") - .resizable(resizingMode: Image.ResizingMode.stretch) - .foregroundColor(Color.circleButtonForeground) - .aspectRatio(contentMode: .fit) - .font(Font.title.weight(.bold)) - .frame(width: 12, height: 12) - } - }) - } - - public var body: some View { - HStack { - Text("New voices powered by OpenAI") - .font(Font.system(size: 20, weight: .bold)) - Spacer() - closeButton - } - .padding(.top, 16) - .padding(.horizontal, 16) - - List { - Section { - let parsedMessage = try? AttributedString(markdown: message, - options: .init(interpretedSyntax: .inlineOnly)) - Text(parsedMessage ?? "") - .multilineTextAlignment(.leading) - .foregroundColor(Color.appGrayTextContrast) - .accentColor(.blue) - .frame(maxWidth: .infinity, alignment: .leading) - .padding(.top, 16) - } - - Section { - ForEach(voices, id: \.self.name) { voice in - voiceRow(for: voice) - } - } - } - .environmentObject(audioController) - } - - func voiceRow(for voice: OpenAIVoiceItem) -> some View { - Button(action: { - if audioController.isPlayingSample(voice: voice.key) { - playbackSample = nil - audioController.stopVoiceSample() - } - playbackSample = voice.key - audioController.currentVoice = voice.key - audioController.playVoiceSample(voice: voice.key) - Timer.scheduledTimer(withTimeInterval: 2.0, repeats: true) { timer in - let playing = audioController.isPlayingSample(voice: voice.key) - if playing { - playbackSample = voice.key - } else if !playing { - // If the playback sample is something else, its taken ownership - // of the value so we just ignore it and shut down our timer. - if playbackSample == voice.key { - playbackSample = nil - } - timer.invalidate() - } - } - }, label: { - HStack { - if playbackSample == voice.key { - Image(systemName: "stop.circle") - .font(.appTitleTwo) - .padding(.trailing, 16) - } else { - Image(systemName: "play.circle") - .font(.appTitleTwo) - .padding(.trailing, 16) - } - Text(voice.name) - Spacer() - - if audioController.currentVoice == voice.key { - if audioController.isPlaying, audioController.isLoading { - ProgressView() - } else { - Image(systemName: "checkmark") - } - } - }.contentShape(Rectangle()) - }) - .buttonStyle(PlainButtonStyle()) - .frame(maxWidth: .infinity) - } - } -#endif diff --git a/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift b/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift index c6e11af42..07681a8fe 100644 --- a/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/LibraryTabView.swift @@ -21,7 +21,9 @@ struct LibraryTabView: View { @AppStorage("LibraryTabView::hideFollowingTab") var hideFollowingTab = false @AppStorage(UserDefaultKey.lastSelectedTabItem.rawValue) var selectedTab = "inbox" + @AppStorage(UserDefaultKey.followingPrimerDisplayed.rawValue) var followingPrimerDisplayed = false + @State var showFollowingPrimer = true @State var showExpandedAudioPlayer = false private let syncManager = LibrarySyncManager() @@ -72,6 +74,12 @@ struct LibraryTabView: View { var body: some View { VStack(spacing: 0) { + PresentationLink(transition: UIDevice.isIPad ? .popover : .sheet(detents: [.medium]), isPresented: $showFollowingPrimer) { + FollowingViewModal() + } label: { + EmptyView() + } + TabView(selection: $selectedTab) { if !hideFollowingTab { NavigationView { diff --git a/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift b/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift index 6b7db00d6..8aa1cfd60 100644 --- a/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift +++ b/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift @@ -28,7 +28,7 @@ public enum UserDefaultKey: String { case recentSearchTerms case audioPlayerExpanded case themeName - case openAIPrimerDisplayed + case followingPrimerDisplayed case notificationsEnabled case deviceTokenID case userWordsPerMinute diff --git a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift index 0904bb340..168ce3253 100644 --- a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift +++ b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift @@ -3,7 +3,7 @@ import Utils public enum WebFont: String, CaseIterable { case inter = "Inter" - case system = "unset" + case system = "system-ui" case merriweather = "Merriweather" case lora = "Lora" case opensans = "Open Sans" diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/102.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/102.png deleted file mode 100644 index f5fe221f6..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/102.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/16.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/16.png deleted file mode 100644 index 90f8121d8..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/16.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/32.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/32.png deleted file mode 100644 index 663b7704a..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/32.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/512.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/512.png deleted file mode 100644 index 2255a4b59..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/512.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/64.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/64.png deleted file mode 100644 index 447fafc66..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/64.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/66.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/66.png deleted file mode 100644 index 6fa49f249..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/66.png and /dev/null differ diff --git a/apple/Resources/Assets.xcassets/AppIcon.appiconset/92.png b/apple/Resources/Assets.xcassets/AppIcon.appiconset/92.png deleted file mode 100644 index 3e7dc5833..000000000 Binary files a/apple/Resources/Assets.xcassets/AppIcon.appiconset/92.png and /dev/null differ