fix(character-detail, gallery): 이미지 사이즈 수정
This commit is contained in:
		@@ -140,61 +140,68 @@ struct CharacterDetailGalleryView: View {
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    @ViewBuilder
 | 
					    @ViewBuilder
 | 
				
			||||||
    private func galleryImageView(item: CharacterImageListItemResponse, index: Int) -> some View {
 | 
					    private func galleryImageView(item: CharacterImageListItemResponse, index: Int) -> some View {
 | 
				
			||||||
        ZStack {
 | 
					        GeometryReader { geo in
 | 
				
			||||||
            // 이미지
 | 
					            let width = geo.size.width
 | 
				
			||||||
            AsyncImage(url: URL(string: item.imageUrl)) { image in
 | 
					            let height = width * 5 / 4
 | 
				
			||||||
                image
 | 
					 | 
				
			||||||
                    .resizable()
 | 
					 | 
				
			||||||
                    .aspectRatio(contentMode: .fill)
 | 
					 | 
				
			||||||
            } placeholder: {
 | 
					 | 
				
			||||||
                Rectangle()
 | 
					 | 
				
			||||||
                    .fill(Color.gray.opacity(0.3))
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            .frame(width: 132, height: 165)
 | 
					 | 
				
			||||||
            .clipped()
 | 
					 | 
				
			||||||
            .cornerRadius(0)
 | 
					 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            // 미소유 이미지 오버레이
 | 
					            ZStack {
 | 
				
			||||||
            if !item.isOwned {
 | 
					                // 이미지
 | 
				
			||||||
                // 어두운 오버레이
 | 
					                AsyncImage(url: URL(string: item.imageUrl)) { image in
 | 
				
			||||||
                Rectangle()
 | 
					                    image
 | 
				
			||||||
                    .fill(Color.black.opacity(0.2))
 | 
					 | 
				
			||||||
                    .frame(width: 132, height: 165)
 | 
					 | 
				
			||||||
                
 | 
					 | 
				
			||||||
                // 자물쇠 아이콘과 코인 정보
 | 
					 | 
				
			||||||
                VStack(spacing: 8) {
 | 
					 | 
				
			||||||
                    // 자물쇠 아이콘
 | 
					 | 
				
			||||||
                    Image("ic_new_lock")
 | 
					 | 
				
			||||||
                        .resizable()
 | 
					                        .resizable()
 | 
				
			||||||
                        .scaledToFit()
 | 
					                        .scaledToFill()
 | 
				
			||||||
                        .frame(width: 24)
 | 
					                        .frame(width: width, height: height)
 | 
				
			||||||
 | 
					                        .clipped()
 | 
				
			||||||
 | 
					                } placeholder: {
 | 
				
			||||||
 | 
					                    Rectangle()
 | 
				
			||||||
 | 
					                        .fill(Color.gray.opacity(0.3))
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					                // 미소유 이미지 오버레이
 | 
				
			||||||
 | 
					                if !item.isOwned {
 | 
				
			||||||
 | 
					                    // 어두운 오버레이
 | 
				
			||||||
 | 
					                    Rectangle()
 | 
				
			||||||
 | 
					                        .fill(Color.black.opacity(0.2))
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                    // 코인 정보 배경
 | 
					                    // 자물쇠 아이콘과 코인 정보
 | 
				
			||||||
                    HStack(spacing: 4) {
 | 
					                    VStack(spacing: 8) {
 | 
				
			||||||
                        Image("ic_can")
 | 
					                        // 자물쇠 아이콘
 | 
				
			||||||
 | 
					                        Image("ic_new_lock")
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .scaledToFit()
 | 
					                            .scaledToFit()
 | 
				
			||||||
                            .frame(width: 16)
 | 
					                            .frame(width: 24)
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
                        Text("\(item.imagePriceCan)")
 | 
					                        // 코인 정보 배경
 | 
				
			||||||
                            .font(.custom(Font.preBold.rawValue, size: 16))
 | 
					                        HStack(spacing: 4) {
 | 
				
			||||||
                            .foregroundColor(Color(hex: "#263238"))
 | 
					                            Image("ic_can")
 | 
				
			||||||
                    }
 | 
					                                .resizable()
 | 
				
			||||||
                    .padding(.horizontal, 12)
 | 
					                                .scaledToFit()
 | 
				
			||||||
                    .padding(.vertical, 6)
 | 
					                                .frame(width: 16)
 | 
				
			||||||
                    .background(Color(hex: "#B5E7FA"))
 | 
					                            
 | 
				
			||||||
                    .cornerRadius(30)
 | 
					                            Text("\(item.imagePriceCan)")
 | 
				
			||||||
                    .overlay {
 | 
					                                .font(.custom(Font.preBold.rawValue, size: 16))
 | 
				
			||||||
                        RoundedRectangle(cornerRadius: 30)
 | 
					                                .foregroundColor(Color(hex: "#263238"))
 | 
				
			||||||
                            .strokeBorder(lineWidth: 1)
 | 
					                        }
 | 
				
			||||||
                            .foregroundColor(.button)
 | 
					                        .padding(.horizontal, 12)
 | 
				
			||||||
 | 
					                        .padding(.vertical, 6)
 | 
				
			||||||
 | 
					                        .background(Color(hex: "#B5E7FA"))
 | 
				
			||||||
 | 
					                        .cornerRadius(30)
 | 
				
			||||||
 | 
					                        .overlay {
 | 
				
			||||||
 | 
					                            RoundedRectangle(cornerRadius: 30)
 | 
				
			||||||
 | 
					                                .strokeBorder(lineWidth: 1)
 | 
				
			||||||
 | 
					                                .foregroundColor(.button)
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            .frame(width: width, height: height)
 | 
				
			||||||
 | 
					            .clipped()
 | 
				
			||||||
 | 
					            .contentShape(Rectangle())
 | 
				
			||||||
 | 
					            .onTapGesture {
 | 
				
			||||||
 | 
					                viewModel.onImageTapped(item, index: index)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .onTapGesture {
 | 
					        .aspectRatio(4/5, contentMode: .fit)
 | 
				
			||||||
            viewModel.onImageTapped(item, index: index)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user