프로필 수정 페이지 - sns, 소개, 태그 수정 UI 크리에이터만 보이도록 수정

This commit is contained in:
Yu Sung 2023-11-20 19:51:16 +09:00
parent cab41ee6c7
commit 39f84ceadf
1 changed files with 59 additions and 25 deletions

View File

@ -323,40 +323,74 @@ struct ProfileUpdateView: View {
NicknameAndGenderView() NicknameAndGenderView()
.padding(.top, 13.3) .padding(.top, 13.3)
InstagramAndYoutubeAccountView() if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
.padding(.top, 13.3) InstagramAndYoutubeAccountView()
.padding(.top, 13.3)
}
TagSelectView() if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
.padding(.top, 33.3) TagSelectView()
.padding(.top, 33.3)
}
ContentInputView() if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
.padding(.top, 33.3) ContentInputView()
.padding(.top, 33.3)
}
Text("저장하기") if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
.font(.custom(Font.bold.rawValue, size: 18.3)) Text("저장하기")
.foregroundColor(Color.white) .font(.custom(Font.bold.rawValue, size: 18.3))
.frame(width: screenSize().width - 26.7, height: 50) .foregroundColor(Color.white)
.background(Color(hex: "9970ff")) .frame(width: screenSize().width - 26.7, height: 50)
.cornerRadius(10) .background(Color(hex: "9970ff"))
.padding(.vertical, 13.7) .cornerRadius(10)
.padding(.horizontal, 13.3) .padding(.vertical, 13.7)
.frame(width: screenSize().width) .padding(.horizontal, 13.3)
.background(Color(hex: "222222")) .frame(width: screenSize().width)
.cornerRadius(16.7, corners: [.topLeft, .topRight]) .background(Color(hex: "222222"))
.padding(.top, 26.7) .cornerRadius(16.7, corners: [.topLeft, .topRight])
.onTapGesture { .padding(.top, 26.7)
viewModel.updateProfile() .onTapGesture {
viewModel.updateProfile()
}
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.frame(width: proxy.size.width, height: 15.3)
} }
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.frame(width: proxy.size.width, height: 15.3)
} }
} }
} }
} }
.padding(.top, 13.3) .padding(.top, 13.3)
if UserDefaults.string(forKey: .role) != MemberRole.CREATOR.rawValue {
Spacer()
Text("저장하기")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color.white)
.frame(width: screenSize().width - 26.7, height: 50)
.background(Color(hex: "9970ff"))
.cornerRadius(10)
.padding(.vertical, 13.7)
.padding(.horizontal, 13.3)
.frame(width: screenSize().width)
.background(Color(hex: "222222"))
.cornerRadius(16.7, corners: [.topLeft, .topRight])
.padding(.top, 13.3)
.onTapGesture {
viewModel.updateProfile()
}
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.frame(width: proxy.size.width, height: 15.3)
}
}
} }
if isShowPhotoPicker { if isShowPhotoPicker {