mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-28 21:38:44 +00:00
May God be with you (#141)
* 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
This commit is contained in:
parent
fb6dc6219d
commit
400079f0da
6 changed files with 47 additions and 61 deletions
|
|
@ -4,7 +4,6 @@
|
|||
//
|
||||
// Created by Francesco on 06/01/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -769,6 +769,8 @@ struct EpisodeCell: View {
|
|||
|
||||
if buttonCount == 3 {
|
||||
swipeDistance += 12
|
||||
} else if buttonCount == 4 {
|
||||
swipeDistance += 24
|
||||
}
|
||||
|
||||
return swipeDistance
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -18,19 +18,16 @@ struct SearchItem: Identifiable {
|
|||
struct SearchHistorySection<Content: View>: 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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue