라이브 프로필 다이얼로그 - 팔로잉 버튼 위치 변경
This commit is contained in:
parent
ebfecb0ad4
commit
4de4f997e6
|
@ -40,7 +40,6 @@ struct LiveRoomUserProfileDialogView: View {
|
|||
isShowing = false
|
||||
}
|
||||
}
|
||||
.padding(.top, 13.3)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
|
@ -57,6 +56,19 @@ struct LiveRoomUserProfileDialogView: View {
|
|||
.background(Color(hex: "555555"))
|
||||
.cornerRadius(23.3)
|
||||
|
||||
if let isFollowing = userProfile.isFollowing {
|
||||
Image(isFollowing ? "btn_following" : "btn_follow")
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if isFollowing {
|
||||
onClickUnFollow(userProfile.userId)
|
||||
} else {
|
||||
onClickFollow(userProfile.userId)
|
||||
}
|
||||
}
|
||||
.padding(.leading, 13.3)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Image("ic_seemore_vertical")
|
||||
|
@ -70,53 +82,6 @@ struct LiveRoomUserProfileDialogView: View {
|
|||
}
|
||||
.padding(.top, 21.3)
|
||||
|
||||
HStack(spacing: 8) {
|
||||
if let isFollwing = userProfile.isFollowing {
|
||||
if isFollwing {
|
||||
HStack(spacing: 4) {
|
||||
Image("ic_alarm_selected")
|
||||
.resizable()
|
||||
.frame(width: 18.7, height: 18.7)
|
||||
|
||||
Text("팔로잉")
|
||||
.font(.custom(Font.bold.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "ffffff"))
|
||||
}
|
||||
.padding(.vertical, 7.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color(hex: "3e1b93"))
|
||||
.cornerRadius(16.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 16.7)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
)
|
||||
.onTapGesture { onClickUnFollow(userProfile.userId) }
|
||||
} else {
|
||||
HStack(spacing: 4) {
|
||||
Image("ic_alarm")
|
||||
.resizable()
|
||||
.frame(width: 18.7, height: 18.7)
|
||||
|
||||
Text("팔로우")
|
||||
.font(.custom(Font.bold.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "ffffff"))
|
||||
}
|
||||
.padding(.vertical, 7.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.cornerRadius(16.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 16.7)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
)
|
||||
.onTapGesture { onClickFollow(userProfile.userId) }
|
||||
}
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.top, 21.3)
|
||||
|
||||
KFImage(URL(string: userProfile.profileUrl))
|
||||
.resizable()
|
||||
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fill)
|
||||
|
@ -208,31 +173,37 @@ struct LiveRoomUserProfileDialogView: View {
|
|||
.padding(.top, 21.3)
|
||||
}
|
||||
|
||||
Text(userProfile.tags)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
.lineSpacing(3)
|
||||
.padding(.top, 21.3)
|
||||
if let _ = userProfile.isFollowing, !userProfile.tags.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
Text(userProfile.tags)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
.lineSpacing(3)
|
||||
.padding(.top, 21.3)
|
||||
}
|
||||
|
||||
Text(userProfile.introduce)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "909090"))
|
||||
.lineLimit(introduceLineLimit)
|
||||
.lineSpacing(3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.vertical, 20)
|
||||
.onTapGesture {
|
||||
if let _ = introduceLineLimit {
|
||||
self.introduceLineLimit = nil
|
||||
} else {
|
||||
self.introduceLineLimit = 2
|
||||
if let _ = userProfile.isFollowing, !userProfile.introduce.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
Text(userProfile.introduce)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "909090"))
|
||||
.lineLimit(introduceLineLimit)
|
||||
.lineSpacing(3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.top, 20)
|
||||
.onTapGesture {
|
||||
if let _ = introduceLineLimit {
|
||||
self.introduceLineLimit = nil
|
||||
} else {
|
||||
self.introduceLineLimit = 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.background(Color(hex: "222222").edgesIgnoringSafeArea(.all))
|
||||
.padding(.top, 13.3)
|
||||
.padding(.bottom, 20)
|
||||
.background(Color(hex: "222222"))
|
||||
.cornerRadius(8)
|
||||
|
||||
if viewModel.isShowKickOutPopup {
|
||||
|
|
Loading…
Reference in New Issue