Browse Source

Finishing touches!

pull/92/head
Abhishek 5 years ago
parent
commit
9b39ac5539
  1. 24
      Clocker/Clocker.xcodeproj/xcuserdata/ban.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  2. 22
      Clocker/Media.xcassets/Power Icon/Power.imageset/Contents.json
  3. BIN
      Clocker/Media.xcassets/Power Icon/Power.imageset/More-Dark.png
  4. BIN
      Clocker/Media.xcassets/Power Icon/Power.imageset/More.png
  5. BIN
      Clocker/Media.xcassets/Power Icon/Power.imageset/PowerIcon 2.png
  6. BIN
      Clocker/Media.xcassets/Power Icon/Power.imageset/PowerIcon.png
  7. 6
      Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/Contents.json
  8. BIN
      Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/More-Dark.png
  9. BIN
      Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/PowerIcon 2.png
  10. 6
      Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/Contents.json
  11. BIN
      Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/More.png
  12. BIN
      Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/PowerIcon.png
  13. 2
      Clocker/Preferences/About/AboutViewController.swift
  14. 84
      Clocker/Preferences/App Feedback/AppFeedbackWindow.xib
  15. 43
      Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

24
Clocker/Clocker.xcodeproj/xcuserdata/ban.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -1,5 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Bucket <Bucket
uuid = "F515D608-9FB6-4230-BDAA-714D2FAB3B77"
type = "1" type = "1"
version = "2.0"> version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
uuid = "0963511F-240E-487A-8C30-82699394C21B"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
breakpointStackSelectionBehavior = "1"
scope = "1"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
<BreakpointContent
uuid = "4624F314-95A9-4ACC-A82C-CB1A1481BAA4"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket> </Bucket>

22
Clocker/Media.xcassets/Power Icon/Power.imageset/Contents.json vendored

@ -5,29 +5,29 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal",
"scale" : "1x",
"appearances" : [ "appearances" : [
{ {
"appearance" : "luminosity", "appearance" : "luminosity",
"value" : "dark" "value" : "dark"
} }
] ],
"idiom" : "universal",
"scale" : "1x"
}, },
{ {
"filename" : "More.png",
"idiom" : "universal", "idiom" : "universal",
"filename" : "PowerIcon.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal",
"filename" : "PowerIcon 2.png",
"appearances" : [ "appearances" : [
{ {
"appearance" : "luminosity", "appearance" : "luminosity",
"value" : "dark" "value" : "dark"
} }
], ],
"filename" : "More-Dark.png",
"idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
@ -35,18 +35,18 @@
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "universal",
"scale" : "3x",
"appearances" : [ "appearances" : [
{ {
"appearance" : "luminosity", "appearance" : "luminosity",
"value" : "dark" "value" : "dark"
} }
] ],
"idiom" : "universal",
"scale" : "3x"
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }

BIN
Clocker/Media.xcassets/Power Icon/Power.imageset/More-Dark.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
Clocker/Media.xcassets/Power Icon/Power.imageset/More.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
Clocker/Media.xcassets/Power Icon/Power.imageset/PowerIcon 2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
Clocker/Media.xcassets/Power Icon/Power.imageset/PowerIcon.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

6
Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/Contents.json vendored

@ -2,10 +2,10 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "PowerIcon 2.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "More-Dark.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
@ -15,7 +15,7 @@
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }

BIN
Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/More-Dark.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
Clocker/Media.xcassets/Power Icon/PowerIcon-White.imageset/PowerIcon 2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

6
Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/Contents.json vendored

@ -2,10 +2,10 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "PowerIcon.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "More.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
@ -15,7 +15,7 @@
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }

BIN
Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/More.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
Clocker/Media.xcassets/Power Icon/PowerIcon.imageset/PowerIcon.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

2
Clocker/Preferences/About/AboutViewController.swift

@ -6,7 +6,7 @@ struct AboutUsConstants {
static let AboutUsNibIdentifier = "CLAboutWindows" static let AboutUsNibIdentifier = "CLAboutWindows"
static let GitHubURL = "https://github.com/abhishekbanthia/Clocker/?ref=ClockerApp" static let GitHubURL = "https://github.com/abhishekbanthia/Clocker/?ref=ClockerApp"
static let PayPalURL = "https://paypal.me/abhishekbanthia1712" static let PayPalURL = "https://paypal.me/abhishekbanthia1712"
static let TwitterLink = "https://twitter.com/n0shake/?ref=ClockerApp" static let TwitterLink = "https://twitter.com/clocker_support/?ref=ClockerApp"
static let PersonalWebsite = "http://abhishekbanthia.com/?ref=ClockerApp" static let PersonalWebsite = "http://abhishekbanthia.com/?ref=ClockerApp"
static let AppStoreLink = "macappstore://itunes.apple.com/us/app/clocker/id1056643111?action=write-review" static let AppStoreLink = "macappstore://itunes.apple.com/us/app/clocker/id1056643111?action=write-review"
static let CrowdInLocalizationLink = "https://crwd.in/clocker" static let CrowdInLocalizationLink = "https://crwd.in/clocker"

84
Clocker/Preferences/App Feedback/AppFeedbackWindow.xib

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@ -12,10 +12,10 @@
<outlet property="contactBox" destination="JzF-Oq-qhW" id="CUI-1V-SfW"/> <outlet property="contactBox" destination="JzF-Oq-qhW" id="CUI-1V-SfW"/>
<outlet property="emailField" destination="zlM-Cf-OxV" id="uRw-dZ-JGR"/> <outlet property="emailField" destination="zlM-Cf-OxV" id="uRw-dZ-JGR"/>
<outlet property="feedbackTextView" destination="sCg-gV-TTr" id="Evh-WS-epn"/> <outlet property="feedbackTextView" destination="sCg-gV-TTr" id="Evh-WS-epn"/>
<outlet property="headerLabel" destination="gej-YH-9dt" id="mgE-2k-ioK"/>
<outlet property="informativeText" destination="W3a-Hi-ryk" id="qhv-iC-svS"/> <outlet property="informativeText" destination="W3a-Hi-ryk" id="qhv-iC-svS"/>
<outlet property="nameField" destination="Qzm-kE-Igl" id="miJ-7A-VPC"/> <outlet property="nameField" destination="Qzm-kE-Igl" id="miJ-7A-VPC"/>
<outlet property="progressIndicator" destination="h17-og-9PU" id="AE2-Gh-DpO"/> <outlet property="progressIndicator" destination="h17-og-9PU" id="AE2-Gh-DpO"/>
<outlet property="quickCommentsLabel" destination="j4P-EU-Uso" id="TSm-DN-QeM"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/> <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections> </connections>
</customObject> </customObject>
@ -23,24 +23,24 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Clocker Feedback" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5"> <window title="Clocker Feedback" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="437" y="172" width="319" height="392"/> <rect key="contentRect" x="437" y="172" width="319" height="440"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/> <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<view key="contentView" id="se5-gp-TjO"> <view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="319" height="392"/> <rect key="frame" x="0.0" y="0.0" width="319" height="440"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oNX-kV-RGt"> <scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oNX-kV-RGt">
<rect key="frame" x="12" y="205" width="295" height="145"/> <rect key="frame" x="12" y="230" width="295" height="122"/>
<clipView key="contentView" drawsBackground="NO" id="NNn-eZ-8Je"> <clipView key="contentView" drawsBackground="NO" id="NNn-eZ-8Je">
<rect key="frame" x="1" y="1" width="293" height="143"/> <rect key="frame" x="1" y="1" width="293" height="120"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textView importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="sCg-gV-TTr"> <textView importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="sCg-gV-TTr">
<rect key="frame" x="0.0" y="0.0" width="293" height="143"/> <rect key="frame" x="0.0" y="0.0" width="293" height="120"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="293" height="143"/> <size key="minSize" width="293" height="120"/>
<size key="maxSize" width="463" height="10000000"/> <size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</textView> </textView>
@ -55,14 +55,14 @@
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</scroller> </scroller>
</scrollView> </scrollView>
<box boxType="custom" borderType="line" title="Box Title" translatesAutoresizingMaskIntoConstraints="NO" id="JzF-Oq-qhW"> <box translatesAutoresizingMaskIntoConstraints="NO" id="JzF-Oq-qhW">
<rect key="frame" x="12" y="67" width="295" height="125"/> <rect key="frame" x="9" y="63" width="301" height="154"/>
<view key="contentView" id="moX-Vc-vMc"> <view key="contentView" id="moX-Vc-vMc">
<rect key="frame" x="1" y="1" width="293" height="123"/> <rect key="frame" x="3" y="3" width="295" height="135"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="Qzm-kE-Igl"> <textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="Qzm-kE-Igl">
<rect key="frame" x="10" y="88" width="273" height="24"/> <rect key="frame" x="10" y="100" width="275" height="24"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="24" id="6DY-uj-pMG"/> <constraint firstAttribute="height" constant="24" id="6DY-uj-pMG"/>
</constraints> </constraints>
@ -73,7 +73,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="zlM-Cf-OxV"> <textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="zlM-Cf-OxV">
<rect key="frame" x="10" y="54" width="266" height="24"/> <rect key="frame" x="10" y="66" width="267" height="24"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="24" id="b3M-Sc-y8S"/> <constraint firstAttribute="height" constant="24" id="b3M-Sc-y8S"/>
</constraints> </constraints>
@ -84,7 +84,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="LVY-Qw-MYC"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="LVY-Qw-MYC">
<rect key="frame" x="6" y="0.0" width="281" height="44"/> <rect key="frame" x="6" y="0.0" width="283" height="56"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Accessory Info" id="yEq-6I-HBq"> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Accessory Info" id="yEq-6I-HBq">
<font key="font" size="10" name="Avenir-Book"/> <font key="font" size="10" name="Avenir-Book"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -98,6 +98,7 @@
<constraint firstItem="Qzm-kE-Igl" firstAttribute="top" secondItem="moX-Vc-vMc" secondAttribute="top" constant="11" id="Dpz-4F-hN7"/> <constraint firstItem="Qzm-kE-Igl" firstAttribute="top" secondItem="moX-Vc-vMc" secondAttribute="top" constant="11" id="Dpz-4F-hN7"/>
<constraint firstItem="Qzm-kE-Igl" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="10" id="GKZ-24-t7t"/> <constraint firstItem="Qzm-kE-Igl" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="10" id="GKZ-24-t7t"/>
<constraint firstItem="LVY-Qw-MYC" firstAttribute="top" secondItem="zlM-Cf-OxV" secondAttribute="bottom" constant="10" id="Xck-iy-cZk"/> <constraint firstItem="LVY-Qw-MYC" firstAttribute="top" secondItem="zlM-Cf-OxV" secondAttribute="bottom" constant="10" id="Xck-iy-cZk"/>
<constraint firstAttribute="trailing" secondItem="LVY-Qw-MYC" secondAttribute="trailing" constant="8" id="b5X-pR-y2N"/>
<constraint firstItem="LVY-Qw-MYC" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="8" id="iLs-Ob-MZC"/> <constraint firstItem="LVY-Qw-MYC" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="8" id="iLs-Ob-MZC"/>
<constraint firstItem="LVY-Qw-MYC" firstAttribute="centerX" secondItem="moX-Vc-vMc" secondAttribute="centerX" id="k3n-00-eiV"/> <constraint firstItem="LVY-Qw-MYC" firstAttribute="centerX" secondItem="moX-Vc-vMc" secondAttribute="centerX" id="k3n-00-eiV"/>
<constraint firstAttribute="bottom" secondItem="LVY-Qw-MYC" secondAttribute="bottom" id="p1w-eh-TeV"/> <constraint firstAttribute="bottom" secondItem="LVY-Qw-MYC" secondAttribute="bottom" id="p1w-eh-TeV"/>
@ -105,7 +106,7 @@
</constraints> </constraints>
</view> </view>
<constraints> <constraints>
<constraint firstAttribute="height" constant="125" id="lwa-Yt-uxh"/> <constraint firstAttribute="height" constant="150" id="lwa-Yt-uxh"/>
</constraints> </constraints>
<font key="titleFont" size="11" name="Avenir-Book"/> <font key="titleFont" size="11" name="Avenir-Book"/>
</box> </box>
@ -143,17 +144,6 @@ DQ
<action selector="sendFeedback:" target="-2" id="lrL-0l-Jbd"/> <action selector="sendFeedback:" target="-2" id="lrL-0l-Jbd"/>
</connections> </connections>
</button> </button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gej-YH-9dt">
<rect key="frame" x="10" y="358" width="299" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="a7O-DC-irX"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="Header Text" id="oHe-hu-bQn">
<font key="font" size="13" name="Avenir-Book"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="W3a-Hi-ryk"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="W3a-Hi-ryk">
<rect key="frame" x="10" y="47" width="289" height="22"/> <rect key="frame" x="10" y="47" width="289" height="22"/>
<constraints> <constraints>
@ -168,6 +158,36 @@ DQ
<progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="h17-og-9PU"> <progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="h17-og-9PU">
<rect key="frame" x="12" y="19" width="79" height="20"/> <rect key="frame" x="12" y="19" width="79" height="20"/>
</progressIndicator> </progressIndicator>
<box translatesAutoresizingMaskIntoConstraints="NO" id="bGc-DH-2iw">
<rect key="frame" x="9" y="356" width="301" height="84"/>
<view key="contentView" id="6oZ-b5-xPJ">
<rect key="frame" x="3" y="3" width="295" height="65"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="j4P-EU-Uso" customClass="UnderlinedButton" customModule="Clocker" customModuleProvider="target">
<rect key="frame" x="5" y="25" width="285" height="15"/>
<buttonCell key="cell" type="bevel" title="Quick Comments Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="FQy-Mb-DcS">
<behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
<font key="font" size="11" name="Avenir-Light"/>
</buttonCell>
<accessibility identifier="ClockerOpenSourceText"/>
<connections>
<action selector="navigateToSupportTwitter:" target="-2" id="kr0-Ks-qua"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="j4P-EU-Uso" firstAttribute="centerX" secondItem="6oZ-b5-xPJ" secondAttribute="centerX" id="Lzk-D8-sUJ"/>
<constraint firstItem="j4P-EU-Uso" firstAttribute="centerY" secondItem="6oZ-b5-xPJ" secondAttribute="centerY" id="Zio-We-YXV"/>
<constraint firstAttribute="trailing" secondItem="j4P-EU-Uso" secondAttribute="trailing" constant="5" id="geY-fl-hwn"/>
<constraint firstItem="j4P-EU-Uso" firstAttribute="leading" secondItem="6oZ-b5-xPJ" secondAttribute="leading" constant="5" id="ilm-9x-zlx"/>
</constraints>
</view>
<constraints>
<constraint firstAttribute="height" constant="80" id="9IW-uw-ubx"/>
</constraints>
<font key="titleFont" size="11" name="Avenir-Light"/>
</box>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="JzF-Oq-qhW" firstAttribute="trailing" secondItem="oNX-kV-RGt" secondAttribute="trailing" id="4Vq-PW-upG"/> <constraint firstItem="JzF-Oq-qhW" firstAttribute="trailing" secondItem="oNX-kV-RGt" secondAttribute="trailing" id="4Vq-PW-upG"/>
@ -175,22 +195,22 @@ DQ
<constraint firstAttribute="trailing" secondItem="zlM-Cf-OxV" secondAttribute="trailing" constant="30" id="Arj-b2-oje"/> <constraint firstAttribute="trailing" secondItem="zlM-Cf-OxV" secondAttribute="trailing" constant="30" id="Arj-b2-oje"/>
<constraint firstItem="sJq-1o-Bft" firstAttribute="top" secondItem="JzF-Oq-qhW" secondAttribute="bottom" constant="26" id="Epm-On-lNy"/> <constraint firstItem="sJq-1o-Bft" firstAttribute="top" secondItem="JzF-Oq-qhW" secondAttribute="bottom" constant="26" id="Epm-On-lNy"/>
<constraint firstAttribute="trailing" secondItem="oNX-kV-RGt" secondAttribute="trailing" constant="12" id="IqR-EG-ga3"/> <constraint firstAttribute="trailing" secondItem="oNX-kV-RGt" secondAttribute="trailing" constant="12" id="IqR-EG-ga3"/>
<constraint firstItem="bGc-DH-2iw" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="JMO-BF-p3W"/>
<constraint firstItem="sJq-1o-Bft" firstAttribute="leading" secondItem="szs-8j-SMN" secondAttribute="trailing" constant="8" id="JSB-K6-cbX"/> <constraint firstItem="sJq-1o-Bft" firstAttribute="leading" secondItem="szs-8j-SMN" secondAttribute="trailing" constant="8" id="JSB-K6-cbX"/>
<constraint firstAttribute="trailing" secondItem="sJq-1o-Bft" secondAttribute="trailing" constant="20" id="KuW-ez-Od9"/> <constraint firstAttribute="trailing" secondItem="sJq-1o-Bft" secondAttribute="trailing" constant="20" id="KuW-ez-Od9"/>
<constraint firstItem="JzF-Oq-qhW" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="NCF-RW-EvZ"/> <constraint firstItem="JzF-Oq-qhW" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="NCF-RW-EvZ"/>
<constraint firstAttribute="bottom" secondItem="h17-og-9PU" secondAttribute="bottom" constant="20" id="OLS-kL-muQ"/> <constraint firstAttribute="bottom" secondItem="h17-og-9PU" secondAttribute="bottom" constant="20" id="OLS-kL-muQ"/>
<constraint firstItem="oNX-kV-RGt" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="P0X-Hb-ZtS"/> <constraint firstItem="oNX-kV-RGt" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="P0X-Hb-ZtS"/>
<constraint firstItem="szs-8j-SMN" firstAttribute="leading" secondItem="h17-og-9PU" secondAttribute="trailing" constant="8" id="S7a-To-K83"/> <constraint firstItem="szs-8j-SMN" firstAttribute="leading" secondItem="h17-og-9PU" secondAttribute="trailing" constant="8" id="S7a-To-K83"/>
<constraint firstAttribute="trailing" secondItem="bGc-DH-2iw" secondAttribute="trailing" constant="12" id="Swh-0I-anu"/>
<constraint firstAttribute="bottom" secondItem="sJq-1o-Bft" secondAttribute="bottom" constant="20" id="cft-qs-VMz"/> <constraint firstAttribute="bottom" secondItem="sJq-1o-Bft" secondAttribute="bottom" constant="20" id="cft-qs-VMz"/>
<constraint firstItem="oNX-kV-RGt" firstAttribute="top" secondItem="6oZ-b5-xPJ" secondAttribute="bottom" constant="7" id="dlq-R6-ar3"/>
<constraint firstItem="h17-og-9PU" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="iIH-oN-lBO"/> <constraint firstItem="h17-og-9PU" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="iIH-oN-lBO"/>
<constraint firstAttribute="trailing" secondItem="W3a-Hi-ryk" secondAttribute="trailing" constant="22" id="j6H-0M-Cux"/> <constraint firstAttribute="trailing" secondItem="W3a-Hi-ryk" secondAttribute="trailing" constant="22" id="j6H-0M-Cux"/>
<constraint firstAttribute="trailing" secondItem="gej-YH-9dt" secondAttribute="trailing" constant="12" id="qjH-ND-NKx"/> <constraint firstItem="bGc-DH-2iw" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="o8t-tV-qS6"/>
<constraint firstItem="gej-YH-9dt" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="tlA-wq-Gts"/>
<constraint firstItem="JzF-Oq-qhW" firstAttribute="top" secondItem="oNX-kV-RGt" secondAttribute="bottom" constant="13" id="v2l-OZ-epC"/> <constraint firstItem="JzF-Oq-qhW" firstAttribute="top" secondItem="oNX-kV-RGt" secondAttribute="bottom" constant="13" id="v2l-OZ-epC"/>
<constraint firstItem="szs-8j-SMN" firstAttribute="top" secondItem="W3a-Hi-ryk" secondAttribute="bottom" constant="6" id="vlm-Yj-d84"/> <constraint firstItem="szs-8j-SMN" firstAttribute="top" secondItem="W3a-Hi-ryk" secondAttribute="bottom" constant="6" id="vlm-Yj-d84"/>
<constraint firstAttribute="bottom" secondItem="szs-8j-SMN" secondAttribute="bottom" constant="20" id="xos-N8-d1k"/> <constraint firstAttribute="bottom" secondItem="szs-8j-SMN" secondAttribute="bottom" constant="20" id="xos-N8-d1k"/>
<constraint firstItem="gej-YH-9dt" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="14" id="yZE-PY-8EZ"/>
<constraint firstItem="oNX-kV-RGt" firstAttribute="top" secondItem="gej-YH-9dt" secondAttribute="bottom" constant="8" id="yec-Eo-Jb9"/>
</constraints> </constraints>
</view> </view>
<connections> <connections>

43
Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

@ -33,6 +33,7 @@ class AppFeedbackWindowController: NSWindowController {
@IBOutlet var informativeText: NSTextField! @IBOutlet var informativeText: NSTextField!
@IBOutlet var progressIndicator: NSProgressIndicator! @IBOutlet var progressIndicator: NSProgressIndicator!
@IBOutlet var quickCommentsLabel: UnderlinedButton!
private var themeDidChangeNotification: NSObjectProtocol? private var themeDidChangeNotification: NSObjectProtocol?
private var serialNumber: String? { private var serialNumber: String? {
let platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")) let platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
@ -72,6 +73,7 @@ class AppFeedbackWindowController: NSWindowController {
nameField.setAccessibilityIdentifier("NameField") nameField.setAccessibilityIdentifier("NameField")
emailField.setAccessibilityIdentifier("EmailField") emailField.setAccessibilityIdentifier("EmailField")
progressIndicator.setAccessibilityIdentifier("ProgressIndicator") progressIndicator.setAccessibilityIdentifier("ProgressIndicator")
quickCommentsLabel.setAccessibility("QuickCommentLabel")
setup() setup()
@ -204,19 +206,54 @@ class AppFeedbackWindowController: NSWindowController {
informativeText.stringValue = CLEmptyString informativeText.stringValue = CLEmptyString
} }
@IBOutlet var headerLabel: NSTextField!
@IBOutlet var contactBox: NSBox! @IBOutlet var contactBox: NSBox!
@IBOutlet var accessoryInfo: NSTextField! @IBOutlet var accessoryInfo: NSTextField!
private func setup() { private func setup() {
headerLabel.stringValue = "Tell us what you think!".localized()
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()
[headerLabel, accessoryInfo].forEach { $0?.textColor = Themer.shared().mainTextColor() } let range = NSRange(location: 9, length: 15)
quickCommentsLabel.title = "Tweet to @ClockerSupport if you have a quick comment!"
setUnderline(for: quickCommentsLabel, range: range)
[accessoryInfo].forEach { $0?.textColor = Themer.shared().mainTextColor() }
contactBox.borderColor = Themer.shared().mainTextColor() contactBox.borderColor = Themer.shared().mainTextColor()
} }
private func setUnderline(for button: UnderlinedButton?, range: NSRange) {
guard let underlinedButton = button else { return }
let mutableParaghStyle = NSMutableParagraphStyle()
mutableParaghStyle.alignment = .center
let originalText = NSMutableAttributedString(string: underlinedButton.title)
originalText.addAttribute(NSAttributedString.Key.underlineStyle,
value: NSNumber(value: Int8(NSUnderlineStyle.single.rawValue)),
range: range)
originalText.addAttribute(NSAttributedString.Key.foregroundColor,
value: Themer.shared().mainTextColor(),
range: NSRange(location: 0, length: underlinedButton.attributedTitle.string.count))
originalText.addAttribute(NSAttributedString.Key.font,
value: (button?.font)!,
range: NSRange(location: 0, length: underlinedButton.attributedTitle.string.count))
originalText.addAttribute(NSAttributedString.Key.paragraphStyle,
value: mutableParaghStyle,
range: NSRange(location: 0, length: underlinedButton.attributedTitle.string.count))
underlinedButton.attributedTitle = originalText
}
@IBAction func navigateToSupportTwitter(_: Any) {
guard let twitterURL = URL(string: AboutUsConstants.TwitterLink),
let countryCode = Locale.autoupdatingCurrent.regionCode else { return }
NSWorkspace.shared.open(twitterURL)
// Log this
let custom: [String: Any] = ["Country": countryCode]
Logger.log(object: custom, for: "Opened Twitter")
}
} }
extension AppFeedbackWindowController: NSWindowDelegate { extension AppFeedbackWindowController: NSWindowDelegate {

Loading…
Cancel
Save