Changed ConsoleLibraryView to GameView
This commit is contained in:
@@ -99,7 +99,6 @@ struct ConsoleLibraryView : View {
|
|||||||
GridItem(.adaptive(minimum: 100))
|
GridItem(.adaptive(minimum: 100))
|
||||||
]
|
]
|
||||||
|
|
||||||
let defaultImage = UIImage()
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
@@ -117,31 +116,7 @@ struct ConsoleLibraryView : View {
|
|||||||
LazyVGrid(columns: columns, spacing: 20) {
|
LazyVGrid(columns: columns, spacing: 20) {
|
||||||
ForEach(games.filter({$0.inWishlist == self.showWishlist})) { game in
|
ForEach(games.filter({$0.inWishlist == self.showWishlist})) { game in
|
||||||
NavigationLink(destination: GameDetailView(game: game)) {
|
NavigationLink(destination: GameDetailView(game: game)) {
|
||||||
if ICloudManager.fileExists(at: game.cover_icloud_path) {
|
GameView(game: game)
|
||||||
Image(uiImage: ICloudManager.imageFrom(path: game.cover_icloud_path) ?? defaultImage)
|
|
||||||
.resizable()
|
|
||||||
.scaledToFit()
|
|
||||||
.cornerRadius(5)
|
|
||||||
}else{
|
|
||||||
Group {
|
|
||||||
Text(game.name)
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundColor(Color.black)
|
|
||||||
.padding()
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
}
|
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
||||||
.background(Color.gray)
|
|
||||||
.cornerRadius(5)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// if game.isDigital {
|
|
||||||
// Image("digitalGame")
|
|
||||||
// .resizable()
|
|
||||||
// .aspectRatio(contentMode: .fit)
|
|
||||||
// .frame(height: 15)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.padding()
|
}.padding()
|
||||||
|
|||||||
Reference in New Issue
Block a user