summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteffen Ernst <steffen.ernst@mullvad.net>2025-05-19 09:35:51 +0200
committerSteffen <steffen.ernst@mullvad.net>2025-05-22 11:26:33 +0200
commit9b06d6ffcbef5b8e5397e51e3842b7bee7101580 (patch)
tree23d29afb9d7087bad16103fd3c1c559e70e73bcc
parent9653985636debcb0933dac78790aabd838c2163f (diff)
downloadmullvadvpn-9b06d6ffcbef5b8e5397e51e3842b7bee7101580.tar.xz
mullvadvpn-9b06d6ffcbef5b8e5397e51e3842b7bee7101580.zip
Change too many devices view to sheet
-rw-r--r--ios/MullvadVPN/Coordinators/LoginCoordinator.swift5
-rw-r--r--ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift12
-rw-r--r--ios/MullvadVPN/View controllers/DeviceList/DeviceManagementViewController.swift2
3 files changed, 10 insertions, 9 deletions
diff --git a/ios/MullvadVPN/Coordinators/LoginCoordinator.swift b/ios/MullvadVPN/Coordinators/LoginCoordinator.swift
index e5747f87cb..a7dd9dc999 100644
--- a/ios/MullvadVPN/Coordinators/LoginCoordinator.swift
+++ b/ios/MullvadVPN/Coordinators/LoginCoordinator.swift
@@ -109,7 +109,7 @@ final class LoginCoordinator: Coordinator, Presenting, @preconcurrency DeviceMan
private func returnToLogin(repeatLogin: Bool) {
guard let loginController else { return }
- navigationController.popToViewController(loginController, animated: true) {
+ navigationController.dismiss(animated: true) {
if let lastLoginAction = self.lastLoginAction, repeatLogin {
self.loginController?.start(action: lastLoginAction)
}
@@ -125,6 +125,7 @@ final class LoginCoordinator: Coordinator, Presenting, @preconcurrency DeviceMan
interactor: interactor,
alertPresenter: AlertPresenter(context: self)
)
+ controller.isModalInPresentation = true
controller.delegate = self
controller.fetchDevices(animateUpdates: false) { [weak self] result in
@@ -133,7 +134,7 @@ final class LoginCoordinator: Coordinator, Presenting, @preconcurrency DeviceMan
switch result {
case .success:
Task { @MainActor in
- navigationController.pushViewController(controller, animated: true) {
+ navigationController.present(controller, animated: true) {
completion(nil)
}
}
diff --git a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift
index 30579a752b..9169be90b4 100644
--- a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift
+++ b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift
@@ -73,14 +73,14 @@ class DeviceManagementContentView: UIView {
return button
}()
- let backButton: AppButton = {
+ let cancelButton: AppButton = {
let button = AppButton(style: .default)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle(
NSLocalizedString(
- "BACK_BUTTON",
+ "CANCEL_BUTTON",
tableName: "DeviceManagement",
- value: "Back",
+ value: "Cancel",
comment: ""
),
for: .normal
@@ -89,7 +89,7 @@ class DeviceManagementContentView: UIView {
}()
private lazy var buttonStackView: UIStackView = {
- let stackView = UIStackView(arrangedSubviews: [continueButton, backButton])
+ let stackView = UIStackView(arrangedSubviews: [continueButton, cancelButton])
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical
stackView.distribution = .fillEqually
@@ -128,7 +128,7 @@ class DeviceManagementContentView: UIView {
private func constraintViews() {
NSLayoutConstraint.activate([
- scrollView.topAnchor.constraint(equalTo: topAnchor),
+ scrollView.topAnchor.constraint(equalTo: topAnchor, constant: 16),
scrollView.leadingAnchor.constraint(equalTo: leadingAnchor),
scrollView.trailingAnchor.constraint(equalTo: trailingAnchor),
@@ -156,7 +156,7 @@ class DeviceManagementContentView: UIView {
scrollContentView.widthAnchor.constraint(equalTo: scrollView.widthAnchor),
statusImageView.topAnchor
- .constraint(equalTo: scrollContentView.layoutMarginsGuide.topAnchor),
+ .constraint(equalTo: scrollContentView.topAnchor),
statusImageView.centerXAnchor.constraint(equalTo: scrollContentView.centerXAnchor),
titleLabel.topAnchor.constraint(equalTo: statusImageView.bottomAnchor, constant: 22),
diff --git a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementViewController.swift b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementViewController.swift
index 64f8c45b6b..8663d8bdb3 100644
--- a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementViewController.swift
+++ b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementViewController.swift
@@ -60,7 +60,7 @@ class DeviceManagementViewController: UIViewController, RootContainment {
view.addSubview(contentView)
- contentView.backButton.addTarget(
+ contentView.cancelButton.addTarget(
self,
action: #selector(didTapBackButton(_:)),
for: .touchUpInside