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 Feb 7, 2024
1 parent 18bb268 commit d480090
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/Brave/Frontend/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -741,9 +741,22 @@ 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 = p3aUtilities.histogramsController().then {
//TODO: Remove in 1.63.x
$0.loadViewIfNeeded()
$0.perform(Selector("loadURL:"), with: "chrome://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 d480090

Please sign in to comment.