tvOS - Remove last CollectionView (#1036)
This commit is contained in:
parent
16303c9bd4
commit
58190d73fd
|
@ -35,13 +35,17 @@ struct UserProfileButton: View {
|
||||||
Button {
|
Button {
|
||||||
action()
|
action()
|
||||||
} label: {
|
} label: {
|
||||||
ImageView(user.profileImageSource(client: userSession.client, maxWidth: 250, maxHeight: 250))
|
ZStack {
|
||||||
.failure {
|
Color.clear
|
||||||
Image(systemName: "person.fill")
|
|
||||||
.resizable()
|
ImageView(user.profileImageSource(client: userSession.client, maxWidth: 250, maxHeight: 250))
|
||||||
.padding2()
|
.failure {
|
||||||
}
|
Image(systemName: "person.fill")
|
||||||
.frame(width: 200, height: 200)
|
.resizable()
|
||||||
|
.edgePadding()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.aspectRatio(1, contentMode: .fill)
|
||||||
}
|
}
|
||||||
.buttonStyle(.card)
|
.buttonStyle(.card)
|
||||||
.focused($isFocused)
|
.focused($isFocused)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors
|
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors
|
||||||
//
|
//
|
||||||
|
|
||||||
import CollectionView
|
import CollectionVGrid
|
||||||
import JellyfinAPI
|
import JellyfinAPI
|
||||||
import Stinsen
|
import Stinsen
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
@ -110,22 +110,16 @@ struct UserSignInView: View {
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.offset(y: -50)
|
.offset(y: -50)
|
||||||
} else {
|
} else {
|
||||||
CollectionView(items: viewModel.publicUsers) { _, user, _ in
|
CollectionVGrid(
|
||||||
|
viewModel.publicUsers,
|
||||||
|
layout: .minWidth(250, insets: .init(20), itemSpacing: 20, lineSpacing: 20)
|
||||||
|
) { user in
|
||||||
UserProfileButton(user: user)
|
UserProfileButton(user: user)
|
||||||
.onSelect {
|
.onSelect {
|
||||||
username = user.name ?? ""
|
username = user.name ?? ""
|
||||||
focusedField = .password
|
focusedField = .password
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.layout { _, layoutEnvironment in
|
|
||||||
.grid(
|
|
||||||
layoutEnvironment: layoutEnvironment,
|
|
||||||
layoutMode: .adaptive(withMinItemSize: 250),
|
|
||||||
itemSpacing: 20,
|
|
||||||
lineSpacing: 20,
|
|
||||||
sectionInsets: .init(top: 20, leading: 20, bottom: 20, trailing: 20)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -725,7 +725,6 @@
|
||||||
E1DC9814296DC06200982F06 /* PulseLogHandler in Frameworks */ = {isa = PBXBuildFile; productRef = E1DC9813296DC06200982F06 /* PulseLogHandler */; };
|
E1DC9814296DC06200982F06 /* PulseLogHandler in Frameworks */ = {isa = PBXBuildFile; productRef = E1DC9813296DC06200982F06 /* PulseLogHandler */; };
|
||||||
E1DC9819296DD1CD00982F06 /* CinematicBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9818296DD1CD00982F06 /* CinematicBackgroundView.swift */; };
|
E1DC9819296DD1CD00982F06 /* CinematicBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9818296DD1CD00982F06 /* CinematicBackgroundView.swift */; };
|
||||||
E1DC981A296DD1CD00982F06 /* CinematicBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9818296DD1CD00982F06 /* CinematicBackgroundView.swift */; };
|
E1DC981A296DD1CD00982F06 /* CinematicBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9818296DD1CD00982F06 /* CinematicBackgroundView.swift */; };
|
||||||
E1DC981E296DD91900982F06 /* CollectionView in Frameworks */ = {isa = PBXBuildFile; productRef = E1DC981D296DD91900982F06 /* CollectionView */; };
|
|
||||||
E1DC983D296DEB9B00982F06 /* UnwatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC983C296DEB9B00982F06 /* UnwatchedIndicator.swift */; };
|
E1DC983D296DEB9B00982F06 /* UnwatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC983C296DEB9B00982F06 /* UnwatchedIndicator.swift */; };
|
||||||
E1DC983E296DEB9B00982F06 /* UnwatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC983C296DEB9B00982F06 /* UnwatchedIndicator.swift */; };
|
E1DC983E296DEB9B00982F06 /* UnwatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC983C296DEB9B00982F06 /* UnwatchedIndicator.swift */; };
|
||||||
E1DC9841296DEBD800982F06 /* WatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9840296DEBD800982F06 /* WatchedIndicator.swift */; };
|
E1DC9841296DEBD800982F06 /* WatchedIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1DC9840296DEBD800982F06 /* WatchedIndicator.swift */; };
|
||||||
|
@ -1380,7 +1379,6 @@
|
||||||
E1575E56293E7650001665B1 /* VLCUI in Frameworks */,
|
E1575E56293E7650001665B1 /* VLCUI in Frameworks */,
|
||||||
62666E1727E501CC00EC0ECD /* CFNetwork.framework in Frameworks */,
|
62666E1727E501CC00EC0ECD /* CFNetwork.framework in Frameworks */,
|
||||||
62666DFA27E5013700EC0ECD /* TVVLCKit.xcframework in Frameworks */,
|
62666DFA27E5013700EC0ECD /* TVVLCKit.xcframework in Frameworks */,
|
||||||
E1DC981E296DD91900982F06 /* CollectionView in Frameworks */,
|
|
||||||
62666E3227E5021E00EC0ECD /* UIKit.framework in Frameworks */,
|
62666E3227E5021E00EC0ECD /* UIKit.framework in Frameworks */,
|
||||||
62666E2A27E5020A00EC0ECD /* OpenGLES.framework in Frameworks */,
|
62666E2A27E5020A00EC0ECD /* OpenGLES.framework in Frameworks */,
|
||||||
E1002B6B2793E36600E47059 /* Algorithms in Frameworks */,
|
E1002B6B2793E36600E47059 /* Algorithms in Frameworks */,
|
||||||
|
@ -3199,7 +3197,6 @@
|
||||||
E1B5F7A829577BCE004B26CF /* PulseLogHandler */,
|
E1B5F7A829577BCE004B26CF /* PulseLogHandler */,
|
||||||
E1B5F7AA29577BCE004B26CF /* PulseUI */,
|
E1B5F7AA29577BCE004B26CF /* PulseUI */,
|
||||||
E1B5F7AC29577BDD004B26CF /* OrderedCollections */,
|
E1B5F7AC29577BDD004B26CF /* OrderedCollections */,
|
||||||
E1DC981D296DD91900982F06 /* CollectionView */,
|
|
||||||
E18443CA2A037773002DDDC8 /* UDPBroadcast */,
|
E18443CA2A037773002DDDC8 /* UDPBroadcast */,
|
||||||
E14CB6872A9FF71F001586C6 /* JellyfinAPI */,
|
E14CB6872A9FF71F001586C6 /* JellyfinAPI */,
|
||||||
E1A7B1642B9A9F7800152546 /* PreferencesView */,
|
E1A7B1642B9A9F7800152546 /* PreferencesView */,
|
||||||
|
@ -3327,7 +3324,6 @@
|
||||||
E15210522946DF1B00375CC2 /* XCRemoteSwiftPackageReference "Pulse" */,
|
E15210522946DF1B00375CC2 /* XCRemoteSwiftPackageReference "Pulse" */,
|
||||||
E19DDEC52948EF9900954E10 /* XCRemoteSwiftPackageReference "swift-collections" */,
|
E19DDEC52948EF9900954E10 /* XCRemoteSwiftPackageReference "swift-collections" */,
|
||||||
E1DC9812296DC06200982F06 /* XCRemoteSwiftPackageReference "PulseLogHandler" */,
|
E1DC9812296DC06200982F06 /* XCRemoteSwiftPackageReference "PulseLogHandler" */,
|
||||||
E1DC981F296DDBE600982F06 /* XCRemoteSwiftPackageReference "CollectionView" */,
|
|
||||||
E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */,
|
E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */,
|
||||||
E14CB6842A9FF62A001586C6 /* XCRemoteSwiftPackageReference "jellyfin-sdk-swift" */,
|
E14CB6842A9FF62A001586C6 /* XCRemoteSwiftPackageReference "jellyfin-sdk-swift" */,
|
||||||
E15D4F032B1B0C3C00442DB8 /* XCLocalSwiftPackageReference "PreferencesView" */,
|
E15D4F032B1B0C3C00442DB8 /* XCLocalSwiftPackageReference "PreferencesView" */,
|
||||||
|
@ -4747,14 +4743,6 @@
|
||||||
minimumVersion = 4.0.0;
|
minimumVersion = 4.0.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
E1DC981F296DDBE600982F06 /* XCRemoteSwiftPackageReference "CollectionView" */ = {
|
|
||||||
isa = XCRemoteSwiftPackageReference;
|
|
||||||
repositoryURL = "https://github.com/LePips/CollectionView";
|
|
||||||
requirement = {
|
|
||||||
branch = main;
|
|
||||||
kind = branch;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */ = {
|
E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/gunterhager/UDPBroadcastConnection";
|
repositoryURL = "https://github.com/gunterhager/UDPBroadcastConnection";
|
||||||
|
@ -5051,10 +5039,6 @@
|
||||||
package = E1DC9812296DC06200982F06 /* XCRemoteSwiftPackageReference "PulseLogHandler" */;
|
package = E1DC9812296DC06200982F06 /* XCRemoteSwiftPackageReference "PulseLogHandler" */;
|
||||||
productName = PulseLogHandler;
|
productName = PulseLogHandler;
|
||||||
};
|
};
|
||||||
E1DC981D296DD91900982F06 /* CollectionView */ = {
|
|
||||||
isa = XCSwiftPackageProductDependency;
|
|
||||||
productName = CollectionView;
|
|
||||||
};
|
|
||||||
E1FAD1C52A0375BA007F5521 /* UDPBroadcast */ = {
|
E1FAD1C52A0375BA007F5521 /* UDPBroadcast */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */;
|
package = E1FAD1C42A0375BA007F5521 /* XCRemoteSwiftPackageReference "UDPBroadcastConnection" */;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"originHash" : "20f168223d2d1133c4837df32ef688f816b79816393b1172be8e57d39c47d619",
|
"originHash" : "c477e4f1cd54bd525946c46dd4d4243ceca54f879672628a772af4ecb8aa0a79",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "blurhashkit",
|
"identity" : "blurhashkit",
|
||||||
|
@ -37,15 +37,6 @@
|
||||||
"revision" : "e4e0adc7722430870293e390e32d35c37a0d047b"
|
"revision" : "e4e0adc7722430870293e390e32d35c37a0d047b"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"identity" : "collectionview",
|
|
||||||
"kind" : "remoteSourceControl",
|
|
||||||
"location" : "https://github.com/LePips/CollectionView",
|
|
||||||
"state" : {
|
|
||||||
"branch" : "main",
|
|
||||||
"revision" : "70a44bd1a8864f88213be69613554a9d5a8fb779"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"identity" : "corestore",
|
"identity" : "corestore",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
|
|
Loading…
Reference in New Issue