Account / Explainers

Fixes #2553
Fixes #2554

Introduces Mail-inspired add account sheets
This commit is contained in:
Stuart Breckenridge 2020-11-06 19:07:28 +08:00
parent 6f09a6682d
commit ba5a06c108
16 changed files with 630 additions and 361 deletions

View File

@ -17,40 +17,14 @@
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="398" height="205"/>
<rect key="contentRect" x="196" y="240" width="398" height="135"/>
<rect key="screenRect" x="0.0" y="0.0" width="1792" height="1095"/>
<view key="contentView" wantsLayer="YES" misplaced="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="398" height="205"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="398" height="135"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uDK-ji-zlT">
<rect key="frame" x="127" y="107" width="145" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ySx-qg-WbT">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="36" id="BKI-n8-fbR"/>
<constraint firstAttribute="height" constant="36" id="NLk-V3-hn9"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountCloudKit" id="9RZ-J3-ioX"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="80D-3X-rL2">
<rect key="frame" x="53" y="0.0" width="94" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="iCloud" id="1d2-Mx-TKe">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" ambiguous="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uDK-ji-zlT">
<rect key="frame" x="199" y="59" width="0.0" height="16"/>
</stackView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xqo-gP-MPl">
<rect key="frame" x="310" y="13" width="75" height="32"/>
@ -78,34 +52,56 @@ Gw
<action selector="cancel:" target="-2" id="uDi-hX-dXu"/>
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Kj-Cl-FJQ">
<rect key="frame" x="47" y="56" width="304" height="16"/>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ySx-qg-WbT">
<rect key="frame" x="20" y="71" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="xiK-wa-r3v"/>
<constraint firstAttribute="width" constant="50" id="LlV-kM-gHE"/>
<constraint firstAttribute="height" constant="50" id="MjL-TR-9ey"/>
</constraints>
<textFieldCell key="cell" selectable="YES" allowsUndo="NO" title="This account syncs using your iCloud account." id="wfr-Dv-UIF">
<font key="font" metaFont="system"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountCloudKit" id="9RZ-J3-ioX"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="80D-3X-rL2">
<rect key="frame" x="76" y="99" width="304" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Sign in to your iCloud account." id="1d2-Mx-TKe">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Kj-Cl-FJQ">
<rect key="frame" x="76" y="59" width="304" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="ZJN-cn-p1x"/>
</constraints>
<textFieldCell key="cell" selectable="YES" allowsUndo="NO" title="This account syncs across your Mac and iOS devices using your iCloud account." id="wfr-Dv-UIF">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="9eG-vV-s8c" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="bottom" constant="16" id="BZP-Fw-AVu"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="4kd-dG-z7L"/>
<constraint firstItem="ySx-qg-WbT" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" symbolic="YES" id="9lr-cs-zBS"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="leading" secondItem="ySx-qg-WbT" secondAttribute="trailing" constant="8" symbolic="YES" id="Ab3-E3-UxG"/>
<constraint firstItem="9eG-vV-s8c" firstAttribute="centerY" secondItem="xqo-gP-MPl" secondAttribute="centerY" id="DLC-C8-enC"/>
<constraint firstAttribute="bottom" secondItem="xqo-gP-MPl" secondAttribute="bottom" constant="20" id="HgX-ud-184"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="bfd-35-bLi"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="top" secondItem="80D-3X-rL2" secondAttribute="bottom" constant="35" id="gh3-I9-x4r"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="16" id="h30-eN-6VF"/>
<constraint firstAttribute="trailing" secondItem="3Kj-Cl-FJQ" secondAttribute="trailing" constant="20" symbolic="YES" id="QS1-QM-lOc"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="leading" secondItem="ySx-qg-WbT" secondAttribute="trailing" constant="8" symbolic="YES" id="Ue2-Kp-nGw"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="44" id="V0G-KC-FTs"/>
<constraint firstItem="9eG-vV-s8c" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="bottom" constant="19" id="VYR-uJ-Qmy"/>
<constraint firstItem="xqo-gP-MPl" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="bottom" constant="19" id="mg9-pV-zid"/>
<constraint firstItem="xqo-gP-MPl" firstAttribute="leading" secondItem="9eG-vV-s8c" secondAttribute="trailing" constant="11" id="p6M-6b-ybu"/>
<constraint firstItem="uDK-ji-zlT" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="uXu-yF-PBG"/>
<constraint firstItem="ySx-qg-WbT" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="14" id="xee-QN-iej"/>
<constraint firstAttribute="trailing" secondItem="80D-3X-rL2" secondAttribute="trailing" constant="20" symbolic="YES" id="xzC-kN-UlB"/>
<constraint firstAttribute="trailing" secondItem="xqo-gP-MPl" secondAttribute="trailing" constant="20" id="z4O-vd-ear"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="hpu-h7-p4Z"/>
</connections>
<point key="canvasLocation" x="99" y="114.5"/>
<point key="canvasLocation" x="99" y="79.5"/>
</window>
</objects>
<resources>

View File

@ -20,70 +20,15 @@
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="398" height="205"/>
<rect key="screenRect" x="0.0" y="0.0" width="1792" height="1095"/>
<view key="contentView" wantsLayer="YES" misplaced="YES" id="EiT-Mj-1SZ">
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="398" height="205"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uDK-ji-zlT">
<rect key="frame" x="93" y="160" width="213" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ySx-qg-WbT">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="36" id="BKI-n8-fbR"/>
<constraint firstAttribute="height" constant="36" id="NLk-V3-hn9"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountLocal" id="9RZ-J3-ioX"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="80D-3X-rL2">
<rect key="frame" x="53" y="0.0" width="162" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="On My Mac" id="1d2-Mx-TKe">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" ambiguous="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uDK-ji-zlT">
<rect key="frame" x="199" y="151" width="0.0" height="102"/>
</stackView>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6Q7-nI-h5u">
<rect key="frame" x="105" y="104" width="188" height="21"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MWg-UL-xtj">
<rect key="frame" x="-2" y="3" width="44" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Name:" id="AVh-ns-LEN">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f9b-FM-i8Q">
<rect key="frame" x="48" y="0.0" width="140" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="140" id="cdf-tS-vno"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="Y12-ua-Bj8">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<stackView distribution="fill" orientation="horizontal" alignment="firstBaseline" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" ambiguous="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6Q7-nI-h5u">
<rect key="frame" x="199" y="95" width="0.0" height="21"/>
</stackView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xqo-gP-MPl">
<rect key="frame" x="310" y="13" width="75" height="32"/>
@ -111,29 +56,68 @@ Gw
<action selector="cancel:" target="-2" id="uDi-hX-dXu"/>
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Kj-Cl-FJQ">
<rect key="frame" x="87" y="56" width="224" height="32"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="80D-3X-rL2">
<rect key="frame" x="87" y="169" width="293" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Create a local account on your Mac." id="1d2-Mx-TKe">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ySx-qg-WbT">
<rect key="frame" x="20" y="135" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="220" id="xiK-wa-r3v"/>
<constraint firstAttribute="height" constant="50" id="Hzy-OP-e84"/>
<constraint firstAttribute="width" constant="50" id="Z8v-O8-FE5"/>
</constraints>
<textFieldCell key="cell" selectable="YES" allowsUndo="NO" title="This account stores all of its data on your Mac. It does not sync." id="wfr-Dv-UIF">
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountLocal" id="9RZ-J3-ioX"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MWg-UL-xtj">
<rect key="frame" x="87" y="98" width="44" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Name:" id="AVh-ns-LEN">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="f9b-FM-i8Q">
<rect key="frame" x="137" y="95" width="200" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="Y12-ua-Bj8">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Kj-Cl-FJQ">
<rect key="frame" x="87" y="129" width="293" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="CaZ-mY-r4X"/>
</constraints>
<textFieldCell key="cell" selectable="YES" allowsUndo="NO" title="Local accounts store their data on your Mac. They do not sync across your devices." id="wfr-Dv-UIF">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="6Q7-nI-h5u" firstAttribute="top" secondItem="80D-3X-rL2" secondAttribute="bottom" constant="35" id="3Sa-lr-BqF"/>
<constraint firstItem="9eG-vV-s8c" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="bottom" constant="16" id="BZP-Fw-AVu"/>
<constraint firstItem="9eG-vV-s8c" firstAttribute="centerY" secondItem="xqo-gP-MPl" secondAttribute="centerY" id="DLC-C8-enC"/>
<constraint firstAttribute="bottom" secondItem="xqo-gP-MPl" secondAttribute="bottom" constant="20" id="HgX-ud-184"/>
<constraint firstItem="6Q7-nI-h5u" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="KYO-G6-21s"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="top" secondItem="6Q7-nI-h5u" secondAttribute="bottom" constant="16" id="baJ-uI-EGJ"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="bfd-35-bLi"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="16" id="h30-eN-6VF"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="leading" secondItem="ySx-qg-WbT" secondAttribute="trailing" constant="19" id="Kuc-ym-H5a"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="leading" secondItem="ySx-qg-WbT" secondAttribute="trailing" constant="19" id="Pwn-uQ-qtc"/>
<constraint firstItem="3Kj-Cl-FJQ" firstAttribute="top" secondItem="80D-3X-rL2" secondAttribute="bottom" constant="8" symbolic="YES" id="Rcn-2y-Jkt"/>
<constraint firstItem="9eG-vV-s8c" firstAttribute="top" secondItem="f9b-FM-i8Q" secondAttribute="bottom" constant="55" id="Ybo-3e-eRV"/>
<constraint firstItem="xqo-gP-MPl" firstAttribute="top" secondItem="f9b-FM-i8Q" secondAttribute="bottom" constant="55" id="a0H-cm-vg7"/>
<constraint firstItem="f9b-FM-i8Q" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="bottom" constant="13" id="avx-Vn-eLL"/>
<constraint firstItem="ySx-qg-WbT" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" symbolic="YES" id="cSC-er-N4i"/>
<constraint firstItem="ySx-qg-WbT" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="dmH-e1-X3W"/>
<constraint firstItem="xqo-gP-MPl" firstAttribute="leading" secondItem="9eG-vV-s8c" secondAttribute="trailing" constant="11" id="p6M-6b-ybu"/>
<constraint firstItem="80D-3X-rL2" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="qaR-ST-LnB"/>
<constraint firstItem="uDK-ji-zlT" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="uXu-yF-PBG"/>
<constraint firstAttribute="trailing" secondItem="80D-3X-rL2" secondAttribute="trailing" constant="20" symbolic="YES" id="xkO-OB-uR2"/>
<constraint firstAttribute="trailing" secondItem="3Kj-Cl-FJQ" secondAttribute="trailing" constant="20" symbolic="YES" id="z0z-oa-qLm"/>
<constraint firstAttribute="trailing" secondItem="xqo-gP-MPl" secondAttribute="trailing" constant="20" id="z4O-vd-ear"/>
</constraints>
</view>

View File

@ -23,7 +23,7 @@ class AccountsAddLocalWindowController: NSWindowController {
override func windowDidLoad() {
super.windowDidLoad()
localAccountNameTextField.stringValue = Account.defaultLocalAccountName
localAccountNameTextField.stringValue = NSLocalizedString("Create a local account on your Mac.", comment: "Account Local")
}
// MARK: API

View File

@ -3,15 +3,19 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccountsFeedWranglerWindowController" customModule="NetNewsWire" customModuleProvider="target">
<connections>
<outlet property="actionButton" destination="9mz-D9-krh" id="ozu-6Q-9Lb"/>
<outlet property="errorMessageLabel" destination="byK-Sd-r7F" id="8zt-9d-dWQ"/>
<outlet property="createNewAccountButton" destination="pPT-Cj-3vI" id="KAL-Y7-XQK"/>
<outlet property="errorMessageLabel" destination="zwG-Ag-z8o" id="7a1-iJ-URN"/>
<outlet property="noAccountTextField" destination="xEl-Ae-5r8" id="dU3-Jv-Aq8"/>
<outlet property="passwordTextField" destination="JSa-LY-zNQ" id="5cF-bM-CJE"/>
<outlet property="progressIndicator" destination="B0W-bh-Evv" id="Tiq-gx-s3F"/>
<outlet property="signInTextField" destination="lti-yM-8LV" id="ZgR-2i-RXB"/>
<outlet property="usernameTextField" destination="78p-Cf-f55" id="Gg5-Ce-RJv"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections>
@ -28,40 +32,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Ht-Fn-0Ya">
<rect key="frame" x="89" y="191" width="256" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Ern-Kk-8LX"/>
<constraint firstAttribute="width" constant="36" id="PLS-68-NMc"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountFeedWrangler" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="53" y="0.0" width="205" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Feed Wrangler" id="ras-dj-nP8">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<rect key="frame" x="217" y="229" width="0.0" height="0.0"/>
</stackView>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="12" columnSpacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="79" y="60" width="276" height="99"/>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="7" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="80" y="127" width="270" height="49"/>
<rows>
<gridRow id="DRl-lC-vUc"/>
<gridRow id="eW8-uH-txq"/>
<gridRow id="DbI-7g-Xme"/>
</rows>
<columns>
<gridColumn id="fCQ-jY-Mts"/>
@ -70,7 +47,7 @@
<gridCells>
<gridCell row="DRl-lC-vUc" column="fCQ-jY-Mts" id="4DI-01-jGD">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zy6-9c-8TI">
<rect key="frame" x="23" y="81" width="41" height="16"/>
<rect key="frame" x="23" y="31" width="41" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Email:" id="DqN-SV-v35">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -80,11 +57,11 @@
</gridCell>
<gridCell row="DRl-lC-vUc" column="7CY-bX-6x4" id="Z0b-qS-MUJ">
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="78p-Cf-f55">
<rect key="frame" x="76" y="78" width="200" height="21"/>
<rect key="frame" x="70" y="28" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Qin-jm-4zt"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="fCk-Tf-q01">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="me@email.com" drawsBackground="YES" id="fCk-Tf-q01">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -93,7 +70,7 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="fCQ-jY-Mts" id="Hqa-3w-cQv">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wEx-TM-rPM">
<rect key="frame" x="-2" y="48" width="66" height="16"/>
<rect key="frame" x="-2" y="3" width="66" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Password:" id="7g8-Kk-ISg">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -103,11 +80,11 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="7CY-bX-6x4" id="m16-3v-9pf">
<secureTextField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JSa-LY-zNQ">
<rect key="frame" x="76" y="45" width="200" height="21"/>
<rect key="frame" x="70" y="0.0" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="eal-wa-1nU"/>
</constraints>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="•••••••••" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -117,17 +94,6 @@
</secureTextFieldCell>
</secureTextField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="fCQ-jY-Mts" headOfMergedCell="xX0-vn-AId" xPlacement="leading" id="xX0-vn-AId">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="byK-Sd-r7F">
<rect key="frame" x="-2" y="9" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" id="0yh-Ab-UTX">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="7CY-bX-6x4" headOfMergedCell="xX0-vn-AId" id="hk5-St-E4y"/>
</gridCells>
</gridView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9mz-D9-krh">
@ -156,22 +122,100 @@ Gw
<action selector="cancel:" target="-2" id="WAD-ES-hpq"/>
</connections>
</button>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="20" y="179" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Ern-Kk-8LX"/>
<constraint firstAttribute="width" constant="50" id="PLS-68-NMc"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountFeedWrangler" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="78" y="213" width="337" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Sign in to your Feed Wrangler account." id="ras-dj-nP8">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xEl-Ae-5r8">
<rect key="frame" x="78" y="193" width="216" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Don't have a Feed Wrangler account?" id="DFR-20-sjO">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pPT-Cj-3vI">
<rect key="frame" x="293" y="193" width="105" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="105" id="Ez2-gz-Wqf"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Create one here." bezelStyle="roundedRect" alignment="center" state="on" imageScaling="proportionallyDown" inset="2" id="tlF-nc-ZOr">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
</buttonCell>
<color key="contentTintColor" name="AccentColor"/>
<connections>
<action selector="createAccountWithProvider:" target="-2" id="bp5-3n-RLW"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uzn-QS-o4p">
<rect key="frame" x="78" y="73" width="337" height="39"/>
<constraints>
<constraint firstAttribute="height" constant="39" id="99q-po-zLV"/>
<constraint firstAttribute="width" constant="333" id="oSi-jz-DZ8"/>
</constraints>
<textFieldCell key="cell" title="Your username and password will be encrypted and stored in Keychain. " id="83j-VH-GgC">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="B0W-bh-Evv">
<rect key="frame" x="209" y="167" width="16" height="16"/>
<rect key="frame" x="256" y="22" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="ggl-Gq-PUV"/>
<constraint firstAttribute="height" constant="16" id="m1z-4y-g41"/>
</constraints>
</progressIndicator>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zwG-Ag-z8o">
<rect key="frame" x="18" y="23" width="230" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="226" id="jvg-qt-4RV"/>
</constraints>
<textFieldCell key="cell" id="b2G-2g-1KR">
<font key="font" textStyle="subheadline" name=".SFNS-Regular"/>
<color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="3dK-9R-7wX"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="8qB-Qh-zBJ"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="leading" secondItem="XAM-Hb-0Hw" secondAttribute="trailing" constant="12" symbolic="YES" id="CC8-HR-FDy"/>
<constraint firstItem="xEl-Ae-5r8" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="5" id="FOT-OS-h0G"/>
<constraint firstAttribute="trailing" secondItem="lti-yM-8LV" secondAttribute="trailing" constant="20" symbolic="YES" id="Hxs-l1-XFt"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="leading" secondItem="zwG-Ag-z8o" secondAttribute="trailing" constant="10" id="Kyv-Pw-z56"/>
<constraint firstItem="Uzn-QS-o4p" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="Lm2-GS-vEg"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="centerY" secondItem="9mz-D9-krh" secondAttribute="centerY" id="M2M-fb-kfR"/>
<constraint firstItem="pPT-Cj-3vI" firstAttribute="leading" secondItem="xEl-Ae-5r8" secondAttribute="trailing" constant="1" id="NXU-SK-5WO"/>
<constraint firstAttribute="bottom" secondItem="9mz-D9-krh" secondAttribute="bottom" constant="20" id="PK2-Ye-400"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="8" id="V7z-a7-OOG"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="top" secondItem="zBB-JH-huI" secondAttribute="bottom" constant="20" symbolic="YES" id="Wu3-hp-Vzh"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="aFI-4s-mMv"/>
<constraint firstItem="pPT-Cj-3vI" firstAttribute="centerY" secondItem="xEl-Ae-5r8" secondAttribute="centerY" id="XKR-hU-WpE"/>
<constraint firstItem="Uzn-QS-o4p" firstAttribute="top" secondItem="JSa-LY-zNQ" secondAttribute="bottom" constant="15" id="Z84-bl-0dI"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="leading" secondItem="B0W-bh-Evv" secondAttribute="trailing" constant="8" symbolic="YES" id="afl-Cl-zda"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="dDr-Rs-AyZ"/>
<constraint firstAttribute="bottom" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="22" id="dzj-Jm-8mI"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="eIn-Pl-krd"/>
<constraint firstItem="zwG-Ag-z8o" firstAttribute="centerY" secondItem="XAM-Hb-0Hw" secondAttribute="centerY" id="ed6-s2-xPp"/>
<constraint firstAttribute="trailing" secondItem="9mz-D9-krh" secondAttribute="trailing" constant="20" id="fVQ-zN-rKd"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="8" id="gq2-tB-pXH"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" id="jlY-Jg-KJR"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="lrN-Gd-iXd"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="xEl-Ae-5r8" secondAttribute="bottom" constant="17" id="rbr-SG-72y"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="tAZ-Te-w3H"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="wWG-kT-6M7"/>
<constraint firstItem="xEl-Ae-5r8" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="zAY-I9-eKa"/>
<constraint firstItem="zwG-Ag-z8o" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="zDh-um-1B7"/>
</constraints>
</view>
<connections>
@ -182,5 +226,8 @@ Gw
</objects>
<resources>
<image name="accountFeedWrangler" width="261" height="261"/>
<namedColor name="AccentColor">
<color red="0.030999999493360519" green="0.41600000858306885" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@ -12,6 +12,10 @@ import RSWeb
import Secrets
class AccountsFeedWranglerWindowController: NSWindowController {
@IBOutlet weak var signInTextField: NSTextField!
@IBOutlet weak var noAccountTextField: NSTextField!
@IBOutlet weak var createNewAccountButton: NSButton!
@IBOutlet weak var progressIndicator: NSProgressIndicator!
@IBOutlet weak var usernameTextField: NSTextField!
@IBOutlet weak var passwordTextField: NSSecureTextField!
@ -30,8 +34,12 @@ class AccountsFeedWranglerWindowController: NSWindowController {
if let account = account, let credentials = try? account.retrieveCredentials(type: .basic) {
usernameTextField.stringValue = credentials.username
actionButton.title = NSLocalizedString("Update", comment: "Update")
signInTextField.stringValue = NSLocalizedString("Update your Feed Wrangler account credentials.", comment: "SignIn")
noAccountTextField.isHidden = true
createNewAccountButton.isHidden = true
} else {
actionButton.title = NSLocalizedString("Create", comment: "Create")
signInTextField.stringValue = NSLocalizedString("Sign in to your Feed Wrangler account.", comment: "SignIn")
}
}
@ -113,4 +121,9 @@ class AccountsFeedWranglerWindowController: NSWindowController {
}
}
}
@IBAction func createAccountWithProvider(_ sender: Any) {
NSWorkspace.shared.open(URL(string: "https://feedwrangler.net/users/new")!)
}
}

View File

@ -3,15 +3,19 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccountsFeedbinWindowController" customModule="NetNewsWire" customModuleProvider="target">
<connections>
<outlet property="actionButton" destination="9mz-D9-krh" id="ozu-6Q-9Lb"/>
<outlet property="errorMessageLabel" destination="byK-Sd-r7F" id="8zt-9d-dWQ"/>
<outlet property="createNewAccountButton" destination="MlB-jN-Ybe" id="w6v-BW-0yQ"/>
<outlet property="errorMessageLabel" destination="sPC-hi-ewD" id="Lb6-0x-X2t"/>
<outlet property="noAccountTextField" destination="gEK-TH-URn" id="Spi-K5-FmU"/>
<outlet property="passwordTextField" destination="JSa-LY-zNQ" id="5cF-bM-CJE"/>
<outlet property="progressIndicator" destination="B0W-bh-Evv" id="Tiq-gx-s3F"/>
<outlet property="signInTextField" destination="lti-yM-8LV" id="xU2-4q-bP7"/>
<outlet property="usernameTextField" destination="78p-Cf-f55" id="Gg5-Ce-RJv"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections>
@ -28,43 +32,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Ht-Fn-0Ya">
<rect key="frame" x="134" y="191" width="166" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Ern-Kk-8LX"/>
<constraint firstAttribute="width" constant="36" id="PLS-68-NMc"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountFeedbin" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="53" y="0.0" width="115" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Feedbin" id="ras-dj-nP8">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<rect key="frame" x="233" y="229" width="0.0" height="0.0"/>
</stackView>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="12" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="82" y="60" width="270" height="99"/>
<constraints>
<constraint firstItem="byK-Sd-r7F" firstAttribute="width" secondItem="JSa-LY-zNQ" secondAttribute="width" id="ImZ-BU-uKB"/>
</constraints>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="7" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="80" y="127" width="270" height="49"/>
<rows>
<gridRow id="DRl-lC-vUc"/>
<gridRow id="eW8-uH-txq"/>
<gridRow id="DbI-7g-Xme"/>
</rows>
<columns>
<gridColumn id="fCQ-jY-Mts"/>
@ -73,7 +47,7 @@
<gridCells>
<gridCell row="DRl-lC-vUc" column="fCQ-jY-Mts" id="4DI-01-jGD">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zy6-9c-8TI">
<rect key="frame" x="23" y="81" width="41" height="16"/>
<rect key="frame" x="23" y="31" width="41" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Email:" id="DqN-SV-v35">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -83,11 +57,11 @@
</gridCell>
<gridCell row="DRl-lC-vUc" column="7CY-bX-6x4" id="Z0b-qS-MUJ">
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="78p-Cf-f55">
<rect key="frame" x="70" y="78" width="200" height="21"/>
<rect key="frame" x="70" y="28" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Qin-jm-4zt"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="fCk-Tf-q01">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="me@email.com" drawsBackground="YES" id="fCk-Tf-q01">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -96,7 +70,7 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="fCQ-jY-Mts" id="Hqa-3w-cQv">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wEx-TM-rPM">
<rect key="frame" x="-2" y="48" width="66" height="16"/>
<rect key="frame" x="-2" y="3" width="66" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Password:" id="7g8-Kk-ISg">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -106,11 +80,11 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="7CY-bX-6x4" id="m16-3v-9pf">
<secureTextField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JSa-LY-zNQ">
<rect key="frame" x="70" y="45" width="200" height="21"/>
<rect key="frame" x="70" y="0.0" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="eal-wa-1nU"/>
</constraints>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="•••••••••" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -120,17 +94,6 @@
</secureTextFieldCell>
</secureTextField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="fCQ-jY-Mts" xPlacement="leading" id="xX0-vn-AId"/>
<gridCell row="DbI-7g-Xme" column="7CY-bX-6x4" yPlacement="top" id="hk5-St-E4y">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="byK-Sd-r7F">
<rect key="frame" x="68" y="17" width="204" height="16"/>
<textFieldCell key="cell" id="0yh-Ab-UTX">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
</gridCells>
</gridView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9mz-D9-krh">
@ -159,22 +122,100 @@ Gw
<action selector="cancel:" target="-2" id="WAD-ES-hpq"/>
</connections>
</button>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="20" y="182" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="C4r-4y-79Z"/>
<constraint firstAttribute="height" constant="50" id="prg-y8-RI9"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountFeedbin" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="78" y="213" width="337" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Sign in to your Feedbin account." id="ras-dj-nP8">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gEK-TH-URn">
<rect key="frame" x="78" y="193" width="179" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Don't have a Feedbin account?" id="QF5-gl-fjb">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="X1Z-v1-T5L">
<rect key="frame" x="78" y="82" width="337" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="NRl-GS-cHS"/>
<constraint firstAttribute="width" constant="333" id="cNd-Nt-bdB"/>
</constraints>
<textFieldCell key="cell" title="Your username and password will be encrypted and stored in Keychain. " id="HuQ-TS-tS3">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MlB-jN-Ybe">
<rect key="frame" x="254" y="193" width="105" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="105" id="fHd-fN-n8G"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Create one here." bezelStyle="roundedRect" alignment="center" state="on" imageScaling="proportionallyDown" inset="2" id="fx3-Uk-NVw">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
</buttonCell>
<color key="contentTintColor" name="AccentColor"/>
<connections>
<action selector="createAccountWithProvider:" target="-2" id="t3r-Jo-xim"/>
</connections>
</button>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="B0W-bh-Evv">
<rect key="frame" x="209" y="167" width="16" height="16"/>
<rect key="frame" x="256" y="22" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="Tcz-vj-cLr"/>
<constraint firstAttribute="height" constant="16" id="slt-7y-Jw0"/>
</constraints>
</progressIndicator>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sPC-hi-ewD">
<rect key="frame" x="27" y="23" width="223" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="219" id="1jw-Q0-cm5"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="clipping" id="sl9-fG-jwg">
<font key="font" textStyle="subheadline" name=".SFNS-Regular"/>
<color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="X1Z-v1-T5L" firstAttribute="top" secondItem="JSa-LY-zNQ" secondAttribute="bottom" constant="15" id="2U1-Zm-vzz"/>
<constraint firstItem="gEK-TH-URn" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="2UN-2R-QiC"/>
<constraint firstItem="gEK-TH-URn" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="5" id="6gj-jv-thI"/>
<constraint firstAttribute="trailing" secondItem="lti-yM-8LV" secondAttribute="trailing" constant="20" symbolic="YES" id="Bvl-lx-VMh"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="leading" secondItem="XAM-Hb-0Hw" secondAttribute="trailing" constant="12" symbolic="YES" id="CC8-HR-FDy"/>
<constraint firstItem="sPC-hi-ewD" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="29" id="DFv-ba-n2r"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="DGC-SC-Klr"/>
<constraint firstItem="sPC-hi-ewD" firstAttribute="centerY" secondItem="XAM-Hb-0Hw" secondAttribute="centerY" id="GAG-BE-Cdn"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="HFJ-XG-KGU"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="centerY" secondItem="9mz-D9-krh" secondAttribute="centerY" id="M2M-fb-kfR"/>
<constraint firstAttribute="bottom" secondItem="9mz-D9-krh" secondAttribute="bottom" constant="20" id="PK2-Ye-400"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="8" id="V7z-a7-OOG"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="top" secondItem="zBB-JH-huI" secondAttribute="bottom" constant="20" symbolic="YES" id="Wu3-hp-Vzh"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="aFI-4s-mMv"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerY" secondItem="XAM-Hb-0Hw" secondAttribute="centerY" id="YYi-d9-Ykb"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="a2m-T4-Cvm"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="17" id="er0-pf-nSm"/>
<constraint firstAttribute="trailing" secondItem="9mz-D9-krh" secondAttribute="trailing" constant="20" id="fVQ-zN-rKd"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="8" id="gq2-tB-pXH"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" id="jlY-Jg-KJR"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="lrN-Gd-iXd"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="tAZ-Te-w3H"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="leading" secondItem="sPC-hi-ewD" secondAttribute="trailing" constant="8" symbolic="YES" id="jvz-NC-C9Q"/>
<constraint firstItem="MlB-jN-Ybe" firstAttribute="leading" secondItem="gEK-TH-URn" secondAttribute="trailing" constant="-1" id="o73-Mf-NOJ"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="gEK-TH-URn" secondAttribute="bottom" constant="17" id="rZU-JI-MfQ"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" constant="16.5" id="tAZ-Te-w3H"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="leading" secondItem="B0W-bh-Evv" secondAttribute="trailing" constant="8" symbolic="YES" id="uTp-NW-oDs"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="uzf-L9-WGW"/>
<constraint firstItem="X1Z-v1-T5L" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="wEv-sV-yfy"/>
<constraint firstItem="MlB-jN-Ybe" firstAttribute="centerY" secondItem="gEK-TH-URn" secondAttribute="centerY" id="xKz-dq-g9H"/>
</constraints>
</view>
<connections>
@ -185,5 +226,8 @@ Gw
</objects>
<resources>
<image name="accountFeedbin" width="369" height="343"/>
<namedColor name="AccentColor">
<color red="0.030999999493360519" green="0.41600000858306885" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@ -13,6 +13,9 @@ import Secrets
class AccountsFeedbinWindowController: NSWindowController {
@IBOutlet weak var signInTextField: NSTextField!
@IBOutlet weak var noAccountTextField: NSTextField!
@IBOutlet weak var createNewAccountButton: NSButton!
@IBOutlet weak var progressIndicator: NSProgressIndicator!
@IBOutlet weak var usernameTextField: NSTextField!
@IBOutlet weak var passwordTextField: NSSecureTextField!
@ -31,8 +34,12 @@ class AccountsFeedbinWindowController: NSWindowController {
if let account = account, let credentials = try? account.retrieveCredentials(type: .basic) {
usernameTextField.stringValue = credentials.username
actionButton.title = NSLocalizedString("Update", comment: "Update")
signInTextField.stringValue = NSLocalizedString("Update your Feedbin account credentials.", comment: "SignIn")
noAccountTextField.isHidden = true
createNewAccountButton.isHidden = true
} else {
actionButton.title = NSLocalizedString("Add Account", comment: "Add Account")
actionButton.title = NSLocalizedString("Create", comment: "Add Account")
signInTextField.stringValue = NSLocalizedString("Sign in to your Feedbin account.", comment: "SignIn")
}
}
@ -117,5 +124,10 @@ class AccountsFeedbinWindowController: NSWindowController {
}
}
@IBAction func createAccountWithProvider(_ sender: Any) {
NSWorkspace.shared.open(URL(string: "https://feedbin.com/signup")!)
}
}

View File

@ -3,15 +3,19 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccountsNewsBlurWindowController" customModule="NetNewsWire" customModuleProvider="target">
<connections>
<outlet property="actionButton" destination="9mz-D9-krh" id="ozu-6Q-9Lb"/>
<outlet property="errorMessageLabel" destination="byK-Sd-r7F" id="8zt-9d-dWQ"/>
<outlet property="createNewAccountButton" destination="9oE-Gq-qp7" id="95R-be-GZr"/>
<outlet property="errorMessageLabel" destination="tFv-QN-zMA" id="mcs-9L-T3b"/>
<outlet property="noAccountTextField" destination="yqn-od-aLJ" id="3Az-uY-FfZ"/>
<outlet property="passwordTextField" destination="JSa-LY-zNQ" id="5cF-bM-CJE"/>
<outlet property="progressIndicator" destination="B0W-bh-Evv" id="Tiq-gx-s3F"/>
<outlet property="signInTextField" destination="lti-yM-8LV" id="mNk-mt-HZ8"/>
<outlet property="usernameTextField" destination="78p-Cf-f55" id="Gg5-Ce-RJv"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections>
@ -28,40 +32,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Ht-Fn-0Ya">
<rect key="frame" x="123" y="191" width="188" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Ern-Kk-8LX"/>
<constraint firstAttribute="width" constant="36" id="PLS-68-NMc"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountNewsBlur" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="53" y="0.0" width="137" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="NewsBlur" id="ras-dj-nP8">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<rect key="frame" x="217" y="229" width="0.0" height="0.0"/>
</stackView>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="12" columnSpacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="51" y="60" width="332" height="99"/>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="7" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="80" y="127" width="326" height="49"/>
<rows>
<gridRow id="DRl-lC-vUc"/>
<gridRow id="eW8-uH-txq"/>
<gridRow id="DbI-7g-Xme"/>
</rows>
<columns>
<gridColumn id="fCQ-jY-Mts"/>
@ -70,7 +47,7 @@
<gridCells>
<gridCell row="DRl-lC-vUc" column="fCQ-jY-Mts" id="4DI-01-jGD">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zy6-9c-8TI">
<rect key="frame" x="-2" y="81" width="122" height="16"/>
<rect key="frame" x="-2" y="31" width="122" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Username or Email:" id="DqN-SV-v35">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -80,11 +57,11 @@
</gridCell>
<gridCell row="DRl-lC-vUc" column="7CY-bX-6x4" id="Z0b-qS-MUJ">
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="78p-Cf-f55">
<rect key="frame" x="132" y="78" width="200" height="21"/>
<rect key="frame" x="126" y="28" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Qin-jm-4zt"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="fCk-Tf-q01">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="me@email.com" drawsBackground="YES" id="fCk-Tf-q01">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -93,7 +70,7 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="fCQ-jY-Mts" id="Hqa-3w-cQv">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wEx-TM-rPM">
<rect key="frame" x="54" y="48" width="66" height="16"/>
<rect key="frame" x="54" y="3" width="66" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Password:" id="7g8-Kk-ISg">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -103,11 +80,11 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="7CY-bX-6x4" id="m16-3v-9pf">
<secureTextField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JSa-LY-zNQ">
<rect key="frame" x="132" y="45" width="200" height="21"/>
<rect key="frame" x="126" y="0.0" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="eal-wa-1nU"/>
</constraints>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="••••••••" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -117,17 +94,6 @@
</secureTextFieldCell>
</secureTextField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="fCQ-jY-Mts" headOfMergedCell="xX0-vn-AId" xPlacement="leading" id="xX0-vn-AId">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="byK-Sd-r7F">
<rect key="frame" x="-2" y="9" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" id="0yh-Ab-UTX">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="7CY-bX-6x4" headOfMergedCell="xX0-vn-AId" id="hk5-St-E4y"/>
</gridCells>
</gridView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9mz-D9-krh">
@ -157,21 +123,98 @@ Gw
</connections>
</button>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="B0W-bh-Evv">
<rect key="frame" x="209" y="167" width="16" height="16"/>
<rect key="frame" x="256" y="22" width="16" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="Cew-Vp-UKw"/>
<constraint firstAttribute="width" constant="16" id="P6W-hb-FGm"/>
</constraints>
</progressIndicator>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="20" y="179" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="1ou-e3-F9w"/>
<constraint firstAttribute="width" constant="50" id="llp-FJ-LQl"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="accountNewsBlur" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="78" y="213" width="330" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Sign in to your NewsBlur account." id="ras-dj-nP8">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yqn-od-aLJ">
<rect key="frame" x="78" y="193" width="187" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Don't have a NewsBlur account?" id="fPs-Sh-GEf">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9oE-Gq-qp7">
<rect key="frame" x="264" y="193" width="105" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="105" id="Z91-fh-Mw5"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Create one here." bezelStyle="roundedRect" alignment="center" state="on" imageScaling="proportionallyDown" inset="2" id="moP-jO-Ubz">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<color key="contentTintColor" name="AccentColor"/>
<connections>
<action selector="createAccountWithProvider:" target="-2" id="FMt-SQ-TGa"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OMB-u7-kzz">
<rect key="frame" x="78" y="73" width="337" height="39"/>
<constraints>
<constraint firstAttribute="width" constant="333" id="9Bx-xl-Lf4"/>
<constraint firstAttribute="height" constant="39" id="dYs-8A-ml0"/>
</constraints>
<textFieldCell key="cell" title="Your username and password will be encrypted and stored in Keychain. " id="VWI-0W-Duk">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tFv-QN-zMA">
<rect key="frame" x="20" y="22" width="230" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="226" id="7XO-aQ-XFv"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="clipping" id="yQ5-2h-Y9i">
<font key="font" textStyle="subheadline" name=".SFNS-Regular"/>
<color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="tFv-QN-zMA" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="22" id="0vw-sR-47d"/>
<constraint firstItem="OMB-u7-kzz" firstAttribute="top" secondItem="JSa-LY-zNQ" secondAttribute="bottom" constant="15" id="5YM-1I-eNA"/>
<constraint firstAttribute="bottom" secondItem="tFv-QN-zMA" secondAttribute="bottom" constant="22" id="8K5-dH-2jc"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="leading" secondItem="XAM-Hb-0Hw" secondAttribute="trailing" constant="12" symbolic="YES" id="CC8-HR-FDy"/>
<constraint firstItem="yqn-od-aLJ" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="FVS-Uu-8cX"/>
<constraint firstAttribute="trailing" secondItem="lti-yM-8LV" secondAttribute="trailing" constant="27" id="J9X-fP-LuZ"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="KH1-LS-xLd"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="centerY" secondItem="9mz-D9-krh" secondAttribute="centerY" id="M2M-fb-kfR"/>
<constraint firstItem="yqn-od-aLJ" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="5" id="M9g-aH-poR"/>
<constraint firstAttribute="bottom" secondItem="9mz-D9-krh" secondAttribute="bottom" constant="20" id="PK2-Ye-400"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="8" id="V7z-a7-OOG"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="top" secondItem="zBB-JH-huI" secondAttribute="bottom" constant="20" symbolic="YES" id="Wu3-hp-Vzh"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="aFI-4s-mMv"/>
<constraint firstItem="9oE-Gq-qp7" firstAttribute="centerY" secondItem="yqn-od-aLJ" secondAttribute="centerY" id="VJR-Vq-lRi"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="XLG-4y-Pfd"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="eNp-CL-ocA"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="yqn-od-aLJ" secondAttribute="bottom" constant="17" id="fO2-t2-I4M"/>
<constraint firstAttribute="trailing" secondItem="9mz-D9-krh" secondAttribute="trailing" constant="20" id="fVQ-zN-rKd"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="8" id="gq2-tB-pXH"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" id="jlY-Jg-KJR"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="lrN-Gd-iXd"/>
<constraint firstItem="OMB-u7-kzz" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="jm9-kY-iQy"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="kLe-eK-uhH"/>
<constraint firstItem="9oE-Gq-qp7" firstAttribute="leading" secondItem="yqn-od-aLJ" secondAttribute="trailing" constant="1" id="ks3-4Y-649"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="leading" secondItem="tFv-QN-zMA" secondAttribute="trailing" constant="8" symbolic="YES" id="oDj-tr-QWc"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="tAZ-Te-w3H"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerY" secondItem="XAM-Hb-0Hw" secondAttribute="centerY" id="uUt-Cg-PFc"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="xUF-s0-Ews"/>
</constraints>
</view>
<connections>
@ -182,5 +225,8 @@ Gw
</objects>
<resources>
<image name="accountNewsBlur" width="25" height="25"/>
<namedColor name="AccentColor">
<color red="0.030999999493360519" green="0.41600000858306885" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@ -12,6 +12,10 @@ import RSWeb
import Secrets
class AccountsNewsBlurWindowController: NSWindowController {
@IBOutlet weak var signInTextField: NSTextField!
@IBOutlet weak var noAccountTextField: NSTextField!
@IBOutlet weak var createNewAccountButton: NSButton!
@IBOutlet weak var progressIndicator: NSProgressIndicator!
@IBOutlet weak var usernameTextField: NSTextField!
@IBOutlet weak var passwordTextField: NSSecureTextField!
@ -30,8 +34,12 @@ class AccountsNewsBlurWindowController: NSWindowController {
if let account = account, let credentials = try? account.retrieveCredentials(type: .newsBlurBasic) {
usernameTextField.stringValue = credentials.username
actionButton.title = NSLocalizedString("Update", comment: "Update")
signInTextField.stringValue = NSLocalizedString("Update your NewsBlur account credentials.", comment: "SignIn")
noAccountTextField.isHidden = true
createNewAccountButton.isHidden = true
} else {
actionButton.title = NSLocalizedString("Create", comment: "Create")
signInTextField.stringValue = NSLocalizedString("Sign in to your NewsBlur account.", comment: "SignIn")
}
}
@ -113,4 +121,9 @@ class AccountsNewsBlurWindowController: NSWindowController {
}
}
}
@IBAction func createAccountWithProvider(_ sender: Any) {
NSWorkspace.shared.open(URL(string: "https://newsblur.com")!)
}
}

View File

@ -3,6 +3,7 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -11,8 +12,9 @@
<outlet property="actionButton" destination="9mz-D9-krh" id="ozu-6Q-9Lb"/>
<outlet property="apiURLLabel" destination="H6f-t4-SMg" id="1ac-qe-jw2"/>
<outlet property="apiURLTextField" destination="d7d-ZV-CcZ" id="Af4-uM-Dgd"/>
<outlet property="errorMessageLabel" destination="byK-Sd-r7F" id="8zt-9d-dWQ"/>
<outlet property="errorMessageLabel" destination="Gyz-Mz-v08" id="fwM-K9-xnR"/>
<outlet property="gridView" destination="zBB-JH-huI" id="ghz-ki-b0V"/>
<outlet property="noAccountTextField" destination="R8e-67-Bwh" id="7oG-ro-jcB"/>
<outlet property="passwordTextField" destination="JSa-LY-zNQ" id="E9W-0F-69m"/>
<outlet property="progressIndicator" destination="B0W-bh-Evv" id="Tiq-gx-s3F"/>
<outlet property="titleImageView" destination="Ssh-Dh-xbg" id="8Iy-jf-EYR"/>
@ -28,49 +30,19 @@
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="433" height="249"/>
<rect key="screenRect" x="0.0" y="0.0" width="1792" height="1095"/>
<view key="contentView" misplaced="YES" id="se5-gp-TjO">
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="433" height="249"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="bottom" spacing="19" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Ht-Fn-0Ya">
<rect key="frame" x="113" y="219" width="208" height="38"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Ern-Kk-8LX"/>
<constraint firstAttribute="width" constant="36" id="PLS-68-NMc"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="53" y="0.0" width="157" height="38"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Reader API" id="ras-dj-nP8">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
<rect key="frame" x="217" y="229" width="0.0" height="0.0"/>
</stackView>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="12" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="82" y="60" width="270" height="127"/>
<constraints>
<constraint firstItem="byK-Sd-r7F" firstAttribute="width" secondItem="d7d-ZV-CcZ" secondAttribute="width" id="PDt-cC-RvD"/>
</constraints>
<gridView xPlacement="trailing" yPlacement="center" rowAlignment="none" rowSpacing="7" columnSpacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="zBB-JH-huI">
<rect key="frame" x="80" y="105" width="270" height="77"/>
<rows>
<gridRow id="DRl-lC-vUc"/>
<gridRow id="eW8-uH-txq"/>
<gridRow id="ebD-On-mOK"/>
<gridRow id="DbI-7g-Xme"/>
</rows>
<columns>
<gridColumn id="fCQ-jY-Mts"/>
@ -79,7 +51,7 @@
<gridCells>
<gridCell row="DRl-lC-vUc" column="fCQ-jY-Mts" id="4DI-01-jGD">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zy6-9c-8TI">
<rect key="frame" x="23" y="109" width="41" height="16"/>
<rect key="frame" x="23" y="59" width="41" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Login:" id="DqN-SV-v35">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -89,11 +61,11 @@
</gridCell>
<gridCell row="DRl-lC-vUc" column="7CY-bX-6x4" id="Z0b-qS-MUJ">
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="78p-Cf-f55">
<rect key="frame" x="70" y="106" width="200" height="21"/>
<rect key="frame" x="70" y="56" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Qin-jm-4zt"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="fCk-Tf-q01">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="username" drawsBackground="YES" id="fCk-Tf-q01">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -102,7 +74,7 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="fCQ-jY-Mts" id="Hqa-3w-cQv">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wEx-TM-rPM">
<rect key="frame" x="-2" y="76" width="66" height="16"/>
<rect key="frame" x="-2" y="31" width="66" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Password:" id="7g8-Kk-ISg">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -112,11 +84,11 @@
</gridCell>
<gridCell row="eW8-uH-txq" column="7CY-bX-6x4" id="m16-3v-9pf">
<secureTextField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JSa-LY-zNQ">
<rect key="frame" x="70" y="73" width="200" height="21"/>
<rect key="frame" x="70" y="28" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="eal-wa-1nU"/>
</constraints>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="••••••••" drawsBackground="YES" usesSingleLineMode="YES" id="trK-OG-tBe">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -128,7 +100,7 @@
</gridCell>
<gridCell row="ebD-On-mOK" column="fCQ-jY-Mts" id="xwR-xz-N6h">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="H6f-t4-SMg">
<rect key="frame" x="7" y="43" width="57" height="16"/>
<rect key="frame" x="7" y="3" width="57" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="API URL:" id="zBm-dZ-EF1">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -138,7 +110,7 @@
</gridCell>
<gridCell row="ebD-On-mOK" column="7CY-bX-6x4" id="Wd5-Zp-t61">
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="d7d-ZV-CcZ" userLabel="API URL Text Field">
<rect key="frame" x="70" y="40" width="200" height="21"/>
<rect key="frame" x="70" y="0.0" width="200" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Mki-bb-tDu"/>
</constraints>
@ -149,17 +121,6 @@
</textFieldCell>
</textField>
</gridCell>
<gridCell row="DbI-7g-Xme" column="fCQ-jY-Mts" xPlacement="leading" id="xX0-vn-AId"/>
<gridCell row="DbI-7g-Xme" column="7CY-bX-6x4" yPlacement="top" id="hk5-St-E4y">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="byK-Sd-r7F">
<rect key="frame" x="68" y="12" width="204" height="16"/>
<textFieldCell key="cell" id="0yh-Ab-UTX">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
</gridCells>
</gridView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9mz-D9-krh">
@ -189,21 +150,100 @@ Gw
</connections>
</button>
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="B0W-bh-Evv">
<rect key="frame" x="209" y="195" width="16" height="16"/>
<rect key="frame" x="256" y="20" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="QuJ-Kk-QvB"/>
<constraint firstAttribute="height" constant="16" id="SbP-MC-kng"/>
</constraints>
</progressIndicator>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ssh-Dh-xbg">
<rect key="frame" x="20" y="179" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="NYV-hM-AYz"/>
<constraint firstAttribute="width" constant="50" id="qWk-4n-LXb"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="y38-YL-woC"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lti-yM-8LV">
<rect key="frame" x="78" y="213" width="337" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Sign in to a Reader API account." id="ras-dj-nP8">
<font key="font" textStyle="headline" name=".SFNS-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="R8e-67-Bwh">
<rect key="frame" x="78" y="193" width="174" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Don't have a Reader account?" id="ker-hu-FEc">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kUQ-aj-Iu6">
<rect key="frame" x="251" y="194" width="99" height="13"/>
<constraints>
<constraint firstAttribute="height" constant="13" id="NOr-5b-kRd"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Create one here." bezelStyle="roundedRect" alignment="center" state="on" imageScaling="proportionallyDown" inset="2" id="xY9-Rw-8kx">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<color key="contentTintColor" name="AccentColor"/>
<connections>
<action selector="createAccountWithProvider:" target="-2" id="eQi-od-QJ3"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q5z-LG-0Fm">
<rect key="frame" x="78" y="58" width="337" height="39"/>
<constraints>
<constraint firstAttribute="height" constant="39" id="Zv4-mj-po0"/>
<constraint firstAttribute="width" constant="333" id="xsi-I6-XNM"/>
</constraints>
<textFieldCell key="cell" title="Your username and password will be encrypted and stored in Keychain. " id="Ec9-bB-tQz">
<font key="font" textStyle="callout" name=".SFNS-Regular"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gyz-Mz-v08">
<rect key="frame" x="18" y="23" width="230" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="226" id="0Fh-f0-A3K"/>
</constraints>
<textFieldCell key="cell" id="AGV-EV-VmY">
<font key="font" textStyle="subheadline" name=".SFNS-Regular"/>
<color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="0Fq-9s-pKG"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="R8e-67-Bwh" secondAttribute="bottom" constant="11" id="2Ve-1M-0xg"/>
<constraint firstItem="kUQ-aj-Iu6" firstAttribute="centerY" secondItem="R8e-67-Bwh" secondAttribute="centerY" id="2hZ-w7-Lne"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="5a7-jI-SC9"/>
<constraint firstAttribute="bottom" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="20" symbolic="YES" id="7OS-Ie-XXN"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="leading" secondItem="B0W-bh-Evv" secondAttribute="trailing" constant="8" symbolic="YES" id="Ame-HX-mdC"/>
<constraint firstItem="q5z-LG-0Fm" firstAttribute="leading" secondItem="R8e-67-Bwh" secondAttribute="leading" id="B2k-oM-YfG"/>
<constraint firstItem="kUQ-aj-Iu6" firstAttribute="leading" secondItem="R8e-67-Bwh" secondAttribute="trailing" constant="1" id="BWQ-ly-Hcg"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="leading" secondItem="XAM-Hb-0Hw" secondAttribute="trailing" constant="12" symbolic="YES" id="CC8-HR-FDy"/>
<constraint firstAttribute="trailing" secondItem="lti-yM-8LV" secondAttribute="trailing" constant="20" symbolic="YES" id="CeA-ET-oeg"/>
<constraint firstItem="Ssh-Dh-xbg" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="EKF-Yq-DxZ"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="leading" secondItem="Gyz-Mz-v08" secondAttribute="trailing" constant="10" id="IUE-sL-VHF"/>
<constraint firstItem="q5z-LG-0Fm" firstAttribute="top" secondItem="R8e-67-Bwh" secondAttribute="bottom" constant="96" id="Kai-IT-67g"/>
<constraint firstItem="XAM-Hb-0Hw" firstAttribute="centerY" secondItem="9mz-D9-krh" secondAttribute="centerY" id="M2M-fb-kfR"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="leading" secondItem="R8e-67-Bwh" secondAttribute="leading" id="Mqa-R7-znW"/>
<constraint firstAttribute="bottom" secondItem="9mz-D9-krh" secondAttribute="bottom" constant="20" id="PK2-Ye-400"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="top" secondItem="B0W-bh-Evv" secondAttribute="bottom" constant="8" id="V7z-a7-OOG"/>
<constraint firstItem="9mz-D9-krh" firstAttribute="top" secondItem="zBB-JH-huI" secondAttribute="bottom" constant="20" symbolic="YES" id="Wu3-hp-Vzh"/>
<constraint firstItem="zBB-JH-huI" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="aFI-4s-mMv"/>
<constraint firstItem="R8e-67-Bwh" firstAttribute="leading" secondItem="Ssh-Dh-xbg" secondAttribute="trailing" constant="10" id="ah8-Mj-rXV"/>
<constraint firstItem="Gyz-Mz-v08" firstAttribute="centerY" secondItem="XAM-Hb-0Hw" secondAttribute="centerY" id="cSM-1G-AUG"/>
<constraint firstAttribute="trailing" secondItem="9mz-D9-krh" secondAttribute="trailing" constant="20" id="fVQ-zN-rKd"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="8" id="gq2-tB-pXH"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" id="jlY-Jg-KJR"/>
<constraint firstItem="B0W-bh-Evv" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="lrN-Gd-iXd"/>
<constraint firstItem="Gyz-Mz-v08" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" symbolic="YES" id="p26-D7-Oi8"/>
<constraint firstAttribute="trailing" secondItem="q5z-LG-0Fm" secondAttribute="trailing" constant="20" id="rky-el-9AK"/>
<constraint firstItem="lti-yM-8LV" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="20" symbolic="YES" id="t4L-Nb-T2M"/>
<constraint firstItem="7Ht-Fn-0Ya" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="tAZ-Te-w3H"/>
<constraint firstItem="R8e-67-Bwh" firstAttribute="top" secondItem="lti-yM-8LV" secondAttribute="bottom" constant="5" id="vL5-xO-f7d"/>
</constraints>
</view>
<connections>
@ -212,4 +252,9 @@ Gw
<point key="canvasLocation" x="116.5" y="136.5"/>
</window>
</objects>
<resources>
<namedColor name="AccentColor">
<color red="0.030999999493360519" green="0.41600000858306885" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

View File

@ -23,6 +23,7 @@ class AccountsReaderAPIWindowController: NSWindowController {
@IBOutlet weak var passwordTextField: NSSecureTextField!
@IBOutlet weak var errorMessageLabel: NSTextField!
@IBOutlet weak var actionButton: NSButton!
@IBOutlet weak var noAccountTextField: NSTextField!
var account: Account?
var accountType: AccountType?
@ -38,19 +39,23 @@ class AccountsReaderAPIWindowController: NSWindowController {
switch accountType {
case .freshRSS:
titleImageView.image = AppAssets.accountFreshRSS
titleLabel.stringValue = NSLocalizedString("FreshRSS", comment: "FreshRSS")
titleLabel.stringValue = NSLocalizedString("Sign in to your FreshRSS account.", comment: "FreshRSS")
noAccountTextField.stringValue = NSLocalizedString("Don't have a FreshRSS account?", comment: "No FreshRSS")
case .inoreader:
titleImageView.image = AppAssets.accountInoreader
titleLabel.stringValue = NSLocalizedString("InoReader", comment: "InoReader")
titleLabel.stringValue = NSLocalizedString("Sign in to your InoReader account.", comment: "InoReader")
gridView.row(at: 2).isHidden = true
noAccountTextField.stringValue = NSLocalizedString("Don't have an InoReader account?", comment: "No InoReader")
case .bazQux:
titleImageView.image = AppAssets.accountBazQux
titleLabel.stringValue = NSLocalizedString("BazQux", comment: "BazQux")
titleLabel.stringValue = NSLocalizedString("Sign in to your BazQux account.", comment: "BazQux")
gridView.row(at: 2).isHidden = true
noAccountTextField.stringValue = NSLocalizedString("Don't have a BazQux account?", comment: "No BazQux")
case .theOldReader:
titleImageView.image = AppAssets.accountTheOldReader
titleLabel.stringValue = NSLocalizedString("The Old Reader", comment: "The Old Reader")
titleLabel.stringValue = NSLocalizedString("Sign in to your The Old Reader account.", comment: "The Old Reader")
gridView.row(at: 2).isHidden = true
noAccountTextField.stringValue = NSLocalizedString("Don't have a The Old Reader account?", comment: "No OldReader")
default:
break
}
@ -172,5 +177,21 @@ class AccountsReaderAPIWindowController: NSWindowController {
}
}
@IBAction func createAccountWithProvider(_ sender: Any) {
switch accountType {
case .freshRSS:
NSWorkspace.shared.open(URL(string: "https://freshrss.org")!)
case .inoreader:
NSWorkspace.shared.open(URL(string: "https://www.inoreader.com")!)
case .bazQux:
NSWorkspace.shared.open(URL(string: "https://bazqux.com")!)
case .theOldReader:
NSWorkspace.shared.open(URL(string: "https://theoldreader.com")!)
default:
return
}
}
}

View File

@ -15,6 +15,7 @@ struct AddAccountHelpView: View {
var delegate: AccountsPreferencesAddAccountDelegate?
var helpText: String
@State private var hoveringId: String? = nil
@State private var iCloudUnavailableError: Bool = false
var body: some View {
VStack {
@ -24,7 +25,11 @@ struct AddAccountHelpView: View {
.resizable()
.frame(width: 20, height: 20, alignment: .center)
.onTapGesture {
delegate?.presentSheetForAccount(account)
if account == .cloudKit && AccountManager.shared.accounts.contains(where: { $0.type == .cloudKit }) {
iCloudUnavailableError = true
} else {
delegate?.presentSheetForAccount(account)
}
hoveringId = nil
}
.onHover(perform: { hovering in
@ -42,7 +47,14 @@ struct AddAccountHelpView: View {
Text(helpText)
.multilineTextAlignment(.center)
.padding(.top, 8)
}
.alert(isPresented: $iCloudUnavailableError, content: {
Alert(title: Text(NSLocalizedString("Error", comment: "Error")),
message: Text(NSLocalizedString("You've already set up an iCloud account.", comment: "Error")),
dismissButton: Alert.Button.cancel({
iCloudUnavailableError = false
}))
})
}
}

View File

@ -151,8 +151,6 @@ struct AddAccountsView: View {
.aspectRatio(contentMode: .fit)
.frame(width: 25, height: 25, alignment: .center)
.padding(.leading, 4)
Text(account.localizedAccountName())
}
.tag(account)

View File

@ -11,7 +11,12 @@ import SwiftUI
import RSCore
struct EnableExtensionPointHelpView: View {
let imageLiterals = ["extensionPointMarsEdit", "extensionPointMicroblog", "extensionPointReddit", "extensionPointTwitter"]
var extensionPoints: [ExtensionPoint.Type] {
let types = ExtensionPointManager.shared.availableExtensionPointTypes.filter({ $0 is SendToCommand.Type }) +
ExtensionPointManager.shared.availableExtensionPointTypes.filter({ !($0 is SendToCommand.Type) })
return types
}
var helpText: String
weak var preferencesController: ExtensionPointPreferencesViewController?
@ -20,23 +25,31 @@ struct EnableExtensionPointHelpView: View {
var body: some View {
VStack {
HStack {
ForEach(imageLiterals, id: \.self) { name in
Image(name)
ForEach(0..<extensionPoints.count, content: { i in
Image(nsImage: extensionPoints[i].image)
.resizable()
.frame(width: 20, height: 20, alignment: .center)
.onTapGesture {
preferencesController?.enableExtensionPoints(self)
preferencesController?.enableExtensionPointFromSelection(extensionPoints[i])
hoveringId = nil
}
.onHover(perform: { hovering in
if hovering {
hoveringId = name
hoveringId = extensionPoints[i].title
} else {
hoveringId = nil
}
})
.scaleEffect(hoveringId == name ? 1.2 : 1)
.shadow(radius: hoveringId == name ? 0.8 : 0)
.scaleEffect(hoveringId == extensionPoints[i].title ? 1.2 : 1)
.shadow(radius: hoveringId == extensionPoints[i].title ? 0.8 : 0)
})
if ExtensionPointManager.shared.availableExtensionPointTypes.count == 0 {
Image("markUnread")
.resizable()
.renderingMode(.template)
.frame(width: 30, height: 30, alignment: .center)
.foregroundColor(.green)
}
}

View File

@ -10,14 +10,17 @@ import AppKit
import SwiftUI
import RSCore
struct EnableExtensionPointView: View {
weak var parent: NSHostingController<EnableExtensionPointView>? // required because presentationMode.dismiss() doesn't work
weak var enabler: ExtensionPointPreferencesEnabler?
@State private var extensionPointTypeName = String(describing: Self.feedProviderExtensionPointTypes.first)
@State private var extensionPointTypeName = String(describing: Self.sendToCommandExtensionPointTypes.first)
private var selectedType: ExtensionPoint.Type?
init(enabler: ExtensionPointPreferencesEnabler?) {
init(enabler: ExtensionPointPreferencesEnabler?, selectedType: ExtensionPoint.Type? ) {
self.enabler = enabler
self.selectedType = selectedType
}
var body: some View {
@ -60,7 +63,7 @@ struct EnableExtensionPointView: View {
})
.help("Add Extension")
.keyboardShortcut(.defaultAction)
.disabled(disableContinue())
} else {
Button(action: {
enabler?.enable(typeFromName(extensionPointTypeName))
@ -69,6 +72,7 @@ struct EnableExtensionPointView: View {
Text("Continue")
.frame(width: 80)
})
.disabled(disableContinue())
}
}
.padding(.top, 12)
@ -78,6 +82,11 @@ struct EnableExtensionPointView: View {
.fixedSize(horizontal: false, vertical: true)
.frame(width: 420)
.padding()
.onAppear {
if selectedType != nil {
extensionPointTypeName = String(describing: selectedType!)
}
}
}
var feedProviderExtensionPoints: some View {
@ -101,7 +110,7 @@ struct EnableExtensionPointView: View {
Text(extensionPointType.title)
}
.tag(extensionPointTypeNames)
.tag(extensionPointTypeName)
})
})
.pickerStyle(RadioGroupPickerStyle())
@ -138,7 +147,7 @@ struct EnableExtensionPointView: View {
Text(extensionPointType.title)
}
.tag(extensionPointTypeNames)
.tag(extensionPointTypeName)
})
})
.pickerStyle(RadioGroupPickerStyle())
@ -169,6 +178,10 @@ struct EnableExtensionPointView: View {
}
fatalError()
}
func disableContinue() -> Bool {
ExtensionPointManager.shared.availableExtensionPointTypes.count == 0
}
}

View File

@ -45,7 +45,13 @@ final class ExtensionPointPreferencesViewController: NSViewController {
}
@IBAction func enableExtensionPoints(_ sender: Any) {
let controller = NSHostingController(rootView: EnableExtensionPointView(enabler: self))
let controller = NSHostingController(rootView: EnableExtensionPointView(enabler: self, selectedType: nil))
controller.rootView.parent = controller
presentAsSheet(controller)
}
func enableExtensionPointFromSelection(_ selection: ExtensionPoint.Type) {
let controller = NSHostingController(rootView: EnableExtensionPointView(enabler: self, selectedType: selection))
controller.rootView.parent = controller
presentAsSheet(controller)
}
@ -179,7 +185,10 @@ private extension ExtensionPointPreferencesViewController {
if tableView.selectedRow == -1 {
var helpText = ""
if activeExtensionPoints.count == 0 {
if ExtensionPointManager.shared.availableExtensionPointTypes.count == 0 {
helpText = NSLocalizedString("You've added all available extension points.", comment: "Extension Explainer")
}
else if activeExtensionPoints.count == 0 {
helpText = NSLocalizedString("Add an extension by clicking the + button.", comment: "Extension Explainer")
} else {
helpText = NSLocalizedString("Select an extension or add a new extension point by clicking the + button.", comment: "Extension Explainer")
@ -219,7 +228,10 @@ private extension ExtensionPointPreferencesViewController {
if tableView.selectedRow == -1 {
var helpText = ""
if activeExtensionPoints.count == 0 {
if ExtensionPointManager.shared.availableExtensionPointTypes.count == 0 {
helpText = NSLocalizedString("You've added all available extension points.", comment: "Extension Explainer")
}
else if activeExtensionPoints.count == 0 {
helpText = NSLocalizedString("Add an extension by clicking the + button.", comment: "Extension Explainer")
} else {
helpText = NSLocalizedString("Select an extension or add a new extension point by clicking the + button.", comment: "Extension Explainer")