mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
uppercase filenames, return empty array in explore fetcher ( wip ), fix profile removal bug, hide empty sections correctly ( explore & search ), refreshcontrol tintcolor, add spm modules to tvos target aswell, remove unused ffmpeg-ios-lame framework !?, ...
This commit is contained in:
parent
e3583d9b81
commit
50e470b4fa
8 changed files with 71 additions and 68 deletions
|
|
@ -10,6 +10,7 @@ import JavaScriptCore
|
|||
// TODO: implement and test
|
||||
extension JSController {
|
||||
func fetchExploreResults(module: ScrapingModule, completion: @escaping ([ExploreItem]) -> Void) {
|
||||
completion([])
|
||||
/*let searchUrl = module.metadata.searchBaseUrl.replacingOccurrences(of: "%s", with: keyword.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? "")
|
||||
|
||||
guard let url = URL(string: searchUrl) else {
|
||||
|
|
@ -54,6 +55,7 @@ extension JSController {
|
|||
}
|
||||
|
||||
func fetchJsExploreResults(module: ScrapingModule, completion: @escaping ([ExploreItem]) -> Void) {
|
||||
completion([])
|
||||
/*
|
||||
if let exception = context.exception {
|
||||
Logger.shared.log("JavaScript exception: \(exception)",type: "Error")
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ class ProfileStore: ObservableObject {
|
|||
|
||||
func deleteProfile(removalID: UUID?) {
|
||||
guard let removalID,
|
||||
profiles.count == 1
|
||||
else { return }
|
||||
profiles.count > 1
|
||||
else { return }
|
||||
|
||||
if let suite = UserDefaults(suiteName: removalID.uuidString) {
|
||||
for key in suite.dictionaryRepresentation().keys {
|
||||
|
|
|
|||
|
|
@ -99,20 +99,22 @@ struct ExploreView: View {
|
|||
.padding(.top)
|
||||
.padding()
|
||||
} else if hasNoResults {
|
||||
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)
|
||||
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)
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top)
|
||||
} else {
|
||||
LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) {
|
||||
ForEach(exploreItems) { item in
|
||||
|
|
@ -161,6 +163,12 @@ struct ExploreView: View {
|
|||
}
|
||||
.navigationTitle("Explore")
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.refreshable {
|
||||
await withCheckedContinuation { continuation in
|
||||
fetchData()
|
||||
continuation.resume()
|
||||
}
|
||||
}
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
Menu {
|
||||
|
|
|
|||
|
|
@ -118,20 +118,22 @@ struct SearchView: View {
|
|||
.padding(.top)
|
||||
.padding()
|
||||
} else if hasNoResults {
|
||||
VStack(spacing: 8) {
|
||||
Image(systemName: "magnifyingglass")
|
||||
.font(.largeTitle)
|
||||
.foregroundColor(.secondary)
|
||||
.accessibilityLabel("Magnifying Glass Icon")
|
||||
Text("No Results Found")
|
||||
.font(.headline)
|
||||
Text("Try different keywords")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
if !(hideEmptySections ?? false) {
|
||||
VStack(spacing: 8) {
|
||||
Image(systemName: "magnifyingglass")
|
||||
.font(.largeTitle)
|
||||
.foregroundColor(.secondary)
|
||||
.accessibilityLabel("Magnifying Glass Icon")
|
||||
Text("No Results Found")
|
||||
.font(.headline)
|
||||
Text("Try different keywords")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top)
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top)
|
||||
} else {
|
||||
LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 16), count: columnsCount), spacing: 16) {
|
||||
ForEach(searchItems) { item in
|
||||
|
|
|
|||
|
|
@ -178,10 +178,12 @@ class Settings: ObservableObject {
|
|||
}
|
||||
|
||||
private func applyColorToUIKit(_ color: Color) {
|
||||
let newColor = UIColor(color)
|
||||
let tempStepper = UIStepper()
|
||||
tempStepper.tintColor = UIColor(color)
|
||||
tempStepper.tintColor = newColor
|
||||
UIStepper.appearance().setDecrementImage(tempStepper.decrementImage(for: .normal), for: .normal)
|
||||
UIStepper.appearance().setIncrementImage(tempStepper.incrementImage(for: .normal), for: .normal)
|
||||
UIRefreshControl.appearance().tintColor = newColor
|
||||
}
|
||||
|
||||
private func saveAccentColor(_ color: Color) {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@
|
|||
/* Begin PBXBuildFile section */
|
||||
120D3C722DBA40AB0093D596 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = 120D3C712DBA40A40093D596 /* .swiftlint.yml */; };
|
||||
120D3C732DBA40AB0093D596 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = 120D3C712DBA40A40093D596 /* .swiftlint.yml */; };
|
||||
1258EA372DC4404F009B8D12 /* Drops in Frameworks */ = {isa = PBXBuildFile; productRef = 1258EA362DC4404F009B8D12 /* Drops */; };
|
||||
1258EA392DC4404F009B8D12 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 1258EA382DC4404F009B8D12 /* Kingfisher */; };
|
||||
1258EA3B2DC4404F009B8D12 /* MarqueeLabel in Frameworks */ = {isa = PBXBuildFile; productRef = 1258EA3A2DC4404F009B8D12 /* MarqueeLabel */; };
|
||||
126C428D2DB99627006BC27D /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 126C428C2DB99627006BC27D /* Localizable.xcstrings */; };
|
||||
126C428E2DB99627006BC27D /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 126C428C2DB99627006BC27D /* Localizable.xcstrings */; };
|
||||
132E351D2D959DDB0007800E /* Drops in Frameworks */ = {isa = PBXBuildFile; productRef = 132E351C2D959DDB0007800E /* Drops */; };
|
||||
132E35202D959E1D0007800E /* FFmpeg-iOS-Lame in Frameworks */ = {isa = PBXBuildFile; productRef = 132E351F2D959E1D0007800E /* FFmpeg-iOS-Lame */; };
|
||||
132E35232D959E410007800E /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 132E35222D959E410007800E /* Kingfisher */; };
|
||||
13B77E192DA44F8300126FDF /* MarqueeLabel in Frameworks */ = {isa = PBXBuildFile; productRef = 13B77E182DA44F8300126FDF /* MarqueeLabel */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
|
@ -51,6 +53,9 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1258EA392DC4404F009B8D12 /* Kingfisher in Frameworks */,
|
||||
1258EA372DC4404F009B8D12 /* Drops in Frameworks */,
|
||||
1258EA3B2DC4404F009B8D12 /* MarqueeLabel in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -60,7 +65,6 @@
|
|||
files = (
|
||||
13B77E192DA44F8300126FDF /* MarqueeLabel in Frameworks */,
|
||||
132E35232D959E410007800E /* Kingfisher in Frameworks */,
|
||||
132E35202D959E1D0007800E /* FFmpeg-iOS-Lame in Frameworks */,
|
||||
132E351D2D959DDB0007800E /* Drops in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -109,6 +113,9 @@
|
|||
);
|
||||
name = SulfurTV;
|
||||
packageProductDependencies = (
|
||||
1258EA362DC4404F009B8D12 /* Drops */,
|
||||
1258EA382DC4404F009B8D12 /* Kingfisher */,
|
||||
1258EA3A2DC4404F009B8D12 /* MarqueeLabel */,
|
||||
);
|
||||
productName = SulfurTV;
|
||||
productReference = 120764652DB6F6E0003621E9 /* SulfurTV.app */;
|
||||
|
|
@ -133,7 +140,6 @@
|
|||
name = Sulfur;
|
||||
packageProductDependencies = (
|
||||
132E351C2D959DDB0007800E /* Drops */,
|
||||
132E351F2D959E1D0007800E /* FFmpeg-iOS-Lame */,
|
||||
132E35222D959E410007800E /* Kingfisher */,
|
||||
13B77E182DA44F8300126FDF /* MarqueeLabel */,
|
||||
);
|
||||
|
|
@ -170,7 +176,6 @@
|
|||
mainGroup = 133D7C612D2BE2500075467E;
|
||||
packageReferences = (
|
||||
132E351B2D959DDB0007800E /* XCRemoteSwiftPackageReference "Drops" */,
|
||||
132E351E2D959E1D0007800E /* XCRemoteSwiftPackageReference "FFmpeg-iOS-Lame" */,
|
||||
132E35212D959E410007800E /* XCRemoteSwiftPackageReference "Kingfisher" */,
|
||||
13B77E172DA44F8300126FDF /* XCRemoteSwiftPackageReference "MarqueeLabel" */,
|
||||
123FEDD22DC412F0001C4704 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
|
||||
|
|
@ -572,8 +577,8 @@
|
|||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 0.59.1;
|
||||
branch = main;
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
132E351B2D959DDB0007800E /* XCRemoteSwiftPackageReference "Drops" */ = {
|
||||
|
|
@ -584,14 +589,6 @@
|
|||
kind = branch;
|
||||
};
|
||||
};
|
||||
132E351E2D959E1D0007800E /* XCRemoteSwiftPackageReference "FFmpeg-iOS-Lame" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/kewlbear/FFmpeg-iOS-Lame";
|
||||
requirement = {
|
||||
branch = main;
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
132E35212D959E410007800E /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/onevcat/Kingfisher.git";
|
||||
|
|
@ -621,15 +618,25 @@
|
|||
package = 123FEDD22DC412F0001C4704 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
|
||||
productName = "plugin:SwiftLintBuildToolPlugin";
|
||||
};
|
||||
132E351C2D959DDB0007800E /* Drops */ = {
|
||||
1258EA362DC4404F009B8D12 /* Drops */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 132E351B2D959DDB0007800E /* XCRemoteSwiftPackageReference "Drops" */;
|
||||
productName = Drops;
|
||||
};
|
||||
132E351F2D959E1D0007800E /* FFmpeg-iOS-Lame */ = {
|
||||
1258EA382DC4404F009B8D12 /* Kingfisher */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 132E351E2D959E1D0007800E /* XCRemoteSwiftPackageReference "FFmpeg-iOS-Lame" */;
|
||||
productName = "FFmpeg-iOS-Lame";
|
||||
package = 132E35212D959E410007800E /* XCRemoteSwiftPackageReference "Kingfisher" */;
|
||||
productName = Kingfisher;
|
||||
};
|
||||
1258EA3A2DC4404F009B8D12 /* MarqueeLabel */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 13B77E172DA44F8300126FDF /* XCRemoteSwiftPackageReference "MarqueeLabel" */;
|
||||
productName = MarqueeLabel;
|
||||
};
|
||||
132E351C2D959DDB0007800E /* Drops */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 132E351B2D959DDB0007800E /* XCRemoteSwiftPackageReference "Drops" */;
|
||||
productName = Drops;
|
||||
};
|
||||
132E35222D959E410007800E /* Kingfisher */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"originHash" : "c4909124df3eb22bfcc539fb1f3936eb79c309605d2f34c5b02efa1fe3f48447",
|
||||
"originHash" : "201a3201a2876c1cee578165a829a39bb460fe178ce209055cc70e0c28d43134",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "drops",
|
||||
|
|
@ -10,24 +10,6 @@
|
|||
"revision" : "5824681795286c36bdc4a493081a63e64e2a064e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "ffmpeg-ios-lame",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/kewlbear/FFmpeg-iOS-Lame",
|
||||
"state" : {
|
||||
"branch" : "main",
|
||||
"revision" : "1808fa5a1263c5e216646cd8421fc7dcb70520cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "ffmpeg-ios-support",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/kewlbear/FFmpeg-iOS-Support",
|
||||
"state" : {
|
||||
"revision" : "be3bd9149ac53760e8725652eee99c405b2be47a",
|
||||
"version" : "0.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "kingfisher",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
|
@ -51,8 +33,8 @@
|
|||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/SimplyDanny/SwiftLintPlugins",
|
||||
"state" : {
|
||||
"revision" : "8545ddf4de043e6f2051c5cf204f39ef778ebf6b",
|
||||
"version" : "0.59.1"
|
||||
"branch" : "main",
|
||||
"revision" : "8545ddf4de043e6f2051c5cf204f39ef778ebf6b"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue