Quellcode durchsuchen

【综合】DMG输入AI序列码修正&AI重做时删除文件问题修正

niehaoyu vor 10 Monaten
Ursprung
Commit
9983860a41

+ 14 - 2
PDF Office/PDF Master/Class/AIInfo/AIConfigWindowController/AINewConfigWindowController.swift

@@ -375,7 +375,7 @@ protocol AIConfigWindowDelegate: AnyObject {
             AIChatInfoManager.defaultManager.isAILoading = true
             
             //MARK: TestData
-//            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 13) {
+//            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 3) {
 //                DispatchQueue.main.async {
 //                    AIChatInfoManager.defaultManager.isAILoading = false
 //                    chatModel.chatResult = "AI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果\nAI Summary 返回的结果"
@@ -384,7 +384,7 @@ protocol AIConfigWindowDelegate: AnyObject {
 //                    self.aiTypeItemView.reloadData()
 //                    self.aiInfoInputView.reloadData()
 //
-//                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 14) {
+//                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 4) {
 //                        DispatchQueue.main.async {
 //                            chatModel.chatInfoState = .stateFailed
 //                            chatModel.chatResult = "Unknown error"
@@ -411,6 +411,18 @@ protocol AIConfigWindowDelegate: AnyObject {
                     self.aiInfoInputView.reloadData()
                 }
             }
+        } else {
+            DispatchQueue.main.async {
+                AIChatInfoManager.defaultManager.isAILoading = false
+                
+                let resultStr = NSLocalizedString("File Not Exist", comment: "")
+                chatModel.chatResult = resultStr
+                chatModel.chatInfoState = .stateFailed
+                
+                self.aiChatView.reloadData()
+                self.aiTypeItemView.reloadData()
+                self.aiInfoInputView.reloadData()
+            }
         }
     }
     

+ 2 - 2
PDF Office/PDF Master/Class/AIInfo/AIConfigWindowController/Views/AIChatView/CollectionViewItems/AIChatStringResultItem.xib

@@ -102,7 +102,7 @@
                                                 <rect key="frame" x="0.0" y="94" width="240" height="32"/>
                                                 <subviews>
                                                     <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Sgv-f1-xXt">
-                                                        <rect key="frame" x="12" y="5" width="15" height="15"/>
+                                                        <rect key="frame" x="12" y="9" width="15" height="15"/>
                                                         <constraints>
                                                             <constraint firstAttribute="height" constant="15" id="Ich-sQ-Dy4"/>
                                                             <constraint firstAttribute="width" constant="15" id="RWC-iq-IHu"/>
@@ -126,7 +126,7 @@
                                                     <constraint firstItem="5bn-kF-Wge" firstAttribute="top" secondItem="Z4d-F0-7S2" secondAttribute="top" constant="8" id="BAk-MH-BFI"/>
                                                     <constraint firstItem="5bn-kF-Wge" firstAttribute="leading" secondItem="Sgv-f1-xXt" secondAttribute="trailing" constant="4" id="KBy-ZU-aQq"/>
                                                     <constraint firstAttribute="bottom" secondItem="5bn-kF-Wge" secondAttribute="bottom" constant="8" id="KyK-1T-e9t"/>
-                                                    <constraint firstItem="Sgv-f1-xXt" firstAttribute="top" secondItem="Z4d-F0-7S2" secondAttribute="top" constant="12" id="OPQ-7S-NJS"/>
+                                                    <constraint firstItem="Sgv-f1-xXt" firstAttribute="top" secondItem="Z4d-F0-7S2" secondAttribute="top" constant="8" id="OPQ-7S-NJS"/>
                                                 </constraints>
                                             </customView>
                                             <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X0X-oC-au4">

+ 1 - 1
PDF Office/PDF Master/Class/AIInfo/AIConfigWindowController/Views/AIHeaderView/AIHeaderView.swift

@@ -68,7 +68,7 @@ class AIHeaderView: NSView, NibLoadable {
         }
         
         controller.enterLicenseHandle = { vc in
-            let verifyVC = KMVerificationWindowController.verification(with: .activateExpired)
+            let verifyVC = KMVerificationWindowController.verification(with: .activateAIInfo)
             verifyVC?.callback = {
                 KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
             }