diff --git a/Sources/App/DropSupport/DropSupportMessageViewController.swift b/Sources/App/DropSupport/DropSupportMessageViewController.swift index 78471eb4d..6d50d5a9e 100644 --- a/Sources/App/DropSupport/DropSupportMessageViewController.swift +++ b/Sources/App/DropSupport/DropSupportMessageViewController.swift @@ -128,7 +128,7 @@ class DropSupportMessageViewController: UIViewController { } @objc private func linkButtonTapped() { - guard let url = URL(string: "https://www.home-assistant.io/blog/") else { return } + guard let url = URL(string: "https://www.home-assistant.io/latest-ios-release-notes/") else { return } UIApplication.shared.open(url) } } diff --git a/Sources/App/Resources/en.lproj/Localizable.strings b/Sources/App/Resources/en.lproj/Localizable.strings index 1a51173ff..2ebc6d063 100644 --- a/Sources/App/Resources/en.lproj/Localizable.strings +++ b/Sources/App/Resources/en.lproj/Localizable.strings @@ -313,6 +313,7 @@ Home Assistant is free and open source home automation software with a focus on "settings.connection_section.websocket.status.disconnected.title" = "Disconnected"; "settings.connection_section.websocket.title" = "WebSocket"; "settings.debugging.title" = "Debugging"; +"settings.whats_new.title" = "What's new?"; "settings.details_section.location_settings_row.title" = "Location"; "settings.details_section.notification_settings_row.title" = "Notifications"; "settings.details_section.watch_row.title" = "Apple Watch"; diff --git a/Sources/App/Settings/SettingsRootDataSource.swift b/Sources/App/Settings/SettingsRootDataSource.swift index 11b190c41..7e47d5264 100644 --- a/Sources/App/Settings/SettingsRootDataSource.swift +++ b/Sources/App/Settings/SettingsRootDataSource.swift @@ -29,6 +29,7 @@ enum SettingsRootDataSource { case help case privacy case debugging + case whatsNew var row: SettingsButtonRow { let row = { () -> SettingsButtonRow in @@ -44,6 +45,7 @@ enum SettingsRootDataSource { case .help: return SettingsRootDataSource.help() case .privacy: return SettingsRootDataSource.privacy() case .debugging: return SettingsRootDataSource.debugging() + case .whatsNew: return SettingsRootDataSource.whatsNew() } }() row.tag = rawValue @@ -180,4 +182,19 @@ enum SettingsRootDataSource { }, onDismiss: nil) } } + + private static func whatsNew() -> SettingsButtonRow { + SettingsButtonRow { + $0.title = L10n.Settings.WhatsNew.title + $0.icon = .starIcon + $0.accessoryIcon = .openInNewIcon + $0.onCellSelection { cell, row in + openURLInBrowser( + URL(string: "https://www.home-assistant.io/latest-ios-release-notes/")!, + cell.formViewController() + ) + row.deselect(animated: true) + } + } + } } diff --git a/Sources/App/Settings/SettingsViewController.swift b/Sources/App/Settings/SettingsViewController.swift index 7540a4fae..436ea0437 100644 --- a/Sources/App/Settings/SettingsViewController.swift +++ b/Sources/App/Settings/SettingsViewController.swift @@ -122,6 +122,9 @@ class SettingsViewController: HAFormViewController { <<< SettingsRootDataSource.Row.privacy.row <<< SettingsRootDataSource.Row.debugging.row } + + form +++ Section() + <<< SettingsRootDataSource.Row.whatsNew.row } @objc func openAbout(_ sender: UIButton) { diff --git a/Sources/Shared/Resources/Swiftgen/Strings.swift b/Sources/Shared/Resources/Swiftgen/Strings.swift index dca8b47a3..af87bd736 100644 --- a/Sources/Shared/Resources/Swiftgen/Strings.swift +++ b/Sources/Shared/Resources/Swiftgen/Strings.swift @@ -1217,6 +1217,10 @@ public enum L10n { /// Edit Template public static var title: String { return L10n.tr("Localizable", "settings.template_edit.title") } } + public enum WhatsNew { + /// What's new? + public static var title: String { return L10n.tr("Localizable", "settings.whats_new.title") } + } } public enum SettingsDetails {