Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

"Try Beta" on Settings #2346

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions Classes/Settings/Settings.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<color key="separatorColor" red="0.73725490196078436" green="0.73333333333333328" blue="0.75686274509803919" alpha="1" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
<view key="tableFooterView" contentMode="scaleToFill" id="jkq-3p-p02">
<rect key="frame" x="0.0" y="693.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="737.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Version 1.4.0 (1207)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2bb-Lj-p2k" customClass="SettingsLabel" customModule="Freetime" customModuleProvider="target">
Expand Down Expand Up @@ -365,12 +365,39 @@
</tableViewCellContentView>
<inset key="separatorInset" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="McK-NV-R4T" customClass="StyledTableCell" customModule="Freetime" customModuleProvider="target">
<rect key="frame" x="0.0" y="595.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="McK-NV-R4T" id="M6U-hF-aEN">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Try Beta" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NlT-LX-Mjr" customClass="SettingsLabel" customModule="Freetime" customModuleProvider="target">
<rect key="frame" x="16" y="12" width="60.5" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.14117647059999999" green="0.16078431369999999" blue="0.18039215689999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="link-external" translatesAutoresizingMaskIntoConstraints="NO" id="WkB-US-Hey">
<rect key="frame" x="341" y="9.5" width="19" height="25"/>
<color key="tintColor" red="0.63921568630000003" green="0.66666666669999997" blue="0.69411764710000001" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="WkB-US-Hey" secondAttribute="trailing" constant="15" id="Wxo-wT-v4F"/>
<constraint firstItem="NlT-LX-Mjr" firstAttribute="leading" secondItem="M6U-hF-aEN" secondAttribute="leading" constant="16" id="Z5T-qn-lwO"/>
<constraint firstItem="NlT-LX-Mjr" firstAttribute="centerY" secondItem="M6U-hF-aEN" secondAttribute="centerY" id="Za0-FK-HlJ"/>
<constraint firstItem="WkB-US-Hey" firstAttribute="centerY" secondItem="M6U-hF-aEN" secondAttribute="centerY" id="gfl-J4-uVz"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection id="GTg-1u-cvV">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="ku5-ZI-OG9" style="IBUITableViewCellStyleDefault" id="Y2k-Zq-AUW" customClass="StyledTableCell" customModule="Freetime" customModuleProvider="target">
<rect key="frame" x="0.0" y="631.5" width="375" height="44"/>
<rect key="frame" x="0.0" y="675.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Y2k-Zq-AUW" id="XiT-sq-B22">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
Expand Down Expand Up @@ -415,6 +442,7 @@
<outlet property="setDefaultReaction" destination="gjX-57-UIr" id="aCf-HJ-KKS"/>
<outlet property="signOutCell" destination="Y2k-Zq-AUW" id="QIk-J0-zqg"/>
<outlet property="signatureSwitch" destination="ZWv-km-fU1" id="pf4-kH-RIp"/>
<outlet property="tryTestFlightBetaCell" destination="McK-NV-R4T" id="Nrc-bw-IXY"/>
<outlet property="versionLabel" destination="2bb-Lj-p2k" id="qDb-KP-pnk"/>
<outlet property="viewSourceCell" destination="SAx-6B-29G" id="0Qs-cw-xwG"/>
</connections>
Expand Down
9 changes: 9 additions & 0 deletions Classes/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NewIssueTableViewControllerDelegate {
@IBOutlet weak var reviewAccessCell: StyledTableCell!
@IBOutlet weak var githubStatusCell: StyledTableCell!
@IBOutlet weak var reviewOnAppStoreCell: StyledTableCell!
@IBOutlet weak var tryTestFlightBetaCell: StyledTableCell!
@IBOutlet weak var reportBugCell: StyledTableCell!
@IBOutlet weak var viewSourceCell: StyledTableCell!
@IBOutlet weak var setDefaultReaction: StyledTableCell!
Expand Down Expand Up @@ -118,6 +119,8 @@ NewIssueTableViewControllerDelegate {
onSetDefaultReaction()
} else if cell === signOutCell {
onSignOut()
} else if cell === tryTestFlightBetaCell {
onTryTestFlightBeta()
}
}

Expand Down Expand Up @@ -191,6 +194,12 @@ NewIssueTableViewControllerDelegate {
//showDefaultReactionMenu()
}

func onTryTestFlightBeta() {
guard let url = URL(string: "https://testflight.apple.com/join/QIVXLkkn")
else { fatalError("Failed to decode testflight beta URL") }
presentSafari(url: url)
}

func onSignOut() {
let title = NSLocalizedString("Are you sure?", comment: "")
let message = NSLocalizedString("All of your accounts will be signed out, and their bookmarks will be removed. Do you want to continue?", comment: "")
Expand Down