From 400079f0da85cf401eadaa351f7215ae158a94fa Mon Sep 17 00:00:00 2001 From: 50/50 <80717571+50n50@users.noreply.github.com> Date: Sat, 31 May 2025 20:56:06 +0200 Subject: [PATCH] May God be with you (#141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Minor changes * more minor changes * MORE MINOR CHANGES * Fixed one singular bug * Update SettingsViewGeneral.swift * fuck conflicts * fuck you and your credits * buh buh * Update SettingsViewAbout.swift * What's that? What's a properly working code without unnecessary issues? * Type shit maybe? * Create ios.yml * smol * type shi shi * end * Fixed system theme bug * (hopefully) fixed sliding items in search + recent searches spam * Fixed open keyboard in media view * Fixed searchviewdata + fixed toggle color being too light * fixed episode slider sensitivity * new recent searches, not fully done but wtv WHO CARES 💯 * Add module screen fix * Delete .github/workflows/ios.yml * UI modifications * Scroll to close keyboard * Text change * Downloadview transition * Search cards text fixed * Reduced header spacing + moved down a to match library * Text change * Small tab bar tweak for search view * added gradient to player buttons * reduced summary size * IBH special 💯 * Fixed different height text? * Removed seperator * Some more fixes start watching button * MediaInfoView modifications * Fixed settingsviewdata * Changed x mark and fixed episode swipe for 4 items * Delete Package.resolved * fix * fix * Update Package.resolved * Removed version lalel type shi --- Sora/ContentView.swift | 1 - Sora/Utils/TabBar/TabBar.swift | 8 +- .../EpisodeCell/EpisodeCell.swift | 2 + Sora/Views/MediaInfoView/MediaInfoView.swift | 78 +++++++++---------- Sora/Views/SearchView/SearchComponents.swift | 3 - .../SettingsSubViews/SettingsViewData.swift | 16 ++-- 6 files changed, 47 insertions(+), 61 deletions(-) diff --git a/Sora/ContentView.swift b/Sora/ContentView.swift index 44f1513..8238bd1 100644 --- a/Sora/ContentView.swift +++ b/Sora/ContentView.swift @@ -4,7 +4,6 @@ // // Created by Francesco on 06/01/25. // - import SwiftUI struct ContentView_Previews: PreviewProvider { diff --git a/Sora/Utils/TabBar/TabBar.swift b/Sora/Utils/TabBar/TabBar.swift index 0df4118..88c9bbf 100644 --- a/Sora/Utils/TabBar/TabBar.swift +++ b/Sora/Utils/TabBar/TabBar.swift @@ -75,11 +75,11 @@ struct TabBar: View { showSearch = false } }) { - Image(systemName: "x.circle") - .font(.system(size: 25)) + Image(systemName: "xmark") + .font(.system(size: 30)) .foregroundStyle(.gray) - .frame(width: 20, height: 20) - .matchedGeometryEffect(id: "x.circle", in: animation) + .frame(width: 24, height: 24) + .matchedGeometryEffect(id: "xmark", in: animation) .padding(16) .background( Circle() diff --git a/Sora/Views/MediaInfoView/EpisodeCell/EpisodeCell.swift b/Sora/Views/MediaInfoView/EpisodeCell/EpisodeCell.swift index 54bb828..9a24e50 100644 --- a/Sora/Views/MediaInfoView/EpisodeCell/EpisodeCell.swift +++ b/Sora/Views/MediaInfoView/EpisodeCell/EpisodeCell.swift @@ -769,6 +769,8 @@ struct EpisodeCell: View { if buttonCount == 3 { swipeDistance += 12 + } else if buttonCount == 4 { + swipeDistance += 24 } return swipeDistance diff --git a/Sora/Views/MediaInfoView/MediaInfoView.swift b/Sora/Views/MediaInfoView/MediaInfoView.swift index 12064e9..0dcd7c4 100644 --- a/Sora/Views/MediaInfoView/MediaInfoView.swift +++ b/Sora/Views/MediaInfoView/MediaInfoView.swift @@ -103,6 +103,7 @@ struct MediaInfoView: View { .navigationBarHidden(true) .navigationBarTitleDisplayMode(.inline) .navigationBarTitle("") + .navigationViewStyle(StackNavigationViewStyle()) .ignoresSafeArea(.container, edges: .top) .onAppear { if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, @@ -216,7 +217,6 @@ struct MediaInfoView: View { .aspectRatio(contentMode: .fill) .frame(width: UIScreen.main.bounds.width, height: 600) .clipped() - KFImage(URL(string: imageUrl)) .placeholder { EmptyView() } .setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1, sharpeningRadius: 1)) @@ -248,12 +248,10 @@ struct MediaInfoView: View { endPoint: .bottom ) ) - VStack(spacing: 0) { Rectangle() .fill(Color.clear) .frame(height: 400) - VStack(alignment: .leading, spacing: 16) { headerSection if !episodeLinks.isEmpty { @@ -283,15 +281,33 @@ struct MediaInfoView: View { } .onAppear { UIScrollView.appearance().bounces = false - } + } .navigationBarTitleDisplayMode(.inline) .navigationBarTitle("") + .navigationViewStyle(StackNavigationViewStyle()) .ignoresSafeArea(.container, edges: .top) } @ViewBuilder private var headerSection: some View { VStack(alignment: .leading, spacing: 8) { + Spacer() + HStack(spacing: 16) { + + if !airdate.isEmpty && airdate != "N/A" && airdate != "No Data" { + HStack(spacing: 4) { + Image(systemName: "calendar") + .foregroundColor(.secondary) + + Text(airdate) + .font(.system(size: 14)) + .foregroundColor(.secondary) + } + } + + Spacer() + + } Text(title) .font(.system(size: 28, weight: .bold)) .foregroundColor(.primary) @@ -320,28 +336,7 @@ struct MediaInfoView: View { } playAndBookmarkSection - - // Metadata row - HStack(spacing: 16) { - sourceButton - - if !airdate.isEmpty && airdate != "N/A" && airdate != "No Data" { - HStack(spacing: 4) { - Image(systemName: "calendar") - .foregroundColor(.secondary) - - Text(airdate) - .font(.system(size: 14)) - .foregroundColor(.secondary) - } - } - - Spacer() - - menuButton - } - - // Single episode action buttons + if episodeLinks.count == 1 { VStack(spacing: 12) { HStack(spacing: 12) { @@ -449,22 +444,14 @@ struct MediaInfoView: View { Button(action: { openSafariViewController(with: href) }) { - HStack(spacing: 4) { - Text(module.metadata.sourceName) - .font(.system(size: 14, weight: .medium)) - .foregroundColor(.primary) - .lineLimit(1) - - Image(systemName: "safari") - .resizable() - .frame(width: 14, height: 14) - .foregroundColor(.primary) - } - .padding(.horizontal, 10) - .padding(.vertical, 6) - .background(Color.gray.opacity(0.2)) - .cornerRadius(15) - .gradientOutline() + Image(systemName: "safari") + .resizable() + .frame(width: 16, height: 16) + .foregroundColor(.primary) + .padding(6) + .background(Color.gray.opacity(0.2)) + .clipShape(Circle()) + .circularGradientOutline() } } @@ -583,13 +570,18 @@ struct MediaInfoView: View { Group { if !isGroupedBySeasons && episodeLinks.count <= episodeChunkSize { - Text("All episodes already shown") + Text("") .font(.system(size: 14)) .foregroundColor(.secondary) } else { episodeNavigationSection } } + + HStack(spacing: 4) { + sourceButton + menuButton + } } episodeListSection diff --git a/Sora/Views/SearchView/SearchComponents.swift b/Sora/Views/SearchView/SearchComponents.swift index 5958fbc..02c85aa 100644 --- a/Sora/Views/SearchView/SearchComponents.swift +++ b/Sora/Views/SearchView/SearchComponents.swift @@ -18,19 +18,16 @@ struct SearchItem: Identifiable { struct SearchHistorySection: View { let title: String let content: Content - init(title: String, @ViewBuilder content: () -> Content) { self.title = title self.content = content() } - var body: some View { VStack(alignment: .leading, spacing: 8) { Text(title.uppercased()) .font(.footnote) .foregroundStyle(Color.secondary) .padding(.horizontal, 20) - VStack(spacing: 0) { content } diff --git a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift index 9f00350..b1a5fe5 100644 --- a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift +++ b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift @@ -203,6 +203,8 @@ struct SettingsViewData: View { } VStack { + Spacer() + if isCalculatingSize { ProgressView() .scaleEffect(0.7) @@ -231,7 +233,9 @@ struct SettingsViewData: View { .padding(.horizontal, 16) .padding(.vertical, 12) } - + Spacer() + + Divider().padding(.horizontal, 16) Button(action: clearAllCaches) { Text("Clear All Caches") .foregroundColor(.red) @@ -242,17 +246,9 @@ struct SettingsViewData: View { SettingsSection( title: "App Storage", - footer: "The caches used by Sora are stored images that help load content faster\nThe App Data should never be erased if you don't know what that will cause.\nClearing the documents folder will remove all the modules and downloads\n " + footer: "The App Data should never be erased if you don't know what that will cause.\nClearing the documents folder will remove all the modules and downloads\n " ) { VStack(spacing: 0) { - SettingsButtonRow( - icon: "trash", - title: "Clear Cache", - subtitle: formatSize(cacheSize), - action: clearCache - ) - Divider().padding(.horizontal, 16) - SettingsButtonRow( icon: "doc.text", title: "Remove All Files in Documents",