From 948b1fd2b33ddd2b95b3921d20a00c2274b71fae Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Sat, 9 Sep 2023 00:10:22 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=91=EC=9B=90=EA=B8=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserProfileFanTalkCheersItemView.swift | 54 +++++++++++++++++-- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/SodaLive/Sources/Explorer/Profile/FanTalk/UserProfileFanTalkCheersItemView.swift b/SodaLive/Sources/Explorer/Profile/FanTalk/UserProfileFanTalkCheersItemView.swift index b3c4f38..8c61f21 100644 --- a/SodaLive/Sources/Explorer/Profile/FanTalk/UserProfileFanTalkCheersItemView.swift +++ b/SodaLive/Sources/Explorer/Profile/FanTalk/UserProfileFanTalkCheersItemView.swift @@ -45,10 +45,51 @@ struct UserProfileFanTalkCheersItemView: View { .foregroundColor(Color(hex: "525252")) .padding(.top, 8.3) - Text("\(cheersItem.content)") - .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color(hex: "777777")) + if isModeModify { + HStack(spacing: 10) { + 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) + } else { + Text("\(cheersItem.content)") + .font(.custom(Font.medium.rawValue, size: 12)) + .foregroundColor(Color(hex: "777777")) + .padding(.top, 13.3) + } if isShowInputReply { HStack(spacing: 10) { @@ -129,8 +170,10 @@ struct UserProfileFanTalkCheersItemView: View { Spacer() - Image("ic_seemore_vertical") - .onTapGesture { isShowPopupMenu = true } + if !isModeModify { + Image("ic_seemore_vertical") + .onTapGesture { isShowPopupMenu = true } + } } Rectangle() @@ -159,6 +202,7 @@ struct UserProfileFanTalkCheersItemView: View { .onTapGesture { isModeModify = true isShowPopupMenu = false + cheers = cheersItem.content } }