Bläddra i källkod

【综合】用户反馈代码同步

tangchao 6 månader sedan
förälder
incheckning
8c12bbced1

+ 8 - 1
PDF Office/PDF Master/Class/Tools/UserFeekback/View/KMUserFbListHeaderItemView.swift

@@ -17,13 +17,20 @@ class KMUserFbListHeaderItemView: NSView, NibLoadable {
     var itemClick: ((_ idx: Int)->Void)?
     var helpHoverCallback: ((_ action: KMCoverAction)->Void)?
     
+    @IBOutlet weak var lineTopConst: NSLayoutConstraint!
+    
     override func awakeFromNib() {
         super.awakeFromNib()
-        
+         
         self.checkButton.title = NSLocalizedString("With the log file", comment: "")
         self.checkButton.target = self
         self.checkButton.action = #selector(_checkButtonAction)
         
+#if !VERSION_DMG
+        self.checkButton.isHidden = true
+        self.lineTopConst.constant = -16
+#endif
+        
         self.label.stringValue = NSLocalizedString("Add or delete documents", comment: "")
         self.helpButton.target = self
         self.helpButton.action = #selector(_helpButtonAction)

+ 3 - 2
PDF Office/PDF Master/Class/Tools/UserFeekback/View/KMUserFbListHeaderItemView.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -65,6 +65,7 @@
                 <outlet property="checkButton" destination="RKA-wn-mvX" id="7gg-UM-I1l"/>
                 <outlet property="helpButton" destination="cfe-1a-esp" id="bE6-8v-gcj"/>
                 <outlet property="label" destination="oFe-Ma-UNb" id="pii-cQ-I9a"/>
+                <outlet property="lineTopConst" destination="cf8-tp-2JV" id="EwX-OV-ZJV"/>
                 <outlet property="lineView" destination="8HF-ce-Fcd" id="SHl-ek-iwx"/>
             </connections>
             <point key="canvasLocation" x="116" y="114"/>

+ 12 - 0
PDF Office/PDF Master/Class/Tools/UserFeekback/Window/KMUserFeekbackWindowController.swift

@@ -34,6 +34,8 @@ import Cocoa
     
     var typeString: String = ""
     
+    @IBOutlet weak var listHeaderItemHConst: NSLayoutConstraint!
+    
     private var fileFormats_: [String] = ["jpg", "jpeg", "png", "gif", "bmp", "tiff", "tif", "psd", "svg", "pdf", "mp4", "mov", "avi", "mkv", "wmv", "flv", "mpg", "3gp", "doc", "docx", "xls" ,"xlsx", "ppt", "pptx", "txt", "rtf", "nfo"]
     private var fileFormatsString = "jpg, jpeg, png, gif, bmp, tiff, tif, psd, svg, pdf, mp4, mov, avi, mkv, wmv, flv, mpg, 3gp, doc, docx, xls,xlsx, ppt, pptx, txt, rtf, nfo"
     
@@ -70,6 +72,10 @@ import Cocoa
         self.listHeaderBox.borderWidth = 0
         self.listBox.borderWidth = 0
         
+#if !VERSION_DMG
+        self.listHeaderItemHConst.constant = 44
+#endif
+        
         let email = VerificationManager.default()?.email ?? ""
         self.emailItemView_?.textfiled.stringValue = email
         
@@ -206,6 +212,7 @@ import Cocoa
     }
     
     @objc private func _comfirmButtonAction() {
+#if VERSION_DMG
         if let data = self.listHeaderItemView_?.checkButton.state, data == .on {
             let fileaccess = AppSandboxFileAccess()
             // /Users/kdanmobile/Library/Logs/DiagnosticReports
@@ -243,6 +250,7 @@ import Cocoa
         } else {
             self.logPath_ = nil
         }
+#endif
         
         self.window?.makeFirstResponder(nil)
         let state = self._isConnectionAvailable()
@@ -271,11 +279,13 @@ import Cocoa
         self.window?.contentView?.beginLoading()
         self.comfirmButton.isEnabled = false
         var filePaths: [String] = self.filePaths_
+#if VERSION_DMG
         if let data = self.listHeaderItemView_?.checkButton.state, data == .on {
             if let filePath = self.logPath_, filePath.isEmpty == false {
                 filePaths.append(filePath)
             }
         }
+#endif
         
         self._feekbackAction(filePaths: filePaths) { [weak self] wrapper in
             self?.window?.contentView?.endLoading()
@@ -384,6 +394,7 @@ import Cocoa
         }
     }
     
+#if VERSION_DMG
     private func _getLog() -> String {
         let url = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask).first
         let coms = url?.pathComponents ?? []
@@ -435,6 +446,7 @@ import Cocoa
         }
         return ""
     }
+#endif
     
     private func _runShellCommand(_ command: String) -> String {
         let task = Process()

+ 5 - 10
PDF Office/PDF Master/Class/Tools/UserFeekback/Window/KMUserFeekbackWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -14,6 +14,7 @@
                 <outlet property="emailBox" destination="gZm-XF-OMc" id="xfl-3t-4jH"/>
                 <outlet property="listBox" destination="DGL-Rr-yAO" id="8LA-aZ-PxD"/>
                 <outlet property="listHeaderBox" destination="0oo-D2-BNd" id="WWb-or-WZU"/>
+                <outlet property="listHeaderItemHConst" destination="i8e-QC-6ZU" id="xUw-4K-ld8"/>
                 <outlet property="typeBox" destination="mxl-ba-YzD" id="MI9-W9-ors"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
@@ -90,10 +91,7 @@
                                     </constraints>
                                 </box>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="F8d-uO-ord">
-                                    <rect key="frame" x="281" y="13" width="86" height="32"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="72" id="huS-oq-Rfd"/>
-                                    </constraints>
+                                    <rect key="frame" x="292" y="13" width="75" height="32"/>
                                     <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ul0-cf-SlZ">
                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="system"/>
@@ -103,10 +101,7 @@ DQ
                                     </buttonCell>
                                 </button>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="u0z-8O-Jvu">
-                                    <rect key="frame" x="215" y="13" width="72" height="32"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="58" id="Xrz-Mn-Jb3"/>
-                                    </constraints>
+                                    <rect key="frame" x="223" y="13" width="75" height="32"/>
                                     <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="abu-h9-OsG">
                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                         <font key="font" metaFont="system"/>