fix(live): 라이브룸 팔로우 버튼 스타일을 정렬한다

This commit is contained in:
Yu Sung
2026-03-05 15:41:37 +09:00
parent ca565a2b5f
commit d29e23b9cf
10 changed files with 160 additions and 4 deletions

View File

@@ -773,6 +773,8 @@ enum I18n {
static var notice: String { pick(ko: "공지", en: "Notice", ja: "お知らせ") }
static var menuPan: String { pick(ko: "메뉴판", en: "Menu", ja: "メニュー表") }
static var participants: String { pick(ko: "참여자", en: "Participants", ja: "リスナー") }
static var follow: String { pick(ko: "팔로우", en: "Follow", ja: "フォロー") }
static var following: String { pick(ko: "팔로잉", en: "Following", ja: "フォロー中") }
}
enum LiveNow {

View File

@@ -214,10 +214,7 @@ struct LiveRoomInfoGuestView: View {
.onTapGesture { onClickTotalDonation() }
if creatorId != UserDefaults.int(forKey: .userId) {
let asset = FollowButtonImageAsset(type: followButtonType)
asset.imageView(defaultSize: CGSize(width: 83.3, height: 26.7))
.contentShape(Rectangle())
.onTapGesture { onClickFollow() }
followButtonView
}
}
}
@@ -236,6 +233,41 @@ struct LiveRoomInfoGuestView: View {
UIScrollView.appearance().bounces = true
}
}
private var followButtonText: String {
followButtonType == .follow ? I18n.LiveRoom.follow : I18n.LiveRoom.following
}
private var followButtonIconName: String {
switch followButtonType {
case .follow:
return "ic_live_creator_follow_plus"
case .following:
return "ic_live_creator_follow_alarm"
case .followingNoAlarm:
return "ic_live_creator_follow_no_alarm"
}
}
private var followButtonView: some View {
HStack(spacing: 6.7) {
Image(followButtonIconName)
.resizable()
.frame(width: 12, height: 12)
Text(followButtonText)
.appFont(size: 12, weight: .medium)
.foregroundColor(.graybb)
}
.padding(.horizontal, 11)
.padding(.vertical, 5.3)
.overlay(
RoundedRectangle(cornerRadius: 5.3)
.stroke(Color.graybb, lineWidth: 1)
)
.contentShape(Rectangle())
.onTapGesture { onClickFollow() }
}
}
struct LiveRoomInfoGuestView_Previews: PreviewProvider {