패키지 폴더명 변경

This commit is contained in:
Yu Sung
2023-12-15 19:19:51 +09:00
parent 650b6808e6
commit a7f8fa5dc5
3 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
//
// CreatorCommunityCommentView.swift
// SodaLive
//
// Created by klaus on 2023/12/15.
//
import SwiftUI
struct CreatorCommunityCommentView: View {
let commentCount: Int
let commentList: [String]
let registerComment: (String) -> Void
@State private var comment = ""
var body: some View {
VStack(alignment: .leading, spacing: 11) {
HStack(spacing: 5.3) {
Text("댓글")
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(.white)
Text("\(commentCount)")
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color(hex: "909090"))
Spacer()
}
HStack(spacing: 8) {
Image("ic_place_holder")
.resizable()
.frame(width: 33.3, height: 33.3)
.clipShape(Circle())
if commentCount > 0 {
Text(commentList[0])
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color(hex: "bbbbbb"))
.lineLimit(1)
.padding(.leading, 3)
} else {
HStack(spacing: 0) {
TextField("댓글을 입력해 보세요.", text: $comment)
.autocapitalization(.none)
.disableAutocorrection(true)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
.accentColor(Color(hex: "3bb9f1"))
.keyboardType(.default)
.padding(.horizontal, 13.3)
Spacer()
Image("btn_message_send")
.resizable()
.frame(width: 35, height: 35)
.padding(6.7)
.onTapGesture {
hideKeyboard()
registerComment(comment)
}
}
.background(Color(hex: "232323"))
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.strokeBorder(lineWidth: 1)
.foregroundColor(Color(hex: "3bb9f1"))
)
}
}
}
.padding(11)
.background(Color(hex: "ffffff").opacity(0.1))
.cornerRadius(5.3)
}
}
struct CreatorCommunityCommentView_Previews: PreviewProvider {
static var previews: some View {
CreatorCommunityCommentView(
commentCount: 0,
commentList: [
"내용 읽어보니까 결혼해도 될것 같은데",
"너무 조하유 앞으로도 좋은 라이브 많이 들려주세요"
],
registerComment: { _ in }
)
}
}

View File

@@ -0,0 +1,80 @@
//
// CreatorCommunityAllItemView.swift
// SodaLive
//
// Created by klaus on 2023/12/15.
//
import SwiftUI
struct CreatorCommunityAllItemView: View {
@State var isExpandContent = true
var body: some View {
VStack(spacing: 13.3) {
HStack(spacing: 0) {
Image("ic_place_holder")
.resizable()
.frame(width: 40, height: 40)
.clipShape(Circle())
VStack(alignment: .leading, spacing: 3) {
Text("민하나")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
Text("1개월 전(수정됨)")
.font(.custom(Font.light.rawValue, size: 13.3))
.foregroundColor(Color(hex: "777777"))
}
.padding(.leading, 11)
Spacer()
Image("ic_seemore_vertical")
.padding(.trailing, 8.3)
.onTapGesture {}
}
Text("너무 조하유 앞으로도 좋은 라이브 많이 들려주세요!너무 조하유 앞으로도 좋은 라이브 많이 들려주세요!너무 조하유 앞으로도 좋은 라이브 많이 들려주세요!너무 조하유 앞으로도 좋은 라이브 많이 들려주세요!")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "bbbbbb"))
.fixedSize(horizontal: false, vertical: true)
.frame(maxWidth: .infinity, alignment: .leading)
.lineLimit(isExpandContent ? Int.max : 3)
.onTapGesture { isExpandContent.toggle() }
Image("img_sample")
.resizable()
.frame(maxWidth: .infinity)
.scaledToFit()
HStack(spacing: 8) {
IconAndTitleToggleButton(
isChecked: .constant(true),
title: "252",
normalIconName: "ic_audio_content_heart_normal",
checkedIconName: "ic_audio_content_heart_pressed"
) {}
IconAndTitleButton(iconName: "ic_audio_content_share", title: "공유") {}
}
.frame(maxWidth: .infinity, alignment: .leading)
CreatorCommunityCommentView(
commentCount: 2,
commentList: [
"내용 읽어보니까 결혼해도 될것 같은데",
"너무 조하유 앞으로도 좋은 라이브 많이 들려주세요"
],
registerComment: { _ in }
)
}
}
}
struct CreatorCommunityAllItemView_Previews: PreviewProvider {
static var previews: some View {
CreatorCommunityAllItemView()
}
}

View File

@@ -0,0 +1,37 @@
//
// CreatorCommunityAllView.swift
// SodaLive
//
// Created by klaus on 2023/12/15.
//
import SwiftUI
struct CreatorCommunityAllView: View {
let creatorId: Int
var body: some View {
BaseView {
VStack(spacing: 0) {
DetailNavigationBar(title: "커뮤니티")
ScrollView(.vertical, showsIndicators: false) {
LazyVStack(spacing: 26.7) {
CreatorCommunityAllItemView()
CreatorCommunityAllItemView()
CreatorCommunityAllItemView()
}
.padding(.horizontal, 13.3)
.padding(.vertical, 5.3)
}
}
}
}
}
struct CreatorCommunityAllView_Previews: PreviewProvider {
static var previews: some View {
CreatorCommunityAllView(creatorId: 0)
}
}