-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add-connection-detail-toggle-to-connection-view-ios-961'
- Loading branch information
Showing
42 changed files
with
1,271 additions
and
244 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
ios/MullvadMockData/MullvadREST/SelectedRelaysStub+Stubs.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// SelectedRelaysStub+Stubs.swift | ||
// MullvadVPN | ||
// | ||
// Created by Jon Petersson on 2024-12-18. | ||
// Copyright © 2024 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
import MullvadREST | ||
import MullvadTypes | ||
import Network | ||
|
||
public struct SelectedRelaysStub { | ||
public static let selectedRelays = SelectedRelays( | ||
entry: nil, | ||
exit: SelectedRelay( | ||
endpoint: MullvadEndpoint( | ||
ipv4Relay: IPv4Endpoint(ip: .loopback, port: 42), | ||
ipv6Relay: IPv6Endpoint(ip: .loopback, port: 42), | ||
ipv4Gateway: IPv4Address.loopback, | ||
ipv6Gateway: IPv6Address.loopback, | ||
publicKey: Data() | ||
), | ||
hostname: "se-got-wg-001", | ||
location: Location( | ||
country: "Sweden", | ||
countryCode: "se", | ||
city: "Gothenburg", | ||
cityCode: "got", | ||
latitude: 42, | ||
longitude: 42 | ||
) | ||
), | ||
retryAttempt: 0 | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// View+Conditionals.swift | ||
// MullvadVPN | ||
// | ||
// Created by Jon Petersson on 2025-01-07. | ||
// Copyright © 2025 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension View { | ||
@ViewBuilder func `if`<Content: View>( | ||
_ conditional: Bool, | ||
@ViewBuilder _ content: (Self) -> Content | ||
) -> some View { | ||
if conditional { | ||
content(self) | ||
} else { | ||
self | ||
} | ||
} | ||
|
||
@ViewBuilder func ifLet<Content: View, T>( | ||
_ conditional: T?, | ||
@ViewBuilder _ content: (Self, _ value: T) -> Content | ||
) -> some View { | ||
if let value = conditional { | ||
content(self, value) | ||
} else { | ||
self | ||
} | ||
} | ||
|
||
@ViewBuilder func showIf(_ conditional: Bool) -> some View { | ||
if conditional { | ||
self | ||
} else { | ||
EmptyView() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
ios/MullvadVPN/Supporting Files/Assets.xcassets/IconReload.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "IconReload.pdf", | ||
"filename" : "icon-reload.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
|
Binary file removed
BIN
-1.21 KB
ios/MullvadVPN/Supporting Files/Assets.xcassets/IconReload.imageset/IconReload.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
...MullvadVPN/Supporting Files/Assets.xcassets/IconReload.imageset/icon-reload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.