|
@@ -144,29 +144,28 @@ class TSDiscoverViewModel {
|
|
return images
|
|
return images
|
|
}()
|
|
}()
|
|
|
|
|
|
- //顶部按钮功能
|
|
|
|
- lazy var topFuncSection:TSDiscoverSectionModel = {
|
|
|
|
- let section = TSDiscoverSectionModel()
|
|
|
|
- section.style = .funcItems
|
|
|
|
- section.items = [[
|
|
|
|
-// TSDiscoverItemModel(style: .futureBaby,
|
|
|
|
-// viewModel: TSDiscoverBaseItemVM(title: "AI Baby", imageNamed: "discover_AIBaby"),
|
|
|
|
-// generateModel: TSFuncStyle.futureBaby.generateModel),
|
|
|
|
- TSDiscoverItemModel(style: .ttp,
|
|
|
|
- viewModel: TSDiscoverBaseItemVM(title: "Text to Image", imageNamed: "discover_TextImage")),
|
|
|
|
- TSDiscoverItemModel(style: .chat,
|
|
|
|
- viewModel: TSDiscoverBaseItemVM(title: "AI Assistant", imageNamed: "discover_AIAssistant")),
|
|
|
|
- TSDiscoverItemModel(style: .photoQuality,
|
|
|
|
- viewModel: TSDiscoverBaseItemVM(title: "Enhance Photo", imageNamed: "discover_HD"),
|
|
|
|
- generateModel: TSFuncStyle.oldPhoto.generateModel),
|
|
|
|
- TSDiscoverItemModel(style: .photoLive,
|
|
|
|
- viewModel: TSDiscoverBaseItemVM(title: "Old Photo Animation", imageNamed: "discover_PredictOld"),
|
|
|
|
- generateModel: TSFuncStyle.photoLive.generateModel),
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- ]]
|
|
|
|
- return section
|
|
|
|
- }()
|
|
|
|
|
|
+// //顶部按钮功能(金刚区)
|
|
|
|
+// lazy var topFuncSection:TSDiscoverSectionModel = {
|
|
|
|
+// let section = TSDiscoverSectionModel()
|
|
|
|
+// section.style = .funcItems
|
|
|
|
+// section.items = [[
|
|
|
|
+//// TSDiscoverItemModel(style: .futureBaby,
|
|
|
|
+//// viewModel: TSDiscoverBaseItemVM(title: "AI Baby", imageNamed: "discover_AIBaby"),
|
|
|
|
+//// generateModel: TSFuncStyle.futureBaby.generateModel),
|
|
|
|
+// TSDiscoverItemModel(style: .ttp,
|
|
|
|
+// viewModel: TSDiscoverBaseItemVM(title: "Text to Image", imageNamed: "discover_TextImage")),
|
|
|
|
+// TSDiscoverItemModel(style: .chat,
|
|
|
|
+// viewModel: TSDiscoverBaseItemVM(title: "AI Assistant", imageNamed: "discover_AIAssistant")),
|
|
|
|
+// TSDiscoverItemModel(style: .photoQuality,
|
|
|
|
+// viewModel: TSDiscoverBaseItemVM(title: "Enhance Photo", imageNamed: "discover_HD"),
|
|
|
|
+// generateModel: TSFuncStyle.oldPhoto.generateModel),
|
|
|
|
+// TSDiscoverItemModel(style: .photoLive,
|
|
|
|
+// viewModel: TSDiscoverBaseItemVM(title: "Old Photo Animation", imageNamed: "discover_PredictOld"),
|
|
|
|
+// generateModel: TSFuncStyle.photoLive.generateModel),
|
|
|
|
+// ]]
|
|
|
|
+// return section
|
|
|
|
+// }()
|
|
|
|
+
|
|
|
|
|
|
lazy var popularStylesSection: TSDiscoverSectionModel = {
|
|
lazy var popularStylesSection: TSDiscoverSectionModel = {
|
|
let section = TSDiscoverSectionModel()
|
|
let section = TSDiscoverSectionModel()
|
|
@@ -366,6 +365,24 @@ class TSDiscoverViewModel {
|
|
}()
|
|
}()
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ lazy var ttpCardSection: TSDiscoverSectionModel = {
|
|
|
|
+ let section = TSDiscoverSectionModel()
|
|
|
|
+ section.style = .fullCard
|
|
|
|
+ section.items = [
|
|
|
|
+ TSDiscoverItemModel(style: .ttp,
|
|
|
|
+ viewModel: TSDiscoverBaseItemVM(
|
|
|
|
+ title: "AI ➡️ Photo".localized,
|
|
|
|
+ imageNamed: "discover_ttp",
|
|
|
|
+ info: "Turn words into visually stunning artwork".localized
|
|
|
|
+ ),
|
|
|
|
+ generateModel: nil),
|
|
|
|
+ ]
|
|
|
|
+
|
|
|
|
+ return section
|
|
|
|
+ }()
|
|
|
|
+
|
|
|
|
+
|
|
lazy var trendingSection: TSDiscoverSectionModel = {
|
|
lazy var trendingSection: TSDiscoverSectionModel = {
|
|
let section = TSDiscoverSectionModel()
|
|
let section = TSDiscoverSectionModel()
|
|
section.style = .styleMore
|
|
section.style = .styleMore
|
|
@@ -433,7 +450,21 @@ class TSDiscoverViewModel {
|
|
return section
|
|
return section
|
|
}()
|
|
}()
|
|
|
|
|
|
-
|
|
|
|
|
|
+ lazy var chatCardSection: TSDiscoverSectionModel = {
|
|
|
|
+ let section = TSDiscoverSectionModel()
|
|
|
|
+ section.style = .fullCard
|
|
|
|
+ section.items = [
|
|
|
|
+ TSDiscoverItemModel(style: .chat,
|
|
|
|
+ viewModel: TSDiscoverBaseItemVM(
|
|
|
|
+ title: "AI Assistant".localized,
|
|
|
|
+ imageNamed: "aiList_aiChat",
|
|
|
|
+ info: "Get smart and instant answers".localized
|
|
|
|
+ ),
|
|
|
|
+ generateModel: nil),
|
|
|
|
+ ]
|
|
|
|
+
|
|
|
|
+ return section
|
|
|
|
+ }()
|
|
|
|
|
|
lazy var artFilterSection: TSDiscoverSectionModel = {
|
|
lazy var artFilterSection: TSDiscoverSectionModel = {
|
|
let section = TSDiscoverSectionModel()
|
|
let section = TSDiscoverSectionModel()
|
|
@@ -524,18 +555,19 @@ class TSDiscoverViewModel {
|
|
|
|
|
|
lazy var discoverDatas: [TSDiscoverSectionModel] = {
|
|
lazy var discoverDatas: [TSDiscoverSectionModel] = {
|
|
return [
|
|
return [
|
|
- topFuncSection,
|
|
|
|
popularStylesSection,
|
|
popularStylesSection,
|
|
- petToHumanSection,
|
|
|
|
|
|
+ processPhotoSection,
|
|
figuresToysSection,
|
|
figuresToysSection,
|
|
babyCardSection,
|
|
babyCardSection,
|
|
- coolPersonalitySection,
|
|
|
|
animeCartoonSection,
|
|
animeCartoonSection,
|
|
|
|
+ coolPersonalitySection,
|
|
|
|
+ ttpCardSection,
|
|
trendingSection,
|
|
trendingSection,
|
|
- processPhotoSection,
|
|
|
|
artFilterSection,
|
|
artFilterSection,
|
|
bePrettySection,
|
|
bePrettySection,
|
|
oldAgeCardSection,
|
|
oldAgeCardSection,
|
|
|
|
+ petToHumanSection,
|
|
|
|
+ chatCardSection,
|
|
]
|
|
]
|
|
}()
|
|
}()
|
|
|
|
|