응원글 수정 기능 추가
This commit is contained in:
parent
5d95c0f1c9
commit
948b1fd2b3
|
@ -45,10 +45,51 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||||
.foregroundColor(Color(hex: "525252"))
|
.foregroundColor(Color(hex: "525252"))
|
||||||
.padding(.top, 8.3)
|
.padding(.top, 8.3)
|
||||||
|
|
||||||
Text("\(cheersItem.content)")
|
if isModeModify {
|
||||||
.font(.custom(Font.medium.rawValue, size: 12))
|
HStack(spacing: 10) {
|
||||||
.foregroundColor(Color(hex: "777777"))
|
TextField("", text: $cheers)
|
||||||
|
.autocapitalization(.none)
|
||||||
|
.disableAutocorrection(true)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.padding(13.3)
|
||||||
|
.background(Color(hex: "232323"))
|
||||||
|
.accentColor(Color(hex: "9970ff"))
|
||||||
|
.keyboardType(.default)
|
||||||
|
.cornerRadius(10)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 10)
|
||||||
|
.strokeBorder(lineWidth: 1)
|
||||||
|
.foregroundColor(Color(hex: "9970ff"))
|
||||||
|
)
|
||||||
|
|
||||||
|
Text("수정")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "ffffff"))
|
||||||
|
.padding(13.3)
|
||||||
|
.background(Color(hex: "9970ff"))
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.onTapGesture {
|
||||||
|
modifyCheer(cheersItem.cheersId, cheers)
|
||||||
|
}
|
||||||
|
|
||||||
|
Text("취소")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "9970ff"))
|
||||||
|
.padding(13.3)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.onTapGesture {
|
||||||
|
isModeModify = false
|
||||||
|
}
|
||||||
|
}
|
||||||
.padding(.top, 13.3)
|
.padding(.top, 13.3)
|
||||||
|
} else {
|
||||||
|
Text("\(cheersItem.content)")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
}
|
||||||
|
|
||||||
if isShowInputReply {
|
if isShowInputReply {
|
||||||
HStack(spacing: 10) {
|
HStack(spacing: 10) {
|
||||||
|
@ -129,8 +170,10 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Image("ic_seemore_vertical")
|
if !isModeModify {
|
||||||
.onTapGesture { isShowPopupMenu = true }
|
Image("ic_seemore_vertical")
|
||||||
|
.onTapGesture { isShowPopupMenu = true }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle()
|
Rectangle()
|
||||||
|
@ -159,6 +202,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
isModeModify = true
|
isModeModify = true
|
||||||
isShowPopupMenu = false
|
isShowPopupMenu = false
|
||||||
|
cheers = cheersItem.content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue