Compare commits
180 Commits
v1.0.2
...
27b87c9cbe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27b87c9cbe | ||
|
|
20cce36c16 | ||
|
|
7d0c472885 | ||
|
|
c787027dcc | ||
|
|
62904d96b1 | ||
|
|
638d00ffc3 | ||
|
|
5fe41f8db3 | ||
|
|
6aaf383013 | ||
|
|
708cef356b | ||
|
|
8f62c17971 | ||
|
|
12d2c09434 | ||
|
|
bd818918f3 | ||
|
|
aa87f0367b | ||
|
|
34f2348aa0 | ||
|
|
31bd137f4d | ||
|
|
ac49b4e2ad | ||
|
|
9c049550af | ||
|
|
5437cb07aa | ||
|
|
a1f9d0d29c | ||
|
|
6c152650a1 | ||
|
|
01833fbc1f | ||
|
|
7ce5a36172 | ||
|
|
e8522ab755 | ||
|
|
c1e598a8bf | ||
|
|
a27952bbca | ||
|
|
679783cc35 | ||
|
|
a836215d37 | ||
|
|
bfcc430349 | ||
|
|
3387a1b369 | ||
|
|
8857dd3e98 | ||
|
|
86491cce95 | ||
|
|
5fcf4c03c0 | ||
|
|
60457d987e | ||
|
|
86bbb281c8 | ||
|
|
735796a970 | ||
|
|
b2a20969b8 | ||
|
|
a66f76f9a6 | ||
|
|
1c09f6a055 | ||
|
|
9a74567643 | ||
|
|
fe41360f91 | ||
|
|
55d35222a9 | ||
|
|
e43e485154 | ||
|
|
1bdb6fd917 | ||
|
|
208fc77b7f | ||
|
|
f4bd1c4487 | ||
|
|
15421ca4d5 | ||
|
|
ceef432695 | ||
|
|
a17dacc900 | ||
|
|
c1679acff9 | ||
|
|
0de3cf55a7 | ||
|
|
89c552a341 | ||
|
|
be1d70a835 | ||
|
|
623640d410 | ||
|
|
d53392ddcd | ||
|
|
85044d901f | ||
|
|
acdacbfb7b | ||
|
|
7bd32f8486 | ||
|
|
f40642f90f | ||
|
|
9f360e9fcd | ||
|
|
302f69b265 | ||
|
|
cb3a564a29 | ||
|
|
02764f5fe8 | ||
|
|
28b64ba8a8 | ||
|
|
d829399b05 | ||
|
|
d393bb8f8b | ||
|
|
e2e64fa4e6 | ||
|
|
a7f8fa5dc5 | ||
|
|
650b6808e6 | ||
|
|
b8fbb664d5 | ||
|
|
c84f1042e3 | ||
|
|
7d34a4e27a | ||
|
|
e5af4167f8 | ||
|
|
e782f72179 | ||
|
|
4bc3ecd0fb | ||
|
|
6fecd27954 | ||
|
|
0c116fb700 | ||
|
|
c09920942c | ||
|
|
77a145d61c | ||
|
|
694ef2b0a4 | ||
|
|
854bce08cd | ||
|
|
6d27ca8087 | ||
|
|
3897976a2b | ||
|
|
da1686bb34 | ||
|
|
160888c5f4 | ||
|
|
7ab21a1dd8 | ||
|
|
13c212a56e | ||
|
|
d52f0d1176 | ||
|
|
0af16ac000 | ||
|
|
5682adf967 | ||
|
|
2e8258a977 | ||
|
|
a22e2e7a51 | ||
|
|
ff7144f708 | ||
|
|
9622e9b55d | ||
|
|
4de4f997e6 | ||
|
|
ebfecb0ad4 | ||
|
|
823bd8e92d | ||
|
|
6cbd4edacc | ||
|
|
8821ce5f1f | ||
|
|
39f84ceadf | ||
|
|
cab41ee6c7 | ||
|
|
3c4b1a7098 | ||
|
|
16af9dbacd | ||
|
|
aa676581d3 | ||
|
|
0e0d7a3c24 | ||
|
|
e98847179a | ||
|
|
41b7247a44 | ||
|
|
63a259f890 | ||
|
|
7c8f9b1460 | ||
|
|
27df89d78e | ||
|
|
cf7f1527b7 | ||
|
|
68675ebfe8 | ||
|
|
0079f248ee | ||
|
|
6583e07f45 | ||
|
|
902b772267 | ||
|
|
cdad53ae7b | ||
|
|
995c6adab7 | ||
|
|
115a30a7b6 | ||
|
|
c78b804678 | ||
|
|
1a01244d85 | ||
|
|
fea557560c | ||
|
|
c440e8abd9 | ||
|
|
41d5bad46f | ||
|
|
6c8e19aed5 | ||
|
|
282ee73de1 | ||
|
|
91c43e679f | ||
|
|
02835c4b2e | ||
|
|
a4d15be57a | ||
|
|
219128ea8d | ||
|
|
47ae2ec8e1 | ||
|
|
962197d319 | ||
|
|
c75f94722b | ||
|
|
c00931761c | ||
|
|
8255065bba | ||
|
|
1e1b97e2d4 | ||
|
|
f653667df2 | ||
|
|
658cff20eb | ||
|
|
fd356451ae | ||
|
|
91cd3fe995 | ||
|
|
5f7924880e | ||
|
|
00a8f7e8ff | ||
|
|
d1b5ab31aa | ||
|
|
225efc34e4 | ||
|
|
4e607ed624 | ||
|
|
c7522aa7c9 | ||
|
|
b632a65a6f | ||
|
|
d3c5a5bfb9 | ||
|
|
2449eb14d0 | ||
|
|
4c9e78f960 | ||
|
|
6e9aaa0c8a | ||
|
|
0294bbf223 | ||
|
|
36aa167e1d | ||
|
|
8c20ce9c62 | ||
|
|
f44ef505cf | ||
|
|
9a72e21fda | ||
|
|
1c4503bda1 | ||
|
|
b1773b117d | ||
|
|
a16c38f4ab | ||
|
|
475882570a | ||
|
|
5b0cb44645 | ||
|
|
b2f0975ad1 | ||
|
|
48b1093dac | ||
|
|
3bcd2b7dba | ||
|
|
9863fc66de | ||
|
|
58868f613a | ||
|
|
1f992a11dc | ||
|
|
948b1fd2b3 | ||
|
|
5d95c0f1c9 | ||
|
|
b31933715d | ||
|
|
707b6f804c | ||
|
|
05f5a4fe82 | ||
|
|
f08d72745e | ||
|
|
4611524f8f | ||
|
|
a41c423991 | ||
|
|
d76b1c7a59 | ||
|
|
6fa183b89a | ||
|
|
371d6d538a | ||
|
|
2aa3f944c8 | ||
|
|
e68961bd0d | ||
|
|
88fcbc98f4 | ||
|
|
3916a49e60 |
@@ -51,4 +51,4 @@ SPEC CHECKSUMS:
|
|||||||
|
|
||||||
PODFILE CHECKSUM: cdff30c96e85662f4de75ddd8d54358311c1e629
|
PODFILE CHECKSUM: cdff30c96e85662f4de75ddd8d54358311c1e629
|
||||||
|
|
||||||
COCOAPODS: 1.12.1
|
COCOAPODS: 1.14.3
|
||||||
|
|||||||
@@ -180,6 +180,24 @@
|
|||||||
"version" : "6.6.0"
|
"version" : "6.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"identity" : "sdwebimage",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/SDWebImage/SDWebImage.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "59730af512c06fb569c119d737df4c1c499e001d",
|
||||||
|
"version" : "5.18.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "sdwebimageswiftui",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "261b6cec35686d2dc192b809ab50742b4502a73b",
|
||||||
|
"version" : "2.2.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"identity" : "swift-protobuf",
|
"identity" : "swift-protobuf",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
|
|||||||
21
SodaLive/Resources/Assets.xcassets/btn_add.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "btn_add.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/btn_add.imageset/btn_add.png
vendored
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
21
SodaLive/Resources/Assets.xcassets/btn_audio_content_preview_play.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "btn_audio_content_preview_play.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 2.8 KiB |
21
SodaLive/Resources/Assets.xcassets/btn_minus_round_rect.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "btn_minus_round_rect.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/btn_minus_round_rect.imageset/btn_minus_round_rect.png
vendored
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.7 KiB |
21
SodaLive/Resources/Assets.xcassets/btn_plus_round_rect.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "btn_plus_round_rect.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/btn_plus_round_rect.imageset/btn_plus_round_rect.png
vendored
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 4.6 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_card_can_gray.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_card_can_gray.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_card_can_gray.imageset/ic_card_can_gray.png
vendored
Normal file
|
After Width: | Height: | Size: 552 B |
21
SodaLive/Resources/Assets.xcassets/ic_card_time_small_gray.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_card_time_small_gray.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_card_time_small_gray.imageset/ic_card_time_small_gray.png
vendored
Normal file
|
After Width: | Height: | Size: 543 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_coupon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_coupon.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_coupon.imageset/ic_coupon.png
vendored
Normal file
|
After Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.8 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_logo2.imageset/Contents.json
vendored
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_logo2.imageset/ic_logo2.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_notice_triangle.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_notice_triangle.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_notice_triangle.imageset/ic_notice_triangle.png
vendored
Normal file
|
After Width: | Height: | Size: 419 B |
21
SodaLive/Resources/Assets.xcassets/ic_pin.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_pin.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_pin.imageset/ic_pin.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_pin_cancel.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_pin_cancel.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_pin_cancel.imageset/ic_pin_cancel.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_record.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_record.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_record.imageset/ic_record.png
vendored
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_record_pause.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_record_pause.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_record_pause.imageset/ic_record_pause.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_record_play.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_record_play.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_record_play.imageset/ic_record_play.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_record_stop.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_record_stop.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_record_stop.imageset/ic_record_stop.png
vendored
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_refresh.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_refresh.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_refresh.imageset/ic_refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 886 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.1 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_roulette.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/ic_roulette.png
vendored
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_roulette_settings.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/ic_roulette_settings.png
vendored
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_save.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_save.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_save.imageset/ic_save.png
vendored
Normal file
|
After Width: | Height: | Size: 443 B |
21
SodaLive/Resources/Assets.xcassets/ic_short_play.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_short_play.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_short_play.imageset/ic_short_play.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_thumb_play_blue.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_thumb_play_blue.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_thumb_play_blue.imageset/ic_thumb_play_blue.png
vendored
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_trash_can.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "ic_trash_can.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/ic_trash_can.imageset/ic_trash_can.png
vendored
Normal file
|
After Width: | Height: | Size: 787 B |
21
SodaLive/Resources/Assets.xcassets/img_sample.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_sample.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/img_sample.imageset/img_sample.png
vendored
Normal file
|
After Width: | Height: | Size: 456 KiB |
21
SodaLive/Resources/Assets.xcassets/splash/splash_bg_2024.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "splash_bg_2024.jpg",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/splash/splash_bg_2024.imageset/splash_bg_2024.jpg
vendored
Normal file
|
After Width: | Height: | Size: 349 KiB |
21
SodaLive/Resources/Assets.xcassets/splash/splash_logo_2024.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "splash_logo_2024.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SodaLive/Resources/Assets.xcassets/splash/splash_logo_2024.imageset/splash_logo_2024.png
vendored
Normal file
|
After Width: | Height: | Size: 40 KiB |
21
SodaLive/Resources/Assets.xcassets/splash/splash_logo_dragon_2024.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "splash_logo_dragon_2024.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 987 B |
@@ -1,25 +1,226 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
<array>
|
<array>
|
||||||
<string>gmarket_sans_bold.otf</string>
|
<string>gmarket_sans_bold.otf</string>
|
||||||
<string>gmarket_sans_medium.otf</string>
|
<string>gmarket_sans_medium.otf</string>
|
||||||
<string>gmarket_sans_light.otf</string>
|
<string>gmarket_sans_light.otf</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>audio</string>
|
<string>audio</string>
|
||||||
<string>fetch</string>
|
<string>fetch</string>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
<key>GADApplicationIdentifier</key>
|
||||||
|
<string>ca-app-pub-1299501215847962~3447556960</string>
|
||||||
|
<key>SKAdNetworkItems</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cstr6suwn9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4fzdc2evr5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4pfyvq9l8r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2fnua5tdw4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ydx93a7ass.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5a6flpkh64.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>p78axxw29g.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v72qych5uu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ludvb6z3bs.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cp8zw746q7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3sh42y64q3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>c6k4g5qg8m.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>s39g8k73mm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qy4746246.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>f38h382jlk.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>hs6bdukanm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v4nxqhlyqp.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>wzmmz9fp6w.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>yclnxrl5pm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>t38b2kh725.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7ug5zh24hu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>gta9lk7p23.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>vutu7akeur.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>y5ghdn5j9k.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n6fk4nfna4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v9wttpbfk9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n38lu8286q.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>47vhws6wlr.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>kbd757ywx3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9t245vhmpl.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>eh6m2bh4zr.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>a2p9lx4jpn.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>22mmun2rn5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4468km3ulz.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2u9pt9hc89.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>8s468mfl3y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>klf5c3l5u5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ppxm28t8ap.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ecpz2srf59.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>uw77j35x4d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>pwa73g5rt2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mlmmfzh3r3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>578prtvx9j.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4dzt52r2t5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>e5fvkxwrpn.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>8c4e2ghe7u.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>zq492l623r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3rd42ekr43.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qcr597p9d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -21,5 +21,206 @@
|
|||||||
<string>fetch</string>
|
<string>fetch</string>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>GADApplicationIdentifier</key>
|
||||||
|
<string>ca-app-pub-1299501215847962~8852459715</string>
|
||||||
|
<key>SKAdNetworkItems</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cstr6suwn9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4fzdc2evr5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4pfyvq9l8r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2fnua5tdw4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ydx93a7ass.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5a6flpkh64.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>p78axxw29g.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v72qych5uu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ludvb6z3bs.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cp8zw746q7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3sh42y64q3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>c6k4g5qg8m.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>s39g8k73mm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qy4746246.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>f38h382jlk.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>hs6bdukanm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v4nxqhlyqp.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>wzmmz9fp6w.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>yclnxrl5pm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>t38b2kh725.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7ug5zh24hu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>gta9lk7p23.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>vutu7akeur.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>y5ghdn5j9k.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n6fk4nfna4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v9wttpbfk9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n38lu8286q.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>47vhws6wlr.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>kbd757ywx3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9t245vhmpl.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>eh6m2bh4zr.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>a2p9lx4jpn.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>22mmun2rn5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4468km3ulz.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2u9pt9hc89.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>8s468mfl3y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>klf5c3l5u5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ppxm28t8ap.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ecpz2srf59.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>uw77j35x4d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>pwa73g5rt2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mlmmfzh3r3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>578prtvx9j.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4dzt52r2t5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>e5fvkxwrpn.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>8c4e2ghe7u.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>zq492l623r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3rd42ekr43.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qcr597p9d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||||
FirebaseApp.configure()
|
FirebaseApp.configure()
|
||||||
|
|
||||||
Messaging.messaging().delegate = self
|
Messaging.messaging().delegate = self
|
||||||
|
|
||||||
// For iOS 10 display notification (sent via APNS)
|
// For iOS 10 display notification (sent via APNS)
|
||||||
@@ -95,16 +94,26 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
|
|||||||
Messaging.messaging().appDidReceiveMessage(userInfo)
|
Messaging.messaging().appDidReceiveMessage(userInfo)
|
||||||
|
|
||||||
let roomIdString = userInfo["room_id"] as? String
|
let roomIdString = userInfo["room_id"] as? String
|
||||||
let audioContentIdString = userInfo["audio_content_id"] as? String
|
let contentIdString = userInfo["content_id"] as? String
|
||||||
|
let channelIdString = userInfo["channel_id"] as? String
|
||||||
|
let messageIdString = userInfo["message_id"] as? String
|
||||||
|
|
||||||
if let roomIdString = roomIdString, let roomId = Int(roomIdString), roomId > 0 {
|
if let roomIdString = roomIdString, let roomId = Int(roomIdString), roomId > 0 {
|
||||||
AppState.shared.pushRoomId = roomId
|
AppState.shared.pushRoomId = roomId
|
||||||
}
|
}
|
||||||
|
|
||||||
if let audioContentIdString = audioContentIdString, let audioContentId = Int(audioContentIdString), audioContentId > 0 {
|
if let contentIdString = contentIdString, let audioContentId = Int(contentIdString), audioContentId > 0 {
|
||||||
AppState.shared.pushAudioContentId = audioContentId
|
AppState.shared.pushAudioContentId = audioContentId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let channelIdString = channelIdString, let channelId = Int(channelIdString), channelId > 0 {
|
||||||
|
AppState.shared.pushChannelId = channelId
|
||||||
|
}
|
||||||
|
|
||||||
|
if let messageIdString = messageIdString, let messageId = Int(messageIdString), messageId > 0 {
|
||||||
|
AppState.shared.pushMessageId = messageId
|
||||||
|
}
|
||||||
|
|
||||||
completionHandler()
|
completionHandler()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class AppState: ObservableObject {
|
|||||||
|
|
||||||
@Published var pushRoomId = 0
|
@Published var pushRoomId = 0
|
||||||
@Published var pushChannelId = 0
|
@Published var pushChannelId = 0
|
||||||
|
@Published var pushMessageId = 0
|
||||||
@Published var pushAudioContentId = 0
|
@Published var pushAudioContentId = 0
|
||||||
@Published var roomId = 0 {
|
@Published var roomId = 0 {
|
||||||
didSet {
|
didSet {
|
||||||
|
|||||||
@@ -72,8 +72,6 @@ enum AppStep {
|
|||||||
|
|
||||||
case userProfileFanTalkAll(userId: Int)
|
case userProfileFanTalkAll(userId: Int)
|
||||||
|
|
||||||
case creatorNoticeWrite(notice: String)
|
|
||||||
|
|
||||||
case createLive(
|
case createLive(
|
||||||
timeSettingMode: LiveRoomCreateViewModel.TimeSettingMode,
|
timeSettingMode: LiveRoomCreateViewModel.TimeSettingMode,
|
||||||
onSuccess: (CreateLiveRoomResponse) -> Void
|
onSuccess: (CreateLiveRoomResponse) -> Void
|
||||||
@@ -107,4 +105,20 @@ enum AppStep {
|
|||||||
case followingList
|
case followingList
|
||||||
|
|
||||||
case orderListAll
|
case orderListAll
|
||||||
|
|
||||||
|
case newContentAll
|
||||||
|
|
||||||
|
case curationAll(title: String, curationId: Int)
|
||||||
|
|
||||||
|
case contentRankingAll
|
||||||
|
|
||||||
|
case creatorCommunityAll(creatorId: Int)
|
||||||
|
|
||||||
|
case creatorCommunityWrite(onSuccess: () -> Void)
|
||||||
|
|
||||||
|
case creatorCommunityModify(postId: Int, onSuccess: () -> Void)
|
||||||
|
|
||||||
|
case canCoupon
|
||||||
|
|
||||||
|
case contentAllByTheme(themeId: Int)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ struct SodaLiveApp: App {
|
|||||||
let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: true)?.queryItems
|
let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: true)?.queryItems
|
||||||
let roomId = queryItems?.filter({$0.name == "room_id"}).first?.value
|
let roomId = queryItems?.filter({$0.name == "room_id"}).first?.value
|
||||||
let channelId = queryItems?.filter({$0.name == "channel_id"}).first?.value
|
let channelId = queryItems?.filter({$0.name == "channel_id"}).first?.value
|
||||||
let audioContentId = queryItems?.filter({$0.name == "audio_content_id"}).first?.value
|
let messageId = queryItems?.filter({$0.name == "message_id"}).first?.value
|
||||||
|
let audioContentId = queryItems?.filter({$0.name == "content_id"}).first?.value
|
||||||
|
|
||||||
if let roomId = roomId {
|
if let roomId = roomId {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||||
@@ -40,6 +41,12 @@ struct SodaLiveApp: App {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let messageId = messageId {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||||
|
AppState.shared.pushMessageId = Int(messageId) ?? 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let audioContentId = audioContentId {
|
if let audioContentId = audioContentId {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||||
AppState.shared.pushAudioContentId = Int(audioContentId) ?? 0
|
AppState.shared.pushAudioContentId = Int(audioContentId) ?? 0
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ struct AddAllPlaybackTrackingRequest: Encodable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct PlaybackTrackingData: Encodable {
|
struct PlaybackTrackingData: Encodable {
|
||||||
let audioContentId: Int
|
let contentId: Int
|
||||||
let playDateTime: String
|
let playDateTime: String
|
||||||
let isPreview: Bool
|
let isPreview: Bool
|
||||||
}
|
}
|
||||||
|
|||||||
111
SodaLive/Sources/Content/All/ByTheme/ContentAllByThemeView.swift
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
//
|
||||||
|
// ContentAllByThemeView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/14/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ContentAllByThemeView: View {
|
||||||
|
@StateObject var viewModel = ContentAllByThemeViewModel()
|
||||||
|
|
||||||
|
let themeId: Int
|
||||||
|
|
||||||
|
let columns = [
|
||||||
|
GridItem(.flexible(), alignment: .top),
|
||||||
|
GridItem(.flexible(), alignment: .top),
|
||||||
|
GridItem(.flexible(), alignment: .top)
|
||||||
|
]
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationView {
|
||||||
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
DetailNavigationBar(title: viewModel.theme)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
|
LazyVGrid(columns: columns, spacing: 13.3) {
|
||||||
|
ForEach(0..<viewModel.contentList.count, id: \.self) { index in
|
||||||
|
ContentNewAllItemView(item: viewModel.contentList[index])
|
||||||
|
.onAppear {
|
||||||
|
if index == viewModel.contentList.count - 1 {
|
||||||
|
viewModel.getContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onAppear {
|
||||||
|
viewModel.themeId = themeId
|
||||||
|
viewModel.getContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
//
|
||||||
|
// ContentAllByThemeViewModel.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/14/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import Combine
|
||||||
|
|
||||||
|
final class ContentAllByThemeViewModel: ObservableObject {
|
||||||
|
enum Sort: String {
|
||||||
|
case NEWEST, PRICE_HIGH, PRICE_LOW
|
||||||
|
}
|
||||||
|
|
||||||
|
private let repository = ContentRepository()
|
||||||
|
private var subscription = Set<AnyCancellable>()
|
||||||
|
|
||||||
|
@Published var errorMessage = ""
|
||||||
|
@Published var isShowPopup = false
|
||||||
|
@Published var isLoading = false
|
||||||
|
|
||||||
|
@Published var theme = ""
|
||||||
|
@Published var totalCount = 0
|
||||||
|
@Published var sort = Sort.NEWEST {
|
||||||
|
didSet {
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
getContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Published var contentList: [GetAudioContentMainItem] = []
|
||||||
|
|
||||||
|
var themeId = 0
|
||||||
|
var page = 1
|
||||||
|
var isLast = false
|
||||||
|
private let pageSize = 10
|
||||||
|
|
||||||
|
func getContentList() {
|
||||||
|
if (!isLast && !isLoading) {
|
||||||
|
isLoading = true
|
||||||
|
|
||||||
|
repository.getAudioContentByTheme(
|
||||||
|
themeId: themeId,
|
||||||
|
page: page,
|
||||||
|
size: pageSize,
|
||||||
|
sort: sort
|
||||||
|
)
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<GetContentByThemeResponse>.self, from: responseData)
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
if page == 1 {
|
||||||
|
self.contentList.removeAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
if !data.items.isEmpty {
|
||||||
|
page += 1
|
||||||
|
self.theme = data.theme
|
||||||
|
self.totalCount = data.totalCount
|
||||||
|
self.contentList.append(contentsOf: data.items)
|
||||||
|
} else {
|
||||||
|
isLast = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isLoading = false
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// GetContentByThemeResponse.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/14/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct GetContentByThemeResponse: Decodable {
|
||||||
|
let theme: String
|
||||||
|
let totalCount: Int
|
||||||
|
let items: [GetAudioContentMainItem]
|
||||||
|
}
|
||||||
100
SodaLive/Sources/Content/All/ContentNewAllItemView.swift
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
//
|
||||||
|
// ContentNewAllItemView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/09/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import Kingfisher
|
||||||
|
|
||||||
|
struct ContentNewAllItemView: View {
|
||||||
|
|
||||||
|
let item: GetAudioContentMainItem
|
||||||
|
|
||||||
|
@State var width: CGFloat = 0
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationLink {
|
||||||
|
ContentDetailView(contentId: item.contentId)
|
||||||
|
} label: {
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
ZStack(alignment: .bottom) {
|
||||||
|
KFImage(URL(string: item.coverImageUrl))
|
||||||
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: width, height: width, alignment: .top)
|
||||||
|
.cornerRadius(2.7)
|
||||||
|
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
HStack(spacing: 0) {
|
||||||
|
HStack(spacing: 2) {
|
||||||
|
if item.price > 0 {
|
||||||
|
Image("ic_card_can_gray")
|
||||||
|
|
||||||
|
Text("\(item.price)")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8.3))
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
} else {
|
||||||
|
Text("무료")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8.3))
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(3)
|
||||||
|
.background(Color(hex: "333333").opacity(0.7))
|
||||||
|
.cornerRadius(10)
|
||||||
|
.padding(.leading, 2.7)
|
||||||
|
.padding(.bottom, 2.7)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
HStack(spacing: 2) {
|
||||||
|
Image("ic_card_time_small_gray")
|
||||||
|
|
||||||
|
Text(item.duration)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8.3))
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
}
|
||||||
|
.padding(3)
|
||||||
|
.background(Color(hex: "333333").opacity(0.7))
|
||||||
|
.cornerRadius(10)
|
||||||
|
.padding(.trailing, 2.7)
|
||||||
|
.padding(.bottom, 2.7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.frame(width: width, height: width)
|
||||||
|
|
||||||
|
Text(item.title)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
|
.frame(width: width, alignment: .leading)
|
||||||
|
.multilineTextAlignment(.leading)
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.lineLimit(2)
|
||||||
|
|
||||||
|
HStack(spacing: 5.3) {
|
||||||
|
KFImage(URL(string: item.creatorProfileImageUrl))
|
||||||
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: 21.3, height: 21.3)
|
||||||
|
.clipShape(Circle())
|
||||||
|
.onTapGesture { AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId)) }
|
||||||
|
|
||||||
|
Text(item.creatorNickname)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
|
.padding(.bottom, 10)
|
||||||
|
}
|
||||||
|
.frame(width: width)
|
||||||
|
.onAppear {
|
||||||
|
width = (screenSize().width - 54) / 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
87
SodaLive/Sources/Content/All/ContentNewAllView.swift
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
//
|
||||||
|
// ContentNewAllView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/09/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ContentNewAllView: View {
|
||||||
|
|
||||||
|
@StateObject var viewModel = ContentNewAllViewModel()
|
||||||
|
|
||||||
|
let columns = [
|
||||||
|
GridItem(.flexible(), alignment: .top),
|
||||||
|
GridItem(.flexible(), alignment: .top),
|
||||||
|
GridItem(.flexible(), alignment: .top)
|
||||||
|
]
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationView {
|
||||||
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
DetailNavigationBar(title: "새로운 콘텐츠")
|
||||||
|
|
||||||
|
Text("※ 최근 2주간 등록된 새로운 콘텐츠 입니다.")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color(hex: "bbbbbb"))
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
.frame(width: screenSize().width, alignment: .leading)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
|
ContentMainNewContentThemeView(
|
||||||
|
themes: viewModel.themeList,
|
||||||
|
selectTheme: {
|
||||||
|
viewModel.selectedTheme = $0
|
||||||
|
},
|
||||||
|
selectedTheme: $viewModel.selectedTheme
|
||||||
|
).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)
|
||||||
|
}
|
||||||
|
.padding(.vertical, 13.3)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
|
LazyVGrid(columns: columns, spacing: 13.3) {
|
||||||
|
ForEach(0..<viewModel.newContentList.count, id: \.self) { index in
|
||||||
|
ContentNewAllItemView(item: viewModel.newContentList[index])
|
||||||
|
.onAppear {
|
||||||
|
if index == viewModel.newContentList.count - 1 {
|
||||||
|
viewModel.getNewContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onAppear {
|
||||||
|
viewModel.getThemeList()
|
||||||
|
viewModel.getNewContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ContentNewAllView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
ContentNewAllView()
|
||||||
|
}
|
||||||
|
}
|
||||||
130
SodaLive/Sources/Content/All/ContentNewAllViewModel.swift
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
//
|
||||||
|
// ContentNewAllViewModel.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/09/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import Combine
|
||||||
|
|
||||||
|
final class ContentNewAllViewModel: ObservableObject {
|
||||||
|
|
||||||
|
private let repository = ContentRepository()
|
||||||
|
private var subscription = Set<AnyCancellable>()
|
||||||
|
|
||||||
|
@Published var errorMessage = ""
|
||||||
|
@Published var isShowPopup = false
|
||||||
|
@Published var isLoading = false
|
||||||
|
|
||||||
|
@Published var themeList = [String]()
|
||||||
|
@Published var newContentList = [GetAudioContentMainItem]()
|
||||||
|
|
||||||
|
@Published var selectedTheme = "전체" {
|
||||||
|
didSet {
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
getNewContentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Published var totalCount = 0
|
||||||
|
|
||||||
|
var page = 1
|
||||||
|
var isLast = false
|
||||||
|
private let pageSize = 10
|
||||||
|
|
||||||
|
func getNewContentList() {
|
||||||
|
if (!isLast && !isLoading) {
|
||||||
|
isLoading = true
|
||||||
|
|
||||||
|
repository.getNewContentAllOfTheme(
|
||||||
|
theme: selectedTheme == "전체" ? "" : selectedTheme,
|
||||||
|
page: page,
|
||||||
|
size: pageSize
|
||||||
|
)
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
self.isLoading = false
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<GetNewContentAllResponse>.self, from: responseData)
|
||||||
|
self.isLoading = false
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
if page == 1 {
|
||||||
|
newContentList.removeAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
self.totalCount = data.totalCount
|
||||||
|
|
||||||
|
if !data.items.isEmpty {
|
||||||
|
page += 1
|
||||||
|
self.newContentList.append(contentsOf: data.items)
|
||||||
|
} else {
|
||||||
|
isLast = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
self.isLoading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
} else {
|
||||||
|
isLoading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getThemeList() {
|
||||||
|
repository.getNewContentThemeList()
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<[String]>.self, from: responseData)
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
self.themeList.append("전체")
|
||||||
|
self.themeList.append(contentsOf: data)
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
}
|
||||||
|
}
|
||||||
163
SodaLive/Sources/Content/All/ContentRankingAllView.swift
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
//
|
||||||
|
// ContentRankingAllView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/10/15.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import Kingfisher
|
||||||
|
|
||||||
|
struct ContentRankingAllView: View {
|
||||||
|
|
||||||
|
@StateObject var viewModel = ContentRankingAllViewModel()
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationView {
|
||||||
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
DetailNavigationBar(title: "인기 콘텐츠")
|
||||||
|
|
||||||
|
VStack(spacing: 8) {
|
||||||
|
Text("\(viewModel.dateString)")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Text("※ 인기 콘텐츠의 순위는 매주 업데이트됩니다.")
|
||||||
|
.font(.custom(Font.light.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "bbbbbb"))
|
||||||
|
}
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
.frame(width: screenSize().width - 26.7)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
|
ContentMainRankingSortView(
|
||||||
|
sorts: viewModel.contentRankingSortList,
|
||||||
|
selectSort: { viewModel.selectedContentRankingSort = $0 },
|
||||||
|
selectedSort: $viewModel.selectedContentRankingSort
|
||||||
|
)
|
||||||
|
.frame(width: screenSize().width - 26.7)
|
||||||
|
.padding(.vertical, 16.7)
|
||||||
|
|
||||||
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
|
LazyVStack(spacing: 20) {
|
||||||
|
ForEach(0..<viewModel.contentRankingItemList.count, id: \.self) { index in
|
||||||
|
let item = viewModel.contentRankingItemList[index]
|
||||||
|
NavigationLink {
|
||||||
|
ContentDetailView(contentId: item.contentId)
|
||||||
|
} label: {
|
||||||
|
HStack(spacing: 0) {
|
||||||
|
KFImage(URL(string: item.coverImageUrl))
|
||||||
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: 66.7, height: 66.7, alignment: .top)
|
||||||
|
.clipped()
|
||||||
|
.cornerRadius(5.3)
|
||||||
|
|
||||||
|
Text("\(index + 1)")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
|
.padding(.horizontal, 12)
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
HStack(spacing: 8) {
|
||||||
|
Text(item.themeStr)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8))
|
||||||
|
.foregroundColor(Color(hex: "3bac6a"))
|
||||||
|
.padding(2.6)
|
||||||
|
.background(Color(hex: "28312b"))
|
||||||
|
.cornerRadius(2.6)
|
||||||
|
|
||||||
|
Text(item.duration)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.padding(2.6)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(2.6)
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(item.creatorNickname)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 10.7))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.padding(.vertical, 8)
|
||||||
|
|
||||||
|
Text(item.title)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
|
.lineLimit(2)
|
||||||
|
.padding(.top, 2.7)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
if item.price > 0 {
|
||||||
|
HStack(spacing: 8) {
|
||||||
|
Image("ic_can")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 17, height: 17)
|
||||||
|
|
||||||
|
Text("\(item.price)")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(Color(hex: "909090"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Text("무료")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(Color(hex: "ffffff"))
|
||||||
|
.padding(.horizontal, 5.3)
|
||||||
|
.padding(.vertical, 2.7)
|
||||||
|
.background(Color(hex: "cf5c37"))
|
||||||
|
.cornerRadius(2.6)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.frame(height: 66.7)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
.onAppear {
|
||||||
|
if index == viewModel.contentRankingItemList.count - 1 {
|
||||||
|
viewModel.getContentRanking()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(13.3)
|
||||||
|
}
|
||||||
|
|
||||||
|
if viewModel.isLoading {
|
||||||
|
LoadingView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .top, autohideIn: 2) {
|
||||||
|
GeometryReader { geo in
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Text(viewModel.errorMessage)
|
||||||
|
.padding(.vertical, 13.3)
|
||||||
|
.padding(.horizontal, 6.7)
|
||||||
|
.frame(width: geo.size.width - 66.7, alignment: .center)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.background(Color(hex: "9970ff"))
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
.multilineTextAlignment(.leading)
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.cornerRadius(20)
|
||||||
|
.padding(.top, 66.7)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onAppear {
|
||||||
|
viewModel.getContentRankingSortType()
|
||||||
|
viewModel.getContentRanking()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ContentRankingAllView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
ContentRankingAllView()
|
||||||
|
}
|
||||||
|
}
|
||||||
124
SodaLive/Sources/Content/All/ContentRankingAllViewModel.swift
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
//
|
||||||
|
// ContentRankingAllViewModel.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/10/15.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import Combine
|
||||||
|
|
||||||
|
final class ContentRankingAllViewModel: ObservableObject {
|
||||||
|
|
||||||
|
private let repository = ContentRepository()
|
||||||
|
private var subscription = Set<AnyCancellable>()
|
||||||
|
|
||||||
|
@Published var errorMessage = ""
|
||||||
|
@Published var isShowPopup = false
|
||||||
|
@Published var isLoading = false
|
||||||
|
|
||||||
|
@Published var dateString = ""
|
||||||
|
@Published var contentRankingItemList = [GetAudioContentRankingItem]()
|
||||||
|
@Published var contentRankingSortList = [String]()
|
||||||
|
|
||||||
|
@Published var selectedContentRankingSort = "매출" {
|
||||||
|
didSet {
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
getContentRanking()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var page = 1
|
||||||
|
var isLast = false
|
||||||
|
private let pageSize = 10
|
||||||
|
|
||||||
|
func getContentRanking() {
|
||||||
|
if (!isLast && !isLoading && page <= 5) {
|
||||||
|
isLoading = true
|
||||||
|
|
||||||
|
repository.getContentRanking(page: page, size: pageSize, sortType: selectedContentRankingSort)
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
self.isLoading = false
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<GetAudioContentRanking>.self, from: responseData)
|
||||||
|
self.isLoading = false
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
if page == 1 {
|
||||||
|
contentRankingItemList.removeAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
dateString = "\(data.startDate)~\(data.endDate)"
|
||||||
|
|
||||||
|
if !data.items.isEmpty {
|
||||||
|
page += 1
|
||||||
|
self.contentRankingItemList.append(contentsOf: data.items)
|
||||||
|
} else {
|
||||||
|
isLast = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
self.isLoading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getContentRankingSortType() {
|
||||||
|
repository.getContentRankingSortType()
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<[String]>.self, from: responseData)
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
self.contentRankingSortList.removeAll()
|
||||||
|
self.contentRankingSortList.append(contentsOf: data)
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
}
|
||||||
|
}
|
||||||
11
SodaLive/Sources/Content/All/GetNewContentAllResponse.swift
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
//
|
||||||
|
// GetNewContentAllResponse.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/09/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
struct GetNewContentAllResponse: Decodable {
|
||||||
|
let totalCount: Int
|
||||||
|
let items: [GetAudioContentMainItem]
|
||||||
|
}
|
||||||
45
SodaLive/Sources/Content/Category/CategoryApi.swift
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
//
|
||||||
|
// CategoryApi.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/7/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import Moya
|
||||||
|
|
||||||
|
enum CategoryApi {
|
||||||
|
case getCategoryList(creatorId: Int)
|
||||||
|
}
|
||||||
|
|
||||||
|
extension CategoryApi: TargetType {
|
||||||
|
var baseURL: URL {
|
||||||
|
return URL(string: BASE_URL)!
|
||||||
|
}
|
||||||
|
|
||||||
|
var path: String {
|
||||||
|
switch self {
|
||||||
|
case .getCategoryList:
|
||||||
|
return "/category"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var method: Moya.Method {
|
||||||
|
switch self {
|
||||||
|
case .getCategoryList:
|
||||||
|
return .get
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var task: Moya.Task {
|
||||||
|
switch self {
|
||||||
|
case .getCategoryList(let creatorId):
|
||||||
|
let parameters = ["creatorId": creatorId] as [String : Any]
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var headers: [String : String]? {
|
||||||
|
return ["Authorization": "Bearer \(UserDefaults.string(forKey: UserDefaultsKey.token))"]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
//
|
||||||
|
// ContentListCategoryView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/7/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ContentListCategoryView: View {
|
||||||
|
let categoryList: [GetCategoryListResponse]
|
||||||
|
let selectCategory: (Int) -> Void
|
||||||
|
|
||||||
|
@Binding var selectedCategory: String
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
|
HStack(spacing: 8) {
|
||||||
|
ForEach(0..<categoryList.count, id: \.self) { index in
|
||||||
|
let category = categoryList[index]
|
||||||
|
Text(category.category)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color(hex: selectedCategory == category.category ? "3bb9f1" : "777777"))
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.padding(.vertical, 9.3)
|
||||||
|
.border(
|
||||||
|
Color(hex: selectedCategory == category.category ? "3bb9f1" : "eeeeee"),
|
||||||
|
width: 0.5
|
||||||
|
)
|
||||||
|
.cornerRadius(16.7)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: CGFloat(16.7))
|
||||||
|
.stroke(lineWidth: 0.5)
|
||||||
|
.foregroundColor(Color(hex: selectedCategory == category.category ? "3bb9f1" : "eeeeee"))
|
||||||
|
)
|
||||||
|
.onTapGesture {
|
||||||
|
if selectedCategory != category.category {
|
||||||
|
selectedCategory = category.category
|
||||||
|
selectCategory(category.categoryId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
|
||||||
|
ContentListCategoryView(
|
||||||
|
categoryList: [
|
||||||
|
GetCategoryListResponse(categoryId: 0, category: "전체"),
|
||||||
|
GetCategoryListResponse(categoryId: 1, category: "test"),
|
||||||
|
GetCategoryListResponse(categoryId: 0, category: "test2")
|
||||||
|
],
|
||||||
|
selectCategory: { _ in },
|
||||||
|
selectedCategory: .constant("전체")
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// GetCategoryListResponse.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2/7/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct GetCategoryListResponse: Decodable {
|
||||||
|
let categoryId: Int
|
||||||
|
let category: String
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ import Foundation
|
|||||||
import Moya
|
import Moya
|
||||||
|
|
||||||
enum ContentApi {
|
enum ContentApi {
|
||||||
case getAudioContentList(userId: Int, page: Int, size: Int, sort: ContentListViewModel.Sort)
|
case getAudioContentList(userId: Int, categoryId: Int, page: Int, size: Int, sort: ContentListViewModel.Sort)
|
||||||
case getAudioContentDetail(audioContentId: Int)
|
case getAudioContentDetail(audioContentId: Int)
|
||||||
case likeContent(request: PutAudioContentLikeRequest)
|
case likeContent(request: PutAudioContentLikeRequest)
|
||||||
case registerComment(request: RegisterAudioContentCommentRequest)
|
case registerComment(request: RegisterAudioContentCommentRequest)
|
||||||
@@ -22,9 +22,21 @@ enum ContentApi {
|
|||||||
case getAudioContentCommentReplyList(commentId: Int, page: Int, size: Int)
|
case getAudioContentCommentReplyList(commentId: Int, page: Int, size: Int)
|
||||||
case deleteAudioContent(audioContentId: Int)
|
case deleteAudioContent(audioContentId: Int)
|
||||||
case modifyAudioContent(parameters: [MultipartFormData])
|
case modifyAudioContent(parameters: [MultipartFormData])
|
||||||
case getMain
|
case getNewContentUploadCreatorList
|
||||||
|
case getMainBannerList
|
||||||
|
case getMainOrderList
|
||||||
case getNewContentOfTheme(theme: String)
|
case getNewContentOfTheme(theme: String)
|
||||||
|
case getCurationList(page: Int, size: Int)
|
||||||
case donation(request: AudioContentDonationRequest)
|
case donation(request: AudioContentDonationRequest)
|
||||||
|
case modifyComment(request: ModifyCommentRequest)
|
||||||
|
case getNewContentThemeList
|
||||||
|
case getNewContentAllOfTheme(theme: String, page: Int, size: Int)
|
||||||
|
case getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort)
|
||||||
|
case getContentRanking(page: Int, size: Int, sortType: String)
|
||||||
|
case getContentRankingSortType
|
||||||
|
case pinContent(contentId: Int)
|
||||||
|
case unpinContent(contentId: Int)
|
||||||
|
case getAudioContentByTheme(themeId: Int, page: Int, size: Int, sort: ContentAllByThemeViewModel.Sort)
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ContentApi: TargetType {
|
extension ContentApi: TargetType {
|
||||||
@@ -73,26 +85,68 @@ extension ContentApi: TargetType {
|
|||||||
case .modifyAudioContent:
|
case .modifyAudioContent:
|
||||||
return "/audio-content"
|
return "/audio-content"
|
||||||
|
|
||||||
case .getMain:
|
case .getNewContentUploadCreatorList:
|
||||||
return "/audio-content/main"
|
return "/audio-content/main/new-content-upload-creator"
|
||||||
|
|
||||||
|
case .getMainBannerList:
|
||||||
|
return "/audio-content/main/banner-list"
|
||||||
|
|
||||||
|
case .getMainOrderList:
|
||||||
|
return "/audio-content/main/order-list"
|
||||||
|
|
||||||
case .getNewContentOfTheme:
|
case .getNewContentOfTheme:
|
||||||
return "/audio-content/main/new"
|
return "/audio-content/main/new"
|
||||||
|
|
||||||
|
case .getCurationList:
|
||||||
|
return "/audio-content/main/curation-list"
|
||||||
|
|
||||||
case .donation:
|
case .donation:
|
||||||
return "/audio-content/donation"
|
return "/audio-content/donation"
|
||||||
|
|
||||||
|
case .modifyComment:
|
||||||
|
return "/audio-content/comment"
|
||||||
|
|
||||||
|
case .getNewContentThemeList:
|
||||||
|
return "/audio-content/main/theme"
|
||||||
|
|
||||||
|
case .getNewContentAllOfTheme:
|
||||||
|
return "/audio-content/main/new/all"
|
||||||
|
|
||||||
|
case .getAudioContentListByCurationId(let curationId, _, _, _):
|
||||||
|
return "/audio-content/curation/\(curationId)"
|
||||||
|
|
||||||
|
case .getContentRanking:
|
||||||
|
return "/audio-content/ranking"
|
||||||
|
|
||||||
|
case .getContentRankingSortType:
|
||||||
|
return "/audio-content/ranking-sort-type"
|
||||||
|
|
||||||
|
case .pinContent(let contentId):
|
||||||
|
return "/audio-content/pin-to-the-top/\(contentId)"
|
||||||
|
|
||||||
|
case .unpinContent(let contentId):
|
||||||
|
return "/audio-content/unpin-at-the-top/\(contentId)"
|
||||||
|
|
||||||
|
case .getAudioContentByTheme(let themeId, _, _, _):
|
||||||
|
return "/audio-content/theme/\(themeId)/content"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var method: Moya.Method {
|
var method: Moya.Method {
|
||||||
switch self {
|
switch self {
|
||||||
case .getAudioContentList, .getAudioContentDetail, .getOrderList, .getAudioContentThemeList, .getAudioContentCommentList, .getAudioContentCommentReplyList, .getMain, .getNewContentOfTheme:
|
case .getAudioContentList, .getAudioContentDetail, .getOrderList, .getAudioContentThemeList,
|
||||||
|
.getAudioContentCommentList, .getAudioContentCommentReplyList, .getNewContentOfTheme,
|
||||||
|
.getNewContentThemeList, .getNewContentAllOfTheme, .getAudioContentListByCurationId, .getContentRanking,
|
||||||
|
.getContentRankingSortType:
|
||||||
return .get
|
return .get
|
||||||
|
|
||||||
case .likeContent, .modifyAudioContent:
|
case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList, .getAudioContentByTheme:
|
||||||
|
return .get
|
||||||
|
|
||||||
|
case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
|
||||||
return .put
|
return .put
|
||||||
|
|
||||||
case .registerComment, .orderAudioContent, .addAllPlaybackTracking, .uploadAudioContent, .donation:
|
case .registerComment, .orderAudioContent, .addAllPlaybackTracking, .uploadAudioContent, .donation, .pinContent:
|
||||||
return .post
|
return .post
|
||||||
|
|
||||||
case .deleteAudioContent:
|
case .deleteAudioContent:
|
||||||
@@ -102,9 +156,10 @@ extension ContentApi: TargetType {
|
|||||||
|
|
||||||
var task: Moya.Task {
|
var task: Moya.Task {
|
||||||
switch self {
|
switch self {
|
||||||
case .getAudioContentList(let userId, let page, let size, let sort):
|
case .getAudioContentList(let userId, let categoryId, let page, let size, let sort):
|
||||||
let parameters = [
|
let parameters = [
|
||||||
"creator-id": userId,
|
"creator-id": userId,
|
||||||
|
"category-id": categoryId,
|
||||||
"page": page - 1,
|
"page": page - 1,
|
||||||
"size": size,
|
"size": size,
|
||||||
"sort-type": sort
|
"sort-type": sort
|
||||||
@@ -136,7 +191,7 @@ extension ContentApi: TargetType {
|
|||||||
case .addAllPlaybackTracking(let request):
|
case .addAllPlaybackTracking(let request):
|
||||||
return .requestJSONEncodable(request)
|
return .requestJSONEncodable(request)
|
||||||
|
|
||||||
case .getAudioContentThemeList, .getMain:
|
case .getAudioContentThemeList, .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList:
|
||||||
return .requestPlain
|
return .requestPlain
|
||||||
|
|
||||||
case .uploadAudioContent(let parameters):
|
case .uploadAudioContent(let parameters):
|
||||||
@@ -173,6 +228,62 @@ extension ContentApi: TargetType {
|
|||||||
|
|
||||||
case .donation(let request):
|
case .donation(let request):
|
||||||
return .requestJSONEncodable(request)
|
return .requestJSONEncodable(request)
|
||||||
|
|
||||||
|
case .modifyComment(let request):
|
||||||
|
return .requestJSONEncodable(request)
|
||||||
|
|
||||||
|
case .getNewContentThemeList:
|
||||||
|
return .requestPlain
|
||||||
|
|
||||||
|
case .getNewContentAllOfTheme(let theme, let page, let size):
|
||||||
|
let parameters = [
|
||||||
|
"theme": theme,
|
||||||
|
"page": page - 1,
|
||||||
|
"size": size
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
|
||||||
|
case .getAudioContentListByCurationId(_, let page, let size, let sort):
|
||||||
|
let parameters = [
|
||||||
|
"page": page - 1,
|
||||||
|
"size": size,
|
||||||
|
"sort-type": sort
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
|
||||||
|
case .getContentRanking(let page, let size, let sortType):
|
||||||
|
let parameters = [
|
||||||
|
"page": page - 1,
|
||||||
|
"size": size,
|
||||||
|
"sort-type": sortType
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
|
||||||
|
case .getContentRankingSortType:
|
||||||
|
return .requestPlain
|
||||||
|
|
||||||
|
case .getCurationList(let page, let size):
|
||||||
|
let parameters = [
|
||||||
|
"page": page - 1,
|
||||||
|
"size": size
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
|
||||||
|
case .pinContent, .unpinContent:
|
||||||
|
return .requestPlain
|
||||||
|
|
||||||
|
case .getAudioContentByTheme(_, let page, let size, let sort):
|
||||||
|
let parameters = [
|
||||||
|
"page": page - 1,
|
||||||
|
"size": size,
|
||||||
|
"sort-type": sort
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,15 @@ struct ContentListItemView: View {
|
|||||||
|
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
|
if item.isScheduledToOpen {
|
||||||
|
Text("오픈예정")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 8))
|
||||||
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
|
.padding(2.6)
|
||||||
|
.background(Color(hex: "003851"))
|
||||||
|
.cornerRadius(2.6)
|
||||||
|
}
|
||||||
|
|
||||||
Text(item.themeStr)
|
Text(item.themeStr)
|
||||||
.font(.custom(Font.medium.rawValue, size: 8))
|
.font(.custom(Font.medium.rawValue, size: 8))
|
||||||
.foregroundColor(Color(hex: "3bac6a"))
|
.foregroundColor(Color(hex: "3bac6a"))
|
||||||
@@ -39,11 +48,18 @@ struct ContentListItemView: View {
|
|||||||
.padding(2.6)
|
.padding(2.6)
|
||||||
.background(Color(hex: "222222"))
|
.background(Color(hex: "222222"))
|
||||||
.cornerRadius(2.6)
|
.cornerRadius(2.6)
|
||||||
|
|
||||||
|
if item.isPin {
|
||||||
|
Image("ic_pin")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 13.3, height: 13.3)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(item.title)
|
Text(item.title)
|
||||||
.font(.custom(Font.medium.rawValue, size: 12))
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
.foregroundColor(Color(hex: "d2d2d2"))
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
|
.multilineTextAlignment(.leading)
|
||||||
.padding(.top, 8)
|
.padding(.top, 8)
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
|
|
||||||
@@ -112,7 +128,9 @@ struct ContentListItemView_Previews: PreviewProvider {
|
|||||||
duration: "00:04:43",
|
duration: "00:04:43",
|
||||||
likeCount: 2,
|
likeCount: 2,
|
||||||
commentCount: 0,
|
commentCount: 0,
|
||||||
isAdult: false
|
isPin: true,
|
||||||
|
isAdult: false,
|
||||||
|
isScheduledToOpen: true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,148 +13,158 @@ struct ContentListView: View {
|
|||||||
@StateObject var viewModel = ContentListViewModel()
|
@StateObject var viewModel = ContentListViewModel()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
BaseView(isLoading: $viewModel.isLoading) {
|
NavigationView {
|
||||||
VStack(spacing: 0) {
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
HStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Button {
|
HStack(spacing: 0) {
|
||||||
AppState.shared.back()
|
Button {
|
||||||
} label: {
|
AppState.shared.back()
|
||||||
Image("ic_back")
|
} label: {
|
||||||
.resizable()
|
Image("ic_back")
|
||||||
.frame(width: 20, height: 20)
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20)
|
||||||
|
|
||||||
Text("콘텐츠 전체보기")
|
Text("콘텐츠 전체보기")
|
||||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||||
.foregroundColor(Color(hex: "eeeeee"))
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.frame(height: 50)
|
||||||
|
.background(Color.black)
|
||||||
|
|
||||||
Spacer()
|
if !viewModel.categoryList.isEmpty {
|
||||||
}
|
ContentListCategoryView(
|
||||||
.padding(.horizontal, 13.3)
|
categoryList: viewModel.categoryList,
|
||||||
.frame(height: 50)
|
selectCategory: { viewModel.selectCategory(categoryId: $0) },
|
||||||
.background(Color.black)
|
selectedCategory: $viewModel.selectedCategory
|
||||||
|
)
|
||||||
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)
|
.padding(.horizontal, 13.3)
|
||||||
.onTapGesture { AppState.shared.setAppStep(step: .createContent) }
|
}
|
||||||
}
|
|
||||||
|
|
||||||
HStack(spacing: 13.3) {
|
if userId == UserDefaults.int(forKey: .userId) {
|
||||||
Spacer()
|
Text("새로운 콘텐츠 등록하기")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 15))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.padding(.vertical, 17)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.background(Color(hex: "3bb9f1"))
|
||||||
|
.cornerRadius(5.3)
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.onTapGesture { AppState.shared.setAppStep(step: .createContent) }
|
||||||
|
}
|
||||||
|
|
||||||
Text("최신순")
|
HStack(spacing: 13.3) {
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
Spacer()
|
||||||
.foregroundColor(
|
|
||||||
Color(hex: "e2e2e2")
|
Text("최신순")
|
||||||
.opacity(viewModel.sort == .NEWEST ? 1 : 0.5)
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
)
|
.foregroundColor(
|
||||||
.onTapGesture {
|
Color(hex: "e2e2e2")
|
||||||
if viewModel.sort != .NEWEST {
|
.opacity(viewModel.sort == .NEWEST ? 1 : 0.5)
|
||||||
viewModel.sort = .NEWEST
|
)
|
||||||
|
.onTapGesture {
|
||||||
|
if viewModel.sort != .NEWEST {
|
||||||
|
viewModel.sort = .NEWEST
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Text("높은 가격순")
|
Text("높은 가격순")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(
|
.foregroundColor(
|
||||||
Color(hex: "e2e2e2")
|
Color(hex: "e2e2e2")
|
||||||
.opacity(viewModel.sort == .PRICE_HIGH ? 1 : 0.5)
|
.opacity(viewModel.sort == .PRICE_HIGH ? 1 : 0.5)
|
||||||
)
|
)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
if viewModel.sort != .PRICE_HIGH {
|
if viewModel.sort != .PRICE_HIGH {
|
||||||
viewModel.sort = .PRICE_HIGH
|
viewModel.sort = .PRICE_HIGH
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Text("낮은 가격순")
|
Text("낮은 가격순")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(
|
.foregroundColor(
|
||||||
Color(hex: "e2e2e2")
|
Color(hex: "e2e2e2")
|
||||||
.opacity(viewModel.sort == .PRICE_LOW ? 1 : 0.5)
|
.opacity(viewModel.sort == .PRICE_LOW ? 1 : 0.5)
|
||||||
)
|
)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
if viewModel.sort != .PRICE_LOW {
|
if viewModel.sort != .PRICE_LOW {
|
||||||
viewModel.sort = .PRICE_LOW
|
viewModel.sort = .PRICE_LOW
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
.padding(.vertical, 13.3)
|
||||||
.padding(.vertical, 13.3)
|
.padding(.horizontal, 20)
|
||||||
.padding(.horizontal, 20)
|
.background(Color(hex: "161616"))
|
||||||
.background(Color(hex: "161616"))
|
.padding(.top, 13.3)
|
||||||
.padding(.top, 13.3)
|
|
||||||
|
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
Text("전체")
|
Text("전체")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "e2e2e2"))
|
.foregroundColor(Color(hex: "e2e2e2"))
|
||||||
|
|
||||||
Text("\(viewModel.totalCount)")
|
Text("\(viewModel.totalCount)")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "ff5c49"))
|
.foregroundColor(Color(hex: "ff5c49"))
|
||||||
.padding(.leading, 8)
|
.padding(.leading, 8)
|
||||||
|
|
||||||
Text("개")
|
Text("개")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "e2e2e2"))
|
.foregroundColor(Color(hex: "e2e2e2"))
|
||||||
.padding(.leading, 2)
|
.padding(.leading, 2)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.vertical, 13.3)
|
.padding(.vertical, 13.3)
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
ScrollViewReader { reader in
|
ScrollViewReader { reader in
|
||||||
ScrollView(.vertical, showsIndicators: false) {
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
LazyVStack(spacing: 10.7) {
|
LazyVStack(spacing: 10.7) {
|
||||||
ScrollerToTop(reader: reader, scrollOnChange: $viewModel.scrollToTop)
|
ScrollerToTop(reader: reader, scrollOnChange: $viewModel.scrollToTop)
|
||||||
|
|
||||||
ForEach(0..<viewModel.audioContentList.count, id: \.self) { index in
|
ForEach(0..<viewModel.audioContentList.count, id: \.self) { index in
|
||||||
let audioContent = viewModel.audioContentList[index]
|
let audioContent = viewModel.audioContentList[index]
|
||||||
ContentListItemView(item: audioContent)
|
NavigationLink {
|
||||||
.contentShape(Rectangle())
|
ContentDetailView(contentId: audioContent.contentId)
|
||||||
.onTapGesture {
|
} label: {
|
||||||
AppState
|
ContentListItemView(item: audioContent)
|
||||||
.shared
|
.contentShape(Rectangle())
|
||||||
.setAppStep(
|
.onAppear {
|
||||||
step: .contentDetail(contentId: audioContent.contentId)
|
if index == viewModel.audioContentList.count - 1 {
|
||||||
)
|
viewModel.getAudioContentList()
|
||||||
}
|
}
|
||||||
.onAppear {
|
}
|
||||||
if index == viewModel.audioContentList.count - 1 {
|
|
||||||
viewModel.getAudioContentList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.top, 13.3)
|
||||||
}
|
}
|
||||||
.padding(.top, 13.3)
|
.onAppear {
|
||||||
}
|
viewModel.userId = userId
|
||||||
.onAppear {
|
viewModel.getCategoryList()
|
||||||
viewModel.userId = userId
|
viewModel.getAudioContentList()
|
||||||
viewModel.getAudioContentList()
|
}
|
||||||
}
|
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {
|
||||||
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {
|
HStack {
|
||||||
HStack {
|
Spacer()
|
||||||
Spacer()
|
Text(viewModel.errorMessage)
|
||||||
Text(viewModel.errorMessage)
|
.padding(.vertical, 13.3)
|
||||||
.padding(.vertical, 13.3)
|
.frame(width: screenSize().width - 66.7, alignment: .center)
|
||||||
.frame(width: screenSize().width - 66.7, alignment: .center)
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
.font(.custom(Font.medium.rawValue, size: 12))
|
.background(Color(hex: "3bb9f1"))
|
||||||
.background(Color(hex: "9970ff"))
|
.foregroundColor(Color.white)
|
||||||
.foregroundColor(Color.white)
|
.multilineTextAlignment(.leading)
|
||||||
.multilineTextAlignment(.leading)
|
.cornerRadius(20)
|
||||||
.cornerRadius(20)
|
.padding(.bottom, 66.7)
|
||||||
.padding(.bottom, 66.7)
|
Spacer()
|
||||||
Spacer()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ final class ContentListViewModel: ObservableObject {
|
|||||||
@Published var isShowPopup = false
|
@Published var isShowPopup = false
|
||||||
@Published var isLoading = false
|
@Published var isLoading = false
|
||||||
|
|
||||||
|
@Published var categoryList: [GetCategoryListResponse] = []
|
||||||
@Published var audioContentList: [GetAudioContentListItem] = []
|
@Published var audioContentList: [GetAudioContentListItem] = []
|
||||||
@Published var totalCount = 0
|
@Published var totalCount = 0
|
||||||
@Published var sort = Sort.NEWEST {
|
@Published var sort = Sort.NEWEST {
|
||||||
@@ -32,18 +33,20 @@ final class ContentListViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Published var scrollToTop = false
|
@Published var scrollToTop = false
|
||||||
|
@Published var selectedCategory: String = "전체"
|
||||||
|
|
||||||
var userId = 0
|
var userId = 0
|
||||||
var page = 1
|
var page = 1
|
||||||
var isLast = false
|
var isLast = false
|
||||||
private let pageSize = 10
|
private let pageSize = 10
|
||||||
|
private var categoryId = 0
|
||||||
|
|
||||||
func getAudioContentList() {
|
func getAudioContentList() {
|
||||||
if (!isLast && !isLoading) {
|
if (!isLast && !isLoading) {
|
||||||
isLoading = true
|
isLoading = true
|
||||||
|
|
||||||
repository
|
repository
|
||||||
.getAudioContentList(userId: userId, page: page, size: pageSize, sort: sort)
|
.getAudioContentList(userId: userId, categoryId: categoryId, page: page, size: pageSize, sort: sort)
|
||||||
.sink { result in
|
.sink { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .finished:
|
case .finished:
|
||||||
@@ -64,11 +67,11 @@ final class ContentListViewModel: ObservableObject {
|
|||||||
self.scrollToTop.toggle()
|
self.scrollToTop.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
if !data.items.isEmpty {
|
page += 1
|
||||||
page += 1
|
self.totalCount = data.totalCount
|
||||||
self.totalCount = data.totalCount
|
self.audioContentList.append(contentsOf: data.items)
|
||||||
self.audioContentList.append(contentsOf: data.items)
|
|
||||||
} else {
|
if data.items.isEmpty {
|
||||||
isLast = true
|
isLast = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -90,4 +93,53 @@ final class ContentListViewModel: ObservableObject {
|
|||||||
.store(in: &subscription)
|
.store(in: &subscription)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCategoryList() {
|
||||||
|
repository.getCategoryList(creatorId: userId)
|
||||||
|
.sink { result in
|
||||||
|
switch result {
|
||||||
|
case .finished:
|
||||||
|
DEBUG_LOG("finish")
|
||||||
|
case .failure(let error):
|
||||||
|
ERROR_LOG(error.localizedDescription)
|
||||||
|
}
|
||||||
|
} receiveValue: { [unowned self] response in
|
||||||
|
let responseData = response.data
|
||||||
|
|
||||||
|
do {
|
||||||
|
let jsonDecoder = JSONDecoder()
|
||||||
|
let decoded = try jsonDecoder.decode(ApiResponse<[GetCategoryListResponse]>.self, from: responseData)
|
||||||
|
|
||||||
|
if let data = decoded.data, decoded.success {
|
||||||
|
categoryList.removeAll()
|
||||||
|
|
||||||
|
if !data.isEmpty {
|
||||||
|
categoryList.append(GetCategoryListResponse(categoryId: 0, category: "전체"))
|
||||||
|
categoryList.append(contentsOf: data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let message = decoded.message {
|
||||||
|
self.errorMessage = message
|
||||||
|
} else {
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
print(error)
|
||||||
|
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
|
||||||
|
self.isShowPopup = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &subscription)
|
||||||
|
}
|
||||||
|
|
||||||
|
func selectCategory(categoryId: Int) {
|
||||||
|
self.categoryId = categoryId
|
||||||
|
|
||||||
|
page = 1
|
||||||
|
isLast = false
|
||||||
|
getAudioContentList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ import Moya
|
|||||||
|
|
||||||
final class ContentRepository {
|
final class ContentRepository {
|
||||||
private let api = MoyaProvider<ContentApi>()
|
private let api = MoyaProvider<ContentApi>()
|
||||||
|
private let categoryApi = MoyaProvider<CategoryApi>()
|
||||||
|
|
||||||
func getAudioContentList(userId: Int, page: Int, size: Int, sort: ContentListViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
func getAudioContentList(userId: Int, categoryId: Int, page: Int, size: Int, sort: ContentListViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
||||||
return api.requestPublisher(.getAudioContentList(userId: userId, page: page, size: size, sort: sort))
|
return api.requestPublisher(.getAudioContentList(userId: userId, categoryId: categoryId, page: page, size: size, sort: sort))
|
||||||
}
|
}
|
||||||
|
|
||||||
func getAudioContentDetail(audioContentId: Int) -> AnyPublisher<Response, MoyaError> {
|
func getAudioContentDetail(audioContentId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
@@ -65,15 +66,67 @@ final class ContentRepository {
|
|||||||
return api.requestPublisher(.modifyAudioContent(parameters: parameters))
|
return api.requestPublisher(.modifyAudioContent(parameters: parameters))
|
||||||
}
|
}
|
||||||
|
|
||||||
func getMain() -> AnyPublisher<Response, MoyaError> {
|
func getNewContentUploadCreatorList() -> AnyPublisher<Response, MoyaError> {
|
||||||
return api.requestPublisher(.getMain)
|
return api.requestPublisher(.getNewContentUploadCreatorList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getMainBannerList() -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getMainBannerList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getMainOrderList() -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getMainOrderList)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getNewContentOfTheme(theme: String) -> AnyPublisher<Response, MoyaError> {
|
func getNewContentOfTheme(theme: String) -> AnyPublisher<Response, MoyaError> {
|
||||||
return api.requestPublisher(.getNewContentOfTheme(theme: theme))
|
return api.requestPublisher(.getNewContentOfTheme(theme: theme))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCurationList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getCurationList(page: page, size: size))
|
||||||
|
}
|
||||||
|
|
||||||
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(contentId: contentId, donationCan: can, comment: comment)))
|
return api.requestPublisher(.donation(request: AudioContentDonationRequest(contentId: contentId, donationCan: can, comment: comment)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func modifyComment(request: ModifyCommentRequest) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.modifyComment(request: request))
|
||||||
|
}
|
||||||
|
|
||||||
|
func getNewContentThemeList() -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getNewContentThemeList)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getNewContentAllOfTheme(theme: String, page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getNewContentAllOfTheme(theme: theme, page: page, size: size))
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getAudioContentListByCurationId(curationId: curationId, page: page, size: size, sort: sort))
|
||||||
|
}
|
||||||
|
|
||||||
|
func getContentRankingSortType() -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getContentRankingSortType)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getContentRanking(page: Int, size: Int, sortType: String = "매출") -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getContentRanking(page: page, size: size, sortType: sortType))
|
||||||
|
}
|
||||||
|
|
||||||
|
func pinContent(contentId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.pinContent(contentId: contentId))
|
||||||
|
}
|
||||||
|
|
||||||
|
func unpinContent(contentId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.unpinContent(contentId: contentId))
|
||||||
|
}
|
||||||
|
|
||||||
|
func getCategoryList(creatorId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return categoryApi.requestPublisher(.getCategoryList(creatorId: creatorId))
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAudioContentByTheme(themeId: Int, page: Int, size: Int, sort: ContentAllByThemeViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
||||||
|
return api.requestPublisher(.getAudioContentByTheme(themeId: themeId, page: page, size: size, sort: sort))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ struct ContentCreateView: View {
|
|||||||
@State private var isShowPhotoPicker = false
|
@State private var isShowPhotoPicker = false
|
||||||
@State private var isShowSelectAudioView = false
|
@State private var isShowSelectAudioView = false
|
||||||
@State private var isShowSelectThemeView = false
|
@State private var isShowSelectThemeView = false
|
||||||
|
@State private var isShowSelectDateView = false
|
||||||
|
@State private var isShowSelectTimeView = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
BaseView(isLoading: $viewModel.isLoading) {
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
@@ -37,7 +39,7 @@ struct ContentCreateView: View {
|
|||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFill()
|
.scaledToFill()
|
||||||
.frame(width: 107, height: 107)
|
.frame(width: 107, height: 107)
|
||||||
.background(Color(hex: "3e3358"))
|
.background(Color(hex: "13181b"))
|
||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
.clipped()
|
.clipped()
|
||||||
} else {
|
} else {
|
||||||
@@ -46,13 +48,13 @@ struct ContentCreateView: View {
|
|||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.padding(13.3)
|
.padding(13.3)
|
||||||
.frame(width: 107, height: 107)
|
.frame(width: 107, height: 107)
|
||||||
.background(Color(hex: "3e3358"))
|
.background(Color(hex: "13181b"))
|
||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
}
|
}
|
||||||
|
|
||||||
Image("ic_camera")
|
Image("ic_camera")
|
||||||
.padding(10)
|
.padding(10)
|
||||||
.background(Color(hex: "9970ff"))
|
.background(Color(hex: "3bb9f1"))
|
||||||
.cornerRadius(30)
|
.cornerRadius(30)
|
||||||
.offset(x: 50, y: 36)
|
.offset(x: 50, y: 36)
|
||||||
}
|
}
|
||||||
@@ -67,15 +69,15 @@ struct ContentCreateView: View {
|
|||||||
|
|
||||||
Text(viewModel.fileName.trimmingCharacters(in: .whitespacesAndNewlines) == "" ? "파일선택" : viewModel.fileName)
|
Text(viewModel.fileName.trimmingCharacters(in: .whitespacesAndNewlines) == "" ? "파일선택" : viewModel.fileName)
|
||||||
.font(.custom(Font.medium.rawValue, size: 16.7))
|
.font(.custom(Font.medium.rawValue, size: 16.7))
|
||||||
.foregroundColor(Color(hex: "9970ff"))
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
.padding(.vertical, 10)
|
.padding(.vertical, 10)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.background(Color(hex: "9970ff").opacity(0.2))
|
.background(Color(hex: "13181b"))
|
||||||
.cornerRadius(5.3)
|
.cornerRadius(5.3)
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedCorner(radius: 8)
|
RoundedCorner(radius: 8)
|
||||||
.stroke(lineWidth: 2)
|
.stroke(lineWidth: 2)
|
||||||
.foregroundColor(Color(hex: "9970ff"))
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
)
|
)
|
||||||
.padding(.top, 13.3)
|
.padding(.top, 13.3)
|
||||||
.onTapGesture { isShowSelectAudioView = true }
|
.onTapGesture { isShowSelectAudioView = true }
|
||||||
@@ -150,16 +152,16 @@ struct ContentCreateView: View {
|
|||||||
viewModel.theme!.theme :
|
viewModel.theme!.theme :
|
||||||
"테마 선택")
|
"테마 선택")
|
||||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
.foregroundColor(Color(hex: "9970ff"))
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
}
|
}
|
||||||
.padding(.vertical, viewModel.theme != nil ? 8 : 13.3)
|
.padding(.vertical, viewModel.theme != nil ? 8 : 13.3)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.background(Color(hex: "9970ff").opacity(0.2))
|
.background(Color(hex: "13181b"))
|
||||||
.cornerRadius(24)
|
.cornerRadius(24)
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: 24)
|
RoundedRectangle(cornerRadius: 24)
|
||||||
.stroke(lineWidth: 2)
|
.stroke(lineWidth: 2)
|
||||||
.foregroundColor(Color(hex: "9970ff"))
|
.foregroundColor(Color(hex: "3bb9f1"))
|
||||||
)
|
)
|
||||||
.padding(.top, 13.3)
|
.padding(.top, 13.3)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
@@ -194,7 +196,7 @@ struct ContentCreateView: View {
|
|||||||
.padding(.top, 26.7)
|
.padding(.top, 26.7)
|
||||||
|
|
||||||
VStack(spacing: 13.3) {
|
VStack(spacing: 13.3) {
|
||||||
Text("가격설정")
|
Text("가격 설정")
|
||||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
.foregroundColor(Color(hex: "eeeeee"))
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
@@ -214,14 +216,36 @@ struct ContentCreateView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !viewModel.isFree {
|
if !viewModel.isFree {
|
||||||
|
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: !viewModel.isOnlyRental) {
|
||||||
|
if viewModel.isOnlyRental {
|
||||||
|
viewModel.isOnlyRental = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectButtonView(title: "대여만", isChecked: viewModel.isOnlyRental) {
|
||||||
|
if !viewModel.isOnlyRental {
|
||||||
|
viewModel.isOnlyRental = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Text("소장가격")
|
Text(viewModel.isOnlyRental ? "대여 가격" : "소장 가격")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "d2d2d2"))
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
TextField("가격을 입력하세요(10캔 이상)", text: $viewModel.priceString)
|
TextField("가격을 입력하세요(5캔 이상)", text: $viewModel.priceString)
|
||||||
.autocapitalization(.none)
|
.autocapitalization(.none)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
@@ -247,23 +271,101 @@ struct ContentCreateView: View {
|
|||||||
.frame(height: 1)
|
.frame(height: 1)
|
||||||
.padding(.top, 11)
|
.padding(.top, 11)
|
||||||
|
|
||||||
Text("※ 이용기간 대여 (7일) | 소장 (서비스종료시까지)")
|
Text("※ 이용기간 대여 (15일) | 소장 (서비스종료시까지)")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "777777"))
|
.foregroundColor(Color(hex: "777777"))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.padding(.top, 13.3)
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
Text("※ 대여가격은 소장가격의 70%로 자동 반영")
|
Text("※ 대여가격은 소장가격의 60%로 자동 반영")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "777777"))
|
.foregroundColor(Color(hex: "777777"))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
Text("※ 콘텐츠의 최소금액은 10캔 입니다")
|
Text("※ 콘텐츠의 최소금액은 5캔 입니다")
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
.foregroundColor(Color(hex: "777777"))
|
.foregroundColor(Color(hex: "777777"))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
}
|
}
|
||||||
.padding(.top, 26.7)
|
.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: viewModel.isGeneratePreview) {
|
||||||
|
if !viewModel.isGeneratePreview {
|
||||||
|
viewModel.isGeneratePreview = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectButtonView(title: "생성 안 함", isChecked: !viewModel.isGeneratePreview) {
|
||||||
|
if viewModel.isGeneratePreview {
|
||||||
|
viewModel.isGeneratePreview = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
|
||||||
|
if viewModel.isGeneratePreview {
|
||||||
|
VStack(spacing: 10) {
|
||||||
|
Text("미리듣기 시간 설정")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
Text("미리듣기 시간을 직접 설정하지 않으면 콘텐츠 앞부분 30초가 자동으로 설정됩니다. 미리듣기의 시간제한은 없습니다.")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
HStack(spacing: 13.3) {
|
||||||
|
VStack(spacing: 5.3) {
|
||||||
|
Text("시작 시간")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
TextField("00:00:00", text: $viewModel.previewStartTime)
|
||||||
|
.autocapitalization(.none)
|
||||||
|
.disableAutocorrection(true)
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.6))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.padding(.vertical, 16.7)
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.keyboardType(.default)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
}
|
||||||
|
|
||||||
|
VStack(spacing: 5.3) {
|
||||||
|
Text("종료 시간")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "d2d2d2"))
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
TextField("00:00:30", text: $viewModel.previewEndTime)
|
||||||
|
.autocapitalization(.none)
|
||||||
|
.disableAutocorrection(true)
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.6))
|
||||||
|
.foregroundColor(Color(hex: "777777"))
|
||||||
|
.padding(.vertical, 16.7)
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.keyboardType(.default)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 3.3)
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.top, 26.7)
|
.padding(.top, 26.7)
|
||||||
@@ -321,6 +423,80 @@ struct ContentCreateView: View {
|
|||||||
.padding(.top, 26.7)
|
.padding(.top, 26.7)
|
||||||
.padding(.horizontal, 13.3)
|
.padding(.horizontal, 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: !viewModel.isActiveReservation) {
|
||||||
|
if viewModel.isActiveReservation {
|
||||||
|
viewModel.isActiveReservation = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectButtonView(title: "예약 공개", isChecked: viewModel.isActiveReservation) {
|
||||||
|
if !viewModel.isActiveReservation {
|
||||||
|
viewModel.isActiveReservation = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if viewModel.isActiveReservation {
|
||||||
|
HStack(spacing: 13.3) {
|
||||||
|
VStack(alignment: .leading, spacing: 6.7) {
|
||||||
|
Text("예약 날짜")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
hideKeyboard()
|
||||||
|
self.isShowSelectDateView = true
|
||||||
|
}) {
|
||||||
|
Text(viewModel.releaseDateString)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 48.7)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
|
.stroke(Color(hex: "3bb9f1"), lineWidth: 1.3)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 6.7) {
|
||||||
|
Text("예약 시간")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
hideKeyboard()
|
||||||
|
self.isShowSelectTimeView = true
|
||||||
|
}) {
|
||||||
|
Text(viewModel.releaseTimeString)
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 48.7)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
|
.stroke(Color(hex: "3bb9f1"), lineWidth: 1.3)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.padding(.vertical, 14.2)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.padding(.top, 22.7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.top, 26.7)
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
HStack(alignment: .top, spacing: 0) {
|
HStack(alignment: .top, spacing: 0) {
|
||||||
Text("등록")
|
Text("등록")
|
||||||
@@ -328,7 +504,7 @@ struct ContentCreateView: View {
|
|||||||
.foregroundColor(Color.white)
|
.foregroundColor(Color.white)
|
||||||
.frame(height: 50)
|
.frame(height: 50)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.background(Color(hex: "9970ff"))
|
.background(Color(hex: "3bb9f1"))
|
||||||
.cornerRadius(10)
|
.cornerRadius(10)
|
||||||
.padding(13.3)
|
.padding(13.3)
|
||||||
}
|
}
|
||||||
@@ -370,6 +546,14 @@ struct ContentCreateView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isShowSelectDateView {
|
||||||
|
SelectDatePicker(selectedDate: $viewModel.releaseDate, isShowing: $isShowSelectDateView)
|
||||||
|
}
|
||||||
|
|
||||||
|
if isShowSelectTimeView {
|
||||||
|
QuarterTimePickerView(selectedTime: $viewModel.releaseTime, isShowing: $isShowSelectTimeView)
|
||||||
|
}
|
||||||
|
|
||||||
if isShowPhotoPicker {
|
if isShowPhotoPicker {
|
||||||
ImagePicker(
|
ImagePicker(
|
||||||
isShowing: $isShowPhotoPicker,
|
isShowing: $isShowPhotoPicker,
|
||||||
@@ -415,7 +599,7 @@ struct ContentCreateView: View {
|
|||||||
.padding(.vertical, 13.3)
|
.padding(.vertical, 13.3)
|
||||||
.frame(width: screenSize().width - 66.7, alignment: .center)
|
.frame(width: screenSize().width - 66.7, alignment: .center)
|
||||||
.font(.custom(Font.medium.rawValue, size: 12))
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
.background(Color(hex: "9970ff"))
|
.background(Color(hex: "3bb9f1"))
|
||||||
.foregroundColor(Color.white)
|
.foregroundColor(Color.white)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.cornerRadius(20)
|
.cornerRadius(20)
|
||||||
@@ -443,11 +627,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()
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ final class ContentCreateViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Published var isAvailableComment = true
|
@Published var isAvailableComment = true
|
||||||
|
@Published var isActiveReservation = false
|
||||||
@Published var isAdult = false
|
@Published var isAdult = false
|
||||||
@Published var priceString = "0" {
|
@Published var priceString = "0" {
|
||||||
didSet {
|
didSet {
|
||||||
@@ -54,10 +55,32 @@ final class ContentCreateViewModel: ObservableObject {
|
|||||||
didSet {
|
didSet {
|
||||||
if isFree {
|
if isFree {
|
||||||
priceString = "0"
|
priceString = "0"
|
||||||
|
isOnlyRental = false
|
||||||
|
isGeneratePreview = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Published var isOnlyRental = false
|
||||||
|
@Published var isGeneratePreview = true
|
||||||
|
|
||||||
|
@Published var previewStartTime: String = ""
|
||||||
|
@Published var previewEndTime: String = ""
|
||||||
|
@Published var releaseDateString: String = Date().convertDateFormat(dateFormat: "yyyy.MM.dd")
|
||||||
|
@Published var releaseTimeString: String = Date().convertDateFormat(dateFormat: "a hh:mm")
|
||||||
|
|
||||||
|
var releaseDate = Date() {
|
||||||
|
willSet {
|
||||||
|
releaseDateString = newValue.convertDateFormat(dateFormat: "yyyy.MM.dd")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var releaseTime = Date() {
|
||||||
|
willSet {
|
||||||
|
releaseTimeString = newValue.convertDateFormat(dateFormat: "a hh:mm")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var placeholder = "내용을 입력하세요"
|
var placeholder = "내용을 입력하세요"
|
||||||
|
|
||||||
func uploadAudioContent() {
|
func uploadAudioContent() {
|
||||||
@@ -69,9 +92,15 @@ final class ContentCreateViewModel: ObservableObject {
|
|||||||
detail: detail,
|
detail: detail,
|
||||||
tags: hashtags,
|
tags: hashtags,
|
||||||
price: price,
|
price: price,
|
||||||
|
releaseDate: isActiveReservation ? "\(releaseDate.convertDateFormat(dateFormat: "yyyy-MM-dd")) \(releaseTime.convertDateFormat(dateFormat: "HH:mm"))" : nil,
|
||||||
|
timezone: TimeZone.current.identifier,
|
||||||
themeId: theme!.id,
|
themeId: theme!.id,
|
||||||
isAdult: isAdult,
|
isAdult: isAdult,
|
||||||
isCommentAvailable: isAvailableComment
|
isOnlyRental: isOnlyRental,
|
||||||
|
isGeneratePreview: isGeneratePreview,
|
||||||
|
isCommentAvailable: isAvailableComment,
|
||||||
|
previewStartTime: isGeneratePreview && previewStartTime.trimmingCharacters(in: .whitespacesAndNewlines).count > 0 ? previewStartTime : nil,
|
||||||
|
previewEndTime: isGeneratePreview && previewEndTime.trimmingCharacters(in: .whitespacesAndNewlines).count > 0 ? previewEndTime : nil
|
||||||
)
|
)
|
||||||
|
|
||||||
var multipartData = [MultipartFormData]()
|
var multipartData = [MultipartFormData]()
|
||||||
@@ -205,12 +234,68 @@ final class ContentCreateViewModel: ObservableObject {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isFree && price < 10 {
|
if !isFree && price < 5 {
|
||||||
errorMessage = "콘텐츠의 최소금액은 10캔 입니다."
|
errorMessage = "콘텐츠의 최소금액은 5캔 입니다."
|
||||||
isShowPopup = true
|
isShowPopup = true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if previewStartTime.count > 0 && previewEndTime.count > 0 {
|
||||||
|
let startTimeArray = previewStartTime.split(separator: ":")
|
||||||
|
if startTimeArray.count != 3 {
|
||||||
|
errorMessage = "미리 듣기 시간 형식은 00:30:00 과 같아야 합니다"
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for time in startTimeArray {
|
||||||
|
if time.count != 2 {
|
||||||
|
errorMessage = "미리 듣기 시간 형식은 00:30:00 과 같아야 합니다"
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let endTimeArray = previewStartTime.split(separator: ":")
|
||||||
|
if endTimeArray.count != 3 {
|
||||||
|
errorMessage = "미리 듣기 시간 형식은 00:30:00 과 같아야 합니다"
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for time in endTimeArray {
|
||||||
|
if time.count != 2 {
|
||||||
|
errorMessage = "미리 듣기 시간 형식은 00:30:00 과 같아야 합니다"
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let timeDifference = timeDifference(startTime: previewStartTime, endTime: previewEndTime)
|
||||||
|
if timeDifference < 30.0 {
|
||||||
|
errorMessage = "미리 듣기의 최소 시간은 30초 입니다"
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if previewStartTime.count > 0 || previewEndTime.count > 0 {
|
||||||
|
errorMessage = "미리 듣기 시작 시간과 종료 시간 둘 다 입력을 하거나 둘 다 입력 하지 않아야 합니다."
|
||||||
|
isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func timeDifference(startTime: String, endTime: String) -> Double {
|
||||||
|
let dateFormatter = DateFormatter()
|
||||||
|
dateFormatter.dateFormat = "HH:mm:ss"
|
||||||
|
|
||||||
|
if let date1 = dateFormatter.date(from: startTime), let date2 = dateFormatter.date(from: endTime) {
|
||||||
|
return date2.timeIntervalSince(date1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,13 @@ struct CreateAudioContentRequest: Encodable {
|
|||||||
let detail: String
|
let detail: String
|
||||||
let tags: String
|
let tags: String
|
||||||
let price: Int
|
let price: Int
|
||||||
|
let releaseDate: String?
|
||||||
|
let timezone: String
|
||||||
let themeId: Int
|
let themeId: Int
|
||||||
let isAdult: Bool
|
let isAdult: Bool
|
||||||
|
let isOnlyRental: Bool
|
||||||
|
let isGeneratePreview: Bool
|
||||||
let isCommentAvailable: Bool
|
let isCommentAvailable: Bool
|
||||||
|
let previewStartTime: String?
|
||||||
|
let previewEndTime: String?
|
||||||
}
|
}
|
||||||
|
|||||||
63
SodaLive/Sources/Content/Create/QuarterTimePickerView.swift
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
//
|
||||||
|
// QuarterTimePickerView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2024/01/10.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct QuarterTimePickerView: View {
|
||||||
|
|
||||||
|
@Binding var selectedTime: Date
|
||||||
|
@Binding var isShowing: Bool
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
GeometryReader { proxy in
|
||||||
|
ZStack {
|
||||||
|
Color
|
||||||
|
.black
|
||||||
|
.opacity(0.5)
|
||||||
|
.edgesIgnoringSafeArea(.all)
|
||||||
|
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
DatePicker(
|
||||||
|
"",
|
||||||
|
selection: $selectedTime,
|
||||||
|
displayedComponents: .hourAndMinute
|
||||||
|
)
|
||||||
|
.datePickerStyle(WheelDatePickerStyle())
|
||||||
|
.labelsHidden()
|
||||||
|
.environment(\.locale, Locale.init(identifier: "ko"))
|
||||||
|
.frame(width: proxy.size.width - 53.4)
|
||||||
|
.onAppear {
|
||||||
|
UIDatePicker.appearance().minuteInterval = 15
|
||||||
|
}
|
||||||
|
.onDisappear {
|
||||||
|
UIDatePicker.appearance().minuteInterval = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Button(action: { self.isShowing = false }) {
|
||||||
|
Text("확인")
|
||||||
|
.font(.system(size: 16))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
.padding(.vertical, 10)
|
||||||
|
.frame(width: proxy.size.width)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.background(Color(hex: "222222"))
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
}
|
||||||
|
.frame(width: proxy.size.width)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct QuarterTimePickerView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
QuarterTimePickerView(
|
||||||
|
selectedTime: .constant(Date()),
|
||||||
|
isShowing: .constant(true)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||