浏览代码

开发:3.6.17(1)
1.图生图 4 个风格
2.新增分享功能

100Years 5 天之前
父节点
当前提交
5c116de9ae
共有 35 个文件被更改,包括 446 次插入127 次删除
  1. 4 4
      AIEmoji.xcodeproj/project.pbxproj
  2. 22 0
      AIEmoji/Assets.xcassets/Common/ic_share.imageset/Contents.json
  3. 二进制
      AIEmoji/Assets.xcassets/Common/ic_share.imageset/ic_share@2x.png
  4. 二进制
      AIEmoji/Assets.xcassets/Common/ic_share.imageset/ic_share@3x.png
  5. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Fortnite.imageset/Contents.json
  6. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Fortnite.imageset/ptp_style_Fortnite@2x.png
  7. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Fortnite.imageset/ptp_style_Fortnite@3x.png
  8. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Labubu.imageset/Contents.json
  9. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Labubu.imageset/ptp_style_Labubu@2x.png
  10. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Labubu.imageset/ptp_style_Labubu@3x.png
  11. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_MonopolyGo.imageset/Contents.json
  12. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_MonopolyGo.imageset/ptp_style_MonopolyGo@2x.png
  13. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_MonopolyGo.imageset/ptp_style_MonopolyGo@3x.png
  14. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Pokemon.imageset/Contents.json
  15. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Pokemon.imageset/ptp_style_Pokemon@2x.png
  16. 二进制
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Pokemon.imageset/ptp_style_Pokemon@3x.png
  17. 26 18
      AIEmoji/Business/LaunchVC/TSLaunchVC.swift
  18. 46 29
      AIEmoji/Business/TSAILIstVC/TSAIPhotoGeneratorBaseVC/TSAIListPhotoGeneratorBaseVC.swift
  19. 18 0
      AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoBrowseVC.swift
  20. 2 4
      AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoGeneratorBaseVC.swift
  21. 45 28
      AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/TSPTPGeneratorVC.swift
  22. 0 1
      AIEmoji/Business/TSSetingVC/SetingVC/TSSetingViewModel.swift
  23. 42 26
      AIEmoji/Business/TSTextGeneralPictureVC/TSTextPicGennerateVC/TSTextPicGennerateVC.swift
  24. 59 0
      AIEmoji/Common/Tool/TSCommonTool/TSCommonTool.swift
  25. 3 0
      AIEmoji/Common/View/TSPhotoPickerManager/TSPhotoPickerManager.swift
  26. 46 17
      AIEmoji/Res/photo_to_photo_style.json
  27. 5 0
      AIEmoji/de.lproj/Localizable.strings
  28. 5 0
      AIEmoji/en.lproj/Localizable.strings
  29. 5 0
      AIEmoji/es.lproj/Localizable.strings
  30. 5 0
      AIEmoji/ja.lproj/Localizable.strings
  31. 5 0
      AIEmoji/ko.lproj/Localizable.strings
  32. 5 0
      AIEmoji/pt-BR.lproj/Localizable.strings
  33. 5 0
      AIEmoji/pt-PT.lproj/Localizable.strings
  34. 5 0
      AIEmoji/zh-Hans.lproj/Localizable.strings
  35. 5 0
      AIEmoji/zh-Hant.lproj/Localizable.strings

+ 4 - 4
AIEmoji.xcodeproj/project.pbxproj

@@ -2544,7 +2544,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 3;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2560,7 +2560,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.16;
+				MARKETING_VERSION = 3.6.17;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -2583,7 +2583,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 3;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2599,7 +2599,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.16;
+				MARKETING_VERSION = 3.6.17;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

+ 22 - 0
AIEmoji/Assets.xcassets/Common/ic_share.imageset/Contents.json

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

二进制
AIEmoji/Assets.xcassets/Common/ic_share.imageset/ic_share@2x.png


二进制
AIEmoji/Assets.xcassets/Common/ic_share.imageset/ic_share@3x.png


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

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

二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Fortnite.imageset/ptp_style_Fortnite@2x.png


二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Fortnite.imageset/ptp_style_Fortnite@3x.png


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

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

二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Labubu.imageset/ptp_style_Labubu@2x.png


二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Labubu.imageset/ptp_style_Labubu@3x.png


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

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

二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_MonopolyGo.imageset/ptp_style_MonopolyGo@2x.png


二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_MonopolyGo.imageset/ptp_style_MonopolyGo@3x.png


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

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

二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Pokemon.imageset/ptp_style_Pokemon@2x.png


二进制
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Pokemon.imageset/ptp_style_Pokemon@3x.png


+ 26 - 18
AIEmoji/Business/LaunchVC/TSLaunchVC.swift

@@ -129,25 +129,33 @@ class TSLaunchVC: UIViewController {
     
     
 
+//    private func setupLaunchScreenView() {
+//        // 获取 LaunchScreen.storyboard 的视图控制器
+//        let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
+//        guard let launchVC = storyboard.instantiateInitialViewController() else {
+//            debugPrint("无法加载 LaunchScreen 的初始视图控制器")
+//            return
+//        }
+//
+//        // 获取 LaunchScreen 的视图
+//        guard let launchView = launchVC.view else {
+//            debugPrint("无法获取 LaunchScreen 的视图")
+//            return
+//        }
+//
+//        // 设置 launchView 的 frame 为当前视图的 bounds
+//        launchView.frame = UIScreen.main.bounds
+//
+//        // 将 launchView 添加到 TSLaunchVC 的视图中
+//        view.addSubview(launchView)
+//    }
+    
+    
     private func setupLaunchScreenView() {
-        // 获取 LaunchScreen.storyboard 的视图控制器
-        let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
-        guard let launchVC = storyboard.instantiateInitialViewController() else {
-            debugPrint("无法加载 LaunchScreen 的初始视图控制器")
-            return
-        }
-
-        // 获取 LaunchScreen 的视图
-        guard let launchView = launchVC.view else {
-            debugPrint("无法获取 LaunchScreen 的视图")
-            return
-        }
-
-        // 设置 launchView 的 frame 为当前视图的 bounds
-        launchView.frame = UIScreen.main.bounds
-
-        // 将 launchView 添加到 TSLaunchVC 的视图中
-        view.addSubview(launchView)
+        let imageView = UIImageView(frame: UIScreen.main.bounds)
+        imageView.contentMode = .scaleAspectFill
+        imageView.image = UIImage(named: "launch")
+        view.addSubview(imageView)
     }
 }
 

+ 46 - 29
AIEmoji/Business/TSAILIstVC/TSAIPhotoGeneratorBaseVC/TSAIListPhotoGeneratorBaseVC.swift

@@ -110,9 +110,18 @@ class TSAIListPhotoGeneratorBaseVC: TSAIPhotoGeneratorBaseVC {
         return rotatingPictureBtn
     }()
     
+    lazy var shareBtn: UIButton = {
+        let deleteBtn = UIButton.createButton(image: .icShare) { [weak self]  in
+            guard let self = self else { return }
+            guard let image = getSuccessImage() else { return }
+            kShareImage(target: self, image: image)
+        }
+        return deleteBtn
+    }()
+    
     override func createView() {
 
-        contentView.addSubview(generateInView)
+        view.addSubview(generateInView)
         generateInView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
@@ -140,7 +149,15 @@ class TSAIListPhotoGeneratorBaseVC: TSAIPhotoGeneratorBaseVC {
         if viewModel.generatorModel.generatorStyle == .photoExpand {
             setUpExpandAreaView()
         }
-
+        
+        contentView.addSubview(shareBtn)
+        shareBtn.snp.makeConstraints { make in
+            make.top.equalTo(k_Height_StatusBar + 4)
+            make.trailing.equalTo(-16)
+            make.width.equalTo(36)
+            make.height.equalTo(36)
+        }
+        contentView.isHidden = true
     }
     
     func setUpExpandAreaView(){
@@ -304,51 +321,51 @@ extension TSAIListPhotoGeneratorBaseVC {
     
     func showProgress(text:String) {
         generateInView.updateShowProgress(text: text)
-        
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        switchOriginalPictureBtn.isHidden = true
-        rotatingPictureBtn.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        switchOriginalPictureBtn.isHidden = true
+//        rotatingPictureBtn.isHidden = true
         setVideoHidden()
     }
     
     func showLoading(){
         generateInView.updateShowLoading(text: "Generating".localized + " ...".localized)
-
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        switchOriginalPictureBtn.isHidden = true
-        rotatingPictureBtn.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        switchOriginalPictureBtn.isHidden = true
+//        rotatingPictureBtn.isHidden = true
         setVideoHidden()
     }
     
     func showError(text:String,code:Int = 0){
         generateInView.updateShowError(text: text,code: code)
-
-        isClickTheBlankClosePage = true
+        contentView.isHidden = false
         
-        tryAgainBtn.isHidden = false
-        bigSaveBtn.isHidden = true
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        switchOriginalPictureBtn.isHidden = true
-        rotatingPictureBtn.isHidden = true
+//        isClickTheBlankClosePage = true
+//        tryAgainBtn.isHidden = false
+//        bigSaveBtn.isHidden = true
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        switchOriginalPictureBtn.isHidden = true
+//        rotatingPictureBtn.isHidden = true
         setVideoHidden()
     }
     
     func showSuccess(model:TSActionInfoModel){
         generateInView.updateShowSuccess()
+        contentView.isHidden = false
 
-        imageModel = model
-        isClickTheBlankClosePage = true
-        
-        tryAgainBtn.isHidden = false
-        bigSaveBtn.isHidden = false
-        bottomView.isHidden = false
-        netWorkImageView.isHidden = false
+//        isClickTheBlankClosePage = true
+//        tryAgainBtn.isHidden = false
+//        bigSaveBtn.isHidden = false
+//        bottomView.isHidden = false
+//        netWorkImageView.isHidden = false
         
+        imageModel = model
         if viewModel.generatorModel.generatorStyle == .futureBaby {
             rotatingPictureBtn.isHidden = false
         }else{

+ 18 - 0
AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoBrowseVC.swift

@@ -99,6 +99,16 @@ class TSAIPhotoBrowseVC: TSBaseVC {
     }()
     
     
+    lazy var shareBtn: UIButton = {
+        let deleteBtn = UIButton.createButton(image: .icShare) { [weak self]  in
+            guard let self = self else { return }
+            guard let image = currentImage else { return }
+            kShareImage(target: self, image: image)
+        }
+        return deleteBtn
+    }()
+    
+    
     override func createView() {
         super.createView()
         
@@ -139,6 +149,14 @@ class TSAIPhotoBrowseVC: TSBaseVC {
         
         contentView.addSubview(deleteBtn)
         deleteBtn.snp.makeConstraints { make in
+            make.top.equalTo(k_Height_StatusBar + 4)
+            make.trailing.equalTo(-75)
+            make.width.equalTo(36)
+            make.height.equalTo(36)
+        }
+        
+        contentView.addSubview(shareBtn)
+        shareBtn.snp.makeConstraints { make in
             make.top.equalTo(k_Height_StatusBar + 4)
             make.trailing.equalTo(-16)
             make.width.equalTo(36)

+ 2 - 4
AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoGeneratorBaseVC.swift

@@ -38,9 +38,7 @@ class TSAIPhotoGeneratorBaseVC: TSBaseVC {
         colorView.frame = bottomView.bounds
         colorView.cornersRound(radius: 20, corner: [.topLeft,.topRight])
         bottomView.addSubview(colorView)
-        
-        bottomView.isHidden = true
-        
+
         return bottomView
     }()
 
@@ -99,7 +97,7 @@ class TSAIPhotoGeneratorBaseVC: TSBaseVC {
         contentView.addSubview(netWorkImageView)
         contentView.addSubview(bottomView)
         //关闭按钮
-        contentView.addSubview(xBtn)
+        view.addSubview(xBtn)
         xBtn.snp.makeConstraints { make in
             make.top.equalTo(k_Height_StatusBar + 4)
             make.leading.equalTo(16)

+ 45 - 28
AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/TSPTPGeneratorVC.swift

@@ -79,9 +79,18 @@ class TSPTPGeneratorVC: TSAIPhotoGeneratorBaseVC {
         return rotatingPictureBtn
     }()
     
+    lazy var shareBtn: UIButton = {
+        let deleteBtn = UIButton.createButton(image: .icShare) { [weak self]  in
+            guard let self = self else { return }
+            guard let image = getSuccessImage() else { return }
+            kShareImage(target: self, image: image)
+        }
+        return deleteBtn
+    }()
+    
     override func createView() {
 
-        contentView.addSubview(generateInView)
+        view.insertSubview(generateInView, at: 0)
         generateInView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
@@ -96,7 +105,15 @@ class TSPTPGeneratorVC: TSAIPhotoGeneratorBaseVC {
             make.height.equalTo(40)
         }
         
-//        xBtn.isHidden = true
+        contentView.addSubview(shareBtn)
+        shareBtn.snp.makeConstraints { make in
+            make.top.equalTo(k_Height_StatusBar + 4)
+            make.trailing.equalTo(-16)
+            make.width.equalTo(36)
+            make.height.equalTo(36)
+        }
+        
+        contentView.isHidden = true
     }
     
     override func closePage() {
@@ -288,46 +305,46 @@ extension TSPTPGeneratorVC {
     
     func showProgress(text:String) {
         generateInView.updateShowProgress(text: text)
-        
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        rotatingPictureBtn.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        rotatingPictureBtn.isHidden = true
     }
     
     func showLoading(){
         generateInView.updateShowLoading(text: "Generating".localized + " ...")
-
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        rotatingPictureBtn.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        rotatingPictureBtn.isHidden = true
     }
     
     func showError(text:String,code:Int = 0){
         generateInView.updateShowError(text: text,code: code)
-
-        isClickTheBlankClosePage = true
-        
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = true
+//        
         xBtn.isHidden = false
-        tryAgainBtn.isHidden = true
-        bigSaveBtn.isHidden = true
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
-        rotatingPictureBtn.isHidden = true
+//        tryAgainBtn.isHidden = true
+//        bigSaveBtn.isHidden = true
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
+//        rotatingPictureBtn.isHidden = true
     }
     
     func showSuccess(model:TSActionInfoModel){
         generateInView.updateShowSuccess()
-
-        isClickTheBlankClosePage = true
-        
+        contentView.isHidden = false
+//        isClickTheBlankClosePage = true
+//        
         xBtn.isHidden = false
-        tryAgainBtn.isHidden = false
-        bigSaveBtn.isHidden = false
-        bottomView.isHidden = false
-        netWorkImageView.isHidden = false
-        rotatingPictureBtn.isHidden = false
+//        tryAgainBtn.isHidden = false
+//        bigSaveBtn.isHidden = false
+//        bottomView.isHidden = false
+//        netWorkImageView.isHidden = false
+//        rotatingPictureBtn.isHidden = false
         
         
         TSRMShared.ptpDBHistory.updateData(model)

+ 0 - 1
AIEmoji/Business/TSSetingVC/SetingVC/TSSetingViewModel.swift

@@ -7,7 +7,6 @@
 
 import StoreKit
 
-let appid = "6740220736"
 class TSSetingViewModel: ObservableObject {
     
     @Published var settingTypes: [SettingType] = SettingType.allCases

+ 42 - 26
AIEmoji/Business/TSTextGeneralPictureVC/TSTextPicGennerateVC/TSTextPicGennerateVC.swift

@@ -41,16 +41,33 @@ class TSTextPicGennerateVC: TSAIPhotoGeneratorBaseVC {
         return generateInView
     }()
     
-
+    lazy var shareBtn: UIButton = {
+        let deleteBtn = UIButton.createButton(image: .icShare) { [weak self]  in
+            guard let self = self else { return }
+            guard let image = getSuccessImage() else { return }
+            kShareImage(target: self, image: image)
+        }
+        return deleteBtn
+    }()
+    
     override func createView() {
 
-        contentView.addSubview(generateInView)
+        view.insertSubview(generateInView, at: 0)
         generateInView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
         
         super.createView()
 
+        contentView.addSubview(shareBtn)
+        shareBtn.snp.makeConstraints { make in
+            make.top.equalTo(k_Height_StatusBar + 4)
+            make.trailing.equalTo(-16)
+            make.width.equalTo(36)
+            make.height.equalTo(36)
+        }
+        
+        contentView.isHidden = true
     }
     
     override func closePage() {
@@ -154,43 +171,42 @@ extension TSTextPicGennerateVC {
     }
     func showProgress(text:String) {
         generateInView.updateShowProgress(text: text)
-
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
     }
     
     func showLoading(){
         generateInView.updateShowLoading(text: "Generating".localized + " ...")
-        
-        isClickTheBlankClosePage = false
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
+        contentView.isHidden = true
+//        isClickTheBlankClosePage = false
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
     }
     
     func showError(text:String,code:Int = 0){
         generateInView.updateShowError(text: text,code: code)
-        
-        isClickTheBlankClosePage = true
-        
-        tryAgainBtn.isHidden = false
-        bigSaveBtn.isHidden = true
-        bottomView.isHidden = true
-        netWorkImageView.isHidden = true
+        contentView.isHidden = false
+//        isClickTheBlankClosePage = true
+//        
+//        tryAgainBtn.isHidden = false
+//        bigSaveBtn.isHidden = true
+//        bottomView.isHidden = true
+//        netWorkImageView.isHidden = true
     }
     
     func showSuccess(model:TSActionInfoModel){
         generateInView.updateShowSuccess()
-
-        imageModel = model
-        isClickTheBlankClosePage = true
-        
-        tryAgainBtn.isHidden = false
-        bigSaveBtn.isHidden = false
-        bottomView.isHidden = false
-        netWorkImageView.isHidden = false
-        
+        contentView.isHidden = false
+//        isClickTheBlankClosePage = true
+//        
+//        tryAgainBtn.isHidden = false
+//        bigSaveBtn.isHidden = false
+//        bottomView.isHidden = false
+//        netWorkImageView.isHidden = false
         
+        imageModel = model
         self.netWorkImageView.setAsyncImage(urlString: model.response.resultUrl,placeholder:kPlaceholderImage,backgroundColor:netWorkImageView.backgroundColor!)
         
         kPurchaseDefault.useOnceForFree(type: .textGeneratePic)

+ 59 - 0
AIEmoji/Common/Tool/TSCommonTool/TSCommonTool.swift

@@ -221,9 +221,68 @@ func kExecuteOnMainThread(_ block: @escaping () -> Void) {
     }
 }
 
+let appid = "6740220736"
 let kAppName:String = "Picguru" //Picguru Chibii Chibi Ghiblii AI Image Picguru
 let kUploadImageMaxBit10Size:Int = 10 * 1024 * 1024 //10M
 let kUploadImageMaxBit5Size:Int = 5 * 1024 * 1024 //5M
 
+func kShareImage(target: UIViewController,image:UIImage) {
+    let httpAppStoreLink = "https://apps.apple.com/app/id\(appid)"
+    let text = "Turn yourself into a Ghibli style with AI magic! 🎨✨ This app creates stunning anime, cyberpunk & more—just upload a photo. Try it now!"
+    kShareContent(target: target, image: image, text: text)
+}
+
+func kShareContent(target: UIViewController,image:UIImage?,text:String?) {
+    var activityItems:[Any] = []
+    
+
+    if let image = image {
+        activityItems.append(image)
+    }
+    
+    if let text = text {
+        activityItems.append(text)
+    }
+    
+    if let url = URL(string: "https://apps.apple.com/app/id\(appid)") {
+        activityItems.append(url)
+    }
+    
+    if activityItems.isEmpty {
+        return
+    }
 
+    let vc = UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
+    vc.completionWithItemsHandler = { activity, _, _, _ in
+        if let type = activity, type == .copyToPasteboard {
+            UIPasteboard.general.string = text
+        }
+    }
+
+    if UIDevice.current.userInterfaceIdiom == .pad {
+        vc.modalPresentationStyle = .popover
+        vc.popoverPresentationController?.sourceView = target.view
+        vc.popoverPresentationController?.sourceRect = target.view.bounds
+    }
+    
+    target.present(vc, animated: true)
+}
 
+
+//// todo.kailen-logo
+//func shareApp(parent: UIViewController) {
+//    let httpAppStoreLink = "https://apps.apple.com/app/id\(appid)"
+//    let text = "Space"
+//    let url = URL(string: httpAppStoreLink)!
+//    let image = UIImage.appIcon.compressImageSize(to: CGSize(width: 100, height: 100))
+//    let final = ShareActivityItemProvider(placeholderItem: image)
+//    let vc = UIActivityViewController(activityItems: [url, final, text], applicationActivities: nil)
+//    vc.completionWithItemsHandler = { activity, _, _, _ in
+//        if let type = activity, type == .copyToPasteboard {
+//            UIPasteboard.general.string = httpAppStoreLink
+//        }
+//    }
+//
+//    parent.present(vc, animated: true)
+//    
+//}

+ 3 - 0
AIEmoji/Common/View/TSPhotoPickerManager/TSPhotoPickerManager.swift

@@ -55,6 +55,7 @@ class TSPhotoPickerManager: NSObject {
     
     /// 打开照片选择器
     private func openPhotoPicker() {
+        TSToastShared.showLoading(containerView: viewController?.view)
         imagePicker = UIImagePickerController()
         imagePicker.sourceType = .photoLibrary
         imagePicker.delegate = self
@@ -91,6 +92,7 @@ class TSPhotoPickerManager: NSObject {
 // MARK: - UIImagePickerControllerDelegate & UINavigationControllerDelegate (iOS 14 以下)
 extension TSPhotoPickerManager: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
     func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
+        TSToastShared.hideLoading()
 //        picker.dismiss(animated: true) {
             if let image = info[.originalImage] as? UIImage {
                 self.completionHandler?(image,info[.phAsset] as? PHAsset )
@@ -106,6 +108,7 @@ extension TSPhotoPickerManager: UIImagePickerControllerDelegate, UINavigationCon
     }
     
     func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
+        TSToastShared.hideLoading()
 //        self.completionHandler?(nil,nil)
 //        if completionSizeHandler == nil {
             picker.dismiss(animated: true, completion: nil)

+ 46 - 17
AIEmoji/Res/photo_to_photo_style.json

@@ -9,16 +9,13 @@
         "advance":true
     },
     {
-        "imageName": "ptp_style_ActionFigure",
-        "imageText": "Action Figure",
-        "prompt":"将上传的照片转化为一款3D可爱玩偶风格形象,整体造型卡通立体,主角位于画面正中,清哳可见,风格融合插画与 3D 质感。背景为玩具包装盒展示样式:包括透明塑料外壳、纸卡底板,纸卡上印有 「Limited  Edition」字样。包装设计包含玩具插卡元素,如顶部挂孔、边缘裁切线等,呈现真实的商用玩具包装感。包装内右侧竖排另外放置 4 件 “配件” 道具,要根据上传的照片中人物的造型和身份推理出匹配的道具,摆放自然协调,增强整体故事感。色调以照片配色为主,饱和度高,颜色明亮清澈,光线自然温暖,画面风格现代、专业,同时保持可爱、俏皮的趣味性。背景简洁,突出主体,整体视觉呈现应具备真实商品的质感与陈列吸引力。",
-        "input":false,
-        "specialStyle":1,
+        "imageName": "ptp_style_Labubu",
+        "imageText": "Labubu",
+        "prompt":"Please create image in Labubu style, and have 3-4 colorful Labubu surround the characters without turning people face into Labubu",
+        "advance":true,
         "isVip": true,
-        "styleId": "ImageToImage-04",
-        "advance":true
+        "specialStyle":1
     },
-
     {
         "imageName": "ptp_style_7",
         "imageText": "Fantasy Illustration",
@@ -71,6 +68,37 @@
         "isVip": true,
         "advance":true
     },
+    {
+        "imageName": "ptp_style_Minecraft",
+        "imageText": "3D Box",
+        "prompt":"turn photo into MINECRAFT style",
+        "specialStyle":0,
+        "isVip": true,
+        "styleId": "",
+        "advance":true
+    },
+    {
+        "imageName": "ptp_style_Fortnite",
+        "imageText": "Fortnite",
+        "prompt":"Please create image in Fortnite style",
+        "advance":true,
+        "isVip": true
+    },
+    {
+        "imageName": "ptp_style_Pokemon",
+        "imageText": "Pokemon",
+        "prompt":"Please create image in Pokemon style",
+        "advance":true,
+        "isVip": true
+    },
+    
+    {
+        "imageName": "ptp_style_MonopolyGo",
+        "imageText": "Monopoly Go",
+        "prompt":"Please create image in Monopoly go style",
+        "advance":true,
+        "isVip": true
+    },
     {
         "imageName": "ptp_style_gameYS",
         "imageText": "Game",
@@ -105,6 +133,16 @@
         "styleId": "ImageToImage-08",
         "isVip": false
     },
+    {
+        "imageName": "ptp_style_ActionFigure",
+        "imageText": "Action Figure",
+        "prompt":"将上传的照片转化为一款3D可爱玩偶风格形象,整体造型卡通立体,主角位于画面正中,清哳可见,风格融合插画与 3D 质感。背景为玩具包装盒展示样式:包括透明塑料外壳、纸卡底板,纸卡上印有 「Limited  Edition」字样。包装设计包含玩具插卡元素,如顶部挂孔、边缘裁切线等,呈现真实的商用玩具包装感。包装内右侧竖排另外放置 4 件 “配件” 道具,要根据上传的照片中人物的造型和身份推理出匹配的道具,摆放自然协调,增强整体故事感。色调以照片配色为主,饱和度高,颜色明亮清澈,光线自然温暖,画面风格现代、专业,同时保持可爱、俏皮的趣味性。背景简洁,突出主体,整体视觉呈现应具备真实商品的质感与陈列吸引力。",
+        "input":false,
+        "specialStyle":0,
+        "isVip": true,
+        "styleId": "ImageToImage-04",
+        "advance":true
+    },
     {
         "imageName": "ptp_style_Doodle",
         "imageText": "Picture Book",
@@ -196,15 +234,6 @@
         "styleId": "",
         "advance":false
     },
-    {
-        "imageName": "ptp_style_Minecraft",
-        "imageText": "3D Box",
-        "prompt":"turn photo into MINECRAFT style",
-        "specialStyle":0,
-        "isVip": true,
-        "styleId": "",
-        "advance":true
-    },
     {
         "imageName": "ptp_style_VanGogh",
         "imageText": "Van Gogh",

+ 5 - 0
AIEmoji/de.lproj/Localizable.strings

@@ -423,3 +423,8 @@
 "Bikini" = "Bikini";
 "Sailor Moon" = "Sailor Moon";
 "Plush Pillow" = "Plüschkissen";
+
+"Fortnite" = "Fortnite";
+"Pokemon" = "Pokémon";
+"Monopoly Go" = "Monopoly Go";
+"Labubu" = "Labubu";

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

@@ -420,3 +420,8 @@
 "Bikini" = "Bikini";
 "Sailor Moon" = "Sailor";
 "Plush Pillow" = "Plush Pillow";
+
+"Fortnite" = "Fortnite";
+"Pokemon" = "Pokemon";
+"Monopoly Go" = "Monopoly Go";
+"Labubu" = "Labubu";

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

@@ -420,3 +420,8 @@
 "Bikini" = "Bikini";
 "Sailor Moon" = "Marinero Luna";
 "Plush Pillow" = "Almohada de peluche";
+
+"Fortnite" = "Fortnite";
+"Pokemon" = "Pokémon";
+"Monopoly Go" = "Monopoly Go";
+"Labubu" = "Labubu";

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

@@ -419,3 +419,8 @@
 "Bikini" = "ビキニ";
 "Sailor Moon" = "セーラームーン";
 "Plush Pillow" = "ぬいぐるみ枕";
+
+"Fortnite" = "フォートナイト";
+"Pokemon" = "ポケモン";
+"Monopoly Go" = "モノポリー囲碁";
+"Labubu" = "Labubu";

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

@@ -425,3 +425,8 @@
 "Bikini" = "비키니";
 "Sailor Moon" = "세일러문";
 "Plush Pillow" = "플러시 베개";
+
+"Fortnite" = "포트나이트";
+"Pokemon" = "포켓몬";
+"Monopoly Go" = "모노폴리 고";
+"Labubu" = "Labubu";

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

@@ -419,3 +419,8 @@
 "Bikini" = "Bikini";
 "Sailor Moon" = "Sailor Moon";
 "Plush Pillow" = "Travesseiro de pelúcia";
+
+"Fortnite" = "Fortnite";
+"Pokemon" = "Pokémon";
+"Monopoly Go" = "Monopólio Go";
+"Labubu" = "Labubu";

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

@@ -419,3 +419,8 @@
 "Bikini" = "Bikini";
 "Sailor" = "Sailor Moon";
 "Plush Pillow" = "Travesseiro de pelúcia";
+
+"Fortnite" = "Fortnite";
+"Pokemon" = "Pokémon";
+"Monopoly Go" = "Monopólio Go";
+"Labubu" = "Labubu";

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

@@ -421,3 +421,8 @@
 "Bikini" = "比基尼";
 "Sailor Moon" = "美少女战士";
 "Plush Pillow" = "毛绒枕头";
+
+"Fortnite" = "堡垒之夜";
+"Pokemon" = "Pokemon";
+"Monopoly Go" = "大富翁围棋";
+"Labubu" = "Labubu";

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

@@ -411,3 +411,8 @@
 "Bikini" = "比基尼";
 "Sailor Moon" = "美少女戰士";
 "Plush Pillow" = "毛絨枕頭";
+
+"Fortnite" = "堡之夜";
+"Pokemon" = "Pokemon";
+"Monopoly Go" = "壟斷圍棋";
+"Labubu" = "Labubu";