aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/UI/iOS/View
diff options
context:
space:
mode:
authorAlessio Nossa <alessio.nossa@gmail.com>2024-02-28 10:28:12 +0100
committerAlessio Nossa <alessio.nossa@gmail.com>2024-02-28 10:28:12 +0100
commita37ae8a99b9edb363eb084e17eec35f3c4761313 (patch)
tree06b2db1fd7565b9d615c2e79ba022e3cc7c3f690 /Sources/WireGuardApp/UI/iOS/View
parentRemove backward compatibility of GetPeers with SiriKit version (diff)
parentApp: version bump (diff)
downloadwireguard-apple-an/shortcuts-integration.tar.xz
wireguard-apple-an/shortcuts-integration.zip
Merge branch 'master' into an/shortcuts-integrationan/shortcuts-integration
Diffstat (limited to 'Sources/WireGuardApp/UI/iOS/View')
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift28
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TextCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift8
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift14
10 files changed, 20 insertions, 56 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift b/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
index f8f373a..6f9d55c 100644
--- a/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/BorderedTextButton.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift b/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
index 1d9912d..ae7a144 100644
--- a/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/ButtonCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift b/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
index 34eb0df..fedef53 100644
--- a/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/CheckmarkCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift b/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
index 30256a0..0429fb9 100644
--- a/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/ChevronCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift b/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
index d84d23e..e065b4f 100644
--- a/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/EditableTextCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
diff --git a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
index e8c3850..ab1a71f 100644
--- a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -9,11 +9,7 @@ class KeyValueCell: UITableViewCell {
let keyLabel = UILabel()
keyLabel.font = UIFont.preferredFont(forTextStyle: .body)
keyLabel.adjustsFontForContentSizeCategory = true
- if #available(iOS 13.0, *) {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .black
- }
+ keyLabel.textColor = .label
keyLabel.textAlignment = .left
return keyLabel
}()
@@ -35,11 +31,7 @@ class KeyValueCell: UITableViewCell {
valueTextField.autocapitalizationType = .none
valueTextField.autocorrectionType = .no
valueTextField.spellCheckingType = .no
- if #available(iOS 13.0, *) {
- valueTextField.textColor = .secondaryLabel
- } else {
- valueTextField.textColor = .gray
- }
+ valueTextField.textColor = .secondaryLabel
return valueTextField
}()
@@ -64,18 +56,10 @@ class KeyValueCell: UITableViewCell {
var isValueValid = true {
didSet {
- if #available(iOS 13.0, *) {
- if isValueValid {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .systemRed
- }
+ if isValueValid {
+ keyLabel.textColor = .label
} else {
- if isValueValid {
- keyLabel.textColor = .black
- } else {
- keyLabel.textColor = .red
- }
+ keyLabel.textColor = .systemRed
}
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift b/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
index 3952ffd..4bedbba 100644
--- a/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/SwitchCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -16,11 +16,7 @@ class SwitchCell: UITableViewCell {
get { return switchView.isEnabled }
set(value) {
switchView.isEnabled = value
- if #available(iOS 13.0, *) {
- textLabel?.textColor = value ? .label : .secondaryLabel
- } else {
- textLabel?.textColor = value ? .black : .gray
- }
+ textLabel?.textColor = value ? .label : .secondaryLabel
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/TextCell.swift b/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
index 9de5012..3024b46 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TextCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -28,11 +28,7 @@ class TextCell: UITableViewCell {
override func prepareForReuse() {
super.prepareForReuse()
message = ""
- if #available(iOS 13.0, *) {
- setTextColor(.label)
- } else {
- setTextColor(.black)
- }
+ setTextColor(.label)
setTextAlignment(.left)
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
index ac6f063..d151402 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TunnelEditKeyValueCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -30,11 +30,7 @@ class TunnelEditEditableKeyValueCell: TunnelEditKeyValueCell {
super.init(style: style, reuseIdentifier: reuseIdentifier)
copyableGesture = false
- if #available(iOS 13.0, *) {
- valueTextField.textColor = .label
- } else {
- valueTextField.textColor = .black
- }
+ valueTextField.textColor = .label
valueTextField.isEnabled = true
valueLabelScrollView.isScrollEnabled = false
valueTextField.widthAnchor.constraint(equalTo: valueLabelScrollView.widthAnchor).isActive = true
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
index 4dbe97c..71ee6d8 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -41,21 +41,13 @@ class TunnelListCell: UITableViewCell {
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.adjustsFontForContentSizeCategory = true
label.numberOfLines = 1
- if #available(iOS 13.0, *) {
- label.textColor = .secondaryLabel
- } else {
- label.textColor = .gray
- }
+ label.textColor = .secondaryLabel
return label
}()
let busyIndicator: UIActivityIndicatorView = {
let busyIndicator: UIActivityIndicatorView
- if #available(iOS 13.0, *) {
- busyIndicator = UIActivityIndicatorView(style: .medium)
- } else {
- busyIndicator = UIActivityIndicatorView(style: .gray)
- }
+ busyIndicator = UIActivityIndicatorView(style: .medium)
busyIndicator.hidesWhenStopped = true
return busyIndicator
}()