Move Credits inside Version
This commit is contained in:
parent
22ad02fc6a
commit
fec2f02df5
|
@ -23,7 +23,6 @@ internal enum StoryboardSegue {
|
||||||
internal enum Organizer: String, SegueType {
|
internal enum Organizer: String, SegueType {
|
||||||
case aboutSegueIdentifier = "AboutSegueIdentifier"
|
case aboutSegueIdentifier = "AboutSegueIdentifier"
|
||||||
case addProviderSegueIdentifier = "AddProviderSegueIdentifier"
|
case addProviderSegueIdentifier = "AddProviderSegueIdentifier"
|
||||||
case creditsSegueIdentifier = "CreditsSegueIdentifier"
|
|
||||||
case disclaimerSegueIdentifier = "DisclaimerSegueIdentifier"
|
case disclaimerSegueIdentifier = "DisclaimerSegueIdentifier"
|
||||||
case importHostSegueIdentifier = "ImportHostSegueIdentifier"
|
case importHostSegueIdentifier = "ImportHostSegueIdentifier"
|
||||||
case selectProfileSegueIdentifier = "SelectProfileSegueIdentifier"
|
case selectProfileSegueIdentifier = "SelectProfileSegueIdentifier"
|
||||||
|
|
|
@ -39,7 +39,7 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||||
model.setHeader(L10n.About.Sections.Source.header, for: .source)
|
model.setHeader(L10n.About.Sections.Source.header, for: .source)
|
||||||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||||
model.set([.version, .credits, .disclaimer, .website], in: .info)
|
model.set([.version, .disclaimer, .website], in: .info)
|
||||||
model.set([.sourcePassepartout, .sourceTunnelKit], in: .source)
|
model.set([.sourcePassepartout, .sourceTunnelKit], in: .source)
|
||||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||||
|
@ -69,10 +69,6 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||||
perform(segue: StoryboardSegue.Organizer.versionSegueIdentifier)
|
perform(segue: StoryboardSegue.Organizer.versionSegueIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func showCredits() {
|
|
||||||
perform(segue: StoryboardSegue.Organizer.creditsSegueIdentifier)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func showDisclaimer() {
|
private func showDisclaimer() {
|
||||||
perform(segue: StoryboardSegue.Organizer.disclaimerSegueIdentifier)
|
perform(segue: StoryboardSegue.Organizer.disclaimerSegueIdentifier)
|
||||||
}
|
}
|
||||||
|
@ -118,11 +114,6 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch segueType {
|
switch segueType {
|
||||||
case .creditsSegueIdentifier:
|
|
||||||
var notices = AppConstants.Notices.all
|
|
||||||
notices.insert(L10n.Credits.Labels.thirdParties, at: 0)
|
|
||||||
vc.text = notices.joined(separator: "\n\n")
|
|
||||||
|
|
||||||
case .disclaimerSegueIdentifier:
|
case .disclaimerSegueIdentifier:
|
||||||
vc.text = L10n.Disclaimer.Labels.text
|
vc.text = L10n.Disclaimer.Labels.text
|
||||||
|
|
||||||
|
@ -148,8 +139,6 @@ extension AboutViewController {
|
||||||
enum RowType: Int {
|
enum RowType: Int {
|
||||||
case version
|
case version
|
||||||
|
|
||||||
case credits
|
|
||||||
|
|
||||||
case disclaimer
|
case disclaimer
|
||||||
|
|
||||||
case website
|
case website
|
||||||
|
@ -191,11 +180,6 @@ extension AboutViewController {
|
||||||
cell.rightText = Utils.versionString()
|
cell.rightText = Utils.versionString()
|
||||||
return cell
|
return cell
|
||||||
|
|
||||||
case .credits:
|
|
||||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
|
||||||
cell.leftText = L10n.Credits.title
|
|
||||||
return cell
|
|
||||||
|
|
||||||
case .disclaimer:
|
case .disclaimer:
|
||||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||||
cell.leftText = L10n.Disclaimer.title
|
cell.leftText = L10n.Disclaimer.title
|
||||||
|
@ -243,9 +227,6 @@ extension AboutViewController {
|
||||||
case .version:
|
case .version:
|
||||||
showVersion()
|
showVersion()
|
||||||
|
|
||||||
case .credits:
|
|
||||||
showCredits()
|
|
||||||
|
|
||||||
case .disclaimer:
|
case .disclaimer:
|
||||||
showDisclaimer()
|
showDisclaimer()
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,12 @@ class VersionViewController: UIViewController {
|
||||||
|
|
||||||
@IBOutlet private weak var labelVersion: UILabel?
|
@IBOutlet private weak var labelVersion: UILabel?
|
||||||
|
|
||||||
@IBOutlet private weak var labelCopyright: UILabel?
|
|
||||||
|
|
||||||
@IBOutlet private weak var labelIntro: UILabel?
|
@IBOutlet private weak var labelIntro: UILabel?
|
||||||
|
|
||||||
@IBOutlet private weak var buttonChangelog: UIButton?
|
@IBOutlet private weak var buttonChangelog: UIButton?
|
||||||
|
|
||||||
|
@IBOutlet private weak var buttonCredits: UIButton?
|
||||||
|
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
super.awakeFromNib()
|
super.awakeFromNib()
|
||||||
|
|
||||||
|
@ -49,18 +49,29 @@ class VersionViewController: UIViewController {
|
||||||
|
|
||||||
labelTitle?.text = GroupConstants.App.name
|
labelTitle?.text = GroupConstants.App.name
|
||||||
labelVersion?.text = Utils.versionString()
|
labelVersion?.text = Utils.versionString()
|
||||||
labelCopyright?.text = GroupConstants.App.name
|
|
||||||
labelIntro?.text = L10n.Version.Labels.intro
|
labelIntro?.text = L10n.Version.Labels.intro
|
||||||
buttonChangelog?.setTitle(L10n.Version.Buttons.changelog, for: .normal)
|
buttonChangelog?.setTitle(L10n.Version.Buttons.changelog, for: .normal)
|
||||||
|
buttonCredits?.setTitle(L10n.Version.Buttons.credits, for: .normal)
|
||||||
|
|
||||||
scrollView?.applyPrimaryBackground(Theme.current)
|
scrollView?.applyPrimaryBackground(Theme.current)
|
||||||
for label in [labelTitle, labelVersion, labelCopyright, labelIntro] {
|
for label in [labelTitle, labelVersion, labelIntro] {
|
||||||
label?.applyLight(Theme.current)
|
label?.applyLight(Theme.current)
|
||||||
}
|
}
|
||||||
buttonChangelog?.apply(Theme.current)
|
buttonChangelog?.apply(Theme.current)
|
||||||
|
buttonCredits?.apply(Theme.current)
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction private func visitChangelog() {
|
@IBAction private func visitChangelog() {
|
||||||
UIApplication.shared.open(AppConstants.URLs.changelog, options: [:], completionHandler: nil)
|
UIApplication.shared.open(AppConstants.URLs.changelog, options: [:], completionHandler: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||||
|
guard let vc = segue.destination as? LabelViewController else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
vc.title = L10n.Credits.title
|
||||||
|
var notices = AppConstants.Notices.all
|
||||||
|
notices.insert(L10n.Credits.Labels.thirdParties, at: 0)
|
||||||
|
vc.text = notices.joined(separator: "\n\n")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,10 +328,10 @@
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kan-Ro-DbI">
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kan-Ro-DbI">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="448"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="491"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RP1-au-v0h">
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RP1-au-v0h">
|
||||||
<rect key="frame" x="28" y="40" width="319" height="368"/>
|
<rect key="frame" x="28" y="40" width="319" height="411"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="eRj-AM-Edq">
|
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="eRj-AM-Edq">
|
||||||
<rect key="frame" x="59.5" y="0.0" width="200" height="200"/>
|
<rect key="frame" x="59.5" y="0.0" width="200" height="200"/>
|
||||||
|
@ -362,6 +362,14 @@
|
||||||
<action selector="visitChangelog" destination="PMT-gj-ARE" eventType="touchUpInside" id="hSv-6o-eXI"/>
|
<action selector="visitChangelog" destination="PMT-gj-ARE" eventType="touchUpInside" id="hSv-6o-eXI"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rtK-wa-fgh">
|
||||||
|
<rect key="frame" x="0.0" y="378" width="319" height="33"/>
|
||||||
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||||
|
<state key="normal" title="<CRD>"/>
|
||||||
|
<connections>
|
||||||
|
<segue destination="2d7-Ad-AZr" kind="show" id="SQ0-O9-E5E"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="trailing" secondItem="wV2-Nx-RuF" secondAttribute="trailing" id="1jj-cq-2Ja"/>
|
<constraint firstAttribute="trailing" secondItem="wV2-Nx-RuF" secondAttribute="trailing" id="1jj-cq-2Ja"/>
|
||||||
|
@ -370,14 +378,17 @@
|
||||||
<constraint firstItem="Zek-qD-saW" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="4r5-es-LKj"/>
|
<constraint firstItem="Zek-qD-saW" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="4r5-es-LKj"/>
|
||||||
<constraint firstItem="tOJ-Gb-6TL" firstAttribute="top" secondItem="Zek-qD-saW" secondAttribute="bottom" constant="5" id="5EV-6h-af6"/>
|
<constraint firstItem="tOJ-Gb-6TL" firstAttribute="top" secondItem="Zek-qD-saW" secondAttribute="bottom" constant="5" id="5EV-6h-af6"/>
|
||||||
<constraint firstItem="F6g-5X-yGY" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="Bbh-jl-eyk"/>
|
<constraint firstItem="F6g-5X-yGY" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="Bbh-jl-eyk"/>
|
||||||
|
<constraint firstItem="rtK-wa-fgh" firstAttribute="top" secondItem="wV2-Nx-RuF" secondAttribute="bottom" constant="10" id="ChX-qg-yan"/>
|
||||||
<constraint firstItem="Zek-qD-saW" firstAttribute="top" secondItem="eRj-AM-Edq" secondAttribute="bottom" constant="20" id="E5v-Gd-4FH"/>
|
<constraint firstItem="Zek-qD-saW" firstAttribute="top" secondItem="eRj-AM-Edq" secondAttribute="bottom" constant="20" id="E5v-Gd-4FH"/>
|
||||||
<constraint firstItem="wV2-Nx-RuF" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="Iop-zX-3fL"/>
|
<constraint firstItem="wV2-Nx-RuF" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="Iop-zX-3fL"/>
|
||||||
<constraint firstItem="F6g-5X-yGY" firstAttribute="top" secondItem="tOJ-Gb-6TL" secondAttribute="bottom" constant="20" id="Vla-uy-lL8"/>
|
<constraint firstItem="F6g-5X-yGY" firstAttribute="top" secondItem="tOJ-Gb-6TL" secondAttribute="bottom" constant="20" id="Vla-uy-lL8"/>
|
||||||
<constraint firstAttribute="trailing" secondItem="Zek-qD-saW" secondAttribute="trailing" id="WL1-SB-5gf"/>
|
<constraint firstAttribute="trailing" secondItem="Zek-qD-saW" secondAttribute="trailing" id="WL1-SB-5gf"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="rtK-wa-fgh" secondAttribute="bottom" id="XDo-fJ-IOo"/>
|
||||||
<constraint firstAttribute="trailing" secondItem="tOJ-Gb-6TL" secondAttribute="trailing" id="a5o-c7-BD5"/>
|
<constraint firstAttribute="trailing" secondItem="tOJ-Gb-6TL" secondAttribute="trailing" id="a5o-c7-BD5"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="rtK-wa-fgh" secondAttribute="trailing" id="dBQ-XF-2mE"/>
|
||||||
<constraint firstItem="tOJ-Gb-6TL" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="grT-YM-rGi"/>
|
<constraint firstItem="tOJ-Gb-6TL" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="grT-YM-rGi"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="wV2-Nx-RuF" secondAttribute="bottom" id="m4p-a0-sqe"/>
|
|
||||||
<constraint firstItem="eRj-AM-Edq" firstAttribute="top" secondItem="RP1-au-v0h" secondAttribute="top" id="q35-KT-uTl"/>
|
<constraint firstItem="eRj-AM-Edq" firstAttribute="top" secondItem="RP1-au-v0h" secondAttribute="top" id="q35-KT-uTl"/>
|
||||||
|
<constraint firstItem="rtK-wa-fgh" firstAttribute="leading" secondItem="RP1-au-v0h" secondAttribute="leading" id="weH-qk-nTh"/>
|
||||||
<constraint firstItem="wV2-Nx-RuF" firstAttribute="top" secondItem="F6g-5X-yGY" secondAttribute="bottom" constant="20" id="y5I-Du-MiY"/>
|
<constraint firstItem="wV2-Nx-RuF" firstAttribute="top" secondItem="F6g-5X-yGY" secondAttribute="bottom" constant="20" id="y5I-Du-MiY"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
|
@ -411,6 +422,7 @@
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="buttonChangelog" destination="wV2-Nx-RuF" id="E0X-ek-Ii2"/>
|
<outlet property="buttonChangelog" destination="wV2-Nx-RuF" id="E0X-ek-Ii2"/>
|
||||||
|
<outlet property="buttonCredits" destination="rtK-wa-fgh" id="56A-mE-YHa"/>
|
||||||
<outlet property="labelIntro" destination="F6g-5X-yGY" id="QSg-VO-Wf4"/>
|
<outlet property="labelIntro" destination="F6g-5X-yGY" id="QSg-VO-Wf4"/>
|
||||||
<outlet property="labelTitle" destination="Zek-qD-saW" id="TL8-Vb-B58"/>
|
<outlet property="labelTitle" destination="Zek-qD-saW" id="TL8-Vb-B58"/>
|
||||||
<outlet property="labelVersion" destination="tOJ-Gb-6TL" id="O7w-Ne-L0R"/>
|
<outlet property="labelVersion" destination="tOJ-Gb-6TL" id="O7w-Ne-L0R"/>
|
||||||
|
@ -419,7 +431,7 @@
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="n7m-Yv-Puo" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="n7m-Yv-Puo" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="-2551.1999999999998" y="-2224.1379310344828"/>
|
<point key="canvasLocation" x="-2551" y="-2246"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Navigation Controller-->
|
<!--Navigation Controller-->
|
||||||
<scene sceneID="bMd-7b-j9C">
|
<scene sceneID="bMd-7b-j9C">
|
||||||
|
@ -484,7 +496,6 @@
|
||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
</navigationItem>
|
</navigationItem>
|
||||||
<connections>
|
<connections>
|
||||||
<segue destination="2d7-Ad-AZr" kind="show" identifier="CreditsSegueIdentifier" id="tGv-dr-20P"/>
|
|
||||||
<segue destination="PMT-gj-ARE" kind="show" identifier="VersionSegueIdentifier" id="uYt-4N-PPL"/>
|
<segue destination="PMT-gj-ARE" kind="show" identifier="VersionSegueIdentifier" id="uYt-4N-PPL"/>
|
||||||
<segue destination="2d7-Ad-AZr" kind="show" identifier="DisclaimerSegueIdentifier" id="HW6-RJ-VFY"/>
|
<segue destination="2d7-Ad-AZr" kind="show" identifier="DisclaimerSegueIdentifier" id="HW6-RJ-VFY"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
@ -566,7 +577,7 @@
|
||||||
<image name="logo" width="200" height="200"/>
|
<image name="logo" width="200" height="200"/>
|
||||||
</resources>
|
</resources>
|
||||||
<inferredMetricsTieBreakers>
|
<inferredMetricsTieBreakers>
|
||||||
<segue reference="HW6-RJ-VFY"/>
|
<segue reference="SQ0-O9-E5E"/>
|
||||||
<segue reference="kwN-PZ-Zg5"/>
|
<segue reference="kwN-PZ-Zg5"/>
|
||||||
</inferredMetricsTieBreakers>
|
</inferredMetricsTieBreakers>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
@ -200,6 +200,7 @@
|
||||||
|
|
||||||
"version.labels.intro" = "Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.";
|
"version.labels.intro" = "Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.";
|
||||||
"version.buttons.changelog" = "CHANGELOG";
|
"version.buttons.changelog" = "CHANGELOG";
|
||||||
|
"version.buttons.credits" = "CREDITS";
|
||||||
|
|
||||||
"credits.title" = "Credits";
|
"credits.title" = "Credits";
|
||||||
"credits.labels.third_parties" = "Passepartout is a non-official client and is in no way affiliated with OpenVPN Inc.\n\nThe logo is taken from the awesome Circle Icons set by Nick Roach.";
|
"credits.labels.third_parties" = "Passepartout is a non-official client and is in no way affiliated with OpenVPN Inc.\n\nThe logo is taken from the awesome Circle Icons set by Nick Roach.";
|
||||||
|
|
|
@ -614,6 +614,8 @@ internal enum L10n {
|
||||||
internal enum Buttons {
|
internal enum Buttons {
|
||||||
/// CHANGELOG
|
/// CHANGELOG
|
||||||
internal static let changelog = L10n.tr("Localizable", "version.buttons.changelog")
|
internal static let changelog = L10n.tr("Localizable", "version.buttons.changelog")
|
||||||
|
/// CREDITS
|
||||||
|
internal static let credits = L10n.tr("Localizable", "version.buttons.credits")
|
||||||
}
|
}
|
||||||
internal enum Labels {
|
internal enum Labels {
|
||||||
/// Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.
|
/// Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.
|
||||||
|
|
Loading…
Reference in New Issue