mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-18 14:39:09 +00:00
Merge branch 'reorganize-credits-page'
This commit is contained in:
commit
eb38b20994
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 1.0 RC4 1271 (2018-12-04)
|
||||
|
||||
### Changed
|
||||
|
||||
- Reorganized credits page.
|
||||
|
||||
## 1.0 RC3 1258 (2018-11-15)
|
||||
|
||||
### Changed
|
||||
|
@ -136,6 +136,12 @@ extension UITextField {
|
||||
}
|
||||
}
|
||||
|
||||
extension UIActivityIndicatorView {
|
||||
func applyAccent(_ theme: Theme) {
|
||||
color = theme.palette.colorAccent1
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: status bar is broken
|
||||
extension MFMailComposeViewController {
|
||||
func apply(_ theme: Theme) {
|
||||
|
115
Passepartout-iOS/Scenes/Organizer/CreditsViewController.swift
Normal file
115
Passepartout-iOS/Scenes/Organizer/CreditsViewController.swift
Normal file
@ -0,0 +1,115 @@
|
||||
//
|
||||
// CreditsViewController.swift
|
||||
// Passepartout-iOS
|
||||
//
|
||||
// Created by Davide De Rosa on 11/26/18.
|
||||
// Copyright (c) 2018 Davide De Rosa. All rights reserved.
|
||||
//
|
||||
// https://github.com/passepartoutvpn
|
||||
//
|
||||
// This file is part of Passepartout.
|
||||
//
|
||||
// Passepartout is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Passepartout is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CreditsViewController: UITableViewController, TableModelHost {
|
||||
private let licenses = AppConstants.License.all
|
||||
|
||||
private let notices = AppConstants.Notice.all
|
||||
|
||||
// MARK: TableModelHost
|
||||
|
||||
var model: TableModel<SectionType, RowType> = TableModel()
|
||||
|
||||
func reloadModel() {
|
||||
model.add(.licenses)
|
||||
model.add(.notices)
|
||||
|
||||
model.setHeader(L10n.Credits.Sections.Licenses.header, for: .licenses)
|
||||
model.setHeader(L10n.Credits.Sections.Notices.header, for: .notices)
|
||||
|
||||
model.set(.license, count: licenses.count, in: .licenses)
|
||||
model.set(.notice, count: notices.count, in: .notices)
|
||||
}
|
||||
|
||||
// MARK: UIViewController
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = L10n.Credits.title
|
||||
reloadModel()
|
||||
}
|
||||
|
||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||
guard let vc = segue.destination as? LabelViewController else {
|
||||
return
|
||||
}
|
||||
guard let cell = sender as? SettingTableViewCell, let indexPath = tableView.indexPath(for: cell) else {
|
||||
return
|
||||
}
|
||||
vc.title = cell.leftText
|
||||
switch model.row(at: indexPath) {
|
||||
case .license:
|
||||
vc.license = licenses[indexPath.row]
|
||||
|
||||
case .notice:
|
||||
vc.text = notices[indexPath.row].statement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension CreditsViewController {
|
||||
enum SectionType: Int {
|
||||
case licenses
|
||||
|
||||
case notices
|
||||
}
|
||||
|
||||
enum RowType: Int {
|
||||
case license
|
||||
|
||||
case notice
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return model.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
return model.header(for: section)
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return model.count(for: section)
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
switch model.row(at: indexPath) {
|
||||
case .license:
|
||||
let obj = licenses[indexPath.row]
|
||||
cell.leftText = obj.name
|
||||
cell.rightText = obj.type
|
||||
|
||||
case .notice:
|
||||
let obj = notices[indexPath.row]
|
||||
cell.leftText = obj.name
|
||||
cell.rightText = nil
|
||||
}
|
||||
return cell
|
||||
}
|
||||
}
|
@ -28,10 +28,14 @@ import UIKit
|
||||
class LabelViewController: UIViewController {
|
||||
@IBOutlet private weak var scrollView: UIScrollView?
|
||||
|
||||
@IBOutlet private weak var activity: UIActivityIndicatorView?
|
||||
|
||||
@IBOutlet private weak var label: UILabel?
|
||||
|
||||
var text: String?
|
||||
|
||||
var license: AppConstants.License?
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
@ -41,10 +45,43 @@ class LabelViewController: UIViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = L10n.Credits.title
|
||||
label?.text = text
|
||||
|
||||
activity?.hidesWhenStopped = true
|
||||
activity?.applyAccent(Theme.current)
|
||||
scrollView?.applyPrimaryBackground(Theme.current)
|
||||
label?.applyLight(Theme.current)
|
||||
|
||||
if let license = license {
|
||||
|
||||
// try cache first
|
||||
if let cachedContent = AppConstants.License.cachedContent[license.name] {
|
||||
label?.text = cachedContent
|
||||
return
|
||||
}
|
||||
|
||||
label?.text = nil
|
||||
activity?.startAnimating()
|
||||
|
||||
DispatchQueue(label: LabelViewController.description(), qos: .background).async { [weak self] in
|
||||
let content: String
|
||||
let couldFetch: Bool
|
||||
do {
|
||||
content = try String(contentsOf: license.url)
|
||||
couldFetch = true
|
||||
} catch {
|
||||
content = L10n.Label.License.error
|
||||
couldFetch = false
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self?.label?.text = content
|
||||
self?.activity?.stopAnimating()
|
||||
|
||||
if couldFetch {
|
||||
AppConstants.License.cachedContent[license.name] = content
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
label?.text = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,14 +65,4 @@ class VersionViewController: UIViewController {
|
||||
@IBAction private func visitChangelog() {
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Sge-vR-hZB">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Sge-vR-hZB">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@ -13,13 +13,13 @@
|
||||
<!--Wizard Provider View Controller-->
|
||||
<scene sceneID="amb-wT-98R">
|
||||
<objects>
|
||||
<tableViewController id="Ooz-PQ-fgV" customClass="WizardProviderViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="Ooz-PQ-fgV" customClass="WizardProviderViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="FrB-tA-bkJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="ZFw-Xo-SgJ" detailTextLabel="LZg-Pu-uBW" style="IBUITableViewCellStyleValue1" id="vez-pF-zsL" customClass="SettingTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="ZFw-Xo-SgJ" detailTextLabel="LZg-Pu-uBW" style="IBUITableViewCellStyleValue1" id="vez-pF-zsL" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="vez-pF-zsL" id="tAg-9p-gaM">
|
||||
@ -80,13 +80,13 @@
|
||||
<!--Wizard Host View Controller-->
|
||||
<scene sceneID="cDq-OT-Nr8">
|
||||
<objects>
|
||||
<tableViewController id="oga-go-FqD" customClass="WizardHostViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="oga-go-FqD" customClass="WizardHostViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="RpT-29-VW0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="FieldTableViewCell" textLabel="aLA-eA-uGX" style="IBUITableViewCellStyleDefault" id="wnp-T1-bf6" customClass="FieldTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="FieldTableViewCell" textLabel="aLA-eA-uGX" style="IBUITableViewCellStyleDefault" id="wnp-T1-bf6" customClass="FieldTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="wnp-T1-bf6" id="YiA-B5-bel">
|
||||
@ -103,7 +103,7 @@
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="isC-Oi-HuO" detailTextLabel="REc-9m-82J" style="IBUITableViewCellStyleValue1" id="mg5-6A-smS" customClass="SettingTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="isC-Oi-HuO" detailTextLabel="REc-9m-82J" style="IBUITableViewCellStyleValue1" id="mg5-6A-smS" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mg5-6A-smS" id="oTs-dD-rvG">
|
||||
@ -164,13 +164,13 @@
|
||||
<!--Imported Hosts View Controller-->
|
||||
<scene sceneID="0zM-zA-ZTU">
|
||||
<objects>
|
||||
<tableViewController id="c0p-pg-Arz" customClass="ImportedHostsViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="c0p-pg-Arz" customClass="ImportedHostsViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="j8e-Ab-2SM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="h2k-uQ-JBT" detailTextLabel="Tnk-4u-fB2" style="IBUITableViewCellStyleValue1" id="4dG-dn-eeq" customClass="SettingTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="h2k-uQ-JBT" detailTextLabel="Tnk-4u-fB2" style="IBUITableViewCellStyleValue1" id="4dG-dn-eeq" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4dG-dn-eeq" id="c48-Fg-ve4">
|
||||
@ -250,13 +250,13 @@
|
||||
<!--Organizer View Controller-->
|
||||
<scene sceneID="H6i-Tl-Gnq">
|
||||
<objects>
|
||||
<tableViewController id="hNf-xP-0pR" customClass="OrganizerViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="hNf-xP-0pR" customClass="OrganizerViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="ZTL-7K-8ld">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="mFP-Zm-Yaa" detailTextLabel="NYd-C0-mki" style="IBUITableViewCellStyleValue1" id="VMR-pG-t8h" customClass="SettingTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="mFP-Zm-Yaa" detailTextLabel="NYd-C0-mki" style="IBUITableViewCellStyleValue1" id="VMR-pG-t8h" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VMR-pG-t8h" id="yQx-3t-6fR">
|
||||
@ -319,7 +319,7 @@
|
||||
<!--Version View Controller-->
|
||||
<scene sceneID="dbE-eJ-wli">
|
||||
<objects>
|
||||
<viewController id="PMT-gj-ARE" customClass="VersionViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="PMT-gj-ARE" customClass="VersionViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="UOK-GX-kRH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
@ -367,7 +367,7 @@
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<state key="normal" title="<CRD>"/>
|
||||
<connections>
|
||||
<segue destination="2d7-Ad-AZr" kind="show" id="SQ0-O9-E5E"/>
|
||||
<segue destination="duu-Yq-oor" kind="show" id="w0a-1I-6Nc"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
@ -433,6 +433,53 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-2551" y="-2246"/>
|
||||
</scene>
|
||||
<!--Credits View Controller-->
|
||||
<scene sceneID="fCJ-0P-4HO">
|
||||
<objects>
|
||||
<tableViewController id="duu-Yq-oor" customClass="CreditsViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="f7p-SX-zRm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="Cs5-Oz-lZ4" detailTextLabel="6AN-wh-sIr" style="IBUITableViewCellStyleValue1" id="jQu-e3-15s" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jQu-e3-15s" id="1nY-NX-ZWl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Cs5-Oz-lZ4">
|
||||
<rect key="frame" x="16" y="12" width="33.5" height="20.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6AN-wh-sIr">
|
||||
<rect key="frame" x="296" y="12" width="44" height="20.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="2d7-Ad-AZr" kind="show" id="cPN-1o-GoM"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="duu-Yq-oor" id="KEN-j6-9Eb"/>
|
||||
<outlet property="delegate" destination="duu-Yq-oor" id="FR8-fY-ppd"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="A5e-dW-BFv" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1786" y="-2247"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="bMd-7b-j9C">
|
||||
<objects>
|
||||
@ -452,13 +499,13 @@
|
||||
<!--About View Controller-->
|
||||
<scene sceneID="jWz-41-sji">
|
||||
<objects>
|
||||
<tableViewController id="SuC-Dh-OPk" customClass="AboutViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController id="SuC-Dh-OPk" customClass="AboutViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="m0n-o6-NhG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="skM-jg-ICe" detailTextLabel="iON-s3-zdv" style="IBUITableViewCellStyleValue1" id="Ur6-zm-9xA" customClass="SettingTableViewCell" customModule="Passepartout_iOS" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="SettingTableViewCell" textLabel="skM-jg-ICe" detailTextLabel="iON-s3-zdv" style="IBUITableViewCellStyleValue1" id="Ur6-zm-9xA" customClass="SettingTableViewCell" customModule="Passepartout" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Ur6-zm-9xA" id="k8G-g0-As7">
|
||||
@ -506,7 +553,7 @@
|
||||
<!--Label View Controller-->
|
||||
<scene sceneID="1v7-O6-Ddh">
|
||||
<objects>
|
||||
<viewController id="2d7-Ad-AZr" customClass="LabelViewController" customModule="Passepartout_iOS" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="2d7-Ad-AZr" customClass="LabelViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="e1G-CS-7AH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
@ -552,10 +599,15 @@
|
||||
<constraint firstItem="Qme-Hw-Egq" firstAttribute="width" secondItem="6iI-GI-SMq" secondAttribute="width" id="urL-Uu-OBn"/>
|
||||
</constraints>
|
||||
</scrollView>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="piQ-gx-2Zm">
|
||||
<rect key="frame" x="177.5" y="323.5" width="20" height="20"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="piQ-gx-2Zm" firstAttribute="centerY" secondItem="e1G-CS-7AH" secondAttribute="centerY" id="2bL-bY-Tq7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6iI-GI-SMq" secondAttribute="bottom" id="O7t-Z4-Wgz"/>
|
||||
<constraint firstItem="piQ-gx-2Zm" firstAttribute="centerX" secondItem="e1G-CS-7AH" secondAttribute="centerX" id="kec-lV-4be"/>
|
||||
<constraint firstItem="6iI-GI-SMq" firstAttribute="top" secondItem="e1G-CS-7AH" secondAttribute="top" id="moK-Ck-mjj"/>
|
||||
<constraint firstItem="6iI-GI-SMq" firstAttribute="leading" secondItem="e1G-CS-7AH" secondAttribute="leading" id="rLL-Mv-Pet"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6iI-GI-SMq" secondAttribute="trailing" id="smW-RU-D8F"/>
|
||||
@ -563,13 +615,14 @@
|
||||
<viewLayoutGuide key="safeArea" id="skL-cM-vUB"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="activity" destination="piQ-gx-2Zm" id="4MR-Wt-LPh"/>
|
||||
<outlet property="label" destination="KWp-cG-SuG" id="us3-ss-xAX"/>
|
||||
<outlet property="scrollView" destination="6iI-GI-SMq" id="uWc-do-1WG"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Urb-bq-a19" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-2551" y="-1537"/>
|
||||
<point key="canvasLocation" x="-1012" y="-2248"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
|
@ -86,6 +86,7 @@
|
||||
0EF56BBB2185AC8500B0C8AB /* SwiftGen+Segues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF56BBA2185AC8500B0C8AB /* SwiftGen+Segues.swift */; };
|
||||
0EF5CF252141CE58004FF1BD /* HUD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF5CF242141CE58004FF1BD /* HUD.swift */; };
|
||||
0EF5CF292141F31F004FF1BD /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E4FD7ED20D539A0002221FF /* Utils.swift */; };
|
||||
0EFBFAC121AC464800887A8C /* CreditsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFBFAC021AC464800887A8C /* CreditsViewController.swift */; };
|
||||
0EFD943E215BE10800529B64 /* IssueReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFD943D215BE10800529B64 /* IssueReporter.swift */; };
|
||||
0EFD9440215BED8E00529B64 /* LabelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFD943F215BED8E00529B64 /* LabelViewController.swift */; };
|
||||
390EEC911382C4814FB97475 /* Pods_Passepartout_iOS_Tunnel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D0C619B826C7140001C0F32 /* Pods_Passepartout_iOS_Tunnel.framework */; };
|
||||
@ -211,6 +212,7 @@
|
||||
0EE3BBB1215ED3A900F30952 /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
|
||||
0EF56BBA2185AC8500B0C8AB /* SwiftGen+Segues.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SwiftGen+Segues.swift"; sourceTree = "<group>"; };
|
||||
0EF5CF242141CE58004FF1BD /* HUD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HUD.swift; sourceTree = "<group>"; };
|
||||
0EFBFAC021AC464800887A8C /* CreditsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsViewController.swift; sourceTree = "<group>"; };
|
||||
0EFD943D215BE10800529B64 /* IssueReporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueReporter.swift; sourceTree = "<group>"; };
|
||||
0EFD943F215BED8E00529B64 /* LabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelViewController.swift; sourceTree = "<group>"; };
|
||||
28B2E6590DE79C3B403348DC /* Pods-Passepartout-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Passepartout-iOS.debug.xcconfig"; path = "Target Support Files/Pods-Passepartout-iOS/Pods-Passepartout-iOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
@ -341,6 +343,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0EE3BBB1215ED3A900F30952 /* AboutViewController.swift */,
|
||||
0EFBFAC021AC464800887A8C /* CreditsViewController.swift */,
|
||||
0EB67D6A2184581E00BA6200 /* ImportedHostsViewController.swift */,
|
||||
0EFD943F215BED8E00529B64 /* LabelViewController.swift */,
|
||||
0EBE3A78213C4E5400BFA2F5 /* OrganizerViewController.swift */,
|
||||
@ -849,6 +852,7 @@
|
||||
0E6BE13F20CFBAB300A6DD36 /* DebugLogViewController.swift in Sources */,
|
||||
0E89DFC8213E8FC500741BA1 /* SessionProxy+Communication.swift in Sources */,
|
||||
0ED38AEA214054A50004D387 /* OptionViewController.swift in Sources */,
|
||||
0EFBFAC121AC464800887A8C /* CreditsViewController.swift in Sources */,
|
||||
0EFD943E215BE10800529B64 /* IssueReporter.swift in Sources */,
|
||||
0EB60FDA2111136E00AD27F3 /* UITextView+Search.swift in Sources */,
|
||||
0EB67D6B2184581E00BA6200 /* ImportedHostsViewController.swift in Sources */,
|
||||
|
@ -206,4 +206,7 @@
|
||||
"version.buttons.credits" = "CREDITS";
|
||||
|
||||
"credits.title" = "Credits";
|
||||
"credits.labels.third_parties" = "The logo is taken from the awesome Circle Icons set by Nick Roach.";
|
||||
"credits.sections.licenses.header" = "Licenses";
|
||||
"credits.sections.notices.header" = "Notices";
|
||||
|
||||
"label.license.error" = "Unable to download full license content.";
|
||||
|
@ -169,23 +169,69 @@ class AppConstants {
|
||||
static let api = githubRaw(repo: "passepartout-api")
|
||||
}
|
||||
|
||||
class Notices {
|
||||
private static let pia = "PIATunnel - Copyright (c) 2018-Present Private Internet Access"
|
||||
struct License {
|
||||
let name: String
|
||||
|
||||
private static let swiftyBeaver = "SwiftyBeaver - Copyright (c) 2015 Sebastian Kreutzberger"
|
||||
let type: String
|
||||
|
||||
private static let progressHUD = "MBProgressHUD - Copyright (c) 2009-2016 Matej Bukovinski"
|
||||
let url: URL
|
||||
|
||||
init(_ name: String, _ type: String, _ urlString: String) {
|
||||
self.name = name
|
||||
self.type = type
|
||||
url = URL(string: urlString)!
|
||||
}
|
||||
|
||||
private static let openVPN = "© 2002-2018 OpenVPN Inc. - OpenVPN is a registered trademark of OpenVPN Inc."
|
||||
static let all: [License] = [
|
||||
License(
|
||||
"MBProgressHUD",
|
||||
"MIT",
|
||||
"https://raw.githubusercontent.com/jdg/MBProgressHUD/master/LICENSE"
|
||||
),
|
||||
License(
|
||||
"OpenSSL",
|
||||
"OpenSSL",
|
||||
"https://www.openssl.org/source/license.txt"
|
||||
),
|
||||
License(
|
||||
"PIATunnel",
|
||||
"MIT",
|
||||
"https://raw.githubusercontent.com/pia-foss/tunnel-apple/master/LICENSE"
|
||||
),
|
||||
License(
|
||||
"SwiftGen",
|
||||
"MIT",
|
||||
"https://raw.githubusercontent.com/SwiftGen/SwiftGen/master/LICENSE"
|
||||
),
|
||||
License(
|
||||
"SwiftyBeaver",
|
||||
"MIT",
|
||||
"https://raw.githubusercontent.com/SwiftyBeaver/SwiftyBeaver/master/LICENSE"
|
||||
)
|
||||
]
|
||||
|
||||
private static let openSSL = "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. https://www.openssl.org/"
|
||||
static var cachedContent: [String: String] = [:]
|
||||
}
|
||||
|
||||
struct Notice {
|
||||
let name: String
|
||||
|
||||
static let all: [String] = [
|
||||
pia,
|
||||
swiftyBeaver,
|
||||
progressHUD,
|
||||
openVPN,
|
||||
openSSL
|
||||
let statement: String
|
||||
|
||||
init(_ name: String, _ statement: String) {
|
||||
self.name = name
|
||||
self.statement = statement
|
||||
}
|
||||
|
||||
static let all: [Notice] = [
|
||||
Notice(
|
||||
"Circle Icons",
|
||||
"The logo is taken from the awesome Circle Icons set by Nick Roach."
|
||||
),
|
||||
Notice(
|
||||
"OpenVPN",
|
||||
"© 2002-2018 OpenVPN Inc. - OpenVPN is a registered trademark of OpenVPN Inc."
|
||||
)
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -192,9 +192,15 @@ internal enum L10n {
|
||||
internal enum Credits {
|
||||
/// Credits
|
||||
internal static let title = L10n.tr("Localizable", "credits.title")
|
||||
internal enum Labels {
|
||||
/// The logo is taken from the awesome Circle Icons set by Nick Roach.
|
||||
internal static let thirdParties = L10n.tr("Localizable", "credits.labels.third_parties")
|
||||
internal enum Sections {
|
||||
internal enum Licenses {
|
||||
/// Licenses
|
||||
internal static let header = L10n.tr("Localizable", "credits.sections.licenses.header")
|
||||
}
|
||||
internal enum Notices {
|
||||
/// Notices
|
||||
internal static let header = L10n.tr("Localizable", "credits.sections.notices.header")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,6 +293,13 @@ internal enum L10n {
|
||||
}
|
||||
}
|
||||
|
||||
internal enum Label {
|
||||
internal enum License {
|
||||
/// Unable to download full license content.
|
||||
internal static let error = L10n.tr("Localizable", "label.license.error")
|
||||
}
|
||||
}
|
||||
|
||||
internal enum Organizer {
|
||||
internal enum Alerts {
|
||||
internal enum AddHost {
|
||||
|
@ -110,9 +110,12 @@ By contributing to this project you are agreeing to the terms stated in the [Con
|
||||
|
||||
The logo is taken from the awesome Circle Icons set by Nick Roach.
|
||||
|
||||
- PIATunnel - © 2018-Present Private Internet Access
|
||||
- SwiftyBeaver - © 2015 Sebastian Kreutzberger
|
||||
- MBProgressHUD - © 2009-2016 Matej Bukovinski
|
||||
- PIATunnel - © 2018-Present Private Internet Access
|
||||
- SwiftGen - © 2018 SwiftGen
|
||||
- SwiftyBeaver - © 2015 Sebastian Kreutzberger
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. ([https://www.openssl.org/][dep-openssl])
|
||||
|
||||
© 2002-2018 OpenVPN Inc. - OpenVPN is a registered trademark of OpenVPN Inc.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user