100Years il y a 5 jours
Parent
commit
ed2bda3f92
53 fichiers modifiés avec 476 ajouts et 210 suppressions
  1. 2 2
      AIEmoji.xcodeproj/project.pbxproj
  2. 5 5
      AIEmoji/AppDelegate.swift
  3. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/Contents.json
  4. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/ptp_style_ActionFigure@2x.png
  5. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/ptp_style_ActionFigure@3x.png
  6. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/Contents.json
  7. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/ptp_style_AnimeMax@2x.png
  8. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/ptp_style_AnimeMax@3x.png
  9. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/Contents.json
  10. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/ptp_style_CuteCat@2x.png
  11. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/ptp_style_CuteCat@3x.png
  12. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/Contents.json
  13. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/ptp_style_CuteDog@2x.png
  14. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/ptp_style_CuteDog@3x.png
  15. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/Contents.json
  16. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/ptp_style_Irasutoya@2x.png
  17. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/ptp_style_Irasutoya@3x.png
  18. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/Contents.json
  19. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/ptp_style_max@2x.png
  20. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/ptp_style_max@3x.png
  21. BIN
      AIEmoji/Assets.xcassets/boot/bootPage_0.imageset/bootPage_0@2x.png
  22. BIN
      AIEmoji/Assets.xcassets/boot/bootPage_0.imageset/bootPage_0@3x.png
  23. 10 8
      AIEmoji/Business/LaunchVC/TSBootPageVC.swift
  24. 1 1
      AIEmoji/Business/TSAILIstVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift
  25. 0 2
      AIEmoji/Business/TSAILIstVC/TSAIUploadPhotoBaseVC/TSAIUploadPhotoBaseVC.swift
  26. 7 7
      AIEmoji/Business/TSGenmojiVC/TSGenmojiVC/Model/TSGenmojiModel.swift
  27. 6 11
      AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoBrowseVC.swift
  28. 16 22
      AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/TSPTPGeneratorVC.swift
  29. 21 15
      AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/VM/TSPTPGeneratorVM.swift
  30. 61 84
      AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/TSPTPInputVC.swift
  31. 15 19
      AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/VM/TSPTPInputVM.swift
  32. 2 0
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/Cell/TSPTPSelectStyleCell.swift
  33. 1 1
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/Cell/TSPTPUploadCell.swift
  34. 12 4
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/M/TSPTPStyleModel.swift
  35. 2 2
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/TSPhotoToPhotoVC.swift
  36. 2 2
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/VM/TSPhotoToPhotoVM.swift
  37. 0 1
      AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/TSTTPInputVC.swift
  38. 0 5
      AIEmoji/Business/TSTextGeneralPictureVC/TSTextGeneralPictureVC/TSTextGeneralPictureVC.swift
  39. 30 4
      AIEmoji/Business/VIewTool/TSGeneratorloadingView.swift
  40. 1 1
      AIEmoji/Business/VIewTool/TSViewTool.swift
  41. 1 0
      AIEmoji/Common/GlobalImports/GlobalImports.swift
  42. 57 9
      AIEmoji/Res/photo_to_photo_style.json
  43. 8 4
      AIEmoji/de.lproj/Localizable.strings
  44. 9 0
      AIEmoji/en.lproj/Localizable.strings
  45. 9 0
      AIEmoji/es.lproj/Localizable.strings
  46. 9 0
      AIEmoji/ja.lproj/Localizable.strings
  47. 9 0
      AIEmoji/ko.lproj/Localizable.strings
  48. 9 0
      AIEmoji/pt-BR.lproj/Localizable.strings
  49. 9 0
      AIEmoji/pt-PT.lproj/Localizable.strings
  50. 9 0
      AIEmoji/zh-Hans.lproj/Localizable.strings
  51. 14 0
      AIEmoji/zh-Hant.lproj/Localizable.strings
  52. 2 0
      Podfile
  53. 5 1
      Podfile.lock

+ 2 - 2
AIEmoji.xcodeproj/project.pbxproj

@@ -2250,7 +2250,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2289,7 +2289,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;

+ 5 - 5
AIEmoji/AppDelegate.swift

@@ -45,14 +45,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func JudgmentSkipPage() {
         if AppDelegate.isFirstInstallApp() {
-//            let bootPageVC  = TSBootPageVC { [weak self]  in
-//                guard let self = self else { return }
+            let bootPageVC  = TSBootPageVC { [weak self]  in
+                guard let self = self else { return }
                 UserDefaults.standard.set("1", forKey: "isFirstInstallApp")
                 UserDefaults.standard.synchronize()
                 goToTab()
-//            }
-//            let navi = TSBaseNavigationC(rootViewController: bootPageVC)
-//            window?.rootViewController = navi
+            }
+            let navi = TSBaseNavigationC(rootViewController: bootPageVC)
+            window?.rootViewController = navi
         }else{
             goToTab()
         }

+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/ptp_style_ActionFigure@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_ActionFigure.imageset/ptp_style_ActionFigure@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/ptp_style_AnimeMax@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_AnimeMax.imageset/ptp_style_AnimeMax@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/ptp_style_CuteCat@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteCat.imageset/ptp_style_CuteCat@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/ptp_style_CuteDog@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_CuteDog.imageset/ptp_style_CuteDog@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/ptp_style_Irasutoya@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Irasutoya.imageset/ptp_style_Irasutoya@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/ptp_style_max@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_max.imageset/ptp_style_max@3x.png


BIN
AIEmoji/Assets.xcassets/boot/bootPage_0.imageset/bootPage_0@2x.png


BIN
AIEmoji/Assets.xcassets/boot/bootPage_0.imageset/bootPage_0@3x.png


+ 10 - 8
AIEmoji/Business/LaunchVC/TSBootPageVC.swift

@@ -18,9 +18,11 @@ class TSBootPageVC: TSBaseVC {
         fatalError("init(coder:) has not been implemented")
     }
     var index:Int = 0
-    let titleStrings = ["Change image styles".localized,"AI image generation".localized,"Ask Ai anything".localized]
-    let imageStrings = ["bootPage_0","bootPage_1","bootPage_2"]
-//    let imageStrings = ["bootPage_0","bootPage_1",TSConfig.isLanguageZh ? "bootPage_2-zh-Hans" : "bootPage_2"]
+//    let titleStrings = ["Change image styles".localized,"AI image generation".localized,"Ask Ai anything".localized]
+//    let imageStrings = ["bootPage_0","bootPage_1","bootPage_2"]
+    
+    let titleStrings = ["Change image styles".localized,"AI image generation".localized]
+    let imageStrings = ["bootPage_0","bootPage_1"]
     
     lazy var titleLabel: UILabel = {
         let titleLabel = UILabel.createLabel(text: titleStrings.safeString(At: index),font: .font(size: 20,weight: .semibold),textColor: .themeColor,textAlignment:.center,numberOfLines: 0)
@@ -118,15 +120,15 @@ class TSBootPageVC: TSBaseVC {
         
         boatAnimateScrollView.startAnimation()
     }
-    
+    var pageIndex = 1
     func clickContinue(){
         index+=1
         dePrint("clickContinue index=\(index)")
         titleLabel.text = titleStrings.safeString(At: index)
         
-        deepseek.isHidden = !(index == 2)//第二页
+        deepseek.isHidden = !(index == pageIndex)//第二页
         
-        if index <= 2{
+        if index <= pageIndex{
             scrollView.contentOffset = CGPointMake(k_ScreenWidth*CGFloat(index), 0)
         }else{
             let vc = TSPurchaseVC()
@@ -142,8 +144,8 @@ class TSBootPageVC: TSBaseVC {
     
     func indexAdd(){
         index+=1
-        if index > 2 {
-            index = 2
+        if index > pageIndex {
+            index = pageIndex
         }
     }
 }

+ 1 - 1
AIEmoji/Business/TSAILIstVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift

@@ -59,7 +59,7 @@ class TSAIListHintBaseVC: TSBaseVC {
                           goodImageNamed: "ptp_hair_goodImage",
                           badImageNamed: "ptp_hair_badImage",
                           titleText: "Upload your photos".localized,
-                          titleSubText: String(format:"(Size ≤ %dMB)".localized , 5),
+                          titleSubText: "",
                           goodText: "Good photo examples".localized,
                           goodInfoText: "Obvious hairstyle, Fully clear and visible face".localized,
                           badText: "Bad photo examples".localized,

+ 0 - 2
AIEmoji/Business/TSAILIstVC/TSAIUploadPhotoBaseVC/TSAIUploadPhotoBaseVC.swift

@@ -197,8 +197,6 @@ extension TSAIUploadPhotoBaseVC {
         
         
         //文字信息区域
-        cusStackView.addSubviewToStack(getTextInfoCell(text: String(format: "Size ≤ %dMB".localized, imageMaxBitSize/1024/1024)))
-        cusStackView.addSpacing(height: lineSpacing)
         cusStackView.addSubviewToStack(getTextInfoCell(text: "Single photo with face fully visible".localized))
         cusStackView.addSpacing(height: lineSpacing)
         cusStackView.addSubviewToStack(getTextInfoCell(text: "No group photos, covered faces, nudes".localized))

+ 7 - 7
AIEmoji/Business/TSGenmojiVC/TSGenmojiVC/Model/TSGenmojiModel.swift

@@ -27,8 +27,8 @@ class TSActionInfoModel: TSBaseModel {
     var id:Int = 0
     var actionType:String = ""
     var comments:String = ""
-    var request:TSGenmojiRequestModel = TSGenmojiRequestModel()
-    var response:TSGenmojiResponseModel = TSGenmojiResponseModel()
+    var request:TSActionRequestModel = TSActionRequestModel()
+    var response:TSActionResponseModel = TSActionResponseModel()
     var createdTimestamp:Int = 0
     var status:String = ""
     var costTime:Int = 0
@@ -41,8 +41,8 @@ class TSActionInfoModel: TSBaseModel {
         id           <- map["id"]
         actionType   <- map["actionType"]
         comments     <- map["comments"]
-        request      <- (map["request"],JsonStringTransform<TSGenmojiRequestModel>())
-        response           <- (map["response"],JsonStringTransform<TSGenmojiResponseModel>())
+        request      <- (map["request"],JsonStringTransform<TSActionRequestModel>())
+        response           <- (map["response"],JsonStringTransform<TSActionResponseModel>())
         createdTimestamp   <- map["createdTimestamp"]
         status     <- map["status"]
         costTime      <- map["costTime"]
@@ -52,9 +52,9 @@ class TSActionInfoModel: TSBaseModel {
     }
 }
 
-class TSGenmojiRequestModel : TSBaseModel {
+class TSActionRequestModel : TSBaseModel {
     var prompt:String = ""
-    var promptSort:String = ""
+    var promptSort:String = ""  //用户自己输入的内容
     var width:Int = 0
     var height:Int = 0
     override func mapping(map: ObjectMapper.Map) {
@@ -65,7 +65,7 @@ class TSGenmojiRequestModel : TSBaseModel {
     }
 }
 
-class TSGenmojiResponseModel : TSBaseModel {
+class TSActionResponseModel : TSBaseModel {
     var resultUrl:String = ""
     var vip:Bool = false
     override func mapping(map: ObjectMapper.Map) {

+ 6 - 11
AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoBrowseVC.swift

@@ -154,23 +154,18 @@ class TSAIPhotoBrowseVC: TSBaseVC {
 extension TSAIPhotoBrowseVC {
     // 手势处理方法
     @objc func handleDismissPan(_ gesture: UIPanGestureRecognizer) {
-        let translation = gesture.translation(in: gesture.view?.superview)
-        let velocity = gesture.velocity(in: gesture.view?.superview)
+        let translation = gesture.translation(in: view)
+        let progress = translation.y / view.bounds.height
         
         switch gesture.state {
         case .changed:
-            // 跟随手指移动
-            if translation.y > 0 {
-                gesture.view?.transform = CGAffineTransform(translationX: 0, y: translation.y)
-            }
+            view.transform = CGAffineTransform(translationX: 0, y: max(0, translation.y))
         case .ended:
-            // 判断是否应该关闭
-            if translation.y > 200 || velocity.y > 1000 {
-                dismiss(animated: true, completion: nil)
+            if progress > 0.5 || gesture.velocity(in: view).y > 1000 {
+                dismiss(animated: true)
             } else {
-                // 恢复原状
                 UIView.animate(withDuration: 0.3) {
-                    gesture.view?.transform = .identity
+                    self.view.transform = .identity
                 }
             }
         default:

+ 16 - 22
AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/TSPTPGeneratorVC.swift

@@ -11,34 +11,32 @@ class TSPTPGeneratorVC: TSAIPhotoGeneratorBaseVC {
     var complete:((TSActionInfoModel)->Void)
     var reloadViewBlock:(()->Void)?
     
-    var prompt:String
-    var promptSort:String
-    var imageUrl:String
-    var upLoadImage:UIImage
-    var style:String
     var progressState = TSProgressState.none
-    init(prompt:String,promptSort:String,imageUrl:String,upLoadImage:UIImage,style:String,complete:@escaping ((TSActionInfoModel)->Void)) {
-        self.prompt = prompt
-        self.promptSort = promptSort
-        self.imageUrl = imageUrl
-        self.upLoadImage = upLoadImage
-        self.style = style
+
+    var generateStyleModel:TSGenerateStyleModel
+    init(generateStyleModel:TSGenerateStyleModel,complete:@escaping ((TSActionInfoModel)->Void)) {
+        self.generateStyleModel = generateStyleModel
+        viewModel = TSPTPGeneratorVM(generateStyleModel: generateStyleModel)
         self.complete = complete
         super.init()
     }
     
-    lazy var viewModel: TSPTPGeneratorVM = {
-        let viewModel:TSPTPGeneratorVM = TSPTPGeneratorVM(prompt: prompt,upLoadImage:upLoadImage,style: style)
-        return viewModel
-    }()
-
+ 
     @MainActor required init?(coder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
     
+    var viewModel: TSPTPGeneratorVM!
 
     lazy var generateInView : TSGeneratorloadingView = {
         let generateInView = TSGeneratorloadingView()
+        if generateStyleModel.advance {
+            generateInView.timeLabel.text = String(format: "~ %d min".localized, 2)
+            generateInView.infoLabel.text = "It is definitely worth your wait. Just watch it".localized
+        }else{
+            generateInView.timeLabel.text = String(format: "~ %d seconds".localized, 20)
+            generateInView.infoLabel.text = ""
+        }
         return generateInView
     }()
     
@@ -222,15 +220,11 @@ extension TSPTPGeneratorVC {
         netWorkImageView.isHidden = false
         rotatingPictureBtn.isHidden = false
         
-        self.netWorkImageView.setAsyncImage(urlString: model.response.resultUrl,placeholder:kPlaceholderImage,backgroundColor:netWorkImageView.backgroundColor!){ [weak self] image in
-            guard let self = self else { return }
-            
-            netWorkImageView.adaptiveScale()
-        }
+        self.netWorkImageView.setAsyncImage(urlString: model.response.resultUrl,placeholder:kPlaceholderImage,backgroundColor:netWorkImageView.backgroundColor!)
         
         kPurchaseDefault.useOnceForFree(type: .picToPic)
         if let model = imageModel {
-            model.request.promptSort = promptSort
+            model.request.promptSort = viewModel.generateStyleModel.inputText
             complete(model)
         }
     }

+ 21 - 15
AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/VM/TSPTPGeneratorVM.swift

@@ -41,15 +41,10 @@ class TSPTPGeneratorVM {
     
     @Published var stateDatauPblished:(TSProgressState,TSActionInfoModel?) = (TSProgressState.none,nil)
    
-    var prompt:String
-    var imageUrl:String?
-    var upLoadImage:UIImage
-    var style:String
+    var generateStyleModel:TSGenerateStyleModel
     var generatingProgress = 0
-    init(prompt:String,upLoadImage:UIImage,style:String) {
-        self.prompt = prompt
-        self.upLoadImage = upLoadImage
-        self.style = style
+    init(generateStyleModel:TSGenerateStyleModel){
+        self.generateStyleModel = generateStyleModel
     }
     
 //    //模拟数据
@@ -83,16 +78,27 @@ class TSPTPGeneratorVM {
 //    }
     
     func creatImage() {
-        guard let imageUrl = imageUrl else { return }
+        guard let imageUrl = generateStyleModel.upLoadImageUrl else { return }
         generatingProgress = 0
         stopNetwork = false
         stateDatauPblished = (.start,nil)
         stateDatauPblished = (.progressString(generating(progress: 0.0)),nil)
+        
+        var prompt = generateStyleModel.prompt
+        if generateStyleModel.input,generateStyleModel.inputText.count>0{
+            if prompt.count > 0 {
+                prompt = prompt + ", " + generateStyleModel.inputText
+            }else {
+                prompt = generateStyleModel.inputText
+            }
+        }
+        
         creatRequest = TSNetworkShared.post(urlType: .imageRewrite,parameters:
                                                 ["prompt":prompt,
                                                  "imageUrl":imageUrl,
-                                                 "style":style,
-                                                 "device":getUserInfoJsonString()
+                                                 "style":generateStyleModel.style,
+                                                 "device":getUserInfoJsonString(),
+                                                 "advance": generateStyleModel.advance
                                                 ]) { [weak self] data,error in
             guard let self = self else { return }
             
@@ -161,8 +167,8 @@ class TSPTPGeneratorVM {
     
     
     func uploadAndCreatImage() {
-        
-        if let imageUrl = imageUrl,imageUrl.contains("http") {
+        guard let upLoadImage = generateStyleModel.upLoadImage else { return  }
+        if let imageUrl = generateStyleModel.upLoadImageUrl,imageUrl.contains("http") {
             creatImage()
             return
         }
@@ -179,11 +185,11 @@ class TSPTPGeneratorVM {
         } completion: { [weak self]  data, error in
             guard let self = self else { return }
             if let error = error {
-                imageUrl = nil
+                generateStyleModel.upLoadImageUrl = nil
                 self.stateDatauPblished = (.failed(error.localizedDescription),nil)
             }else{
                 if let string = data as? String {
-                    imageUrl = string
+                    generateStyleModel.upLoadImageUrl = string
                     creatImage()
                 }
             }

+ 61 - 84
AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/TSPTPInputVC.swift

@@ -7,6 +7,7 @@
 
 //import IQKeyboardManagerSwift
 import PhotosUI
+import MXParallaxHeader
 class TSPTPInputVC: TSBaseVC {
 
     lazy var viewModel: TSPTPInputVM = {
@@ -120,14 +121,14 @@ class TSPTPInputVC: TSBaseVC {
     //###################################### 输入框 ######################################
     lazy var customTextView: TSPlaceholderTextView = {
         let customTextView = TSPlaceholderTextView(
-            placeholder: "Please describe your photo".localized,
+            placeholder: "Describe how you want to transform".localized,
             text: "",
             font: .font(size: 14),
             textColor: .white,
             backgroundColor: .clear
         )
         customTextView.delegate = self
-        customTextView.returnKeyType = .send
+        customTextView.returnKeyType = .done
         return customTextView
     }()
     
@@ -139,6 +140,7 @@ class TSPTPInputVC: TSBaseVC {
         { [weak self]  in
             guard let self = self else { return }
             customTextView.text = ""
+            textViewDidChange(customTextView)
         }
         clearBtn.isHidden = true
         return clearBtn
@@ -168,9 +170,9 @@ class TSPTPInputVC: TSBaseVC {
         }
         
         clearBtn.snp.makeConstraints { make in
-            make.centerY.equalToSuperview()
             make.width.height.equalTo(16.0)
             make.trailing.equalTo(-12)
+            make.bottom.equalTo(-12.0)
         }
         
         return promptTextView
@@ -237,13 +239,11 @@ class TSPTPInputVC: TSBaseVC {
             make.edges.equalToSuperview()
         }
 
-
         contentView.addSubview(collectionComponent.collectionView)
         collectionComponent.collectionView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
         
-        
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(clickView))
         tapGesture.cancelsTouchesInView = false
         view.addGestureRecognizer(tapGesture)
@@ -260,10 +260,12 @@ class TSPTPInputVC: TSBaseVC {
         }
         
         setUpCusStackView()
-        
-        upDateCusStackViewH()
+
         kDelayMainShort {
-            self.upDateCusStackViewH()
+            self.collectionComponent.collectionView.parallaxHeader.view = self.cusStackView
+            self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
+            self.collectionComponent.collectionView.parallaxHeader.mode = .bottom
+            self.collectionComponent.collectionView.parallaxHeader.minimumHeight = 0
         }
     }
     
@@ -271,15 +273,16 @@ class TSPTPInputVC: TSBaseVC {
         NotificationCenter.default.addObserver(self, selector: #selector(vipInfoChanged), name: .kPurchaseDidChanged, object: nil)
         updateVipView()
         TSAIListHintBaseVC.userDefaultsKey = "isFirstUploadImagePTP"
-//        collectionViewObserverHandle()
+
 //        // 监听键盘事件
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
+        
+        //        collectionViewObserverHandle()
     }
 
 
 //    private var collectionViewObserver: CollectionViewObserver!
-//    
 //    func collectionViewObserverHandle(){
 //        collectionViewObserver = CollectionViewObserver(collectionView: collectionComponent.collectionView)
 //        
@@ -316,27 +319,7 @@ extension TSPTPInputVC {
         }
     }
     
-    func upDateCusStackViewH(scrollTop:Bool = true){
-        let cusH = cusStackViewH
-        self.collectionComponent.collectionView.contentInset = UIEdgeInsets(top: cusH, left: 0, bottom: collectionViewBtootm, right: 0)
 
-        cusStackView.snp.updateConstraints { make in
-            make.top.equalTo(-cusH)
-            make.height.equalTo(cusH)
-        }
-        
-        dePrint("self.collectionComponent.collectionView.contentOffset.y=\(self.collectionComponent.collectionView.contentOffset.y)")
-        
-//        if self.collectionComponent.collectionView.contentOffset.y <= -cusH{
-            self.collectionComponent.collectionView.contentOffset = CGPoint(x: 0, y: -cusH)
-//
-//        if scrollTop {
-//            self.collectionComponent.collectionView.contentOffset = CGPoint(x: 0, y: -cusH)
-//        }else {
-//            self.collectionComponent.collectionView.contentOffset = self.collectionComponent.collectionView.contentOffset
-//        }
-    }
-    
     func presentModalHintVC(){
         hintBaseVC = TSAIListHintBaseVC(config: .defaultConfig) { [weak self] image in
             guard let self = self else { return }
@@ -348,13 +331,8 @@ extension TSPTPInputVC {
     }
     
     func setUpCusStackView(){
-        collectionComponent.collectionView.addSubview(cusStackView)
-        cusStackView.snp.makeConstraints { make in
-            make.top.equalTo(-cusStackViewH)
-            make.leading.trailing.equalTo(0)
-            make.height.equalTo(cusStackViewH)
-        }
-        let uploadPhotoTitleView = TSTitleView.creatTitleView(title: "Upload Photo".localized, subTitle: "(Size ≤ 10MB)".localized)
+
+        let uploadPhotoTitleView = TSTitleView.creatTitleView(title: "Upload Photo".localized, subTitle: "")
         cusStackView.addSubviewToStack(uploadPhotoTitleView)
         uploadPhotoTitleView.snp.makeConstraints { make in
             make.height.equalTo(uploadPhotoTitleView.viewH)
@@ -391,12 +369,7 @@ extension TSPTPInputVC {
             make.height.equalTo(selectStyleView.viewH)
             make.width.equalTo(k_ScreenWidth)
         }
-        
-//        cusStackView.addSubviewToStack(promptTextView)
-//        promptTextView.snp.makeConstraints { make in
-//            make.height.equalTo(promptTextViewH)
-//            make.width.equalTo(k_ScreenWidth)
-//        }
+
     }
     
     override func viewDidLayoutSubviews() {
@@ -409,18 +382,23 @@ extension TSPTPInputVC {
 extension TSPTPInputVC: UITextViewDelegate{
     // 实现 UITextViewDelegate 协议方法,控制 return 键行为
     func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
-        
-        clearBtn.isHidden = textView.text.count <= 0
         if text == "\n" {
             // 当输入为换行符(即按下 return 键)时,执行相应操作
             //sendBolck?(textView.text)
+            clickView()
             return false
         }
         return true
     }
+    
+    func textViewDidChange(_ textView: UITextView){
+        clearBtn.isHidden = textView.text.count <= 0
+        viewModel.selectedPTPStyleModel.inputText = textView.text
+        viewModel.gennerateChange()
+    }
+   
 }
 
-
 extension TSPTPInputVC {
     
     @objc func vipInfoChanged() {
@@ -434,7 +412,7 @@ extension TSPTPInputVC {
             
             var showVip = kPurchaseDefault.generateVipShow(type: .picToPic)
             if showVip == false {
-                showVip = self.viewModel.selectedPTPStyleModel?.isVip ?? false
+                showVip = self.viewModel.selectedPTPStyleModel.isVip
             }
             
             kSetBtnVipIcon(btn: self.submitBtn, show: showVip)
@@ -446,30 +424,6 @@ extension TSPTPInputVC {
     }
  
 
-    func updateTextFiledView () {
-        if isNoneStyle {
-            if promptTextView.superview == nil {
-                cusStackView.addSubviewToStack(promptTextView)
-                promptTextView.snp.makeConstraints { make in
-                    make.height.equalTo(promptTextViewH)
-                    make.width.equalTo(k_ScreenWidth)
-                }
-            }
-        }else{
-            cusStackView.removeViewToStack(promptTextView)
-        }
-        
-        kDelayMainShort {
-            self.upDateCusStackViewH(scrollTop: false)
-        }
-    }
-    
-    var isNoneStyle:Bool{
-        if viewModel.selectedPTPStyleModel?.style == "No Style" {
-            return true
-        }
-        return false
-    }
 }
 extension TSPTPInputVC {
     
@@ -480,22 +434,13 @@ extension TSPTPInputVC {
     func generateImage() {
         
         var isVip = kPurchaseDefault.freeNumAvailable(type: .picToPic) == false
-        if viewModel.selectedPTPStyleModel?.isVip == true {
+        if viewModel.selectedPTPStyleModel.isVip == true {
             isVip = true
         }
+        if kJudgeVip(externalBool: isVip, vc: self) { return }  //判断 vip
         
-        //判断 vip
-        if kJudgeVip(externalBool: isVip, vc: self) { return }
-        
-
-        guard let selectedPTPStyleModel = viewModel.selectedPTPStyleModel else { return }
-        guard let upLoadImage = viewModel.upLoadImage else { return }
-        var prompt = viewModel.prompt
-        if isNoneStyle {
-            prompt = customTextView.text
-        }
-        
-        let gennerateVC = TSPTPGeneratorVC(prompt:prompt,promptSort: selectedPTPStyleModel.imageText , imageUrl: "",upLoadImage: upLoadImage,style: selectedPTPStyleModel.style) { [weak self] model in
+        viewModel.selectedPTPStyleModel.upLoadImage = viewModel.upLoadImage
+        let gennerateVC = TSPTPGeneratorVC(generateStyleModel: viewModel.selectedPTPStyleModel) { [weak self] model in
             guard let self = self else { return }
             if viewModel.saveModel(model:model) {
                 collectionComponent.clear()
@@ -541,3 +486,35 @@ extension TSPTPInputVC {
         self.collectionComponent.collectionView.contentOffset = CGPoint(x: 0, y: -cusStackViewH)
     }
 }
+extension TSPTPInputVC {
+    
+    func updateTextFiledView () {
+        if viewModel.selectedPTPStyleModel.input {
+            if promptTextView.superview == nil {
+                cusStackView.addSubviewToStack(promptTextView,length: promptTextViewH,animate: true)
+            }
+        }else{
+            cusStackView.removeViewToStack(promptTextView,animate: true)
+        }
+
+        kDelayMainShort {
+            self.updateViewCusStackViewH()
+        }
+    }
+    
+    func updateViewCusStackViewH() {
+        self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
+   
+        let newHeight = self.cusStackViewH
+        let headerView = self.collectionComponent.collectionView.parallaxHeader.view!
+        for constraint in headerView.constraints {
+            if constraint.firstAttribute == .height &&
+               constraint.firstItem as? UIView == headerView &&
+               constraint.secondItem == nil {
+                constraint.constant = newHeight
+                break
+            }
+        }
+    }
+
+}

+ 15 - 19
AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/VM/TSPTPInputVM.swift

@@ -10,31 +10,21 @@ import ObjectMapper
 class TSPTPInputVM {
     
     var colDataArray:[TSComponent] = [TSComponent]()
-    
     var uploadRequest:Request?
-
-    //上传图片模型,用于上传图片参数的传递
-    private var updateImageModel: TSGenerateStyleModel = {
-        var updateImageModel = TSGenerateStyleModel()
-        return updateImageModel
-    }()
-    
-    var upLoadImageUrl:String?
-    var upLoadImage:UIImage?{
+    var selectedPTPStyleModel:TSGenerateStyleModel = TSGenerateStyleModel(){
         didSet{
-            updateImageModel.image = upLoadImage
-            upLoadImageUrl = nil
-            isCanGennerateBlock?(isCanGennerate)
+            gennerateChange()
         }
     }
     
-    var selectedPTPStyleModel:TSGenerateStyleModel?{
+    var selectedStyleIndex:Int = 1
+    
+    var upLoadImage:UIImage?{
         didSet{
             isCanGennerateBlock?(isCanGennerate)
         }
     }
-    
-    var selectedStyleIndex:Int = 1
+
     
     //选择类型组
     lazy var ptpStyleModels: [TSGenerateStyleModel] = {
@@ -77,7 +67,10 @@ class TSPTPInputVM {
     
 
     var isCanGennerate:Bool {
-        if upLoadImage != nil , selectedPTPStyleModel != nil {
+        if upLoadImage != nil {
+            if selectedPTPStyleModel.input,selectedPTPStyleModel.inputText.count <= 0 {
+                return false
+            }
             return true
         }
         return false
@@ -122,6 +115,9 @@ class TSPTPInputVM {
         }
     }
     
+    func gennerateChange(){
+        isCanGennerateBlock?(isCanGennerate)
+    }
 }
  
 extension TSPTPInputVM {
@@ -163,8 +159,8 @@ extension TSPTPInputVM {
     var prompt:String{
         var prompt = ""
 
-        if let selectPromptModel = selectedPTPStyleModel,selectPromptModel.prompt.count > 0 {
-            prompt = "\(selectPromptModel.prompt)," + prompt
+        if selectedPTPStyleModel.prompt.count > 0 {
+            prompt = "\(selectedPTPStyleModel.prompt)," + prompt
         }
         return prompt
     }

+ 2 - 0
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/Cell/TSPTPSelectStyleCell.swift

@@ -138,6 +138,8 @@ class TSPTPSelectStyleCCell: TSBaseCollectionCell {
             return "ptp_style_hot"
         }else if specialStyle == 2 {
             return "ptp_style_new"
+        }else if specialStyle == 3 {
+            return "ptp_style_max"
         }
         return ""
     }

+ 1 - 1
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/Cell/TSPTPUploadCell.swift

@@ -148,7 +148,7 @@ class TSPTPUploadCell : TSBaseCollectionCell{
         super.renderView(with: object, component: component, attributes: attributes)
         if let itemModel = object as? TSGenmojiCoLItemModel{
             if let model = itemModel.ptpStyleModels.first {
-                upLoadImage = model.image
+                upLoadImage = model.upLoadImage
             }
         }
     }

+ 12 - 4
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/M/TSPTPStyleModel.swift

@@ -9,14 +9,17 @@
 import ObjectMapper
 
 class TSGenerateStyleModel: TSBaseModel {
-    var image:UIImage?//给上传图片用的,非模型使用
     var imageName:String = ""
     var imageText:String = ""
     var prompt:String = ""
     var isVip:Bool = false
-    var specialStyle:Int = 0 //0 普通类型,1 热门类型,2 新类型,3 点击更换图片 4.原图
+    var specialStyle:Int = 0 //0 普通类型,1 热门类型,2 新类型,3 max,
     var clickType:Int = 0 //0 无响应, 1空类型 2.换图
-    var style:String = ""
+    var style:String = ""   //风格类型
+    
+    var input:Bool = false   //是否输入框
+    var advance:Bool = false    //走新的通道
+    
     override func mapping(map: ObjectMapper.Map) {
         imageName               <- map["imageName"]
         imageText               <- map["imageText"]
@@ -25,9 +28,14 @@ class TSGenerateStyleModel: TSBaseModel {
         specialStyle            <- map["specialStyle"]
         clickType               <- map["clickType"]
         style                   <- map["style"]
+        input                   <- map["input"]
+        advance                 <- map["advance"]
     }
     
     var actionInfoModel:TSActionInfoModel? //对应生成的结果
-    var isSelected: Bool = false
+    var isSelected: Bool = false    //改风格,是否被选中
+    var inputText:String = ""   //用户自己补充的风格文字
+    var upLoadImage:UIImage?    //上传的图片
+    var upLoadImageUrl:String?    //上传的图片的 url
 }
 

+ 2 - 2
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/TSPhotoToPhotoVC.swift

@@ -4,7 +4,7 @@
 //
 //  Created by 100Years on 2025/2/25.
 //
-
+/*
 class TSPhotoToPhotoVC: TSBaseVC {
     lazy var viewModel:TSPhotoToPhotoVM = {
         let vm = TSPhotoToPhotoVM()
@@ -360,4 +360,4 @@ extension TSPhotoToPhotoVC {
 //        return "Generate (\(kPurchaseDefault.freeNum(type: .picToPic)))"
     }
 }
-
+*/

+ 2 - 2
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/VM/TSPhotoToPhotoVM.swift

@@ -23,7 +23,7 @@ class TSPhotoToPhotoVM {
     var upLoadImageUrl:String?
     var upLoadImage:UIImage?{
         didSet{
-            updateImageModel.image = upLoadImage
+            updateImageModel.upLoadImage = upLoadImage
             upLoadImageUrl = nil
             isCanGennerateBlock?(isCanGennerate)
         }
@@ -64,7 +64,7 @@ class TSPhotoToPhotoVM {
         let uploadSectionModel = TSGenmojiCoLSectionModel()
         uploadSectionModel.style = .ptpUpload
         uploadSectionModel.name = "Upload Photo".localized
-        uploadSectionModel.subText = "(Size ≤ 10MB)".localized
+        uploadSectionModel.subText = ""
         let itemModel = TSGenmojiCoLItemModel()
         itemModel.style = .ptpUpload
         itemModel.ptpStyleModels = [updateImageModel]

+ 0 - 1
AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/TSTTPInputVC.swift

@@ -17,7 +17,6 @@ class TSTTPInputVC: TSBaseVC {
     }
     
     var reloadUIBlock:(()->Void)?
-    var jumpPTPBlock:(()->Void)?
     lazy var viewModel: TSTTPInputVM = {
         let viewModel:TSTTPInputVM = TSTTPInputVM()
         viewModel.isCanGennerateBlock = { [weak self] enabled in

+ 0 - 5
AIEmoji/Business/TSTextGeneralPictureVC/TSTextGeneralPictureVC/TSTextGeneralPictureVC.swift

@@ -51,11 +51,6 @@ class TSTextGeneralPictureVC: TSBaseVC {
             viewModel.updateRecentData()
             updateListView()
         }
-        
-        generalRintoneVC.jumpPTPBlock = { [weak self]  in
-            guard let self = self else { return }
-            kPushVC(target: self, modelVC: TSPhotoToPhotoVC())
-        }
         return generalRintoneVC
     }()
     

+ 30 - 4
AIEmoji/Business/VIewTool/TSGeneratorloadingView.swift

@@ -32,11 +32,21 @@ class TSGeneratorloadingView: TSBaseView {
         return animatedImageView
     }()
     
+    lazy var timeLabel: UILabel = {
+        let textLabel = UILabel.createLabel(font: .font(size: 18,weight: .semibold),textColor: .white,textAlignment: .center)
+        return textLabel
+    }()
+    
     lazy var textLabel: UILabel = {
         let textLabel = UILabel.createLabel(font: .font(size: 18),textColor: .white,textAlignment: .center)
         return textLabel
     }()
     
+    lazy var infoLabel: UILabel = {
+        let textLabel = UILabel.createLabel(font: .font(size: 12),textColor: .white.withAlphaComponent(0.6),textAlignment: .center)
+        return textLabel
+    }()
+    
     private var targetView: UIView = UIView()
     
     lazy var blurEffect: UIVisualEffectView = {
@@ -69,26 +79,42 @@ class TSGeneratorloadingView: TSBaseView {
         imageView.snp.makeConstraints { make in
             make.width.height.equalTo(200.0)
             make.centerX.equalToSuperview()
-            make.top.equalTo(300.0)
+            make.top.equalTo(250.0)
         }
         
         contentView.addSubview(animatedImageView)
         animatedImageView.snp.makeConstraints { make in
             make.width.height.equalTo(200.0)
             make.centerX.equalToSuperview()
-            make.top.equalTo(300.0)
+            make.top.equalTo(250.0)
         }
   
+        contentView.addSubview(timeLabel)
+        timeLabel.snp.makeConstraints { make in
+            make.top.equalTo(imageView.snp.bottom).offset(-20)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+            make.height.equalTo(27)
+        }
+        
         contentView.addSubview(textLabel)
         textLabel.snp.makeConstraints { make in
-            make.top.equalTo(imageView.snp.bottom).offset(-20)
+            make.top.equalTo(timeLabel.snp.bottom).offset(17)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+            make.height.equalTo(27)
+        }
+        
+        contentView.addSubview(infoLabel)
+        infoLabel.snp.makeConstraints { make in
+            make.top.equalTo(textLabel.snp.bottom).offset(8)
             make.leading.equalTo(16)
             make.trailing.equalTo(-16)
         }
         
         contentView.addSubview(regenerateBtn)
         regenerateBtn.snp.makeConstraints { make in
-            make.top.equalTo(textLabel.snp.bottom).offset(20)
+            make.top.equalTo(infoLabel.snp.bottom).offset(20)
             make.centerX.equalToSuperview()
             make.height.equalTo(44)
             make.width.equalTo(126*kDesignScale)

+ 1 - 1
AIEmoji/Business/VIewTool/TSViewTool.swift

@@ -126,7 +126,7 @@ class TSSavePhotoSuccessTool {
         view.addSubview(viewButton)
         view.addSubview(textLabel)
         viewButton.snp.makeConstraints { make in
-//            make.width.equalTo(65)
+            make.width.equalTo(viewButton.intrinsicContentSize.width)
             make.height.equalTo(28)
             make.trailing.equalTo(-8)
             make.centerY.equalToSuperview()

+ 1 - 0
AIEmoji/Common/GlobalImports/GlobalImports.swift

@@ -139,6 +139,7 @@ func kPresentModalVC(target:UIViewController,
 func kPushVC(target:UIViewController,modelVC:UIViewController){
     modelVC.hidesBottomBarWhenPushed = true
     target.navigationController?.pushViewController(modelVC, animated: true)
+    target.navigationController?.pushViewController(modelVC, animated: true)
 }
 
 

+ 57 - 9
AIEmoji/Res/photo_to_photo_style.json

@@ -1,20 +1,60 @@
 [
     {
-        "imageName": "ptp_style_none",
-        "imageText": "None",
-        "prompt":"",
-        "specialStyle":0,
-        "specialStyle":0,
-        "style":"No Style",
-        "isVip": false
-    },{
+        "imageName": "ptp_style_AnimeMax",
+        "imageText": "Anime",
+        "prompt":"Turn uploaded photos into ghibli style",
+        "specialStyle":3,
+        "isVip": true,
+        "advance":true,
+    },
+    {
         "imageName": "ptp_style_10",
         "imageText": "Anime",
         "prompt":"Studio Ghibli-inspired anime aesthetic, Hayao Miyazaki style, vibrant yet soft color palette, detailed hand-painted textures, whimsical dreamlike atmosphere, soft cel-shading, watercolor wash effect, subtle grain texture, preserving original composition. Style strength: 85%",
         "specialStyle":1,
-        "specialStyle":1,
         "isVip": true
     },
+    {
+        "imageName": "ptp_style_ActionFigure",
+        "imageText": "Action Figure",
+        "prompt":"Action figure",
+        "input":true,
+        "specialStyle":0,
+        "isVip": true,
+        "advance":true
+    },
+    {
+        "imageName": "ptp_style_CuteDog",
+        "imageText": "Cute Dog",
+        "prompt":"Transform this photo into a Snoopy cartoon style, including Snoopy and Woodstock, with the same color and frame size as the original photo",
+        "specialStyle":0,
+        "isVip": true,
+        "advance":true
+    },
+    {
+        "imageName": "ptp_style_CuteCat",
+        "imageText": "Cute Cat",
+        "prompt":"Please turn this picture into Hello Kitty cartoon style and add Hello Kitty, don't change my face to hello kitty",
+        "specialStyle":0,
+        "isVip": true,
+        "advance":true
+    },
+    {
+        "imageName": "ptp_style_Irasutoya",
+        "imageText": "Irasutoya",
+        "prompt":"用 irasutoya 风格绘制上传的照片,保留关键内容和构图,色彩丰富明亮",
+        "specialStyle":0,
+        "isVip": true,
+        "advance":true
+    },
+    {
+        "imageName": "ptp_style_Sketch",
+        "imageText": "Sketch",
+        "prompt":"Turn uploaded photo into sketch style",
+        "specialStyle":0,
+        "isVip": true,
+        "advance":true
+    },
     {
         "imageName": "ptp_style_Claymation",
         "imageText": "Claymation",
@@ -99,5 +139,13 @@
         "prompt":"把图片变成 Chibi 风格",
         "specialStyle":0,
         "isVip": true
+    },
+    {
+        "imageName": "ptp_style_none",
+        "imageText": "No Style",
+        "prompt":"",
+        "specialStyle":0,
+        "input":true,
+        "isVip": false
     }
 ]

+ 8 - 4
AIEmoji/de.lproj/Localizable.strings

@@ -230,7 +230,11 @@
 "Restoring" = "Wiederherstellen";
 "Make photo live" = "Machen Sie Fotos live";
 
-"Open Eyes" = "睜開眼睛";
-"Restore" = "恢復";
-"Restoring" = "復原中";
-"Make photo live" = "讓照片生動起來";
+"~ %d min" = "~ %d min";
+"~ %d seconds" = "~ %d Sekunden";
+"Describe how you want to transform" = "Beschreiben Sie, wie Sie sich verändern möchten";
+"Action Figure" = "Actionfigur";
+"Cute Dog" = "Süßer Hund";
+"Cute Cat" = "Süße Katze";
+"Irasutoya" = "Irasutoya";
+"It is definitely worth your wait. Just watch it" = "Das Warten lohnt sich auf jeden Fall. Schau es dir einfach an";

+ 9 - 0
AIEmoji/en.lproj/Localizable.strings

@@ -226,3 +226,12 @@
 "Restore" = "Restore";
 "Restoring" = "Restoring";
 "Make photo live" = "Make photo live";
+
+"~ %d min" = "~ %d mins";
+"~ %d seconds" = "~ %d seconds";
+"Describe how you want to transform" = "Describe how you want to transform";
+"Action Figure" = "Action Figure";
+"Cute Dog" = "Cute Dog";
+"Cute Cat" = "Cute Cat";
+"Irasutoya" = "Irasutoya";
+"It is definitely worth your wait. Just watch it" = "It is definitely worth your wait. Just watch it";

+ 9 - 0
AIEmoji/es.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "Restaurar";
 "Restoring" = "Restaurando";
 "Make photo live" = "Hacer foto en vivo";
+
+"~ %d min" = "~ %d minutos";
+"~ %d seconds" = "~ %d segundos";
+"Describe how you want to transform" = "Describe cómo quieres transformarte";
+"Action Figure" = "Figura de acción";
+"Cute Dog" = "lindo perro";
+"Cute Cat" = "lindo gato";
+"Irasutoya" = "irasutoya";
+"It is definitely worth your wait. Just watch it" = "Definitivamente vale la pena esperar. Sólo míralo";

+ 9 - 0
AIEmoji/ja.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "復元する";
 "Restoring" = "復元中";
 "Make photo live" = "写真をライブにする";
+
+"~ %d min" = "~ %d 分";
+"~ %d seconds" = "~ %d 秒";
+"Describe how you want to transform" = "どのように変身したいかを説明してください";
+"Action Figure" = "アクションフィギュア";
+"Cute Dog" = "かわいい犬";
+"Cute Cat" = "かわいい猫";
+"Irasutoya" = "Irasutoya";
+"It is definitely worth your wait. Just watch it" = "待つ価値は間違いなくあります。ただ見てください";

+ 9 - 0
AIEmoji/ko.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "복원하다";
 "Restoring" = "복원 중";
 "Make photo live" = "사진을 라이브로 만들기";
+
+"~ %d min" = "~ %d 분";
+"~ %d seconds" = "~ %d 초";
+"Describe how you want to transform" = "어떻게 변화시키고 싶은지 설명하세요.";
+"Action Figure" = "액션 피규어";
+"Cute Dog" = "귀여운 강아지";
+"Cute Cat" = "귀여운 고양이";
+"Irasutoya" = "이라수토야";
+"It is definitely worth your wait. Just watch it" = "확실히 기다릴만한 가치가 있습니다. 그냥 봐";

+ 9 - 0
AIEmoji/pt-BR.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "Restaurar";
 "Restoring" = "Restaurando";
 "Make photo live" = "Transmitir foto ao vivo";
+
+"~ %d min" = "~ %d min";
+"~ %d seconds" = "~ %d segundos";
+"Describe how you want to transform" = "Descreva como você deseja transformar";
+"Action Figure" = "Figura de ação";
+"Cute Dog" = "Cachorro fofo";
+"Cute Cat" = "Gato fofo";
+"Irasutoya" = "Irasutoya";
+"It is definitely worth your wait. Just watch it" = "Definitivamente vale a pena esperar. Apenas observe";

+ 9 - 0
AIEmoji/pt-PT.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "Restaurar";
 "Restoring" = "Restaurando";
 "Make photo live" = "Transmitir foto ao vivo";
+
+"~ %d min" = "~ %d min";
+"~ %d seconds" = "~ %d segundos";
+"Describe how you want to transform" = "Descreva como você deseja transformar";
+"Action Figure" = "Figura de ação";
+"Cute Dog" = "Cachorro fofo";
+"Cute Cat" = "Gato fofo";
+"Irasutoya" = "Irasutoya";
+"It is definitely worth your wait. Just watch it" = "Definitivamente vale a pena esperar. Apenas observe";

+ 9 - 0
AIEmoji/zh-Hans.lproj/Localizable.strings

@@ -225,3 +225,12 @@
 "Restore" = "恢复";
 "Restoring" = "恢复中";
 "Make photo live" = "让照片生动起来";
+
+"~ %d min" = "~ %d 分钟";
+"~ %d seconds" = "~%d秒";
+"Describe how you want to transform" = "描述你想要如何转换";
+"Action Figure" = "可爱玩偶";
+"Cute Dog" = "卡通小狗";
+"Cute Cat" = "凯蒂猫";
+"Irasutoya" = "插画小人";
+"It is definitely worth your wait. Just watch it" = "绝对值得您的等待";

+ 14 - 0
AIEmoji/zh-Hant.lproj/Localizable.strings

@@ -212,3 +212,17 @@
 "Week" = "週";
 "Open eyes" = "睜開眼睛";
 "Photo must be smaller than %dMB." = "照片必須小於 %dMB";
+
+"Open Eyes" = "睜開眼睛";
+"Restore" = "恢復";
+"Restoring" = "復原中";
+"Make photo live" = "讓照片生動起來";
+
+"~ %d min" = "~ %d 分鐘";
+"~ %d seconds" = "~%d秒";
+"Describe how you want to transform" = "描述您想要如何轉型";
+"Action Figure" = "可動人偶";
+"Cute Dog" = "可愛的狗";
+"Cute Cat" = "可愛的貓咪";
+"Irasutoya" = "伊羅蘇托亞";
+"It is definitely worth your wait. Just watch it" = "絕對值得您的等待。就看吧";

+ 2 - 0
Podfile

@@ -22,6 +22,8 @@ target 'AIEmoji' do
   pod 'TSSmalCoacopods', :path => '../TSSmalCoacopods'
 #  pod 'SwiftyMarkdown'
 #  pod "MarkdownKit"
+pod "MXParallaxHeader"
+
 end
 
 

+ 5 - 1
Podfile.lock

@@ -45,6 +45,7 @@ PODS:
   - Kingfisher (7.10.0)
   - Masonry (1.1.0)
   - MJRefresh (3.7.9)
+  - MXParallaxHeader (1.1.0)
   - ObjectMapper (4.4.2)
   - Realm (10.54.2):
     - Realm/Headers (= 10.54.2)
@@ -71,6 +72,7 @@ DEPENDENCIES:
   - Kingfisher (= 7.10.0)
   - Masonry
   - MJRefresh
+  - MXParallaxHeader
   - ObjectMapper
   - RealmSwift (~> 10)
   - SnapKit
@@ -93,6 +95,7 @@ SPEC REPOS:
     - Kingfisher
     - Masonry
     - MJRefresh
+    - MXParallaxHeader
     - ObjectMapper
     - Realm
     - RealmSwift
@@ -119,6 +122,7 @@ SPEC CHECKSUMS:
   Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
+  MXParallaxHeader: de3c867e10ba46e8f6e20c8ee1f2a910372b3b94
   ObjectMapper: e6e4d91ff7f2861df7aecc536c92d8363f4c9677
   Realm: 16852517a207e98cc6acba9336b56c30d06d84ad
   RealmSwift: bca777b3904ee58a9b16036e1840012f03348060
@@ -127,6 +131,6 @@ SPEC CHECKSUMS:
   SwipeCellKit: 3972254a826da74609926daf59b08d6c72e619ea
   TSSmalCoacopods: 6aa97167f0c76b16fc7d1fd1eb198bb6aece4f68
 
-PODFILE CHECKSUM: 5f1a9b50d5f2041d75518c8ffbc2f8cd02fa11a2
+PODFILE CHECKSUM: 0c415b1722b70162352808e1791cd97b87d76ce1
 
 COCOAPODS: 1.16.2