feat(chat-room-bg): 배경 이미지 변경 기능 추가
This commit is contained in:
		@@ -249,7 +249,14 @@ struct ChatRoomView: View {
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            if viewModel.isShowingChangeBgView {
 | 
			
		||||
                ChatBgSelectionView()
 | 
			
		||||
                ChatBgSelectionView(
 | 
			
		||||
                    characterId: viewModel.characterId,
 | 
			
		||||
                    selectedBgImageId: viewModel.chatRoomBgImageId,
 | 
			
		||||
                    onTapBgImage: {
 | 
			
		||||
                        viewModel.setBackgroundImage(imageItem: $0)
 | 
			
		||||
                    },
 | 
			
		||||
                    isShowing: $viewModel.isShowingChangeBgView
 | 
			
		||||
                )
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            if viewModel.isShowingChatResetConfirmDialog {
 | 
			
		||||
@@ -325,19 +332,28 @@ struct ChatRoomBgView: View {
 | 
			
		||||
    let url: String?
 | 
			
		||||
    
 | 
			
		||||
    var body: some View {
 | 
			
		||||
        ZStack {
 | 
			
		||||
            if let url = url {
 | 
			
		||||
                KFImage(URL(string: url))
 | 
			
		||||
                    .resizable()
 | 
			
		||||
                    .aspectRatio(4/5, contentMode: .fill)
 | 
			
		||||
                    .frame(maxWidth: screenSize().width)
 | 
			
		||||
        GeometryReader { geo in
 | 
			
		||||
            let width = geo.size.width
 | 
			
		||||
            let height = width * 5 / 4
 | 
			
		||||
            
 | 
			
		||||
            ZStack {
 | 
			
		||||
                if let url = url {
 | 
			
		||||
                    KFImage(URL(string: url))
 | 
			
		||||
                        .resizable()
 | 
			
		||||
                        .scaledToFill()
 | 
			
		||||
                        .frame(width: width, height: height)
 | 
			
		||||
                        .clipped()
 | 
			
		||||
                        .ignoresSafeArea()
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                Color.black
 | 
			
		||||
                    .opacity(0.6)
 | 
			
		||||
                    .ignoresSafeArea()
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            Color.black
 | 
			
		||||
                .opacity(0.6)
 | 
			
		||||
                .ignoresSafeArea()
 | 
			
		||||
            .frame(width: width, height: height)
 | 
			
		||||
            .clipped()
 | 
			
		||||
        }
 | 
			
		||||
        .aspectRatio(4/5, contentMode: .fit)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user