diff --git a/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/Contents.json b/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/Contents.json new file mode 100644 index 0000000..74674a7 --- /dev/null +++ b/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_can_white.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/ic_can_white.png b/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/ic_can_white.png new file mode 100644 index 0000000..f3157c4 Binary files /dev/null and b/SodaLive/Resources/Assets.xcassets/ic_can_white.imageset/ic_can_white.png differ diff --git a/SodaLive/Sources/Live/Now/LiveNowItemView.swift b/SodaLive/Sources/Live/Now/LiveNowItemView.swift index 832c8ca..1f12eae 100644 --- a/SodaLive/Sources/Live/Now/LiveNowItemView.swift +++ b/SodaLive/Sources/Live/Now/LiveNowItemView.swift @@ -12,8 +12,8 @@ struct LiveNowItemView: View { let item: GetRoomListResponse - let width: CGFloat = 133.3 - let height: CGFloat = 176.7 + let width: CGFloat = 128 + let height: CGFloat = 179 var body: some View { VStack(alignment: .leading, spacing: 8) { @@ -32,14 +32,20 @@ struct LiveNowItemView: View { ) VStack(alignment: .trailing, spacing: 0) { - HStack(spacing: 3.3) { - Text(item.price > 0 ? "유료" : "무료") - .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color.white) - .padding(.horizontal, 7.3) - .padding(.vertical, 4) - .background(Color(hex: item.price > 0 ? "881609" : "643bc8")) - .cornerRadius(10) + HStack(spacing: 0) { + HStack(spacing: 1) { + if item.price > 0 { + Image("ic_can_white") + } + + Text(item.price > 0 ? "\(item.price)" : "무료") + .font(.custom(Font.medium.rawValue, size: 12)) + .foregroundColor(Color.white) + } + .padding(.horizontal, 7.3) + .padding(.vertical, 4) + .background(item.price > 0 ? Color.mainRed3 : Color.gray11) + .cornerRadius(13.3) Spacer() @@ -47,6 +53,9 @@ struct LiveNowItemView: View { Image("ic_lock") .resizable() .frame(width: 20, height: 20) + .padding(2.7) + .background(Color.gray33.opacity(0.7)) + .clipShape(Circle()) } } .padding(.horizontal, 3.3) @@ -97,7 +106,7 @@ struct LiveNowItemView_Previews: PreviewProvider { numberOfPeople: 5, coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png", isAdult: true, - price: 0, + price: 20, tags: ["팬미팅", "힐링"], channelName: nil, creatorProfileImage: "https://test-cf.sodalive.net/profile/default-profile.png", diff --git a/SodaLive/Sources/UI/Theme/Color.swift b/SodaLive/Sources/UI/Theme/Color.swift index d97fa7d..544007c 100644 --- a/SodaLive/Sources/UI/Theme/Color.swift +++ b/SodaLive/Sources/UI/Theme/Color.swift @@ -28,5 +28,6 @@ extension Color { static let mainRed = Color(hex: "ff5c49") static let mainRed2 = Color(hex: "ea3a25") + static let mainRed3 = Color(hex: "dd4500") static let mainYellow = Color(hex: "ffdc00") }