diff --git a/apple/OmnivoreKit/Sources/App/MacMenuCommands.swift b/apple/OmnivoreKit/Sources/App/MacMenuCommands.swift index f9bfbdca1..72250e257 100644 --- a/apple/OmnivoreKit/Sources/App/MacMenuCommands.swift +++ b/apple/OmnivoreKit/Sources/App/MacMenuCommands.swift @@ -15,6 +15,8 @@ import Views @Binding var justifyText: Bool @Binding var currentThemeName: String + @Environment(\.openURL) var openURL + public var fontSizeButtons: some View { Group { Button( @@ -133,6 +135,13 @@ import Views } public var body: some Commands { + CommandGroup(after: .appInfo) { + Button("Open Online", action: { + if let url = URL(string: "https://omnivore.app/") { + NSWorkspace.shared.open(url) + } + }) + } CommandMenu("Reader Display") { spacingButtons diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift index aafd42382..566d451d5 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift @@ -11,6 +11,7 @@ import Views @EnvironmentObject var audioController: AudioController @State private var itemToRemove: LinkedItem? @State private var confirmationShown = false + @State private var presentProfileSheet = false @ObservedObject var viewModel: HomeFeedViewModel @@ -144,6 +145,12 @@ import Views .sheet(item: $viewModel.itemUnderTitleEdit) { item in LinkedItemMetadataEditView(item: item) } + .sheet(isPresented: $presentProfileSheet) { + ProfileView() + } + .onReceive(NSNotification.displayProfilePublisher) { _ in + presentProfileSheet = true + } .task { if viewModel.items.isEmpty { loadItems(isRefresh: true) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index 76422d7c1..5a8cb711f 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -82,6 +82,7 @@ struct ProfileView: View { innerBody } .listStyle(InsetListStyle()) + .frame(minWidth: 400, minHeight: 400) #endif } diff --git a/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift b/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift index a588435ff..45296f027 100644 --- a/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift +++ b/apple/OmnivoreKit/Sources/Services/NSNotification+Operation.swift @@ -9,6 +9,7 @@ public extension NSNotification { static let OperationFailure = Notification.Name("OperationFailure") static let ReaderSettingsChanged = Notification.Name("ReaderSettingsChanged") static let SpeakingReaderItem = Notification.Name("SpeakingReaderItem") + static let DisplayProfile = Notification.Name("DisplayProfile") static var pushFeedItemPublisher: NotificationCenter.Publisher { NotificationCenter.default.publisher(for: PushJSONArticle) @@ -34,6 +35,10 @@ public extension NSNotification { NotificationCenter.default.publisher(for: SpeakingReaderItem) } + static var displayProfilePublisher: NotificationCenter.Publisher { + NotificationCenter.default.publisher(for: DisplayProfile) + } + internal var operationMessage: String? { if let message = userInfo?["message"] as? String { return message @@ -68,4 +73,8 @@ public extension NSNotification { static func readerSettingsChanged() { NotificationCenter.default.post(name: NSNotification.ReaderSettingsChanged, object: nil) } + + static func displayProfile() { + NotificationCenter.default.post(name: NSNotification.DisplayProfile, object: nil) + } } diff --git a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings index 62b25a688..127dd0811 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings @@ -115,7 +115,7 @@ "menuDebugApiEnv" = "API Environment:"; // Navigation -"navigationSelectLink" = "Select a link from the feed"; +"navigationSelectLink" = "Select a link from your library"; "navigationSelectSidebarToggle" = "Toggle sidebar"; // Welcome View