라이브 UI 변경
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// LiveRoomInfoSpeakerView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Kingfisher
|
||||
|
||||
struct LiveRoomInfoSpeakerView: View {
|
||||
|
||||
let nickname: String
|
||||
let profileUrl: String
|
||||
|
||||
let isMute: Bool
|
||||
let isActiveSpeaker: Bool
|
||||
|
||||
let onClickProfile: () -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 2.7) {
|
||||
ZStack(alignment: .center) {
|
||||
KFImage(URL(string: profileUrl))
|
||||
.resizable()
|
||||
.frame(width: 26.7, height: 26.7)
|
||||
.clipShape(Circle())
|
||||
.overlay(
|
||||
Circle()
|
||||
.stroke(
|
||||
Color.button,
|
||||
lineWidth: isActiveSpeaker ? 3 : 0
|
||||
)
|
||||
)
|
||||
|
||||
if isMute {
|
||||
Image("ic_mute")
|
||||
.resizable()
|
||||
.frame(width: 30, height: 30)
|
||||
}
|
||||
}
|
||||
|
||||
Text(nickname)
|
||||
.font(.custom(Font.medium.rawValue, fixedSize: 10.7))
|
||||
.foregroundColor(.gray77)
|
||||
}
|
||||
.frame(width: 30, height: 30)
|
||||
.onTapGesture { onClickProfile() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomInfoSpeakerView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomInfoSpeakerView(
|
||||
nickname: "청령",
|
||||
profileUrl: "https://cf.sodalive.net/profile/13/13-profile-fabb75e0-2870-4d99-900e-1d9aa63e605b-685-1704859996417",
|
||||
isMute: false,
|
||||
isActiveSpeaker: true,
|
||||
onClickProfile: {}
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user