@ -39,7 +39,6 @@ class AppFeedbackWindowController: NSWindowController {
@IBOutlet var emailField : NSTextField !
@IBOutlet var emailField : NSTextField !
@IBOutlet var feedbackTextView : NSTextView !
@IBOutlet var feedbackTextView : NSTextView !
@IBOutlet var progressIndicator : NSProgressIndicator !
@IBOutlet var progressIndicator : NSProgressIndicator !
@IBOutlet var quickCommentsLabel : PointingHandCursorButton !
@IBOutlet var quickCommentsLabel : PointingHandCursorButton !
public weak var appFeedbackWindowDelegate : AppFeedbackWindowControllerDelegate ?
public weak var appFeedbackWindowDelegate : AppFeedbackWindowControllerDelegate ?
private var themeDidChangeNotification : NSObjectProtocol ?
private var themeDidChangeNotification : NSObjectProtocol ?
@ -270,9 +269,20 @@ class AppFeedbackWindowController: NSWindowController {
contactBox . title = " Contact Information (Optional) " . localized ( )
contactBox . title = " Contact Information (Optional) " . localized ( )
accessoryInfo . stringValue = " Contact fields are optional! Your contact information will let us contact you in case we need more information or can help! " . localized ( )
accessoryInfo . stringValue = " Contact fields are optional! Your contact information will let us contact you in case we need more information or can help! " . localized ( )
let versionUpdateInstance = iVersion . sharedInstance ( )
let string = versionUpdateInstance ? . versionDetails ( since : versionUpdateInstance ? . applicationVersion ,
inDict : versionUpdateInstance ? . remoteVersionsDict )
if string != nil {
let range = NSRange ( location : 37 , length : 13 )
quickCommentsLabel . title = " 📣 An improved Clocker experience is now available! "
quickCommentsLabel . tag = 0
setUnderline ( for : quickCommentsLabel , range : range )
} else {
let range = NSRange ( location : 9 , length : 16 )
let range = NSRange ( location : 9 , length : 16 )
quickCommentsLabel . title = " Tweet to @Clocker_Support if you have a quick comment! "
quickCommentsLabel . title = " Tweet to @Clocker_Support if you have a quick comment! "
setUnderline ( for : quickCommentsLabel , range : range )
setUnderline ( for : quickCommentsLabel , range : range )
quickCommentsLabel . tag = 100
}
[ accessoryInfo ] . forEach { $0 ? . textColor = Themer . shared ( ) . mainTextColor ( ) }
[ accessoryInfo ] . forEach { $0 ? . textColor = Themer . shared ( ) . mainTextColor ( ) }
@ -304,15 +314,11 @@ class AppFeedbackWindowController: NSWindowController {
underlinedButton . attributedTitle = originalText
underlinedButton . attributedTitle = originalText
}
}
@IBAction func navigateToSupportTwitter ( _ : Any ) {
@IBAction func navigateToSupportTwitter ( _ sender : NSButton ) {
guard let twitterURL = URL ( string : AboutUsConstants . TwitterLink ) ,
let link = sender . tag = = 100 ? AboutUsConstants . TwitterLink : AboutUsConstants . AppStoreUpdateLink
let countryCode = Locale . autoupdatingCurrent . regionCode else { return }
guard let url = URL ( string : link ) else { return }
NSWorkspace . shared . open ( twitterURL )
// L o g t h i s
NSWorkspace . shared . open ( url )
let custom : [ String : Any ] = [ " Country " : countryCode ]
Logger . log ( object : custom , for : " Opened Twitter " )
}
}
}
}