add introspect
This commit is contained in:
parent
eb895a0805
commit
d2f652b014
|
@ -10,6 +10,7 @@
|
||||||
5302F82A2658791C00647A2E /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 5302F8292658791C00647A2E /* Sentry */; };
|
5302F82A2658791C00647A2E /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 5302F8292658791C00647A2E /* Sentry */; };
|
||||||
53192D5D265AA78A008A4215 /* DeviceProfileBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53192D5C265AA78A008A4215 /* DeviceProfileBuilder.swift */; };
|
53192D5D265AA78A008A4215 /* DeviceProfileBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53192D5C265AA78A008A4215 /* DeviceProfileBuilder.swift */; };
|
||||||
5335256E265E8D5A006CCA86 /* VideoPlayerViewRefactored.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5335256D265E8D5A006CCA86 /* VideoPlayerViewRefactored.swift */; };
|
5335256E265E8D5A006CCA86 /* VideoPlayerViewRefactored.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5335256D265E8D5A006CCA86 /* VideoPlayerViewRefactored.swift */; };
|
||||||
|
53352571265EA0A0006CCA86 /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = 53352570265EA0A0006CCA86 /* Introspect */; };
|
||||||
5338F74E263B61370014BF09 /* ConnectToServerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5338F74D263B61370014BF09 /* ConnectToServerView.swift */; };
|
5338F74E263B61370014BF09 /* ConnectToServerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5338F74D263B61370014BF09 /* ConnectToServerView.swift */; };
|
||||||
5338F754263B65E10014BF09 /* SwiftyRequest in Frameworks */ = {isa = PBXBuildFile; productRef = 5338F753263B65E10014BF09 /* SwiftyRequest */; };
|
5338F754263B65E10014BF09 /* SwiftyRequest in Frameworks */ = {isa = PBXBuildFile; productRef = 5338F753263B65E10014BF09 /* SwiftyRequest */; };
|
||||||
5338F757263B7E2E0014BF09 /* KeychainSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 5338F756263B7E2E0014BF09 /* KeychainSwift */; };
|
5338F757263B7E2E0014BF09 /* KeychainSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 5338F756263B7E2E0014BF09 /* KeychainSwift */; };
|
||||||
|
@ -115,6 +116,7 @@
|
||||||
5338F757263B7E2E0014BF09 /* KeychainSwift in Frameworks */,
|
5338F757263B7E2E0014BF09 /* KeychainSwift in Frameworks */,
|
||||||
53D5E3DD264B47EE00BADDC8 /* MobileVLCKit.xcframework in Frameworks */,
|
53D5E3DD264B47EE00BADDC8 /* MobileVLCKit.xcframework in Frameworks */,
|
||||||
5338F754263B65E10014BF09 /* SwiftyRequest in Frameworks */,
|
5338F754263B65E10014BF09 /* SwiftyRequest in Frameworks */,
|
||||||
|
53352571265EA0A0006CCA86 /* Introspect in Frameworks */,
|
||||||
5302F82A2658791C00647A2E /* Sentry in Frameworks */,
|
5302F82A2658791C00647A2E /* Sentry in Frameworks */,
|
||||||
5389277A263CBFE70035E14B /* SwiftyJSON in Frameworks */,
|
5389277A263CBFE70035E14B /* SwiftyJSON in Frameworks */,
|
||||||
);
|
);
|
||||||
|
@ -251,6 +253,7 @@
|
||||||
53892779263CBFE70035E14B /* SwiftyJSON */,
|
53892779263CBFE70035E14B /* SwiftyJSON */,
|
||||||
538CD953263E3DC100BB5AF0 /* SDWebImageSwiftUI */,
|
538CD953263E3DC100BB5AF0 /* SDWebImageSwiftUI */,
|
||||||
5302F8292658791C00647A2E /* Sentry */,
|
5302F8292658791C00647A2E /* Sentry */,
|
||||||
|
53352570265EA0A0006CCA86 /* Introspect */,
|
||||||
);
|
);
|
||||||
productName = JellyfinPlayer;
|
productName = JellyfinPlayer;
|
||||||
productReference = 5377CBF1263B596A003A4E83 /* JellyfinPlayer.app */;
|
productReference = 5377CBF1263B596A003A4E83 /* JellyfinPlayer.app */;
|
||||||
|
@ -288,6 +291,7 @@
|
||||||
53892778263CBFE70035E14B /* XCRemoteSwiftPackageReference "SwiftyJSON" */,
|
53892778263CBFE70035E14B /* XCRemoteSwiftPackageReference "SwiftyJSON" */,
|
||||||
538CD952263E3DC100BB5AF0 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */,
|
538CD952263E3DC100BB5AF0 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */,
|
||||||
5302F8282658791C00647A2E /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
|
5302F8282658791C00647A2E /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
|
||||||
|
5335256F265EA0A0006CCA86 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */,
|
||||||
);
|
);
|
||||||
productRefGroup = 5377CBF2263B596A003A4E83 /* Products */;
|
productRefGroup = 5377CBF2263B596A003A4E83 /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
|
@ -553,6 +557,14 @@
|
||||||
minimumVersion = 7.1.0;
|
minimumVersion = 7.1.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
5335256F265EA0A0006CCA86 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/siteline/SwiftUI-Introspect";
|
||||||
|
requirement = {
|
||||||
|
kind = upToNextMajorVersion;
|
||||||
|
minimumVersion = 0.1.3;
|
||||||
|
};
|
||||||
|
};
|
||||||
5338F752263B65E10014BF09 /* XCRemoteSwiftPackageReference "SwiftyRequest" */ = {
|
5338F752263B65E10014BF09 /* XCRemoteSwiftPackageReference "SwiftyRequest" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/Kitura/SwiftyRequest";
|
repositoryURL = "https://github.com/Kitura/SwiftyRequest";
|
||||||
|
@ -593,6 +605,11 @@
|
||||||
package = 5302F8282658791C00647A2E /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
|
package = 5302F8282658791C00647A2E /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
|
||||||
productName = Sentry;
|
productName = Sentry;
|
||||||
};
|
};
|
||||||
|
53352570265EA0A0006CCA86 /* Introspect */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = 5335256F265EA0A0006CCA86 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
|
||||||
|
productName = Introspect;
|
||||||
|
};
|
||||||
5338F753263B65E10014BF09 /* SwiftyRequest */ = {
|
5338F753263B65E10014BF09 /* SwiftyRequest */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = 5338F752263B65E10014BF09 /* XCRemoteSwiftPackageReference "SwiftyRequest" */;
|
package = 5338F752263B65E10014BF09 /* XCRemoteSwiftPackageReference "SwiftyRequest" */;
|
||||||
|
|
|
@ -100,6 +100,15 @@
|
||||||
"version": "2.13.1"
|
"version": "2.13.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"package": "Introspect",
|
||||||
|
"repositoryURL": "https://github.com/siteline/SwiftUI-Introspect",
|
||||||
|
"state": {
|
||||||
|
"branch": null,
|
||||||
|
"revision": "2e09be8af614401bc9f87d40093ec19ce56ccaf2",
|
||||||
|
"version": "0.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"package": "SwiftyJSON",
|
"package": "SwiftyJSON",
|
||||||
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
|
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
|
||||||
|
|
|
@ -130,6 +130,10 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dump(_libraries.wrappedValue)
|
||||||
|
dump(_librariesShowRecentlyAdded.wrappedValue)
|
||||||
|
dump(_library_names.wrappedValue)
|
||||||
} catch {
|
} catch {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -181,8 +185,8 @@ struct ContentView: View {
|
||||||
} else {
|
} else {
|
||||||
if(!jsi.did) {
|
if(!jsi.did) {
|
||||||
LoadingView(isShowing: $isLoading) {
|
LoadingView(isShowing: $isLoading) {
|
||||||
NavigationView() {
|
TabView(selection: $tabSelection) {
|
||||||
TabView(selection: $tabSelection) {
|
NavigationView() {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
ScrollView() {
|
ScrollView() {
|
||||||
Spacer().frame(height: orientationInfo.orientation == .portrait ? 0 : 15)
|
Spacer().frame(height: orientationInfo.orientation == .portrait ? 0 : 15)
|
||||||
|
@ -213,23 +217,24 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.fullScreenCover( isPresented: $showSettingsPopover) { SettingsView(viewModel: SettingsViewModel(), close: $showSettingsPopover) }
|
}.fullScreenCover( isPresented: $showSettingsPopover) { SettingsView(viewModel: SettingsViewModel(), close: $showSettingsPopover) }
|
||||||
.tabItem({
|
|
||||||
Text("Home")
|
|
||||||
Image(systemName: "house")
|
|
||||||
})
|
|
||||||
.tag("Home")
|
|
||||||
|
|
||||||
NavigationView() {
|
|
||||||
LibraryView(prefill: "", names: library_names, libraries: libraries)
|
|
||||||
}.navigationViewStyle(StackNavigationViewStyle())
|
|
||||||
.tabItem({
|
|
||||||
Text("All Media")
|
|
||||||
Image(systemName: "folder")
|
|
||||||
})
|
|
||||||
.tag("All Media")
|
|
||||||
}
|
}
|
||||||
|
.navigationViewStyle(StackNavigationViewStyle())
|
||||||
|
.tabItem({
|
||||||
|
Text("Home")
|
||||||
|
Image(systemName: "house")
|
||||||
|
})
|
||||||
|
.tag("Home")
|
||||||
|
|
||||||
|
NavigationView() {
|
||||||
|
LibraryView(prefill: "", names: library_names, libraries: libraries)
|
||||||
|
}
|
||||||
|
.navigationViewStyle(StackNavigationViewStyle())
|
||||||
|
.tabItem({
|
||||||
|
Text("All Media")
|
||||||
|
Image(systemName: "folder")
|
||||||
|
})
|
||||||
|
.tag("All Media")
|
||||||
}
|
}
|
||||||
.navigationViewStyle(StackNavigationViewStyle())
|
|
||||||
}
|
}
|
||||||
.environmentObject(globalData)
|
.environmentObject(globalData)
|
||||||
.onAppear(perform: startup)
|
.onAppear(perform: startup)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import Introspect
|
||||||
|
|
||||||
struct ItemView: View {
|
struct ItemView: View {
|
||||||
var item: ResumeItem;
|
var item: ResumeItem;
|
||||||
|
@ -15,16 +16,31 @@ struct ItemView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if(item.Type == "Movie") {
|
Group {
|
||||||
MovieItemView(item: self.item)
|
NavigationLink(destination: EmptyView(), label: {})
|
||||||
} else if(item.Type == "Season") {
|
NavigationLink(destination: EmptyView(), label: {})
|
||||||
SeasonItemView(item: self.item)
|
if(item.Type == "Movie") {
|
||||||
} else if(item.Type == "Series") {
|
MovieItemView(item: self.item)
|
||||||
SeriesItemView(item: self.item)
|
} else if(item.Type == "Season") {
|
||||||
} else if(item.Type == "Episode") {
|
SeasonItemView(item: self.item)
|
||||||
EpisodeItemView(item: self.item)
|
} else if(item.Type == "Series") {
|
||||||
} else {
|
SeriesItemView(item: self.item)
|
||||||
Text("Type: \(item.Type) not implemented yet :(")
|
} else if(item.Type == "Episode") {
|
||||||
|
EpisodeItemView(item: self.item)
|
||||||
|
} else {
|
||||||
|
Text("Type: \(item.Type) not implemented yet :(")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.introspectTabBarController { (UITabBarController) in
|
||||||
|
UITabBarController.tabBar.isHidden = false
|
||||||
|
}
|
||||||
|
.navigationBarHidden(false)
|
||||||
|
.navigationBarBackButtonHidden(false)
|
||||||
|
.statusBar(hidden: false)
|
||||||
|
.prefersHomeIndicatorAutoHidden(false)
|
||||||
|
.preferredColorScheme(.none)
|
||||||
|
.edgesIgnoringSafeArea([])
|
||||||
|
.overrideViewPreference(.unspecified)
|
||||||
|
.supportedOrientations(.allButUpsideDown)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,6 +280,8 @@ struct LibraryView: View {
|
||||||
.onChange(of: filterString) { tag in
|
.onChange(of: filterString) { tag in
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
items = [];
|
items = [];
|
||||||
|
firstItemIndex = 0;
|
||||||
|
lastItemIndex = itemsPerPage;
|
||||||
loadItems();
|
loadItems();
|
||||||
}
|
}
|
||||||
.navigationTitle(extraParam == "" ? (library_names[prefill_id] ?? "Library") : title)
|
.navigationTitle(extraParam == "" ? (library_names[prefill_id] ?? "Library") : title)
|
||||||
|
@ -322,7 +324,7 @@ struct LibraryView: View {
|
||||||
Text(library_names[id] ?? "").foregroundColor(Color.primary)
|
Text(library_names[id] ?? "").foregroundColor(Color.primary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.onAppear(perform: listOnAppear).overrideViewPreference(.unspecified).navigationTitle("All Media")
|
}.onAppear(perform: listOnAppear).navigationTitle("All Media")
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
||||||
NavigationLink(destination: LibrarySearchView(url: "/Users/\(globalData.user?.user_id ?? "")/Items?Limit=300&StartIndex=0&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb%2CBanner&IncludeItemTypes=Movie,Series\(extraParam)", close: $closeSearch), isActive: $closeSearch) {
|
NavigationLink(destination: LibrarySearchView(url: "/Users/\(globalData.user?.user_id ?? "")/Items?Limit=300&StartIndex=0&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb%2CBanner&IncludeItemTypes=Movie,Series\(extraParam)", close: $closeSearch), isActive: $closeSearch) {
|
||||||
|
|
|
@ -15,6 +15,9 @@ struct VideoPlayerViewRefactored: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
LoadingView(isShowing: $shouldShowLoadingView) {
|
LoadingView(isShowing: $shouldShowLoadingView) {
|
||||||
Text("content")
|
Text("content")
|
||||||
|
.introspectTabBarController { (UITabBarController) in
|
||||||
|
UITabBarController.tabBar.isHidden = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.navigationBarHidden(true)
|
.navigationBarHidden(true)
|
||||||
.navigationBarBackButtonHidden(true)
|
.navigationBarBackButtonHidden(true)
|
||||||
|
@ -23,5 +26,7 @@ struct VideoPlayerViewRefactored: View {
|
||||||
.preferredColorScheme(.dark)
|
.preferredColorScheme(.dark)
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
|
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
|
||||||
|
.overrideViewPreference(.unspecified)
|
||||||
|
.supportedOrientations(.landscape)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue