크리에이터 커뮤니티 등록 UI 추가
This commit is contained in:
parent
a7f8fa5dc5
commit
e2e64fa4e6
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_logo2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -113,4 +113,6 @@ enum AppStep {
|
||||||
case contentRankingAll
|
case contentRankingAll
|
||||||
|
|
||||||
case creatorCommunityAll(creatorId: Int)
|
case creatorCommunityAll(creatorId: Int)
|
||||||
|
|
||||||
|
case creatorCommunityWrite
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,11 +522,11 @@ struct SelectButtonView: View {
|
||||||
|
|
||||||
Text(title)
|
Text(title)
|
||||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
.foregroundColor(isChecked ? .white : Color(hex: "9970ff"))
|
.foregroundColor(isChecked ? .white : Color(hex: "80D8FF"))
|
||||||
}
|
}
|
||||||
.frame(height: 48.7)
|
.frame(height: 48.7)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.background(isChecked ? Color(hex: "9970ff") : Color(hex: "1f1734"))
|
.background(isChecked ? Color(hex: "3BB9F1") : Color(hex: "13181B"))
|
||||||
.cornerRadius(6.7)
|
.cornerRadius(6.7)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
|
|
|
@ -166,6 +166,9 @@ struct ContentView: View {
|
||||||
case .creatorCommunityAll(let creatorId):
|
case .creatorCommunityAll(let creatorId):
|
||||||
CreatorCommunityAllView(creatorId: creatorId)
|
CreatorCommunityAllView(creatorId: creatorId)
|
||||||
|
|
||||||
|
case .creatorCommunityWrite:
|
||||||
|
CreatorCommunityWriteView()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
EmptyView()
|
EmptyView()
|
||||||
.frame(width: 0, height: 0, alignment: .topLeading)
|
.frame(width: 0, height: 0, alignment: .topLeading)
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
//
|
||||||
|
// CreatorCommunityWriteView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/12/15.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct CreatorCommunityWriteView: View {
|
||||||
|
|
||||||
|
@StateObject var keyboardHandler = KeyboardHandler()
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
BaseView {
|
||||||
|
GeometryReader { proxy in
|
||||||
|
ZStack {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
DetailNavigationBar(title: "게시글 등록")
|
||||||
|
|
||||||
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
Text("이미지")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
ZStack {
|
||||||
|
Image("ic_logo2")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.padding(13.3)
|
||||||
|
.frame(width: 107, height: 107)
|
||||||
|
.background(Color(hex: "13181B"))
|
||||||
|
.cornerRadius(8)
|
||||||
|
|
||||||
|
Image("ic_camera")
|
||||||
|
.padding(10)
|
||||||
|
.background(Color(hex: "3BB9F1"))
|
||||||
|
.cornerRadius(30)
|
||||||
|
.offset(x: 50, y: 36)
|
||||||
|
}
|
||||||
|
.frame(alignment: .bottomTrailing)
|
||||||
|
|
||||||
|
HStack(alignment: .top, spacing: 0) {
|
||||||
|
Text("※ ")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
|
||||||
|
Text("등록할 이미지가 없으면 이미지 없이 게시글만 등록 하셔도 됩니다.")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(.top, 24)
|
||||||
|
|
||||||
|
HStack(spacing: 0) {
|
||||||
|
Text("내용")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
Text("0자")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "ff5c49")) +
|
||||||
|
Text(" / 최대 500자")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
|
||||||
|
TextViewWrapper(
|
||||||
|
text: .constant(""),
|
||||||
|
placeholder: "내용을 입력하세요",
|
||||||
|
textColorHex: "eeeeee",
|
||||||
|
backgroundColorHex: "222222"
|
||||||
|
)
|
||||||
|
.frame(height: 184)
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
|
VStack(spacing: 13.3) {
|
||||||
|
Text("댓글 가능 여부")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
HStack(spacing: 13.3) {
|
||||||
|
SelectButtonView(title: "댓글 가능", isChecked: true) {
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectButtonView(title: "댓글 불가", isChecked: false) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
|
||||||
|
VStack(spacing: 13.3) {
|
||||||
|
Text("연령 제한")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
HStack(spacing: 13.3) {
|
||||||
|
SelectButtonView(title: "전체 연령", isChecked: true) {
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectButtonView(title: "19세 이상", isChecked: false) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
}
|
||||||
|
.padding(13.3)
|
||||||
|
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
HStack(spacing: 13.3) {
|
||||||
|
Text("닫기")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||||
|
.foregroundColor(Color(hex: "3BB9F1"))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 50)
|
||||||
|
.background(Color(hex: "13181B"))
|
||||||
|
.cornerRadius(10)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 8)
|
||||||
|
.stroke(Color(hex: "3BB9F1"), lineWidth: 1)
|
||||||
|
)
|
||||||
|
.onTapGesture {
|
||||||
|
hideKeyboard()
|
||||||
|
}
|
||||||
|
|
||||||
|
Text("등록")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 50)
|
||||||
|
.background(Color(hex: "3BB9F1"))
|
||||||
|
.cornerRadius(10)
|
||||||
|
.onTapGesture {
|
||||||
|
hideKeyboard()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(13.3)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(16.7, corners: [.topLeft, .topRight])
|
||||||
|
|
||||||
|
Rectangle()
|
||||||
|
.foregroundColor(Color(hex: "222222"))
|
||||||
|
.frame(height: keyboardHandler.keyboardHeight)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
|
||||||
|
if proxy.safeAreaInsets.bottom > 0 {
|
||||||
|
Rectangle()
|
||||||
|
.foregroundColor(Color(hex: "222222"))
|
||||||
|
.frame(height: 15.3)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edgesIgnoringSafeArea(.bottom)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct CreatorCommunityWriteView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
CreatorCommunityWriteView()
|
||||||
|
}
|
||||||
|
}
|
|
@ -63,6 +63,9 @@ struct UserProfileView: View {
|
||||||
LazyHStack(spacing: 13.3) {
|
LazyHStack(spacing: 13.3) {
|
||||||
if UserDefaults.int(forKey: .userId) == creatorProfile.creator.creatorId {
|
if UserDefaults.int(forKey: .userId) == creatorProfile.creator.creatorId {
|
||||||
CreatorCommunityWriteItemView()
|
CreatorCommunityWriteItemView()
|
||||||
|
.onTapGesture {
|
||||||
|
AppState.shared.setAppStep(step: .creatorCommunityWrite)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatorCommunityItemView()
|
CreatorCommunityItemView()
|
||||||
|
|
Loading…
Reference in New Issue