diff --git a/apple/OmnivoreKit/Sources/App/Views/BottomBars/CustomToolBar.swift b/apple/OmnivoreKit/Sources/App/Views/BottomBars/CustomToolBar.swift
index e3e0ab479..d9966181f 100644
--- a/apple/OmnivoreKit/Sources/App/Views/BottomBars/CustomToolBar.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/BottomBars/CustomToolBar.swift
@@ -40,7 +40,7 @@ struct CustomToolBar: View {
}
.padding(.top, 8)
}
- .padding(.bottom, 30)
+ .padding(.bottom, 35)
.background(ThemeManager.currentBgColor)
}
}
@@ -54,9 +54,6 @@ struct ToolBarButton: View {
action()
}, label: {
image
- .resizable()
- .renderingMode(.template)
- .aspectRatio(contentMode: .fit)
.frame(width: 28, height: 28)
.foregroundColor(ThemeManager.currentTheme.toolbarColor)
.frame(maxWidth: .infinity)
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
index b45b610da..606d8a609 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
@@ -20,7 +20,6 @@ struct WebReader: PlatformViewRepresentable {
@Binding var showNavBarActionID: UUID?
@Binding var shareActionID: UUID?
@Binding var annotation: String
- @Binding var showBottomBar: Bool
@Binding var showHighlightAnnotationModal: Bool
func makeCoordinator() -> WebReaderCoordinator {
@@ -91,9 +90,6 @@ struct WebReader: PlatformViewRepresentable {
context.coordinator.webViewActionHandler = webViewActionHandler
context.coordinator.updateNavBarVisibility = navBarVisibilityUpdater
context.coordinator.scrollPercentHandler = scrollPercentHandler
- context.coordinator.updateShowBottomBar = { newValue in
- self.showBottomBar = newValue
- }
context.coordinator.articleContentID = articleContent.id
loadContent(webView: webView)
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
index 9e68ca638..1ea09ef87 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
@@ -28,7 +28,6 @@ struct WebReaderContainerView: View {
@State var showExpandedAudioPlayer = false
@State var shareActionID: UUID?
@State var annotation = String()
- @State var showBottomBar = true
@State private var bottomBarOpacity = 0.0
@State private var errorAlertMessage: String?
@State private var showErrorAlertMessage = false
@@ -88,7 +87,6 @@ struct WebReaderContainerView: View {
private func tapHandler() {
withAnimation(.easeIn(duration: 0.08)) {
navBarVisible = !navBarVisible
- showBottomBar = navBarVisible
showNavBarActionID = UUID()
}
}
@@ -112,13 +110,11 @@ struct WebReaderContainerView: View {
case "pageTapped":
withAnimation {
navBarVisible = !navBarVisible
- showBottomBar = navBarVisible
showNavBarActionID = UUID()
}
case "dismissNavBars":
withAnimation {
navBarVisible = false
- showBottomBar = false
showNavBarActionID = UUID()
}
default:
@@ -160,45 +156,15 @@ struct WebReaderContainerView: View {
var textToSpeechButtonImage: some View {
if audioController.playbackError || audioController.state == .stopped || audioController.itemAudioProperties?.itemID != self.item.id {
- return AnyView(Image.headphones.frame(width: 48, height: 48))
+ return AnyView(Image.audioPlay.frame(width: 48, height: 48))
}
- let name = audioController.isPlayingItem(itemID: item.unwrappedID) ? "pause.circle" : "play.circle"
- return AnyView(Image(systemName: name).font(.appNavbarIcon))
+ if audioController.isPlayingItem(itemID: item.unwrappedID) {
+ return AnyView(Image.audioPause.frame(width: 48, height: 48))
+ }
+ return AnyView(Image.audioPlay.frame(width: 48, height: 48))
}
#endif
- var bottomButtons: some View {
- HStack(alignment: .center) {
- Button(action: archive, label: {
- item.isArchived ? Image.unarchive : Image.archive
- }).frame(width: 48, height: 48)
- .padding(.leading, 8)
- Divider().opacity(0.8)
-
- Button(action: delete, label: {
- Image.remove
- }).frame(width: 48, height: 48)
- Divider().opacity(0.8)
-
- Button(action: editLabels, label: {
- Image.label
- }).frame(width: 48, height: 48)
- Divider().opacity(0.8)
-
- Button(action: recommend, label: {
- Image(systemName: "sparkles")
- }).frame(width: 48, height: 48)
-
- // We don't have a single note function yet
-// Divider()
-//
-// Button(action: addNote, label: {
-// Image(systemName: "note")
-// }).frame(width: 48, height: 48)
- .padding(.trailing, 8)
- }.foregroundColor(.appGrayTextContrast)
- }
-
func audioMenuItem() -> some View {
Button(
action: {
@@ -431,7 +397,6 @@ struct WebReaderContainerView: View {
showNavBarActionID: $showNavBarActionID,
shareActionID: $shareActionID,
annotation: $annotation,
- showBottomBar: $showBottomBar,
showHighlightAnnotationModal: $showHighlightAnnotationModal
)
.background(ThemeManager.currentBgColor)
@@ -595,13 +560,13 @@ struct WebReaderContainerView: View {
if let audioProperties = audioController.itemAudioProperties {
MiniPlayerViewer(itemAudioProperties: audioProperties)
.padding(.top, 10)
- .padding(.bottom, showBottomBar ? 10 : 40)
+ .padding(.bottom, navBarVisible ? 10 : 40)
.background(Color.themeTabBarColor)
.onTapGesture {
showExpandedAudioPlayer = true
}
}
- if showBottomBar {
+ if navBarVisible {
CustomToolBar(
isArchived: item.isArchived,
archiveAction: archive,
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
index 98723f486..2436e11fb 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
@@ -20,7 +20,6 @@ final class WebReaderCoordinator: NSObject {
var previousShowNavBarActionID: UUID?
var previousShareActionID: UUID?
var updateNavBarVisibility: (Bool) -> Void = { _ in }
- var updateShowBottomBar: (Bool) -> Void = { _ in }
var articleContentID = UUID()
private var yOffsetAtStartOfDrag: Double?
private var lastYOffset: Double = 0
@@ -122,12 +121,6 @@ extension WebReaderCoordinator: WKNavigationDelegate {
scrollView.contentInset.top = navBarVisible ? readerViewNavBarHeight : 0
}
- if yOffset + scrollView.visibleSize.height > scrollView.contentSize.height - 140 {
- updateShowBottomBar(true)
- } else {
- updateShowBottomBar(false)
- }
-
let percent = Int(((yOffset + scrollView.visibleSize.height) / scrollView.contentSize.height) * 100)
scrollPercentHandler(max(0, min(percent, 100)))
}
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.swift b/apple/OmnivoreKit/Sources/Views/Images/Images.swift
index cc286d9e2..8dd6c6fe4 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.swift
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.swift
@@ -24,6 +24,9 @@ public extension Image {
static var chevronRight: Image { Image("chevron-right", bundle: .module) }
static var notebook: Image { Image("notebook", bundle: .module) }
static var headphones: Image { Image("headphones", bundle: .module) }
+
+ static var audioPlay: Image { Image("header-play", bundle: .module) }
+ static var audioPause: Image { Image("header-pause", bundle: .module) }
static var readerSettings: Image { Image("reader-settings", bundle: .module) }
static var utilityMenu: Image { Image("utility-menu", bundle: .module) }
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/Contents.json
new file mode 100644
index 000000000..3e1fa6739
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/Contents.json
@@ -0,0 +1,24 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "header-pause.svg",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ },
+ "properties" : {
+ "template-rendering-intent" : "template"
+ }
+}
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/header-pause.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/header-pause.svg
new file mode 100644
index 000000000..b3de00f7e
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-pause.imageset/header-pause.svg
@@ -0,0 +1,11 @@
+
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-play.imageset/Contents.json
similarity index 71%
rename from apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/Contents.json
rename to apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-play.imageset/Contents.json
index 6bb0cfc0c..e0caa008b 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-play.imageset/Contents.json
@@ -1,11 +1,11 @@
{
"images" : [
{
- "filename" : "three-dots.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "PlayCircle.svg",
"idiom" : "universal",
"scale" : "2x"
},
@@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
+ },
+ "properties" : {
+ "template-rendering-intent" : "template"
}
}
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/PlayCircle.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-play.imageset/PlayCircle.svg
similarity index 100%
rename from apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/PlayCircle.svg
rename to apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/header-play.imageset/PlayCircle.svg
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/Contents.json
index e0caa008b..526236fd4 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/Contents.json
@@ -1,15 +1,17 @@
{
"images" : [
{
+ "filename" : "headphones.png",
"idiom" : "universal",
"scale" : "1x"
},
{
- "filename" : "PlayCircle.svg",
+ "filename" : "headphones@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "headphones@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones.png
new file mode 100644
index 000000000..5fe6dcdfa
Binary files /dev/null and b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones.png differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@2x.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@2x.png
new file mode 100644
index 000000000..97d977df0
Binary files /dev/null and b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@2x.png differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@3x.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@3x.png
new file mode 100644
index 000000000..dfe1b2c22
Binary files /dev/null and b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/headphones.imageset/headphones@3x.png differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/Contents.json
index fbd23f894..fa6683df2 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/Contents.json
@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
- "filename" : "label.svg",
+ "filename" : "header-label.svg",
"idiom" : "universal",
"scale" : "2x"
},
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/header-label.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/header-label.svg
new file mode 100644
index 000000000..54ca883ee
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/header-label.svg
@@ -0,0 +1,11 @@
+
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/label.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/label.svg
deleted file mode 100644
index 8d3ff6758..000000000
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/label.imageset/label.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/Contents.json
index 4312ae5d7..5b7ff0d2c 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/Contents.json
@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
- "filename" : "notebook.svg",
+ "filename" : "header-notebook.svg",
"idiom" : "universal",
"scale" : "2x"
},
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/header-notebook.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/header-notebook.svg
new file mode 100644
index 000000000..35a023b01
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/header-notebook.svg
@@ -0,0 +1,10 @@
+
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/notebook.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/notebook.svg
deleted file mode 100644
index e034c7b32..000000000
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/notebook.imageset/notebook.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/Contents.json
index ed54ef068..47f6ec866 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/Contents.json
@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
- "filename" : "reader-settings.svg",
+ "filename" : "header-reader-settings.svg",
"idiom" : "universal",
"scale" : "2x"
},
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/header-reader-settings.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/header-reader-settings.svg
new file mode 100644
index 000000000..53467d960
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/header-reader-settings.svg
@@ -0,0 +1,10 @@
+
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/reader-settings.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/reader-settings.svg
deleted file mode 100644
index b3f174318..000000000
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/reader-settings.imageset/reader-settings.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/Contents.json b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/Contents.json
index a02d05dc2..67d103d43 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/Contents.json
@@ -1,17 +1,15 @@
{
"images" : [
{
- "filename" : "remove.png",
"idiom" : "universal",
"scale" : "1x"
},
{
- "filename" : "remove@2x.png",
+ "filename" : "toolbar-delete.svg",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "remove@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove.png
deleted file mode 100644
index 6f0731f80..000000000
Binary files a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove.png and /dev/null differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@2x.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@2x.png
deleted file mode 100644
index 6506db813..000000000
Binary files a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@2x.png and /dev/null differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@3x.png b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@3x.png
deleted file mode 100644
index 235beb5c6..000000000
Binary files a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/remove@3x.png and /dev/null differ
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/toolbar-delete.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/toolbar-delete.svg
new file mode 100644
index 000000000..7e4f7cde8
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/remove.imageset/toolbar-delete.svg
@@ -0,0 +1,14 @@
+
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/three-dots.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/three-dots.svg
deleted file mode 100644
index 33739e0df..000000000
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/three-dots.imageset/three-dots.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/toolbar-archive.imageset/toolbar-archive.svg b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/toolbar-archive.imageset/toolbar-archive.svg
index d7aa31afc..b3bf4ff3b 100644
--- a/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/toolbar-archive.imageset/toolbar-archive.svg
+++ b/apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/toolbar-archive.imageset/toolbar-archive.svg
@@ -1,12 +1,12 @@
-