diff --git a/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListView.swift b/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListView.swift index b16a0c3bf..50de7f421 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListView.swift @@ -12,7 +12,35 @@ struct HighlightsListView: View { let itemObjectID: NSManagedObjectID @Binding var hasHighlightMutations: Bool + var emptyView: some View { + Text(""" + You have not added any highlights to this page. + """) + .multilineTextAlignment(.center) + .padding(16) + } + var innerBody: some View { + (viewModel.highlightItems.count > 0 ? AnyView(listView) : AnyView(emptyView)) + .navigationTitle("Highlights & Notes") + .listStyle(PlainListStyle()) + #if os(iOS) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + dismissButton + } + } + #else + .toolbar { + ToolbarItemGroup { + dismissButton + } + } + #endif + } + + var listView: some View { List { Section { ForEach(viewModel.highlightItems) { highlightParams in @@ -38,22 +66,6 @@ struct HighlightsListView: View { } } } - .navigationTitle("Highlights") - .listStyle(PlainListStyle()) - #if os(iOS) - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - dismissButton - } - } - #else - .toolbar { - ToolbarItemGroup { - dismissButton - } - } - #endif } var dismissButton: some View { diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index e6a508038..37f7df362 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -294,7 +294,7 @@ import Views .contextMenu { Button( action: { viewModel.itemForHighlightsView = item }, - label: { Label("View Highlights", systemImage: "highlighter") } + label: { Label("View Highlights & Notes", systemImage: "highlighter") } ) Button( action: { viewModel.itemUnderTitleEdit = item }, diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift index 00891c3d0..31e410553 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift @@ -152,7 +152,7 @@ struct WebReaderContainerView: View { Group { Button( action: { showHighlightsView = true }, - label: { Label("View Highlights", systemImage: "highlighter") } + label: { Label("View Highlights & Notes", systemImage: "highlighter") } ) Button( action: { showTitleEdit = true }, diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift index 99223de4d..57e7e86c1 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift @@ -48,7 +48,7 @@ public struct GridCard: View { Group { Button( action: { menuActionHandler(.viewHighlights) }, - label: { Label("View Highlights", systemImage: "highlighter") } + label: { Label("View Highlights & Notes", systemImage: "highlighter") } ) Button( action: { menuActionHandler(.editTitle) },