40 Commits

Author SHA1 Message Date
Yu Sung
594bcc27ca 빠진 아이콘 추가 2023-08-24 16:18:49 +09:00
Yu Sung
bcb934a155 마이페이지 구매목록 - 19표시 제거 2023-08-24 15:55:26 +09:00
Yu Sung
b31dcf901b 회원가입 - 프로필 이미지 정사각형 2023-08-24 14:42:07 +09:00
Yu Sung
2c8485a1cd 마이페이지 - 구매목록 추가 2023-08-24 14:30:09 +09:00
Yu Sung
f0d2bda024 내보내기, mute, noti_mute 파일 추가 2023-08-24 13:26:24 +09:00
Yu Sung
828c507742 콘텐츠 수정 request data 이름 변경 - audioContentId -> contentId 2023-08-24 13:12:31 +09:00
Yu Sung
65b43e4c0d 콘텐츠 후원 요청 데이터 이름 변경 - audioContentId -> contentId 2023-08-22 22:44:18 +09:00
Yu Sung
728510a72d 콘텐츠 리스트, 콘텐츠 구매 창에 캔 아이콘 변경 2023-08-22 00:41:27 +09:00
Yu Sung
89fd2f5f0d 콘텐츠 구매 - audioContentId -> contentId로 변경 2023-08-22 00:34:43 +09:00
Yu Sung
52921e78b6 pg 검증 API URL 변경 2023-08-21 23:56:29 +09:00
Yu Sung
f0f1cd39b6 크리에이터만 라이브를 개설할 수 있도록 변경 2023-08-21 06:07:53 +09:00
Yu Sung
c5fdfcafda 라이브 방 - 스피커 최대 10 -> 5명으로 수정 2023-08-21 05:38:53 +09:00
Yu Sung
5301aebe71 라이브 종료 - 방장이 라이브를 종료 했을 때 앱이 죽는 버그 수정 2023-08-21 05:23:27 +09:00
Yu Sung
fe046e8006 라이브 방 - SwiftUI 기본 애니메이션 제거 2023-08-21 05:12:29 +09:00
Yu Sung
0daf638b68 라이브 메인 - 메시지 탭 보이도록 수정 2023-08-21 04:41:54 +09:00
Yu Sung
8b7f3fbd07 본인인증을 한 유저만 메시지 탭이 보이도록 수정 2023-08-21 04:20:13 +09:00
Yu Sung
3ab5735fde 라이브 상세 - 제목 왼쪽에 19금 표시 추가 2023-08-21 04:08:12 +09:00
Yu Sung
550bf0c1c7 로딩 애니메이션 변경 2023-08-21 03:07:57 +09:00
Yu Sung
f018bd30e6 푸시토큰 업데이트 수정 2023-08-21 02:48:43 +09:00
Yu Sung
4e62d752f9 마이페이지 - 사용방법 배너 간격 수정 2023-08-21 02:28:25 +09:00
Yu Sung
d93c3e8836 라이브 메인 - 이벤트 클릭 이벤트 추가 2023-08-21 01:29:01 +09:00
Yu Sung
38df12872a 라이브 방 - 입장메시지 방장만 보이도록 수정 2023-08-21 00:45:46 +09:00
Yu Sung
8c3a9e25a0 라이브 방 - 19금 방인 경우 제목 왼쪽에 19 표시 2023-08-20 23:44:18 +09:00
Yu Sung
e8de5dd72b 라이브 상세 - 참여자 리스트 삭제 2023-08-20 23:24:03 +09:00
Yu Sung
30cceefbcf 소다라이브 이용방법 배너 - 라이브 탭에서 마이 탭으로 이동 2023-08-20 23:21:02 +09:00
Yu Sung
ce55449f2d 캔내역 - 충전하기 버튼색 변경 2023-08-20 23:18:23 +09:00
Yu Sung
792e029f0d 캔 아이콘 변경 2023-08-20 23:14:00 +09:00
Yu Sung
6bc5356ac1 메인 하단 탭 - 라이브, 콘텐츠 순서 변경 2023-08-20 20:42:14 +09:00
Yu Sung
a5b954ada2 크리에이터 채널 - 콘텐츠 영역 추가 2023-08-20 20:36:17 +09:00
Yu Sung
154b5826c6 인 앱 결제 상품 추가 2023-08-20 20:22:55 +09:00
Yu Sung
3dfe4f3b8a 19 표시 제거 2023-08-20 20:22:35 +09:00
Yu Sung
d75367c78b data parsing시 이름이 일치하지 않아 에러나던 버그 수정 2023-08-20 00:08:15 +09:00
Yu Sung
78f80cebd5 팔로잉 채널 전체 리스트 페이지 추가 2023-08-19 23:14:54 +09:00
Yu Sung
633e1bfd92 라이브 메인 - 추천 채널 아이템 터치시 크리에이터 채널로 이동하도록 수정 2023-08-19 23:00:46 +09:00
Yu Sung
5a771f14bd 푸시 혹은 공유링크를 타고 앱을 실행했을 때 처리되는 로직 수정 2023-08-19 22:57:10 +09:00
Yu Sung
8e23f65086 yozm -> sodalive 로 변경 2023-08-19 21:57:19 +09:00
Yu Sung
a22a3ebf6c 공유하기 url 수정 2023-08-19 21:27:39 +09:00
Yu Sung
00d49afec6 . 2023-08-19 18:08:59 +09:00
Yu Sung
80b487eab6 앱 아이콘 변경 2023-08-19 18:07:13 +09:00
Yu Sung
8461012e22 아이콘 삭제 2023-08-19 18:05:13 +09:00
149 changed files with 1327 additions and 405 deletions

View File

@@ -5,11 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "loading_4.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_alarm.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_alarm_selected.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_blog_purple.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -5,11 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "loading_1.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_heart_777.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_instagram_purple.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -5,11 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "loading_3.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_kick_out.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_message_send.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

View File

@@ -9,7 +9,7 @@
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_headphones_purple.png", "filename" : "ic_message_square_777.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_mic_paint.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

View File

@@ -5,11 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "loading_2.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_mute.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_place_holder.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_website_purple.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_youtube_play_purple.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_compleate_book.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_noti_mute.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_thumb_default.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,6 +0,0 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "loading_5.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -5,6 +5,8 @@
<key>aps-environment</key> <key>aps-environment</key>
<string>development</string> <string>development</string>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array/> <array>
<string>applinks:sodalive.page.link</string>
</array>
</dict> </dict>
</plist> </plist>

View File

@@ -94,7 +94,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
// With swizzling disabled you must let Messaging know about the message, for Analytics // With swizzling disabled you must let Messaging know about the message, for Analytics
Messaging.messaging().appDidReceiveMessage(userInfo) Messaging.messaging().appDidReceiveMessage(userInfo)
let roomIdString = userInfo["suda_room_id"] as? String let roomIdString = userInfo["room_id"] as? String
let audioContentIdString = userInfo["audio_content_id"] as? String let audioContentIdString = userInfo["audio_content_id"] as? String
if let roomIdString = roomIdString, let roomId = Int(roomIdString), roomId > 0 { if let roomIdString = roomIdString, let roomId = Int(roomIdString), roomId > 0 {

View File

@@ -58,6 +58,8 @@ enum AppStep {
case modifyContent(contentId: Int) case modifyContent(contentId: Int)
case contentListAll(userId: Int)
case contentDetail(contentId: Int) case contentDetail(contentId: Int)
case liveReservationComplete(response: MakeLiveReservationResponse) case liveReservationComplete(response: MakeLiveReservationResponse)
@@ -101,4 +103,8 @@ enum AppStep {
case changeNickname case changeNickname
case profileUpdate(refresh: () -> Void) case profileUpdate(refresh: () -> Void)
case followingList
case orderListAll
} }

View File

@@ -13,7 +13,7 @@ class ObjectBoxService {
let playbackTrackingBox: Box<PlaybackTracking> let playbackTrackingBox: Box<PlaybackTracking>
init() { init() {
let databaseName = "yozmlive" let databaseName = "sodalive"
let appSupport = try! FileManager.default.url(for: .applicationSupportDirectory, let appSupport = try! FileManager.default.url(for: .applicationSupportDirectory,
in: .userDomainMask, in: .userDomainMask,
appropriateFor: nil, appropriateFor: nil,

View File

@@ -58,7 +58,7 @@ struct SodaLiveApp: App {
.onOpenURL { url in .onOpenURL { url in
DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)") DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)")
if let scheme = url.scheme { if let scheme = url.scheme {
if scheme == "kr.co.vividnext.yozm" { if scheme == "kr.co.vividnext.sodalive" {
if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) { if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) {
self.handleIncomingDynamicLink(dynamicLink) self.handleIncomingDynamicLink(dynamicLink)
} else { } else {

View File

@@ -8,57 +8,18 @@
import SwiftUI import SwiftUI
struct LoadingView: View { struct LoadingView: View {
@State var index = 0
@State var timer = Timer.publish(every: 0.35, on: .current, in: .common).autoconnect()
var body: some View { var body: some View {
ZStack { ZStack {
Color.primary.opacity(0.2) Color.primary.opacity(0.2)
.ignoresSafeArea() .ignoresSafeArea()
ZStack { ZStack {
Image("loading_1") ActivityIndicatorView()
.resizable()
.frame(width: 100, height: 100) .frame(width: 100, height: 100)
.opacity(index == 0 ? 1.0 : 0.0)
Image("loading_2")
.resizable()
.frame(width: 100, height: 100)
.opacity(index == 1 ? 1.0 : 0.0)
Image("loading_3")
.resizable()
.frame(width: 100, height: 100)
.opacity(index == 2 ? 1.0 : 0.0)
Image("loading_4")
.resizable()
.frame(width: 100, height: 100)
.opacity(index == 3 ? 1.0 : 0.0)
Image("loading_5")
.resizable()
.frame(width: 100, height: 100)
.opacity(index == 4 ? 1.0 : 0.0)
} }
.frame(width: 150, height: 150) .frame(width: 150, height: 150)
.background(Color.white)
.cornerRadius(14)
.shadow(color: Color.primary.opacity(0.07), radius: 5, x: 5, y: 5)
.shadow(color: Color.primary.opacity(0.07), radius: 5, x: -5, y: -5)
} }
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.onReceive(timer) { _ in
DispatchQueue.main.async {
if index == 4 {
index = 0
} else {
index += 1
}
}
}
} }
} }
@@ -67,3 +28,16 @@ struct LoadingView_Previews: PreviewProvider {
LoadingView() LoadingView()
} }
} }
struct ActivityIndicatorView: UIViewRepresentable {
func makeUIView(context: Context) -> some UIActivityIndicatorView {
let activityIndicator = UIActivityIndicatorView(style: .large)
activityIndicator.color = UIColor(hex: "80D8FF")
return activityIndicator
}
func updateUIView(_ uiView: UIViewType, context: Context) {
uiView.startAnimating()
}
}

View File

@@ -22,17 +22,6 @@ struct ContentListItemView: View {
.frame(width: 66.7, height: 66.7, alignment: .top) .frame(width: 66.7, height: 66.7, alignment: .top)
.clipped() .clipped()
.cornerRadius(5.3) .cornerRadius(5.3)
if item.isAdult {
Text("19")
.font(.custom(Font.bold.rawValue, size: 11.3))
.foregroundColor(Color.white)
.padding(4)
.background(Color(hex: "e53621"))
.clipShape(Circle())
.padding(.top, 4.3)
.padding(.leading, 4.3)
}
} }
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
@@ -60,7 +49,7 @@ struct ContentListItemView: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
HStack(spacing: 6) { HStack(spacing: 6) {
Image("ic_heart") Image("ic_heart_777")
.resizable() .resizable()
.frame(width: 13.3, height: 13.3) .frame(width: 13.3, height: 13.3)
@@ -88,7 +77,7 @@ struct ContentListItemView: View {
if item.price > 0 { if item.price > 0 {
HStack(spacing: 8) { HStack(spacing: 8) {
Image("ic_coin_w") Image("ic_can")
.resizable() .resizable()
.frame(width: 17, height: 17) .frame(width: 17, height: 17)

View File

@@ -0,0 +1,177 @@
//
// ContentListView.swift
// SodaLive
//
// Created by klaus on 2023/08/20.
//
import SwiftUI
struct ContentListView: View {
let userId: Int
@StateObject var viewModel = ContentListViewModel()
var body: some View {
BaseView(isLoading: $viewModel.isLoading) {
VStack(spacing: 0) {
HStack(spacing: 0) {
Button {
AppState.shared.back()
} label: {
Image("ic_back")
.resizable()
.frame(width: 20, height: 20)
Text("콘텐츠 전체보기")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "eeeeee"))
}
Spacer()
}
.padding(.horizontal, 13.3)
.frame(height: 50)
.background(Color.black)
if userId == UserDefaults.int(forKey: .userId) {
Text("새로운 콘텐츠 등록하기")
.font(.custom(Font.bold.rawValue, size: 15))
.foregroundColor(Color(hex: "eeeeee"))
.padding(.vertical, 17)
.frame(maxWidth: .infinity)
.background(Color(hex: "9970ff"))
.cornerRadius(5.3)
.padding(.top, 13.3)
.padding(.horizontal, 13.3)
.onTapGesture { AppState.shared.setAppStep(step: .createContent) }
}
HStack(spacing: 13.3) {
Spacer()
Text("최신순")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(
Color(hex: "e2e2e2")
.opacity(viewModel.sort == .NEWEST ? 1 : 0.5)
)
.onTapGesture {
if viewModel.sort != .NEWEST {
viewModel.sort = .NEWEST
}
}
Text("높은 가격순")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(
Color(hex: "e2e2e2")
.opacity(viewModel.sort == .PRICE_HIGH ? 1 : 0.5)
)
.onTapGesture {
if viewModel.sort != .PRICE_HIGH {
viewModel.sort = .PRICE_HIGH
}
}
Text("낮은 가격순")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(
Color(hex: "e2e2e2")
.opacity(viewModel.sort == .PRICE_LOW ? 1 : 0.5)
)
.onTapGesture {
if viewModel.sort != .PRICE_LOW {
viewModel.sort = .PRICE_LOW
}
}
}
.padding(.vertical, 13.3)
.padding(.horizontal, 20)
.background(Color(hex: "161616"))
.padding(.top, 13.3)
HStack(spacing: 0) {
Text("전체")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "e2e2e2"))
Text("\(viewModel.totalCount)")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "ff5c49"))
.padding(.leading, 8)
Text("")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "e2e2e2"))
.padding(.leading, 2)
Spacer()
}
.padding(.vertical, 13.3)
.padding(.horizontal, 20)
ScrollViewReader { reader in
ScrollView(.vertical, showsIndicators: false) {
LazyVStack(spacing: 10.7) {
ScrollerToTop(reader: reader, scrollOnChange: $viewModel.scrollToTop)
ForEach(0..<viewModel.audioContentList.count, id: \.self) { index in
let audioContent = viewModel.audioContentList[index]
ContentListItemView(item: audioContent)
.contentShape(Rectangle())
.onTapGesture {
AppState
.shared
.setAppStep(
step: .contentDetail(contentId: audioContent.contentId)
)
}
.onAppear {
if index == viewModel.audioContentList.count - 1 {
viewModel.getAudioContentList()
}
}
}
}
}
}
.padding(.top, 13.3)
}
.onAppear {
viewModel.userId = userId
viewModel.getAudioContentList()
}
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {
HStack {
Spacer()
Text(viewModel.errorMessage)
.padding(.vertical, 13.3)
.frame(width: screenSize().width - 66.7, alignment: .center)
.font(.custom(Font.medium.rawValue, size: 12))
.background(Color(hex: "9970ff"))
.foregroundColor(Color.white)
.multilineTextAlignment(.leading)
.cornerRadius(20)
.padding(.bottom, 66.7)
Spacer()
}
}
}
}
}
struct ScrollerToTop: View {
let reader: ScrollViewProxy
@Binding var scrollOnChange: Bool
var body: some View {
EmptyView()
.id("topScrollPoint")
.onChange(of: scrollOnChange) { _ in
withAnimation {
reader.scrollTo("topScrollPoint", anchor: .bottom)
}
}
}
}

View File

@@ -29,8 +29,8 @@ final class ContentRepository {
return api.requestPublisher(.registerComment(request: RegisterAudioContentCommentRequest(comment: comment, contentId: audioContentId, parentId: parentId))) return api.requestPublisher(.registerComment(request: RegisterAudioContentCommentRequest(comment: comment, contentId: audioContentId, parentId: parentId)))
} }
func orderAudioContent(audioContentId: Int, orderType: OrderType) -> AnyPublisher<Response, MoyaError> { func orderAudioContent(contentId: Int, orderType: OrderType) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.orderAudioContent(request: OrderRequest(audioContentId: audioContentId, orderType: orderType))) return api.requestPublisher(.orderAudioContent(request: OrderRequest(contentId: contentId, orderType: orderType)))
} }
func getOrderList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> { func getOrderList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
@@ -74,6 +74,6 @@ final class ContentRepository {
} }
func donation(contentId: Int, can: Int, comment: String) -> AnyPublisher<Response, MoyaError> { func donation(contentId: Int, can: Int, comment: String) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.donation(request: AudioContentDonationRequest(audioContentId: contentId, donationCan: can, comment: comment))) return api.requestPublisher(.donation(request: AudioContentDonationRequest(contentId: contentId, donationCan: can, comment: comment)))
} }
} }

View File

@@ -198,22 +198,22 @@ final class ContentDetailViewModel: ObservableObject {
func shareAudioContent(contentImage: String, contentTitle: String) { func shareAudioContent(contentImage: String, contentTitle: String) {
isLoading = true isLoading = true
guard let link = URL(string: "https://yozm.day/?audio_content_id=\(contentId)") else { return } guard let link = URL(string: "https://sodalive.net/?audio_content_id=\(contentId)") else { return }
let dynamicLinksDomainURIPrefix = "https://yozm.page.link" let dynamicLinksDomainURIPrefix = "https://sodalive.page.link"
guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else { guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else {
self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요."
self.isShowPopup = true self.isShowPopup = true
return return
} }
linkBuilder.iOSParameters = DynamicLinkIOSParameters(bundleID: "kr.co.vividnext.yozm") linkBuilder.iOSParameters = DynamicLinkIOSParameters(bundleID: "kr.co.vividnext.sodalive")
linkBuilder.iOSParameters?.appStoreID = "1630284226" linkBuilder.iOSParameters?.appStoreID = "6461721697"
linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "kr.co.vividnext.yozm") linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "kr.co.vividnext.sodalive")
let socialMetaTagParameters = DynamicLinkSocialMetaTagParameters() let socialMetaTagParameters = DynamicLinkSocialMetaTagParameters()
socialMetaTagParameters.title = contentTitle socialMetaTagParameters.title = contentTitle
socialMetaTagParameters.descriptionText = "지금 요즘라이브에서 이 콘텐츠 감상하기" socialMetaTagParameters.descriptionText = "지금 소다라이브에서 이 콘텐츠 감상하기"
socialMetaTagParameters.imageURL = URL(string: contentImage) socialMetaTagParameters.imageURL = URL(string: contentImage)
linkBuilder.socialMetaTagParameters = socialMetaTagParameters linkBuilder.socialMetaTagParameters = socialMetaTagParameters
@@ -280,7 +280,7 @@ final class ContentDetailViewModel: ObservableObject {
isShowPreviewAlert = false isShowPreviewAlert = false
isLoading = true isLoading = true
repository.orderAudioContent(audioContentId: contentId, orderType: orderType) repository.orderAudioContent(contentId: contentId, orderType: orderType)
.sink { result in .sink { result in
switch result { switch result {
case .finished: case .finished:

View File

@@ -35,17 +35,6 @@ struct ContentOrderConfirmDialogView: View {
.frame(width: 88.7, height: 88.7, alignment: .center) .frame(width: 88.7, height: 88.7, alignment: .center)
.clipped() .clipped()
.cornerRadius(4) .cornerRadius(4)
if audioContent.isAdult {
Text("19")
.font(.custom(Font.bold.rawValue, size: 11.3))
.foregroundColor(Color.white)
.padding(4)
.background(Color(hex: "e53621"))
.clipShape(Circle())
.padding(.leading, 4.3)
.padding(.top, 4.3)
}
} }
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {

View File

@@ -71,7 +71,7 @@ struct ContentOrderDialogView: View {
Spacer() Spacer()
HStack(spacing: 8) { HStack(spacing: 8) {
Image("ic_coin_w") Image("ic_can")
.resizable() .resizable()
.frame(width: 16.7, height: 16.7) .frame(width: 16.7, height: 16.7)

View File

@@ -8,7 +8,7 @@
import Foundation import Foundation
struct AudioContentDonationRequest: Encodable { struct AudioContentDonationRequest: Encodable {
let audioContentId: Int let contentId: Int
let donationCan: Int let donationCan: Int
let comment: String let comment: String
let container: String = "ios" let container: String = "ios"

View File

@@ -24,8 +24,8 @@ struct ContentMainCurationItemView: View {
ScrollView(.horizontal, showsIndicators: false) { ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(alignment: .top, spacing: 13.3) { LazyHStack(alignment: .top, spacing: 13.3) {
ForEach(0..<item.audioContents.count, id: \.self) { ForEach(0..<item.contents.count, id: \.self) {
let audioContent = item.audioContents[$0] let audioContent = item.contents[$0]
ContentMainItemView(item: audioContent) ContentMainItemView(item: audioContent)
} }
} }

View File

@@ -20,17 +20,6 @@ struct ContentMainItemView: View {
.scaledToFill() .scaledToFill()
.frame(width: 133.3, height: 133.3, alignment: .top) .frame(width: 133.3, height: 133.3, alignment: .top)
.cornerRadius(2.7) .cornerRadius(2.7)
if item.isAdult {
Text("19")
.font(.custom(Font.bold.rawValue, size: 11.3))
.foregroundColor(Color.white)
.padding(4)
.background(Color(hex: "e53621"))
.clipShape(Circle())
.padding(.top, 4.3)
.padding(.leading, 4.3)
}
} }
Text(item.title) Text(item.title)

View File

@@ -42,11 +42,11 @@ struct ContentMainNewContentView_Previews: PreviewProvider {
items: [ items: [
GetAudioContentMainItem( GetAudioContentMainItem(
contentId: 1, contentId: 1,
coverImageUrl: "https://test-cf.yozm.day/audio_content_cover/31/31-cover-e78575f9-7624-471c-8102-1289a5748aae-5983-1684487894269", coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
title: "테스트", title: "테스트",
isAdult: false, isAdult: false,
creatorId: 7, creatorId: 7,
creatorProfileImageUrl: "https://test-cf.yozm.day/profile/7f73168e-220f-482f-b97d-baab63b70e04IMG_20220314_220855522.jpg", creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
creatorNickname: "유저1" creatorNickname: "유저1"
) )
], ],

View File

@@ -77,6 +77,7 @@ final class ContentMainViewModel: ObservableObject {
self.isShowPopup = true self.isShowPopup = true
} }
} catch { } catch {
print(error)
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다." self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.isShowPopup = true self.isShowPopup = true
self.isLoading = false self.isLoading = false

View File

@@ -35,7 +35,7 @@ struct GetAudioContentMainItem: Decodable {
struct GetAudioContentCurationResponse: Decodable { struct GetAudioContentCurationResponse: Decodable {
let title: String let title: String
let description: String let description: String
let audioContents: [GetAudioContentMainItem] let contents: [GetAudioContentMainItem]
} }
struct GetAudioContentBannerResponse: Decodable { struct GetAudioContentBannerResponse: Decodable {

View File

@@ -82,7 +82,7 @@ final class ContentModifyViewModel: ObservableObject {
isLoading = true isLoading = true
let request = ModifyContentRequest( let request = ModifyContentRequest(
audioContentId: contentId, contentId: contentId,
title: title != audioContent!.title ? title : nil, title: title != audioContent!.title ? title : nil,
detail: detail != audioContent!.detail ? detail : nil, detail: detail != audioContent!.detail ? detail : nil,
isAdult: isAdult, isAdult: isAdult,

View File

@@ -8,7 +8,7 @@
import Foundation import Foundation
struct ModifyContentRequest: Encodable { struct ModifyContentRequest: Encodable {
let audioContentId: Int let contentId: Int
let title: String? let title: String?
let detail: String? let detail: String?
let isAdult: Bool let isAdult: Bool

View File

@@ -8,7 +8,7 @@
import Foundation import Foundation
struct OrderRequest: Encodable { struct OrderRequest: Encodable {
let audioContentId: Int let contentId: Int
let orderType: OrderType let orderType: OrderType
let container: String = "ios" let container: String = "ios"
} }

View File

@@ -101,6 +101,9 @@ struct ContentView: View {
case .modifyContent(let contentId): case .modifyContent(let contentId):
ContentModifyView(contentId: contentId) ContentModifyView(contentId: contentId)
case .contentListAll(let userId):
ContentListView(userId: userId)
case .contentDetail(let contentId): case .contentDetail(let contentId):
ContentDetailView(contentId: contentId) ContentDetailView(contentId: contentId)
@@ -142,6 +145,12 @@ struct ContentView: View {
case .profileUpdate(let refresh): case .profileUpdate(let refresh):
ProfileUpdateView(refresh: refresh) ProfileUpdateView(refresh: refresh)
case .followingList:
FollowCreatorView()
case .orderListAll:
OrderListAllView()
default: default:
EmptyView() EmptyView()
.frame(width: 0, height: 0, alignment: .topLeading) .frame(width: 0, height: 0, alignment: .topLeading)

View File

@@ -8,7 +8,7 @@
import Foundation import Foundation
let BASE_URL = "https://test-api.sodalive.net" let BASE_URL = "https://test-api.sodalive.net"
let APPLY_YOZM_CREATOR = "https://forms.gle/mmhJKmijjVRnwtdZ7" let APPLY_SODALIVE_CREATOR = "https://forms.gle/mmhJKmijjVRnwtdZ7"
let AGORA_APP_ID = "b96574e191a9430fa54c605528aa3ef7" let AGORA_APP_ID = "b96574e191a9430fa54c605528aa3ef7"
let AGORA_APP_CERTIFICATE = "ae18ade3afcf4086bd4397726eb0654c" let AGORA_APP_CERTIFICATE = "ae18ade3afcf4086bd4397726eb0654c"

View File

@@ -70,6 +70,8 @@ struct LiveRoomPasswordDialog: View {
.foregroundColor(Color(hex: "ffffff")) .foregroundColor(Color(hex: "ffffff"))
Image("ic_can") Image("ic_can")
.resizable()
.frame(width: 20, height: 20)
Text("으로 입장") Text("으로 입장")
.font(.custom(Font.bold.rawValue, size: 15.3)) .font(.custom(Font.bold.rawValue, size: 15.3))

View File

@@ -12,6 +12,7 @@ struct GetCreatorProfileResponse: Decodable {
let userDonationRanking: [UserDonationRankingResponse] let userDonationRanking: [UserDonationRankingResponse]
let similarCreatorList: [SimilarCreatorResponse] let similarCreatorList: [SimilarCreatorResponse]
let liveRoomList: [LiveRoomResponse] let liveRoomList: [LiveRoomResponse]
let contentList: [GetAudioContentListItem]
let notice: String let notice: String
let cheers: GetCheersResponse let cheers: GetCheersResponse
let activitySummary: GetCreatorActivitySummary let activitySummary: GetCreatorActivitySummary

View File

@@ -24,7 +24,9 @@ struct UserProfileContentView: View {
Text("전체보기") Text("전체보기")
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color(hex: "bbbbbb")) .foregroundColor(Color(hex: "bbbbbb"))
.onTapGesture {} .onTapGesture {
AppState.shared.setAppStep(step: .contentListAll(userId: userId))
}
} }
if userId == UserDefaults.int(forKey: .userId) { if userId == UserDefaults.int(forKey: .userId) {
@@ -44,7 +46,13 @@ struct UserProfileContentView: View {
let item = items[index] let item = items[index]
ContentListItemView(item: item) ContentListItemView(item: item)
.contentShape(Rectangle()) .contentShape(Rectangle())
.onTapGesture {} .onTapGesture {
AppState
.shared
.setAppStep(
step: .contentDetail(contentId: item.contentId)
)
}
} }
} }
.padding(.top, 21) .padding(.top, 21)

View File

@@ -37,17 +37,6 @@ struct UserProfileLiveView: View {
.clipped() .clipped()
.cornerRadius(4.7) .cornerRadius(4.7)
if liveRoom.isAdult {
Text("19")
.font(.custom(Font.bold.rawValue, size: 11.3))
.foregroundColor(Color.white)
.padding(4)
.background(Color(hex: "e53621"))
.clipShape(Circle())
.padding(.top, 6.7)
.padding(.leading, 6.7)
}
if !liveRoom.isActive { if !liveRoom.isActive {
Rectangle() Rectangle()
.frame(width: 80, height: 116.7, alignment: .top) .frame(width: 80, height: 116.7, alignment: .top)

View File

@@ -88,6 +88,17 @@ struct UserProfileView: View {
} }
} }
if creatorProfile.contentList.count > 0 ||
userId == UserDefaults.int(forKey: .userId)
{
UserProfileContentView(
userId: userId,
items: creatorProfile.contentList
)
.padding(.top, 46.7)
.padding(.horizontal, 13.3)
}
if creatorProfile.liveRoomList.count > 0 { if creatorProfile.liveRoomList.count > 0 {
UserProfileLiveView( UserProfileLiveView(
userId: userId, userId: userId,

View File

@@ -380,18 +380,18 @@ final class UserProfileViewModel: ObservableObject {
} }
func shareChannel(userId: Int) { func shareChannel(userId: Int) {
guard let link = URL(string: "https://yozm.day/?channel_id=\(userId)") else { return } guard let link = URL(string: "https://sodalive.net/?channel_id=\(userId)") else { return }
let dynamicLinksDomainURIPrefix = "https://yozm.page.link" let dynamicLinksDomainURIPrefix = "https://sodalive.page.link"
guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else { guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else {
self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요."
self.isShowPopup = true self.isShowPopup = true
return return
} }
linkBuilder.iOSParameters = DynamicLinkIOSParameters(bundleID: "kr.co.vividnext.yozm") linkBuilder.iOSParameters = DynamicLinkIOSParameters(bundleID: "kr.co.vividnext.sodalive")
linkBuilder.iOSParameters?.appStoreID = "1630284226" linkBuilder.iOSParameters?.appStoreID = "6461721697"
linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "kr.co.vividnext.yozm") linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "kr.co.vividnext.sodalive")
guard let longDynamicLink = linkBuilder.url else { guard let longDynamicLink = linkBuilder.url else {
self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요."
@@ -404,7 +404,7 @@ final class UserProfileViewModel: ObservableObject {
let shortUrl = url?.absoluteString let shortUrl = url?.absoluteString
let urlString = shortUrl != nil ? shortUrl! : longDynamicLink.absoluteString let urlString = shortUrl != nil ? shortUrl! : longDynamicLink.absoluteString
self.shareMessage = "요즘라이브 \(self.creatorProfile!.creator.nickname)님의 채널입니다.\n\(urlString)" self.shareMessage = "소다라이브 \(self.creatorProfile!.creator.nickname)님의 채널입니다.\n\(urlString)"
self.isShowShareView = true self.isShowShareView = true
} }
} }

View File

@@ -1,6 +1,6 @@
// //
// DateExtension.swift // DateExtension.swift
// yozm // SodaLive
// //
// Created by klaus on 2022/05/27. // Created by klaus on 2022/05/27.
// //

View File

@@ -1,6 +1,6 @@
// //
// IntExtension.swift // IntExtension.swift
// yozm // SodaLive
// //
// Created by klaus on 2022/06/21. // Created by klaus on 2022/06/21.
// //

View File

@@ -1,6 +1,6 @@
// //
// StringExtension.swift // StringExtension.swift
// yozm // SodaLive
// //
// Created by klaus on 2022/06/03. // Created by klaus on 2022/06/03.
// //

View File

@@ -1,6 +1,6 @@
// //
// UserDefaultsExtension.swift // UserDefaultsExtension.swift
// yozm // SodaLive
// //
// Created by klaus on 2022/05/20. // Created by klaus on 2022/05/20.
// //

View File

@@ -1,6 +1,6 @@
// //
// ViewExtension.swift // ViewExtension.swift
// yozm // SodaLive
// //
// Created by klaus on 2022/05/19. // Created by klaus on 2022/05/19.
// //

View File

@@ -0,0 +1,54 @@
//
// FollowCreatorItemView.swift
// SodaLive
//
// Created by klaus on 2023/08/19.
//
import SwiftUI
import Kingfisher
struct FollowCreatorItemView: View {
let creator: GetCreatorFollowingAllListItem
let onClickFollow: (Int) -> Void
let onClickUnFollow: (Int) -> Void
@State private var isFollow = true
var body: some View {
VStack(spacing: 13.3) {
HStack(spacing: 0) {
KFImage(URL(string: creator.profileImageUrl))
.resizable()
.frame(width: 60, height: 60)
.clipShape(Circle())
Text(creator.nickname)
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color(hex: "eeeeee"))
.padding(.leading, 13.3)
Spacer()
Image(isFollow ? "btn_notification_selected" : "btn_notification")
.onTapGesture {
if isFollow {
onClickUnFollow(creator.creatorId)
} else {
onClickFollow(creator.creatorId)
}
isFollow = !isFollow
}
}
Rectangle()
.foregroundColor(Color(hex: "595959"))
.frame(height: 0.5)
}
.onAppear {
isFollow = creator.isFollow
}
}
}

Some files were not shown because too many files have changed in this diff Show More