mirror of
https://github.com/jellyfin/Swiftfin.git
synced 2024-12-02 19:16:27 +00:00
custom image view
This commit is contained in:
parent
7c3dab23cb
commit
2c410c0e57
@ -1042,7 +1042,7 @@
|
||||
repositoryURL = "https://github.com/kean/NukeUI";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 0.6.1;
|
||||
version = 0.3.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
@ -51,8 +51,8 @@
|
||||
"repositoryURL": "https://github.com/kean/NukeUI",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "62b55e26eddc2ed59e63377ab877efac4f9e049c",
|
||||
"version": "0.6.1"
|
||||
"revision": "d2580b8d22b29c6244418d8e4b568f3162191460",
|
||||
"version": "0.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -128,6 +128,9 @@ struct ConnectToServerView: View {
|
||||
let keychain = KeychainSwift()
|
||||
keychain.set(response.accessToken!, forKey: "AccessToken_\(newUser.user_id!)")
|
||||
|
||||
globalData.expiredCredentials = false
|
||||
globalData.networkError = false
|
||||
|
||||
do {
|
||||
try viewContext.save()
|
||||
DispatchQueue.main.async { [self] in
|
||||
|
@ -24,16 +24,14 @@ struct ImageView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
LazyImage(source: source, content: { state in
|
||||
if let image = state.image {
|
||||
image.resizingMode(.aspectFill)
|
||||
} else if state.error != nil {
|
||||
Image(uiImage: UIImage(blurHash: "001fC^", size: CGSize(width: 1, height: 1))!)
|
||||
.resizable()
|
||||
} else {
|
||||
LazyImage(source: source)
|
||||
.placeholder {
|
||||
Image(uiImage: UIImage(blurHash: blurhash, size: CGSize(width: 16, height: 16))!)
|
||||
.resizable()
|
||||
}
|
||||
})
|
||||
.failure {
|
||||
Rectangle()
|
||||
.background(Color.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user