Remove legacy purchase footer

This commit is contained in:
Davide De Rosa 2021-06-28 09:17:21 +02:00
parent 3ba1af9540
commit 33722b673e
2 changed files with 14 additions and 49 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="Rv5-Zx-TH3">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="Rv5-Zx-TH3">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -11,17 +11,17 @@
<objects>
<viewController id="Rv5-Zx-TH3" customClass="PurchaseViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="8QZ-37-H7U">
<rect key="frame" x="0.0" y="0.0" width="442" height="480"/>
<rect key="frame" x="0.0" y="0.0" width="442" height="446"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="80" horizontalPageScroll="10" verticalLineScroll="80" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WTb-Wq-BLo">
<rect key="frame" x="20" y="156" width="402" height="304"/>
<rect key="frame" x="20" y="120" width="402" height="306"/>
<clipView key="contentView" id="dfi-7t-ces">
<rect key="frame" x="1" y="1" width="400" height="302"/>
<rect key="frame" x="1" y="1" width="400" height="304"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="80" rowSizeStyle="automatic" viewBased="YES" id="9w7-b6-jXh">
<rect key="frame" x="0.0" y="0.0" width="400" height="302"/>
<rect key="frame" x="0.0" y="0.0" width="400" height="304"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="17" height="0.0"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -96,7 +96,7 @@
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="CeE-dS-NyP">
<rect key="frame" x="1" y="343" width="400" height="16"/>
<rect key="frame" x="1" y="287" width="400" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="2Ip-OW-X0v">
@ -105,7 +105,7 @@
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TKV-I9-3N8">
<rect key="frame" x="19" y="132" width="404" height="16"/>
<rect key="frame" x="19" y="96" width="404" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="400" id="uyO-So-B3k"/>
</constraints>
@ -116,10 +116,10 @@
</textFieldCell>
</textField>
<progressIndicator hidden="YES" maxValue="100" displayedWhenStopped="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="2hB-Jy-QEw">
<rect key="frame" x="213" y="58" width="16" height="16"/>
<rect key="frame" x="213" y="22" width="16" height="16"/>
</progressIndicator>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XMI-x0-24k">
<rect key="frame" x="230" y="49" width="94" height="32"/>
<rect key="frame" x="230" y="13" width="94" height="32"/>
<buttonCell key="cell" type="push" title="&lt;restore&gt;" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Tce-5t-Hj1">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -129,7 +129,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lBO-a6-qnj">
<rect key="frame" x="322" y="49" width="107" height="32"/>
<rect key="frame" x="322" y="13" width="107" height="32"/>
<buttonCell key="cell" type="push" title="&lt;purchase&gt;" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uxN-5f-y4i">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -139,7 +139,7 @@
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="72F-hB-DPP">
<rect key="frame" x="19" y="96" width="404" height="16"/>
<rect key="frame" x="19" y="60" width="404" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="400" id="ejH-6r-pkl"/>
</constraints>
@ -149,25 +149,12 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oiz-24-DEQ">
<rect key="frame" x="19" y="20" width="404" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="400" id="rN6-hj-XWV"/>
</constraints>
<textFieldCell key="cell" title="&lt;legacy&gt;" id="rKm-Ve-QuT">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="oiz-24-DEQ" secondAttribute="bottom" constant="20" symbolic="YES" id="2i0-3K-crG"/>
<constraint firstItem="72F-hB-DPP" firstAttribute="top" secondItem="TKV-I9-3N8" secondAttribute="bottom" constant="20" id="8kK-yQ-UGc"/>
<constraint firstAttribute="trailing" secondItem="WTb-Wq-BLo" secondAttribute="trailing" constant="20" symbolic="YES" id="Ed7-QK-8qI"/>
<constraint firstItem="lBO-a6-qnj" firstAttribute="leading" secondItem="XMI-x0-24k" secondAttribute="trailing" constant="12" symbolic="YES" id="HGl-z7-xCS"/>
<constraint firstItem="XMI-x0-24k" firstAttribute="centerY" secondItem="lBO-a6-qnj" secondAttribute="centerY" id="Lkd-1j-rt9"/>
<constraint firstItem="oiz-24-DEQ" firstAttribute="top" secondItem="lBO-a6-qnj" secondAttribute="bottom" constant="20" id="O9i-SG-bNc"/>
<constraint firstItem="lBO-a6-qnj" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="9w7-b6-jXh" secondAttribute="leading" id="PAx-YO-dub"/>
<constraint firstItem="TKV-I9-3N8" firstAttribute="trailing" secondItem="9w7-b6-jXh" secondAttribute="trailing" id="QMH-Dc-Vbo"/>
<constraint firstItem="XMI-x0-24k" firstAttribute="leading" secondItem="2hB-Jy-QEw" secondAttribute="trailing" constant="8" symbolic="YES" id="Rlz-6Y-GTq"/>
@ -175,13 +162,12 @@
<constraint firstItem="72F-hB-DPP" firstAttribute="leading" secondItem="TKV-I9-3N8" secondAttribute="leading" id="ZI9-mi-dTu"/>
<constraint firstAttribute="trailing" secondItem="lBO-a6-qnj" secondAttribute="trailing" constant="20" symbolic="YES" id="Ztx-Qh-mHp"/>
<constraint firstItem="lBO-a6-qnj" firstAttribute="top" secondItem="72F-hB-DPP" secondAttribute="bottom" constant="20" id="agT-yo-xZF"/>
<constraint firstAttribute="bottom" secondItem="lBO-a6-qnj" secondAttribute="bottom" constant="20" id="cIH-bz-Vi5"/>
<constraint firstItem="TKV-I9-3N8" firstAttribute="top" secondItem="WTb-Wq-BLo" secondAttribute="bottom" constant="8" symbolic="YES" id="kzd-et-rve"/>
<constraint firstItem="72F-hB-DPP" firstAttribute="trailing" secondItem="TKV-I9-3N8" secondAttribute="trailing" id="m9x-V7-HTG"/>
<constraint firstItem="2hB-Jy-QEw" firstAttribute="centerY" secondItem="lBO-a6-qnj" secondAttribute="centerY" id="mX6-db-4Tp"/>
<constraint firstItem="TKV-I9-3N8" firstAttribute="leading" secondItem="9w7-b6-jXh" secondAttribute="leading" id="pNd-TR-JzE"/>
<constraint firstItem="WTb-Wq-BLo" firstAttribute="top" secondItem="8QZ-37-H7U" secondAttribute="top" constant="20" symbolic="YES" id="q88-zV-efL"/>
<constraint firstItem="oiz-24-DEQ" firstAttribute="trailing" secondItem="72F-hB-DPP" secondAttribute="trailing" id="rdm-Wx-VIj"/>
<constraint firstItem="oiz-24-DEQ" firstAttribute="leading" secondItem="72F-hB-DPP" secondAttribute="leading" id="wkn-4L-Olz"/>
</constraints>
</view>
<connections>
@ -189,7 +175,6 @@
<outlet property="buttonPurchase" destination="lBO-a6-qnj" id="m5t-5u-goQ"/>
<outlet property="buttonRestore" destination="XMI-x0-24k" id="Xhd-Ph-uUY"/>
<outlet property="labelFooter" destination="TKV-I9-3N8" id="DTN-XY-TSD"/>
<outlet property="labelLegacy" destination="oiz-24-DEQ" id="YWQ-uG-YvG"/>
<outlet property="labelRestore" destination="72F-hB-DPP" id="rnt-Zy-gEz"/>
<outlet property="tableView" destination="9w7-b6-jXh" id="0Ju-MH-sbN"/>
</connections>
@ -205,7 +190,7 @@
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
</objects>
<point key="canvasLocation" x="428" y="6.5"/>
<point key="canvasLocation" x="428" y="-11"/>
</scene>
</scenes>
</document>

View File

@ -40,10 +40,6 @@ class PurchaseViewController: NSViewController {
static let product = NSUserInterfaceItemIdentifier("ProductCellIdentifier")
}
private let legacyEmail = "issues+maclegacy@passepartoutvpn.app"
private lazy var legacyEmailURL = URL(string: "mailto:\(legacyEmail)")!
@IBOutlet private weak var tableView: NSTableView!
@IBOutlet private weak var labelFooter: NSTextField!
@ -56,8 +52,6 @@ class PurchaseViewController: NSViewController {
@IBOutlet private weak var buttonRestore: NSButton!
@IBOutlet private weak var labelLegacy: NSTextField!
var feature: Product?
weak var delegate: PurchaseViewControllerDelegate?
@ -111,16 +105,6 @@ class PurchaseViewController: NSViewController {
labelRestore.stringValue = L10n.Core.Purchase.Cells.Restore.description
buttonPurchase.title = L10n.Core.Purchase.title
buttonRestore.title = L10n.Core.Purchase.Cells.Restore.title
let legacyEmailLink = NSAttributedString(
string: legacyEmail,
attributes: [.link: legacyEmailURL]
)
let legacyText = NSMutableAttributedString()
legacyText.append(NSAttributedString(string: L10n.App.Purchase.Sections.Products.Footer.macLegacy))
legacyText.append(legacyEmailLink)
labelLegacy.attributedStringValue = legacyText
labelLegacy.addGestureRecognizer(NSClickGestureRecognizer(target: self, action: #selector(sendLegacyEmail)))
tableView.usesAutomaticRowHeights = true
tableView.reloadData()
@ -172,10 +156,6 @@ class PurchaseViewController: NSViewController {
}
}
@objc private func sendLegacyEmail() {
NSWorkspace.shared.open(legacyEmailURL)
}
private func purchaseFeature() {
guard let sk = skFeature else {
return