diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 3a33289..1f3fbe6 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -2640,22 +2640,6 @@ } } }, - "Right Arrow Icon" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Pfeil nach Rechts Icon" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Right Arrow Icon" - } - } - } - }, "Running Sora %@\nby cranci1" : { "localizations" : { "de" : { diff --git a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift index 3990384..41135b5 100644 --- a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift +++ b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift @@ -1279,11 +1279,10 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele skip85Button.layer.cornerRadius = 21 skip85Button.alpha = 0.7 -/* if #unavailable(iOS 15) { skip85Button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 10, bottom: 6, right: 10) } -*/ + skip85Button.layer.shadowColor = UIColor.black.cgColor skip85Button.layer.shadowOffset = CGSize(width: 0, height: 2) skip85Button.layer.shadowOpacity = 0.6 diff --git a/Sora/Views/ExploreView/ExploreView.swift b/Sora/Views/ExploreView/ExploreView.swift index f17c8f8..db0a111 100644 --- a/Sora/Views/ExploreView/ExploreView.swift +++ b/Sora/Views/ExploreView/ExploreView.swift @@ -88,62 +88,62 @@ struct ExploreView: View { .padding() .frame(maxWidth: .infinity) .background(Color(.systemBackground)) - } - - if isLoading { - LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) { - ForEach(0 ..< columnsCount * 4, id: \.self) { _ in - SkeletonCell(type: .explore, cellWidth: cellWidth) - } - } - .padding(.top) - .padding() - } else if hasNoResults { - if !(hideEmptySections ?? false) { - VStack(spacing: 8) { - Image(systemName: "star") - .font(.largeTitle) - .foregroundColor(.secondary) - .accessibilityLabel("Star Icon") - Text("No Content Available") - .font(.headline) - Text("Try updating the Module") - .font(.caption) - .foregroundColor(.secondary) - } - .padding() - .frame(maxWidth: .infinity) - .padding(.top) - } } else { - LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) { - ForEach(exploreItems) { item in - NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule!)) { - VStack { - KFImage(URL(string: item.imageUrl)) - .resizable() - .aspectRatio(contentMode: .fill) - .frame(height: cellWidth * 3 / 2) - .frame(maxWidth: cellWidth) - .cornerRadius(10) - .clipped() - Text(item.title) - .font(.subheadline) - .foregroundColor(Color.primary) - .padding([.leading, .bottom], 8) - .lineLimit(1) - } + if isLoading { + LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) { + ForEach(0 ..< columnsCount * 4, id: \.self) { _ in + SkeletonCell(type: .explore, cellWidth: cellWidth) } } - .onAppear { - updateOrientation() + .padding(.top) + .padding() + } else if hasNoResults { + if !(hideEmptySections ?? false) { + VStack(spacing: 8) { + Image(systemName: "star") + .font(.largeTitle) + .foregroundColor(.secondary) + .accessibilityLabel("Star Icon") + Text("No Content Available") + .font(.headline) + Text("Try updating the Module") + .font(.caption) + .foregroundColor(.secondary) + } + .padding() + .frame(maxWidth: .infinity) + .padding(.top) } - .onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in - updateOrientation() + } else { + LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) { + ForEach(exploreItems) { item in + NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule!)) { + VStack { + KFImage(URL(string: item.imageUrl)) + .resizable() + .aspectRatio(contentMode: .fill) + .frame(height: cellWidth * 3 / 2) + .frame(maxWidth: cellWidth) + .cornerRadius(10) + .clipped() + Text(item.title) + .font(.subheadline) + .foregroundColor(Color.primary) + .padding([.leading, .bottom], 8) + .lineLimit(1) + } + } + } + .onAppear { + updateOrientation() + } + .onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in + updateOrientation() + } } + .padding(.top) + .padding() } - .padding(.top) - .padding() } } diff --git a/Sora/Views/MediaInfoView/MediaInfoView.swift b/Sora/Views/MediaInfoView/MediaInfoView.swift index 8fdb362..9ed0284 100644 --- a/Sora/Views/MediaInfoView/MediaInfoView.swift +++ b/Sora/Views/MediaInfoView/MediaInfoView.swift @@ -217,42 +217,24 @@ struct MediaInfoView: View { } } - HStack { - Button(action: { - playFirstUnwatchedEpisode() - }) { - HStack { - Image(systemName: "play.fill") - .foregroundColor(.primary) - .accessibilityLabel("Play Icon") - Text(startWatchingText) - .font(.headline) - .foregroundColor(.primary) - } - .padding() - .frame(maxWidth: .infinity) - .background(Color.accentColor) - .cornerRadius(10) - } - .disabled(isFetchingEpisode) - .id(buttonRefreshTrigger) - - Button(action: { - libraryManager.toggleBookmark( - title: title, - imageUrl: imageUrl, - href: href, - moduleId: module.id.uuidString, - moduleName: module.metadata.sourceName - ) - }) { - Image(systemName: libraryManager.isBookmarked(href: href, moduleName: module.metadata.sourceName) ? "bookmark.fill" : "bookmark") - .resizable() - .frame(width: 20, height: 27) - .foregroundColor(Color.accentColor) - .accessibilityLabel("Bookmark Icon") + Button(action: { + playFirstUnwatchedEpisode() + }) { + HStack { + Image(systemName: "play.fill") + .foregroundColor(.primary) + .accessibilityLabel("Play Icon") + Text(startWatchingText) + .font(.headline) + .foregroundColor(.primary) } + .padding() + .frame(maxWidth: .infinity) + .background(Color.accentColor) + .cornerRadius(10) } + .disabled(isFetchingEpisode) + .id(buttonRefreshTrigger) if !episodeLinks.isEmpty { VStack(alignment: .leading, spacing: 10) { @@ -466,20 +448,21 @@ struct MediaInfoView: View { .animation(.spring(response: 0.4, dampingFraction: 0.6), value: showStreamLoadingView) } } - .navigationBarBackButtonHidden(true) .toolbar { - ToolbarItem(placement: .navigationBarLeading) { + ToolbarItem(placement: .navigationBarTrailing) { Button(action: { - activeFetchID = nil - isFetchingEpisode = false - showStreamLoadingView = false - dismiss() + libraryManager.toggleBookmark( + title: title, + imageUrl: imageUrl, + href: href, + moduleId: module.id.uuidString, + moduleName: module.metadata.sourceName + ) }) { - HStack { - Image(systemName: "chevron.left") - .accessibilityLabel("Right Arrow Icon") - Text("Search") - } + Image(systemName: libraryManager.isBookmarked(href: href, moduleName: module.metadata.sourceName) ? "bookmark.fill" : "bookmark") + .resizable() + .foregroundColor(Color.accentColor) + .accessibilityLabel("Bookmark Icon") } } }