فهرست منبع

1.app 改名
2.文生图增加空白选项
3.通过 asset 方式使用图片中英文

100Years 1 هفته پیش
والد
کامیت
b97f88b360
23فایلهای تغییر یافته به همراه58 افزوده شده و 40 حذف شده
  1. 2 2
      AIEmoji.xcodeproj/project.pbxproj
  2. BIN
      AIEmoji/Assets.xcassets/Common/launch_img.imageset/launch_img@2x.png
  3. BIN
      AIEmoji/Assets.xcassets/Common/launch_img.imageset/launch_img@3x.png
  4. 2 2
      AIEmoji/Assets.xcassets/Common/launch_lab.imageset/Contents.json
  5. BIN
      AIEmoji/Assets.xcassets/Common/launch_lab.imageset/launch_lab@2x.png
  6. BIN
      AIEmoji/Assets.xcassets/Common/launch_lab.imageset/launch_lab@3x.png
  7. BIN
      AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@2x.png
  8. BIN
      AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@3x.png
  9. 2 2
      AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/Contents.json
  10. BIN
      AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/ttp_style_none@2x.png
  11. BIN
      AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/ttp_style_none@3x.png
  12. 0 22
      AIEmoji/Assets.xcassets/boot/bootPage_2-zh-Hans.imageset/Contents.json
  13. 20 0
      AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/Contents.json
  14. 0 0
      AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/bootPage_2-zh-Hans@2x.png
  15. 0 0
      AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/bootPage_2-zh-Hans@3x.png
  16. 4 4
      AIEmoji/Base.lproj/LaunchScreen.storyboard
  17. 3 2
      AIEmoji/Business/LaunchVC/TSBootPageVC.swift
  18. 8 1
      AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift
  19. 6 0
      AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/TSTTPInputVC.swift
  20. 1 1
      AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/VM/TSTTPInputVM.swift
  21. 3 3
      AIEmoji/Common/Purchase/TSPurchaseManager.swift
  22. 1 1
      AIEmoji/Common/Tool/TSCommonTool/TSCommonTool.swift
  23. 6 0
      AIEmoji/Res/text_to_photo_style.json

+ 2 - 2
AIEmoji.xcodeproj/project.pbxproj

@@ -2026,7 +2026,7 @@
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIEmoji/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = Ghiblix;
+				INFOPLIST_KEY_CFBundleDisplayName = Ghiblii;
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Allow us to access photos to upload your photos to generate new styles.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@@ -2065,7 +2065,7 @@
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIEmoji/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = Ghiblix;
+				INFOPLIST_KEY_CFBundleDisplayName = Ghiblii;
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Allow us to access photos to upload your photos to generate new styles.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;

BIN
AIEmoji/Assets.xcassets/Common/launch_img.imageset/launch_img@2x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_img.imageset/launch_img@3x.png


+ 2 - 2
AIEmoji/Assets.xcassets/Common/launch_img.imageset/Contents.json → AIEmoji/Assets.xcassets/Common/launch_lab.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "launch_img@2x.png",
+      "filename" : "launch_lab@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "launch_img@3x.png",
+      "filename" : "launch_lab@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
AIEmoji/Assets.xcassets/Common/launch_lab.imageset/launch_lab@2x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_lab.imageset/launch_lab@3x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@2x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@3x.png


+ 2 - 2
AIEmoji/Assets.xcassets/Common/launch_text.imageset/Contents.json → AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "launch_text@2x.png",
+      "filename" : "ttp_style_none@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "launch_text@3x.png",
+      "filename" : "ttp_style_none@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/ttp_style_none@2x.png


BIN
AIEmoji/Assets.xcassets/Genmoji/ttp_style/ttp_style_none.imageset/ttp_style_none@3x.png


+ 0 - 22
AIEmoji/Assets.xcassets/boot/bootPage_2-zh-Hans.imageset/Contents.json

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

+ 20 - 0
AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/Contents.json

@@ -13,10 +13,30 @@
       "filename" : "bootPage_2@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
+    },
+    {
+      "idiom" : "universal",
+      "locale" : "zh-Hans",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "bootPage_2-zh-Hans@2x.png",
+      "idiom" : "universal",
+      "locale" : "zh-Hans",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "bootPage_2-zh-Hans@3x.png",
+      "idiom" : "universal",
+      "locale" : "zh-Hans",
+      "scale" : "3x"
     }
   ],
   "info" : {
     "author" : "xcode",
     "version" : 1
+  },
+  "properties" : {
+    "localizable" : true
   }
 }

+ 0 - 0
AIEmoji/Assets.xcassets/boot/bootPage_2-zh-Hans.imageset/bootPage_2-zh-Hans@2x.png → AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/bootPage_2-zh-Hans@2x.png


+ 0 - 0
AIEmoji/Assets.xcassets/boot/bootPage_2-zh-Hans.imageset/bootPage_2-zh-Hans@3x.png → AIEmoji/Assets.xcassets/boot/bootPage_2.imageset/bootPage_2-zh-Hans@3x.png


+ 4 - 4
AIEmoji/Base.lproj/LaunchScreen.storyboard

@@ -16,8 +16,8 @@
                         <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_text" translatesAutoresizingMaskIntoConstraints="NO" id="FfL-7D-71P">
-                                <rect key="frame" x="98" y="325" width="197" height="45.333333333333314"/>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_lab" translatesAutoresizingMaskIntoConstraints="NO" id="FfL-7D-71P">
+                                <rect key="frame" x="107.00000000000001" y="325" width="179.33333333333337" height="45.333333333333314"/>
                             </imageView>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
@@ -30,10 +30,10 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="53" y="375"/>
+            <point key="canvasLocation" x="52.671755725190835" y="374.64788732394368"/>
         </scene>
     </scenes>
     <resources>
-        <image name="launch_text" width="197" height="45.333332061767578"/>
+        <image name="launch_lab" width="179.33332824707031" height="45.333332061767578"/>
     </resources>
 </document>

+ 3 - 2
AIEmoji/Business/LaunchVC/TSBootPageVC.swift

@@ -19,8 +19,9 @@ class TSBootPageVC: TSBaseVC {
     }
     var index:Int = 0
     let titleStrings = ["Change image styles".localized,"AI image generation".localized,"Ask Ai anything".localized]
-    let imageStrings = ["bootPage_0","bootPage_1",TSConfig.isLanguageZh ? "bootPage_2-zh-Hans" : "bootPage_2"]
-
+    let imageStrings = ["bootPage_0","bootPage_1","bootPage_2"]
+//    let imageStrings = ["bootPage_0","bootPage_1",TSConfig.isLanguageZh ? "bootPage_2-zh-Hans" : "bootPage_2"]
+    
     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)
         return titleLabel

+ 8 - 1
AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -327,7 +327,14 @@ struct PurchaseView :View {
                     .cornerRadius(17.0)
                     .overlay(
                         RoundedRectangle(cornerRadius: 16)
-                            .stroke(Color.hex("#FA794F"), lineWidth: 2) // 边框
+                        .strokeBorder(
+                              LinearGradient(
+                                  colors: [Color.hex("#FA794F"), Color.hex("#F8C32A"),Color.hex("#FEFBF4")],
+                                  startPoint: .leading,
+                                  endPoint: .trailing
+                              ),
+                              lineWidth: 2
+                          )
                     )
 
                 Spacer().frame(height: 36)

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

@@ -40,6 +40,12 @@ class TSTTPInputVC: TSBaseVC {
             guard let self = self else { return }
             viewModel.promptText = text
         }
+        promptTextView.sendBolck = { [weak self] text in
+            guard let self = self else { return }
+            if creatBtnView.creatBtn.isEnabled {
+                generateImage()
+            }
+        }
         return promptTextView
     }()
     

+ 1 - 1
AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/VM/TSTTPInputVM.swift

@@ -73,7 +73,7 @@ extension TSTTPInputVM {
 //        if let selectPromptModel = selectPromptModel {
 //            prompt+=", \(selectPromptModel.prompt)"
 //        }
-        if let selectPromptModel = selectPromptModel {
+        if let selectPromptModel = selectPromptModel,selectPromptModel.prompt.count > 0 {
             prompt = "\(selectPromptModel.prompt)," + prompt
         }
         return prompt

+ 3 - 3
AIEmoji/Common/Purchase/TSPurchaseManager.swift

@@ -143,9 +143,9 @@ public class PurchaseManager: NSObject {
     }
 
     @objc public var isVip: Bool {
-        #if DEBUG
-            return true
-        #endif
+//        #if DEBUG
+//            return true
+//        #endif
         guard let expiresDate = expiredDate else {
             return false
         }

+ 1 - 1
AIEmoji/Common/Tool/TSCommonTool/TSCommonTool.swift

@@ -221,4 +221,4 @@ func kExecuteOnMainThread(_ block: @escaping () -> Void) {
     }
 }
 
-let kAppName:String = "Ghiblix"
+let kAppName:String = "Ghiblii"

+ 6 - 0
AIEmoji/Res/text_to_photo_style.json

@@ -1,4 +1,10 @@
 [
+    {
+        "imageName": "ttp_style_none",
+        "imageText": "Default",
+        "prompt":"",
+        "isVip": false
+    },
     {
         "imageName": "ttp_style_10",
         "imageText": "Ghibli",