Compare commits
40 Commits
aa66951cb4
...
v1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
594bcc27ca | ||
|
|
bcb934a155 | ||
|
|
b31dcf901b | ||
|
|
2c8485a1cd | ||
|
|
f0d2bda024 | ||
|
|
828c507742 | ||
|
|
65b43e4c0d | ||
|
|
728510a72d | ||
|
|
89fd2f5f0d | ||
|
|
52921e78b6 | ||
|
|
f0f1cd39b6 | ||
|
|
c5fdfcafda | ||
|
|
5301aebe71 | ||
|
|
fe046e8006 | ||
|
|
0daf638b68 | ||
|
|
8b7f3fbd07 | ||
|
|
3ab5735fde | ||
|
|
550bf0c1c7 | ||
|
|
f018bd30e6 | ||
|
|
4e62d752f9 | ||
|
|
d93c3e8836 | ||
|
|
38df12872a | ||
|
|
8c3a9e25a0 | ||
|
|
e8de5dd72b | ||
|
|
30cceefbcf | ||
|
|
ce55449f2d | ||
|
|
792e029f0d | ||
|
|
6bc5356ac1 | ||
|
|
a5b954ada2 | ||
|
|
154b5826c6 | ||
|
|
3dfe4f3b8a | ||
|
|
d75367c78b | ||
|
|
78f80cebd5 | ||
|
|
633e1bfd92 | ||
|
|
5a771f14bd | ||
|
|
8e23f65086 | ||
|
|
a22a3ebf6c | ||
|
|
00d49afec6 | ||
|
|
80b487eab6 | ||
|
|
8461012e22 |
@@ -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"
|
||||||
}
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_alarm.imageset/ic_alarm.png
vendored
Normal file
|
After Width: | Height: | Size: 781 B |
21
SodaLive/Resources/Assets.xcassets/ic_alarm_selected.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_alarm_selected.imageset/ic_alarm_selected.png
vendored
Normal file
|
After Width: | Height: | Size: 804 B |
21
SodaLive/Resources/Assets.xcassets/ic_blog_purple.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_blog_purple.imageset/ic_blog_purple.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -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"
|
||||||
}
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_heart_777.imageset/ic_heart_777.png
vendored
Normal file
|
After Width: | Height: | Size: 830 B |
21
SodaLive/Resources/Assets.xcassets/ic_instagram_purple.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_instagram_purple.imageset/ic_instagram_purple.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -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"
|
||||||
}
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_kick_out.imageset/ic_kick_out.png
vendored
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_message_send.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_message_send.imageset/ic_message_send.png
vendored
Normal file
|
After Width: | Height: | Size: 787 B |
@@ -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"
|
||||||
}
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_message_square_777 1.imageset/ic_message_square_777.png
vendored
Normal file
|
After Width: | Height: | Size: 471 B |
21
SodaLive/Resources/Assets.xcassets/ic_mic_paint.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_mic_paint.imageset/ic_mic_paint.png
vendored
Normal file
|
After Width: | Height: | Size: 694 B |
@@ -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"
|
||||||
}
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_mute.imageset/ic_mute.png
vendored
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.7 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_place_holder.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_place_holder.imageset/ic_place_holder.png
vendored
Normal file
|
After Width: | Height: | Size: 70 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_website_purple.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_website_purple.imageset/ic_website_purple.png
vendored
Normal file
|
After Width: | Height: | Size: 926 B |
21
SodaLive/Resources/Assets.xcassets/ic_youtube_play_purple.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_youtube_play_purple.imageset/ic_youtube_play_purple.png
vendored
Normal file
|
After Width: | Height: | Size: 858 B |
21
SodaLive/Resources/Assets.xcassets/img_compleate_book.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/img_compleate_book.imageset/img_compleate_book.png
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
21
SodaLive/Resources/Assets.xcassets/img_noti_mute.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/img_noti_mute.imageset/img_noti_mute.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
21
SodaLive/Resources/Assets.xcassets/img_thumb_default.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/img_thumb_default.imageset/img_thumb_default.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"info" : {
|
|
||||||
"author" : "xcode",
|
|
||||||
"version" : 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 928 B After Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 925 B |
@@ -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>
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
177
SodaLive/Sources/Content/ContentListView.swift
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// DateExtension.swift
|
// DateExtension.swift
|
||||||
// yozm
|
// SodaLive
|
||||||
//
|
//
|
||||||
// Created by klaus on 2022/05/27.
|
// Created by klaus on 2022/05/27.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// IntExtension.swift
|
// IntExtension.swift
|
||||||
// yozm
|
// SodaLive
|
||||||
//
|
//
|
||||||
// Created by klaus on 2022/06/21.
|
// Created by klaus on 2022/06/21.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// StringExtension.swift
|
// StringExtension.swift
|
||||||
// yozm
|
// SodaLive
|
||||||
//
|
//
|
||||||
// Created by klaus on 2022/06/03.
|
// Created by klaus on 2022/06/03.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// UserDefaultsExtension.swift
|
// UserDefaultsExtension.swift
|
||||||
// yozm
|
// SodaLive
|
||||||
//
|
//
|
||||||
// Created by klaus on 2022/05/20.
|
// Created by klaus on 2022/05/20.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ViewExtension.swift
|
// ViewExtension.swift
|
||||||
// yozm
|
// SodaLive
|
||||||
//
|
//
|
||||||
// Created by klaus on 2022/05/19.
|
// Created by klaus on 2022/05/19.
|
||||||
//
|
//
|
||||||
|
|||||||
54
SodaLive/Sources/Follow/FollowCreatorItemView.swift
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||