|
@@ -141,7 +141,8 @@ class KMNBetaFeedbackWindowController: KMNBaseWindowController, NSWindowDelegate
|
|
|
listTabelView.enclosingScrollView?.layer?.backgroundColor = .clear
|
|
|
listTabelView.backgroundColor = .clear
|
|
|
listTabelView.registerForDraggedTypes([.fileURL])
|
|
|
-
|
|
|
+ listTabelView.allowsMultipleSelection = false
|
|
|
+
|
|
|
listTabelView.intercellSpacing = NSSize(width: 8, height: 8) // 设置水平和垂直间距
|
|
|
}
|
|
|
|
|
@@ -169,9 +170,9 @@ class KMNBetaFeedbackWindowController: KMNBaseWindowController, NSWindowDelegate
|
|
|
titleLabel.stringValue = KMLocalizedString("Beta's Usage Rights Has Expired")
|
|
|
|
|
|
stateLabel.stringValue = "* " + KMLocalizedString("Your attachments are strictly confidential and will only be used for the current operation.")
|
|
|
- feedbackLabel.stringValue = KMLocalizedString("Feedback (required)")
|
|
|
+ feedbackLabel.stringValue = KMLocalizedString("Feedback(required)")
|
|
|
feedbackTextView.km_placeholderString = KMLocalizedString("Please describe your suggestions in detail so that we can better improve our product.")
|
|
|
- addFileLabel.stringValue = KMLocalizedString("Add Attachment Document")
|
|
|
+ addFileLabel.stringValue = KMLocalizedString("Picture(optional)")
|
|
|
|
|
|
var toolTips = "-" + KMLocalizedString("Limit file size to 20M, upload up to 10 files")
|
|
|
toolTips = toolTips + "\n" + "-" + "No limitations on file formats ( PDF, Excel, Word, Powerpoint, TXT, HTML, MP4, Images and so on)"
|
|
@@ -180,7 +181,7 @@ class KMNBetaFeedbackWindowController: KMNBaseWindowController, NSWindowDelegate
|
|
|
|
|
|
cancelButton.properties.buttonText = KMLocalizedString("Cancel")
|
|
|
applyButton.properties.buttonText = KMLocalizedString("Submit")
|
|
|
- addFileButton.properties.buttonText = KMLocalizedString("Add File")
|
|
|
+ addFileButton.properties.buttonText = KMLocalizedString("Add Files")
|
|
|
|
|
|
cancelButton.reloadData()
|
|
|
applyButton.reloadData()
|
|
@@ -332,20 +333,25 @@ class KMNBetaFeedbackWindowController: KMNBaseWindowController, NSWindowDelegate
|
|
|
@objc func submitButtonClicked(_ sender: NSView) {
|
|
|
_addWaitingView(to: self.window?.contentView ?? NSView())
|
|
|
KMNBetaFeedbackManager.defalutManager.feekbackAction(filePaths: self._filePaths, content: feedbackTextView.string) {[weak self] success, result in
|
|
|
+ self?._removeWaitingView(from: self?.window?.contentView ?? NSView())
|
|
|
+
|
|
|
if (success) {
|
|
|
|
|
|
- if(!(self?.isSupportOpenApp == false)) {
|
|
|
+ if((self?.isSupportOpenApp == false)) {
|
|
|
} else {
|
|
|
self?.submitActionCallback?(true)
|
|
|
}
|
|
|
- self?._removeWaitingView(from: self?.window?.contentView ?? NSView())
|
|
|
-
|
|
|
KMNBetaFeedbackManager.defalutManager.resetHaveFeedback()
|
|
|
KMNBetaFeedbackManager.defalutManager.havingFeekbackAction { success, result in
|
|
|
|
|
|
};
|
|
|
self?.close()
|
|
|
self?.own_closeEndSheet()
|
|
|
+ } else {
|
|
|
+ _ = KMNCustomAlertView.alertView(message: KMLocalizedString("Failed"),
|
|
|
+ type: .error,
|
|
|
+ fromView: self?.window?.contentView ?? NSView(),
|
|
|
+ point:CGPointMake(CGRectGetMidX(self?.window?.contentView?.bounds ?? CGRect.zero), CGRectGetMidY(self?.window?.contentView?.bounds ?? CGRect.zero)))
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -398,6 +404,8 @@ extension KMNBetaFeedbackWindowController: NSTableViewDelegate, NSTableViewDataS
|
|
|
return cell
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
|
|
|
|
|
|
let datas = _filePaths.count
|
|
@@ -429,6 +437,10 @@ extension KMNBetaFeedbackWindowController: NSTableViewDelegate, NSTableViewDataS
|
|
|
self._updateListData()
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
+ func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> Bool {
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|