라이브 방
- 하트 후원 API 연결 - 하트 후원 성공시 하트 애니메이션 호출 - 하트 후원 성공시 채팅으로 알림
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
enum LiveRoomChatType: String {
|
||||
case CHAT, DONATION, JOIN, ROULETTE_DONATION
|
||||
case CHAT, DONATION, JOIN, ROULETTE_DONATION, HEART
|
||||
}
|
||||
|
||||
protocol LiveRoomChat {
|
||||
@@ -48,3 +48,9 @@ struct LiveRoomJoinChat: LiveRoomChat {
|
||||
|
||||
var type: LiveRoomChatType = .JOIN
|
||||
}
|
||||
|
||||
struct LiveRoomHeartDonationChat: LiveRoomChat {
|
||||
let nickname: String
|
||||
|
||||
var type: LiveRoomChatType = .HEART
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import Foundation
|
||||
|
||||
struct LiveRoomChatRawMessage: Codable {
|
||||
enum LiveRoomChatRawMessageType: String, Codable {
|
||||
case DONATION, SECRET_DONATION, EDIT_ROOM_INFO, SET_MANAGER, TOGGLE_ROULETTE, ROULETTE_DONATION
|
||||
case DONATION, SECRET_DONATION, EDIT_ROOM_INFO, SET_MANAGER, TOGGLE_ROULETTE, ROULETTE_DONATION, HEART_DONATION
|
||||
}
|
||||
|
||||
let type: LiveRoomChatRawMessageType
|
||||
|
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// LiveRoomHeartDonationChatItemView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 10/24/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomHeartDonationChatItemView: View {
|
||||
|
||||
let chatMessage: LiveRoomHeartDonationChat
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 0) {
|
||||
Text("'")
|
||||
.font(.system(size: 12))
|
||||
.foregroundColor(Color.gray11)
|
||||
|
||||
Text(chatMessage.nickname)
|
||||
.font(.system(size: 12, weight: .bold))
|
||||
.foregroundColor(Color(hex: "ec3aa6"))
|
||||
|
||||
Text("'님이 마음을 전했습니다 : 💕")
|
||||
.font(.system(size: 12))
|
||||
.foregroundColor(Color.gray11)
|
||||
}
|
||||
.padding(.vertical, 6.7)
|
||||
.frame(width: screenSize().width - 86)
|
||||
.background(Color.white.opacity(0.7))
|
||||
.cornerRadius(4.7)
|
||||
.padding(.leading, 20)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
LiveRoomHeartDonationChatItemView(chatMessage: LiveRoomHeartDonationChat(nickname: "닉네임"))
|
||||
}
|
Reference in New Issue
Block a user