Skip to content

Commit ec04a30

Browse files
authored
Update link for connection security level help button (#3927)
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> Depends on home-assistant/companion.home-assistant#1247 ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
1 parent eb29610 commit ec04a30

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

Sources/App/WebView/Views/ConnectionSecurityLevelBlock/ConnectionSecurityLevelBlockView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct ConnectionSecurityLevelBlockView: View {
1212

1313
let server: Server
1414

15-
private let learnMoreLink = AppConstants.WebURLs.companionAppDocs
15+
private let learnMoreLink = AppConstants.WebURLs.companionAppConnectionSecurityLevel
1616

1717
init(server: Server) {
1818
self._viewModel = .init(wrappedValue: ConnectionSecurityLevelBlockViewModel(server: server))

Sources/Shared/Environment/AppConstants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public enum AppConstants {
2222
public static var facebook = URL(string: "https://www.facebook.com/292963007723872")!
2323
public static var repo = URL(string: "https://companion.home-assistant.io/app/ios/repo")!
2424
public static var issues = URL(string: "https://companion.home-assistant.io/app/ios/issues")!
25+
public static var companionAppConnectionSecurityLevel =
26+
URL(string: "https://companion.home-assistant.io/docs/getting_started/connection-security-level")!
2527
}
2628

2729
public enum QueryItems: String, CaseIterable {

Tests/App/AppConstants.test.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ struct AppConstantsTests {
3535
assert(AppConstants.WebURLs.facebook.absoluteString == "https://www.facebook.com/292963007723872")
3636
assert(AppConstants.WebURLs.repo.absoluteString == "https://companion.home-assistant.io/app/ios/repo")
3737
assert(AppConstants.WebURLs.issues.absoluteString == "https://companion.home-assistant.io/app/ios/issues")
38+
assert(
39+
AppConstants.WebURLs.companionAppConnectionSecurityLevel
40+
.absoluteString == "https://companion.home-assistant.io/docs/getting_started/connection-security-level"
41+
)
3842
}
3943

4044
@Test func testQueryItemsRawValues() async throws {

0 commit comments

Comments
 (0)