Add link to iCloud Syncing Limitations & Solutions to all iCloud account maintenance UI
This commit is contained in:
parent
b92fceb84e
commit
9ab5d6268b
@ -8,5 +8,6 @@
|
||||
import Foundation
|
||||
|
||||
public struct CloudKitWebDocumentation {
|
||||
public static let limitationsAndSolutions = "https://netnewswire.com/help/iCloud"
|
||||
public static let limitationsAndSolutionsText = NSLocalizedString("iCloud Syncing Limitations & Solutions", comment: "iCloud Documentation")
|
||||
public static let limitationsAndSolutionsURL = URL(string: "https://netnewswire.com/help/iCloud")!
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="AccountsAddLocalWindowController" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="AccountsAddCloudKitWindowController" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="limitationsAndSolutionsTextField" destination="nDR-Ww-6bA" id="rDz-tm-rVb"/>
|
||||
<outlet property="localAccountNameTextField" destination="80D-3X-rL2" id="B6t-AS-hDh"/>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="ENN-6Q-J5m"/>
|
||||
</connections>
|
||||
@ -17,17 +18,17 @@
|
||||
<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="135"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||
<rect key="contentRect" x="196" y="240" width="398" height="163"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="398" height="136"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="398" height="157"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<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 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="199" y="99" width="0.0" height="23"/>
|
||||
</stackView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xqo-gP-MPl">
|
||||
<rect key="frame" x="278" y="13" width="106" height="32"/>
|
||||
<rect key="frame" x="285" y="13" width="100" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Use iCloud" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="oih-6c-KbS">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -40,7 +41,7 @@ DQ
|
||||
</connections>
|
||||
</button>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ySx-qg-WbT">
|
||||
<rect key="frame" x="20" y="72" width="50" height="50"/>
|
||||
<rect key="frame" x="20" y="93" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="LlV-kM-gHE"/>
|
||||
<constraint firstAttribute="height" constant="50" id="MjL-TR-9ey"/>
|
||||
@ -48,7 +49,7 @@ DQ
|
||||
<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="100" width="304" height="16"/>
|
||||
<rect key="frame" x="76" y="121" width="304" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Use your iCloud account." id="1d2-Mx-TKe">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -56,7 +57,7 @@ DQ
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Kj-Cl-FJQ">
|
||||
<rect key="frame" x="76" y="60" width="304" height="32"/>
|
||||
<rect key="frame" x="76" y="81" width="304" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="32" id="ZJN-cn-p1x"/>
|
||||
</constraints>
|
||||
@ -67,7 +68,7 @@ DQ
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9eG-vV-s8c">
|
||||
<rect key="frame" x="172" y="13" width="106" height="32"/>
|
||||
<rect key="frame" x="187" y="13" width="100" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iVd-bO-4LN">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -79,30 +80,41 @@ Gw
|
||||
<action selector="cancel:" target="-2" id="uDi-hX-dXu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nDR-Ww-6bA">
|
||||
<rect key="frame" x="78" y="56" width="237" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" title="iCloud Syncing Limitations & Solutions" drawsBackground="YES" allowsEditingTextAttributes="YES" id="rON-0r-jBU">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="linkColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="nDR-Ww-6bA" firstAttribute="top" secondItem="3Kj-Cl-FJQ" secondAttribute="baseline" constant="12" id="23t-BP-A2U"/>
|
||||
<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="uDK-ji-zlT" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="35" id="Bc9-AC-psw"/>
|
||||
<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 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 firstAttribute="bottom" secondItem="uDK-ji-zlT" secondAttribute="bottom" constant="99" id="bmD-IK-EmD"/>
|
||||
<constraint firstItem="nDR-Ww-6bA" firstAttribute="leading" secondItem="3Kj-Cl-FJQ" secondAttribute="leading" id="eBg-6Q-iVN"/>
|
||||
<constraint firstItem="9eG-vV-s8c" firstAttribute="width" secondItem="xqo-gP-MPl" secondAttribute="width" id="oNb-To-cBK"/>
|
||||
<constraint firstItem="xqo-gP-MPl" firstAttribute="leading" secondItem="9eG-vV-s8c" secondAttribute="trailing" constant="12" symbolic="YES" 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"/>
|
||||
<constraint firstItem="9eG-vV-s8c" firstAttribute="top" secondItem="nDR-Ww-6bA" secondAttribute="bottom" constant="16" id="zPI-oi-RD2"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-2" id="hpu-h7-p4Z"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="99" y="79.5"/>
|
||||
<point key="canvasLocation" x="99" y="93.5"/>
|
||||
</window>
|
||||
</objects>
|
||||
<resources>
|
||||
|
@ -19,6 +19,8 @@ enum AccountsAddCloudKitWindowControllerError: LocalizedError {
|
||||
|
||||
class AccountsAddCloudKitWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var limitationsAndSolutionsTextField: NSTextField!
|
||||
|
||||
private weak var hostWindow: NSWindow?
|
||||
|
||||
convenience init() {
|
||||
@ -27,6 +29,9 @@ class AccountsAddCloudKitWindowController: NSWindowController {
|
||||
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
|
||||
let attrString = NSAttributedString(linkText: CloudKitWebDocumentation.limitationsAndSolutionsText, linkURL: CloudKitWebDocumentation.limitationsAndSolutionsURL)
|
||||
limitationsAndSolutionsTextField.attributedStringValue = attrString
|
||||
}
|
||||
|
||||
// MARK: API
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@ -10,6 +10,8 @@
|
||||
<connections>
|
||||
<outlet property="activeButton" destination="wxB-dX-nGt" id="ALS-GI-sb5"/>
|
||||
<outlet property="credentialsButton" destination="gLh-gl-ZGQ" id="ee9-t8-lUg"/>
|
||||
<outlet property="limitationsAndSolutionsRow" destination="hvR-69-PTb" id="9oU-fy-6Y7"/>
|
||||
<outlet property="limitationsAndSolutionsTextField" destination="8fI-LV-Slc" id="eC9-eK-MSc"/>
|
||||
<outlet property="nameTextField" destination="TT0-Kf-YTC" id="oMG-jn-Qn0"/>
|
||||
<outlet property="typeLabel" destination="XYX-iz-hnq" id="SKM-et-3h3"/>
|
||||
<outlet property="view" destination="3ki-rg-6yb" id="ttM-4E-OLN"/>
|
||||
@ -18,22 +20,23 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<tabView id="3ki-rg-6yb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="346" height="300"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="349" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Account" identifier="" id="35c-I3-wfs">
|
||||
<view key="view" id="ft2-Mb-5LD">
|
||||
<rect key="frame" x="10" y="33" width="326" height="254"/>
|
||||
<rect key="frame" x="10" y="33" width="329" height="254"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<gridView xPlacement="fill" yPlacement="center" rowAlignment="none" rowSpacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="nVy-H3-bFO">
|
||||
<rect key="frame" x="20" y="90" width="286" height="144"/>
|
||||
<rect key="frame" x="20" y="81" width="289" height="153"/>
|
||||
<rows>
|
||||
<gridRow id="yLs-SL-a1b"/>
|
||||
<gridRow yPlacement="top" id="etw-2m-nWZ"/>
|
||||
<gridRow id="3IT-3r-gEK"/>
|
||||
<gridRow id="Y4C-5M-ySp"/>
|
||||
<gridRow id="hvR-69-PTb"/>
|
||||
</rows>
|
||||
<columns>
|
||||
<gridColumn id="sMM-Ds-SKX"/>
|
||||
@ -42,7 +45,7 @@
|
||||
<gridCells>
|
||||
<gridCell row="yLs-SL-a1b" column="sMM-Ds-SKX" id="3ea-DE-T3i">
|
||||
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jiQ-KJ-SS0">
|
||||
<rect key="frame" x="-2" y="128" width="44" height="16"/>
|
||||
<rect key="frame" x="-2" y="137" width="44" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Type:" id="tC5-Vt-gBc">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -52,7 +55,7 @@
|
||||
</gridCell>
|
||||
<gridCell row="yLs-SL-a1b" column="Fhf-h9-g0O" id="baI-Kp-tKF">
|
||||
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XYX-iz-hnq">
|
||||
<rect key="frame" x="44" y="128" width="73" height="16"/>
|
||||
<rect key="frame" x="44" y="137" width="73" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="On My Mac" id="6yI-bV-1Sh">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -63,7 +66,7 @@
|
||||
<gridCell row="etw-2m-nWZ" column="sMM-Ds-SKX" id="htf-Ca-Hpv"/>
|
||||
<gridCell row="etw-2m-nWZ" column="Fhf-h9-g0O" id="NrD-vV-1Y1">
|
||||
<button key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mgt-uY-fuq">
|
||||
<rect key="frame" x="44" y="102" width="64" height="18"/>
|
||||
<rect key="frame" x="44" y="111" width="64" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Active" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="wxB-dX-nGt">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -75,7 +78,7 @@
|
||||
</gridCell>
|
||||
<gridCell row="3IT-3r-gEK" column="sMM-Ds-SKX" id="2yP-oZ-A6S">
|
||||
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ted-jN-oYR">
|
||||
<rect key="frame" x="-2" y="76" width="44" height="16"/>
|
||||
<rect key="frame" x="-2" y="85" width="44" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Name:" id="uyQ-Zi-QCr">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -85,7 +88,7 @@
|
||||
</gridCell>
|
||||
<gridCell row="3IT-3r-gEK" column="Fhf-h9-g0O" id="nCq-02-YVv">
|
||||
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TT0-Kf-YTC">
|
||||
<rect key="frame" x="46" y="73" width="100" height="21"/>
|
||||
<rect key="frame" x="46" y="82" width="100" height="21"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="7Vp-Hq-j6n">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -96,20 +99,29 @@
|
||||
<gridCell row="Y4C-5M-ySp" column="sMM-Ds-SKX" id="dON-E7-yd2"/>
|
||||
<gridCell row="Y4C-5M-ySp" column="Fhf-h9-g0O" id="i7Y-4k-5TF">
|
||||
<textField key="contentView" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="xp5-wk-PKc">
|
||||
<rect key="frame" x="44" y="0.0" width="244" height="64"/>
|
||||
<textFieldCell key="cell" selectable="YES" id="MW0-mH-Gaa">
|
||||
<rect key="frame" x="44" y="25" width="247" height="48"/>
|
||||
<textFieldCell key="cell" selectable="YES" title="The name appears in the sidebar. It can be anything you want. You can even use emoji. 🎸" id="MW0-mH-Gaa">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<string key="title">The name appears in the sidebar. It can be anything you want. You can even use emoji. 🎸
|
||||
</string>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</gridCell>
|
||||
<gridCell row="hvR-69-PTb" column="sMM-Ds-SKX" headOfMergedCell="wZu-cQ-qhN" xPlacement="center" id="wZu-cQ-qhN">
|
||||
<textField key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8fI-LV-Slc">
|
||||
<rect key="frame" x="26" y="0.0" width="237" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" title="iCloud Syncing Limitations & Solutions" allowsEditingTextAttributes="YES" id="0XE-hc-x09">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="linkColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</gridCell>
|
||||
<gridCell row="hvR-69-PTb" column="Fhf-h9-g0O" headOfMergedCell="wZu-cQ-qhN" id="bag-dB-cGS"/>
|
||||
</gridCells>
|
||||
</gridView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gLh-gl-ZGQ">
|
||||
<rect key="frame" x="112" y="55" width="103" height="32"/>
|
||||
<rect key="frame" x="113" y="46" width="103" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Credentials" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="vYg-ZC-o4W">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
|
@ -14,6 +14,8 @@ final class AccountsDetailViewController: NSViewController, NSTextFieldDelegate
|
||||
@IBOutlet weak var typeLabel: NSTextField!
|
||||
@IBOutlet weak var nameTextField: NSTextField!
|
||||
@IBOutlet weak var activeButton: NSButtonCell!
|
||||
@IBOutlet weak var limitationsAndSolutionsRow: NSGridRow!
|
||||
@IBOutlet weak var limitationsAndSolutionsTextField: NSTextField!
|
||||
@IBOutlet weak var credentialsButton: NSButton!
|
||||
|
||||
private var accountsWindowController: NSWindowController?
|
||||
@ -47,6 +49,14 @@ final class AccountsDetailViewController: NSViewController, NSTextFieldDelegate
|
||||
typeLabel.stringValue = account?.defaultName ?? ""
|
||||
nameTextField.stringValue = account?.name ?? ""
|
||||
activeButton.state = account?.isActive ?? false ? .on : .off
|
||||
|
||||
if account?.type == .cloudKit {
|
||||
let attrString = NSAttributedString(linkText: CloudKitWebDocumentation.limitationsAndSolutionsText, linkURL: CloudKitWebDocumentation.limitationsAndSolutionsURL)
|
||||
limitationsAndSolutionsTextField.attributedStringValue = attrString
|
||||
} else {
|
||||
limitationsAndSolutionsRow.isHidden = true
|
||||
}
|
||||
|
||||
credentialsButton.isHidden = hidesCredentialsButton
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,27 @@ extension NSAttributedString {
|
||||
}
|
||||
}
|
||||
|
||||
#if canImport(AppKit)
|
||||
/// Creates an attributed string that is suitable for creating a link using NSTextField
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - linkText: The text of the hypertext link
|
||||
/// - linkURL: The URL that we should go to when the link is clicked
|
||||
public convenience init(linkText: String, linkURL: URL) {
|
||||
let attrString = NSMutableAttributedString(string: linkText)
|
||||
let range = NSRange(location: 0, length: attrString.length)
|
||||
|
||||
attrString.addAttribute(.font, value: NSFont.systemFont(ofSize: NSFont.systemFontSize), range: range)
|
||||
attrString.addAttribute(.cursor, value: NSCursor.pointingHand, range: range)
|
||||
attrString.addAttribute(.foregroundColor, value: NSColor.linkColor, range: range)
|
||||
attrString.addAttribute(.underlineColor, value: NSColor.clear, range: range)
|
||||
|
||||
attrString.addAttribute(.link, value: linkURL, range: range)
|
||||
|
||||
self.init(attributedString: attrString)
|
||||
}
|
||||
#endif
|
||||
|
||||
/// Returns an attributed string initialized from HTML text containing basic inline stylistic tags.
|
||||
///
|
||||
/// - Parameters:
|
||||
|
@ -65,7 +65,7 @@ class CloudKitAccountViewController: UITableViewController {
|
||||
}
|
||||
|
||||
@IBAction func openLimitationsAndSolutions(_ sender: Any) {
|
||||
let vc = SFSafariViewController(url: URL(string: CloudKitWebDocumentation.limitationsAndSolutions)!)
|
||||
let vc = SFSafariViewController(url: CloudKitWebDocumentation.limitationsAndSolutionsURL)
|
||||
vc.modalPresentationStyle = .pageSheet
|
||||
present(vc, animated: true)
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class AccountInspectorViewController: UITableViewController {
|
||||
}
|
||||
|
||||
@IBAction func openLimitationsAndSolutions(_ sender: Any) {
|
||||
let vc = SFSafariViewController(url: URL(string: CloudKitWebDocumentation.limitationsAndSolutions)!)
|
||||
let vc = SFSafariViewController(url: CloudKitWebDocumentation.limitationsAndSolutionsURL)
|
||||
vc.modalPresentationStyle = .pageSheet
|
||||
present(vc, animated: true)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user