mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
Fixes, read description (#168)
* Fixed episodecells getting stuck sliding
* Enabled device scaling for ipad
not good enough yet, not applied everywhere cuz idk where to apply exactly 💯
* Fixed blur in continue watching cells
* Keyboard controls player
* fixed downloadview buttons
* Reduced tab bar outline opacity
---------
Co-authored-by: cranci <100066266+cranci1@users.noreply.github.com>
This commit is contained in:
parent
fd9e68513d
commit
440ec57d59
6 changed files with 92 additions and 44 deletions
|
|
@ -71,6 +71,9 @@
|
||||||
},
|
},
|
||||||
"App Data" : {
|
"App Data" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Are you sure you want to clear all cached data? This will help free up storage space." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Are you sure you want to delete '%@'?" : {
|
"Are you sure you want to delete '%@'?" : {
|
||||||
|
|
||||||
|
|
@ -90,6 +93,9 @@
|
||||||
},
|
},
|
||||||
"Are you sure you want to erase all app data? This action cannot be undone." : {
|
"Are you sure you want to erase all app data? This action cannot be undone." : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Are you sure you want to remove all downloaded media files (.mov, .mp4, .pkg)? This action cannot be undone." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Are you sure you want to remove all files in the Documents folder? This will remove all modules." : {
|
"Are you sure you want to remove all files in the Documents folder? This will remove all modules." : {
|
||||||
|
|
||||||
|
|
@ -112,10 +118,10 @@
|
||||||
"Clear" : {
|
"Clear" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Clear All Caches" : {
|
"Clear All Downloads" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Clear All Downloads" : {
|
"Clear Cache" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Clear Library Only" : {
|
"Clear Library Only" : {
|
||||||
|
|
@ -138,9 +144,6 @@
|
||||||
},
|
},
|
||||||
"cranci1" : {
|
"cranci1" : {
|
||||||
|
|
||||||
},
|
|
||||||
"Current Cache Size" : {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
"DATA/LOGS" : {
|
"DATA/LOGS" : {
|
||||||
|
|
||||||
|
|
@ -255,6 +258,9 @@
|
||||||
},
|
},
|
||||||
"Mark as Watched" : {
|
"Mark as Watched" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Mark watched" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Match with AniList" : {
|
"Match with AniList" : {
|
||||||
|
|
||||||
|
|
@ -333,9 +339,15 @@
|
||||||
},
|
},
|
||||||
"Remove" : {
|
"Remove" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Remove All Caches" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Remove Documents" : {
|
"Remove Documents" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Remove Downloaded Media" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Remove from Bookmarks" : {
|
"Remove from Bookmarks" : {
|
||||||
|
|
||||||
|
|
@ -348,9 +360,15 @@
|
||||||
},
|
},
|
||||||
"Reset AniList ID" : {
|
"Reset AniList ID" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Reset progress" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Reset Progress" : {
|
"Reset Progress" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Revert Module Poster" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Running Sora %@ - cranci1" : {
|
"Running Sora %@ - cranci1" : {
|
||||||
|
|
||||||
|
|
@ -372,6 +390,9 @@
|
||||||
},
|
},
|
||||||
"Season %lld" : {
|
"Season %lld" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Segments Color" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Select Module" : {
|
"Select Module" : {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2701,6 +2701,57 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
|
||||||
default: return .white
|
default: return .white
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override var canBecomeFirstResponder: Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override var keyCommands: [UIKeyCommand]? {
|
||||||
|
return [
|
||||||
|
UIKeyCommand(input: " ", modifierFlags: [], action: #selector(handleSpaceKey), discoverabilityTitle: "Play/Pause"),
|
||||||
|
UIKeyCommand(input: UIKeyCommand.inputLeftArrow, modifierFlags: [], action: #selector(handleLeftArrow), discoverabilityTitle: "Seek Backward 10s"),
|
||||||
|
UIKeyCommand(input: UIKeyCommand.inputRightArrow, modifierFlags: [], action: #selector(handleRightArrow), discoverabilityTitle: "Seek Forward 10s"),
|
||||||
|
UIKeyCommand(input: UIKeyCommand.inputUpArrow, modifierFlags: [], action: #selector(handleUpArrow), discoverabilityTitle: "Seek Forward 60s"),
|
||||||
|
UIKeyCommand(input: UIKeyCommand.inputDownArrow, modifierFlags: [], action: #selector(handleDownArrow), discoverabilityTitle: "Seek Backward 60s"),
|
||||||
|
UIKeyCommand(input: UIKeyCommand.inputEscape, modifierFlags: [], action: #selector(handleEscape), discoverabilityTitle: "Dismiss Player")
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleSpaceKey() {
|
||||||
|
togglePlayPause()
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleLeftArrow() {
|
||||||
|
let skipValue = 10.0
|
||||||
|
currentTimeVal = max(currentTimeVal - skipValue, 0)
|
||||||
|
player.seek(to: CMTime(seconds: currentTimeVal, preferredTimescale: 600))
|
||||||
|
animateButtonRotation(backwardButton, clockwise: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleRightArrow() {
|
||||||
|
let skipValue = 10.0
|
||||||
|
currentTimeVal = min(currentTimeVal + skipValue, duration)
|
||||||
|
player.seek(to: CMTime(seconds: currentTimeVal, preferredTimescale: 600))
|
||||||
|
animateButtonRotation(forwardButton)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleUpArrow() {
|
||||||
|
let skipValue = 60.0
|
||||||
|
currentTimeVal = min(currentTimeVal + skipValue, duration)
|
||||||
|
player.seek(to: CMTime(seconds: currentTimeVal, preferredTimescale: 600))
|
||||||
|
animateButtonRotation(forwardButton)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleDownArrow() {
|
||||||
|
let skipValue = 60.0
|
||||||
|
currentTimeVal = max(currentTimeVal - skipValue, 0)
|
||||||
|
player.seek(to: CMTime(seconds: currentTimeVal, preferredTimescale: 600))
|
||||||
|
animateButtonRotation(backwardButton, clockwise: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc private func handleEscape() {
|
||||||
|
dismiss(animated: true, completion: nil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GradientOverlayButton: UIButton {
|
class GradientOverlayButton: UIButton {
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ struct TabBar: View {
|
||||||
.stroke(
|
.stroke(
|
||||||
LinearGradient(
|
LinearGradient(
|
||||||
gradient: Gradient(stops: [
|
gradient: Gradient(stops: [
|
||||||
.init(color: Color.accentColor.opacity(gradientOpacity), location: 0),
|
.init(color: Color.accentColor.opacity(0.25), location: 0),
|
||||||
.init(color: Color.accentColor.opacity(0), location: 1)
|
.init(color: Color.accentColor.opacity(0), location: 1)
|
||||||
]),
|
]),
|
||||||
startPoint: .top,
|
startPoint: .top,
|
||||||
|
|
|
||||||
|
|
@ -293,29 +293,15 @@ struct CustomDownloadHeader: View {
|
||||||
Image(systemName: isSearchActive ? "xmark.circle.fill" : "magnifyingglass")
|
Image(systemName: isSearchActive ? "xmark.circle.fill" : "magnifyingglass")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 18, height: 18)
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
.padding(6)
|
.padding(10)
|
||||||
.background(
|
.background(
|
||||||
Circle()
|
Circle()
|
||||||
.fill(Color.gray.opacity(0.2))
|
.fill(Color.gray.opacity(0.2))
|
||||||
.shadow(color: .accentColor.opacity(0.2), radius: 2)
|
.shadow(color: .accentColor.opacity(0.2), radius: 2)
|
||||||
)
|
)
|
||||||
.overlay(
|
.circularGradientOutline()
|
||||||
Circle()
|
|
||||||
.stroke(
|
|
||||||
LinearGradient(
|
|
||||||
gradient: Gradient(stops: [
|
|
||||||
.init(color: Color.accentColor.opacity(0.25), location: 0),
|
|
||||||
.init(color: Color.accentColor.opacity(0), location: 1)
|
|
||||||
]),
|
|
||||||
startPoint: .top,
|
|
||||||
endPoint: .bottom
|
|
||||||
),
|
|
||||||
lineWidth: 0.5
|
|
||||||
)
|
|
||||||
.frame(width: 32, height: 32)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if showSortMenu {
|
if showSortMenu {
|
||||||
|
|
@ -336,28 +322,15 @@ struct CustomDownloadHeader: View {
|
||||||
Image(systemName: "arrow.up.arrow.down")
|
Image(systemName: "arrow.up.arrow.down")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 18, height: 18)
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
.padding(6)
|
.padding(10)
|
||||||
.background(
|
.background(
|
||||||
Circle()
|
Circle()
|
||||||
.fill(Color.gray.opacity(0.2))
|
.fill(Color.gray.opacity(0.2))
|
||||||
.shadow(color: .accentColor.opacity(0.2), radius: 2)
|
.shadow(color: .accentColor.opacity(0.2), radius: 2)
|
||||||
)
|
)
|
||||||
.overlay(
|
.circularGradientOutline()
|
||||||
Circle()
|
|
||||||
.stroke(
|
|
||||||
LinearGradient(
|
|
||||||
gradient: Gradient(stops: [
|
|
||||||
.init(color: Color.accentColor.opacity(0.25), location: 0),
|
|
||||||
.init(color: Color.accentColor.opacity(0), location: 1)
|
|
||||||
]),
|
|
||||||
startPoint: .top,
|
|
||||||
endPoint: .bottom
|
|
||||||
),
|
|
||||||
lineWidth: 0.5
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -370,8 +343,10 @@ struct CustomDownloadHeader: View {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Image(systemName: "magnifyingglass")
|
Image(systemName: "magnifyingglass")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.frame(width: 18, height: 18)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.font(.body)
|
|
||||||
|
|
||||||
TextField("Search downloads", text: $searchText)
|
TextField("Search downloads", text: $searchText)
|
||||||
.textFieldStyle(PlainTextFieldStyle())
|
.textFieldStyle(PlainTextFieldStyle())
|
||||||
|
|
@ -382,8 +357,10 @@ struct CustomDownloadHeader: View {
|
||||||
searchText = ""
|
searchText = ""
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "xmark.circle.fill")
|
Image(systemName: "xmark.circle.fill")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.frame(width: 18, height: 18)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.font(.body)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -303,8 +303,6 @@ struct ContinueWatchingCell: View {
|
||||||
}
|
}
|
||||||
.overlay(
|
.overlay(
|
||||||
ZStack {
|
ZStack {
|
||||||
ProgressiveBlurView()
|
|
||||||
.cornerRadius(10, corners: [.bottomLeft, .bottomRight])
|
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"originHash" : "e12f82ce5205016ea66a114308acd41450cfe950ccb1aacfe0e26181d2036fa4",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "drops",
|
"identity" : "drops",
|
||||||
|
|
@ -28,5 +29,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version" : 2
|
"version" : 3
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue