Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8705: Add display for version info (#8706)
Browse files Browse the repository at this point in the history
- Add display for version info
  • Loading branch information
Brandon-T committed Jan 26, 2024
1 parent 4eeb78d commit 0aaeab1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/Brave/Frontend/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,20 @@ class SettingsViewController: TableViewController {
UIPasteboard.general.setSecureString(AppStorageDebugComposer.compose(),
expirationDate: Date().addingTimeInterval(2.minutes))
}

let viewMoreDetails = UIAlertAction(title: Strings.viewAllVersionInfo, style: .default) { [unowned self, weak actionSheet] _ in
let versionController = ChromeWebViewController(privateBrowsing: false).then {
$0.loadURL("brave://version/?show-variations-cmd")
}

actionSheet?.dismiss(animated: true, completion: {
self.present(versionController, animated: true)
})
}

actionSheet.addAction(copyDebugInfoAction)
actionSheet.addAction(copyAppInfoAction)
actionSheet.addAction(viewMoreDetails)
actionSheet.addAction(UIAlertAction(title: Strings.cancelButtonTitle, style: .cancel, handler: nil))
self.navigationController?.present(actionSheet, animated: true, completion: nil)
}, cellClass: MultilineValue1Cell.self),
Expand Down
1 change: 1 addition & 0 deletions Sources/BraveStrings/BraveStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ extension Strings {
NSLocalizedString("copyAppSizeInfoToClipboard", tableName: "BraveShared",
bundle: .module, value: "Copy app size info to clipboard.",
comment: "Copy app info to clipboard action sheet action.")
public static let viewAllVersionInfo = NSLocalizedString("copyAppSizeInfoToClipboard", tableName: "BraveShared", bundle: .module, value: "View all version info.", comment: "View all version info action sheet action.")
public static let blockThirdPartyCookies = NSLocalizedString("Block3rdPartyCookies", tableName: "BraveShared", bundle: .module, value: "Block 3rd party cookies", comment: "cookie settings option")
public static let blockAllCookies = NSLocalizedString("BlockAllCookies", tableName: "BraveShared", bundle: .module, value: "Block all Cookies", comment: "Title for setting to block all website cookies.")
public static let blockAllCookiesAction = NSLocalizedString("BlockAllCookiesAction", tableName: "BraveShared", bundle: .module, value: "Block All", comment: "block all cookies settings action title")
Expand Down

0 comments on commit 0aaeab1

Please sign in to comment.