|
@@ -14,200 +14,175 @@ class TSAIListDataVM {
|
|
|
|
|
|
static let shared:TSAIListDataVM = TSAIListDataVM()
|
|
|
|
|
|
- lazy var videoSection: TSDiscoverSectionModel = {
|
|
|
- let section = TSDiscoverSectionModel()
|
|
|
- section.style = .styleMore
|
|
|
- section.sectionEdge = UIEdgeInsets(top: 16, left: kDiscoverSection.left, bottom: 24, right: kDiscoverSection.right)
|
|
|
- section.items = [[
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_SayHi"]),
|
|
|
- generateModel: TSGenerateModel(json: video_SayHi)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_Smile"]),
|
|
|
- generateModel: TSGenerateModel(json: video_Smile)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_Hug"]),
|
|
|
- generateModel: TSGenerateModel(json: video_Hug)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_HeartGesture"]),
|
|
|
- generateModel: TSGenerateModel(json: video_HeartGesture)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_ForeheadKiss"]),
|
|
|
- generateModel: TSGenerateModel(json: video_ForeheadKiss)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_Kiss"]),
|
|
|
- generateModel: TSGenerateModel(json: video_Kiss)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_BlowKiss"]),
|
|
|
- generateModel: TSGenerateModel(json: video_BlowKiss)),
|
|
|
- TSDiscoverItemModel(style: .creatVideo,
|
|
|
- viewModel: TSDiscoverAnimationItemVM(title: "",style: .gif, imageNameds: ["aiList_Stroll"]),
|
|
|
- generateModel: TSGenerateModel(json: video_Stroll)),
|
|
|
- ]]
|
|
|
- return section
|
|
|
- }()
|
|
|
|
|
|
- lazy var portraitSection: TSDiscoverSectionModel = {
|
|
|
+ lazy var bannerSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
+ section.style = .banner
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: 0, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
TSDiscoverItemModel(style: .portraitFusion,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Portrait Fusion".localized,
|
|
|
- imageNamed: "aiList_PortraitFusion",
|
|
|
- info: "Merge two portraits into one unique image seamlessly".localized
|
|
|
- ),
|
|
|
+ viewModel: TSDiscoverBaseItemVM(imageNamed: "alistHome_0_PortraitFusion"),
|
|
|
generateModel: TSGenerateModel(json: ptp_PortraitFusion)),
|
|
|
- ]
|
|
|
-
|
|
|
- return section
|
|
|
- }()
|
|
|
-
|
|
|
- lazy var colorizeSection: TSDiscoverSectionModel = {
|
|
|
- let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
- TSDiscoverItemModel(style: .colorize,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Colorize".localized,
|
|
|
- imageNamed: "aiList_Colorize",
|
|
|
- info: "Add colors to black-and-white photos".localized
|
|
|
- ),
|
|
|
- generateModel: TSGenerateModel(json: ptp_Colorize)),
|
|
|
- ]
|
|
|
-
|
|
|
+ TSDiscoverItemModel(style: .enhance,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_PhotoEnhance","alistHome_1_PhotoEnhance"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_PhotoEnhance))
|
|
|
+ ]]
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
-
|
|
|
- lazy var Descratchection: TSDiscoverSectionModel = {
|
|
|
+ lazy var restoreOldPhotoSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
+ section.setTitle(title: "Restore Old Photo")
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: 0, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
+ TSDiscoverItemModel(style: .recreate,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_Recreate","alistHome_1_Recreate"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_PortraitFusion)),
|
|
|
+
|
|
|
TSDiscoverItemModel(style: .descratch,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Descratch".localized,
|
|
|
- imageNamed: "aiList_Descratch",
|
|
|
- info: "Remove scratches and dirt".localized
|
|
|
- ),
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_Descratch","alistHome_1_Descratch"]),
|
|
|
generateModel: TSGenerateModel(json: ptp_Descratch)),
|
|
|
- ]
|
|
|
+
|
|
|
+ TSDiscoverItemModel(style: .colorize,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_Colorize","alistHome_1_Colorize"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_Colorize)),
|
|
|
+
|
|
|
+ TSDiscoverItemModel(style: .enhance,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_Enhance","alistHome_1_Enhance"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_PhotoEnhance)),
|
|
|
+
|
|
|
+ TSDiscoverItemModel(style: .enlighten,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(title: "",style: .comparison, imageNameds: ["alistHome_0_AdjustLight","alistHome_1_AdjustLight"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_Enlighten)),
|
|
|
+ ]]
|
|
|
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
-// lazy var creatVideoSection: TSDiscoverSectionModel = {
|
|
|
-// let section = TSDiscoverSectionModel()
|
|
|
-// section.style = .fullCard
|
|
|
-// section.items = [
|
|
|
-// TSDiscoverItemModel(style: .creatVideo,
|
|
|
-// viewModel: TSDiscoverAnimationItemVM(
|
|
|
-// title: "Animated Photo".localized,
|
|
|
-// info: "Turn photos into live moments".localized,
|
|
|
-// style: .gif,
|
|
|
-// imageNameds: ["aiList_Animated","animated_example.gif"]
|
|
|
-// ),
|
|
|
-// generateModel: TSGenerateModel(json: video_Creat)),
|
|
|
-// ]
|
|
|
-//
|
|
|
-// return section
|
|
|
-// }()
|
|
|
-
|
|
|
- lazy var enhanceSection: TSDiscoverSectionModel = {
|
|
|
+
|
|
|
+ lazy var oldPhotoAnimationSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
- TSDiscoverItemModel(style: .enhance,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Enhance".localized,
|
|
|
- imageNamed: "aiList_Enhance",
|
|
|
- info: "Remove blur, sharpen, add details".localized
|
|
|
- ),
|
|
|
- generateModel: TSGenerateModel(json: ptp_PhotoEnhance)),
|
|
|
- ]
|
|
|
-
|
|
|
+ section.setTitle(title: "Old Photo Animation")
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: 0, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Revive)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_SayHi)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_HeartGesture)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_BlowKiss)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_JazzDance)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Applaud)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Cheers)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Salute)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Stroll)),
|
|
|
+ ]]
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
- lazy var RecreateSection: TSDiscoverSectionModel = {
|
|
|
+ lazy var loveScenesSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
- TSDiscoverItemModel(style: .recreate,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Recreate".localized,
|
|
|
- imageNamed: "aiList_Recreate",
|
|
|
- info: "Remove scratches and add realistic color instantly".localized
|
|
|
- ),
|
|
|
- generateModel: TSGenerateModel(json: ptp_Recreate)),
|
|
|
- ]
|
|
|
-
|
|
|
+ section.setTitle(title: "Love Scenes")
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: 0, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_SendRose)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Hug)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_ForeheadKiss)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_SurpriseKiss)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_KissintheRain)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Kiss)),
|
|
|
+ ]]
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
|
|
|
- lazy var enlightenSection: TSDiscoverSectionModel = {
|
|
|
+ lazy var emotionSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
- TSDiscoverItemModel(style: .enlighten,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Adjust Light".localized,
|
|
|
- imageNamed: "aiList_Enlighten",
|
|
|
- info: "Easily fix lighting issues on photos".localized
|
|
|
- ),
|
|
|
- generateModel: TSGenerateModel(json: ptp_Enlighten)),
|
|
|
- ]
|
|
|
-
|
|
|
+ section.setTitle(title: "Emotion")
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: 0, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Smile)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Laugh)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_SpookyGhostface)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Shock)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Pray)),
|
|
|
+ TSDiscoverItemModel(style: .creatVideo,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .gif),
|
|
|
+ generateModel: TSGenerateModel(json: video_Angry)),
|
|
|
+ ]]
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
- lazy var removeSection: TSDiscoverSectionModel = {
|
|
|
+
|
|
|
+ lazy var editPhotoSection: TSDiscoverSectionModel = {
|
|
|
let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
+ section.setTitle(title: "Edit Photo")
|
|
|
+ section.sectionEdge = UIEdgeInsets(top: 0, left: kDiscoverSection.left, bottom: k_TabBar_Height+10, right: kDiscoverSection.right)
|
|
|
+ section.items = [[
|
|
|
TSDiscoverItemModel(style: .remove,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Remove Objects".localized,
|
|
|
- imageNamed: "aiList_Remove".localized,
|
|
|
- info: "Select the unwanted area and remove them easily".localized
|
|
|
- ),
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .crossDissolve, imageNameds: ["alistHome_0_RemoveObjects","alistHome_1_RemoveObjects"]),
|
|
|
generateModel: TSGenerateModel(json: ptp_Remove)),
|
|
|
- ]
|
|
|
-
|
|
|
- return section
|
|
|
- }()
|
|
|
-
|
|
|
- lazy var removeBgSection: TSDiscoverSectionModel = {
|
|
|
- let section = TSDiscoverSectionModel()
|
|
|
- section.style = .fullCard
|
|
|
- section.items = [
|
|
|
TSDiscoverItemModel(style: .removeBg,
|
|
|
- viewModel: TSDiscoverBaseItemVM(
|
|
|
- title: "Remove Background".localized,
|
|
|
- imageNamed: "aiList_RemoveBg".localized,
|
|
|
- info: "Erase image backgrounds with one tap".localized
|
|
|
- ),
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .crossDissolve, imageNameds: ["alistHome_0_RemoveBackground","alistHome_1_RemoveBackground"]),
|
|
|
generateModel: TSGenerateModel(json: ptp_RemoveBg)),
|
|
|
- ]
|
|
|
-
|
|
|
+ TSDiscoverItemModel(style: .removeWatermark,
|
|
|
+ viewModel: TSDiscoverAnimationItemVM(style: .crossDissolve, imageNameds: ["alistHome_0_RemoveWatermark","alistHome_1_RemoveWatermark"]),
|
|
|
+ generateModel: TSGenerateModel(json: ptp_RemoveWatermark)),
|
|
|
+// TSDiscoverItemModel(style: .expandPhoto,
|
|
|
+// viewModel: TSDiscoverAnimationItemVM(style: .comparison, imageNameds: ["alistHome_0_ExpandPhoto","alistHome_1_ExpandPhoto"]),
|
|
|
+// generateModel: TSGenerateModel(json: ptp_AIExpandPhoto)),
|
|
|
+ ]]
|
|
|
return section
|
|
|
}()
|
|
|
|
|
|
+
|
|
|
lazy var listDatas: [TSDiscoverSectionModel] = {
|
|
|
return [
|
|
|
- videoSection,
|
|
|
- portraitSection,
|
|
|
- RecreateSection,
|
|
|
- Descratchection,
|
|
|
- colorizeSection,
|
|
|
- enhanceSection,
|
|
|
- enlightenSection,
|
|
|
- removeSection,
|
|
|
- removeBgSection
|
|
|
+ bannerSection,
|
|
|
+ restoreOldPhotoSection,
|
|
|
+ oldPhotoAnimationSection,
|
|
|
+ loveScenesSection,
|
|
|
+ emotionSection,
|
|
|
+ editPhotoSection,
|
|
|
]
|
|
|
}()
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|