Skip to content

Commit

Permalink
feat: re-add current certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
khcrysalis committed Oct 23, 2024
1 parent 6c0b753 commit d1bd11b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iOS/Views/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SettingsViewController: UITableViewController {
"Language",
],
[
"Current Certificate",
"Certificates",
"Signing Options",
"Server Options",
Expand Down Expand Up @@ -149,6 +150,17 @@ extension SettingsViewController {
cell.setAccessoryIcon(with: "character.bubble")
cell.selectionStyle = .default

case "Current Certificate":
if let hasGotCert = CoreDataManager.shared.getCurrentCertificate() {
let cell = CertificateViewTableViewCell()
cell.configure(with: hasGotCert, isSelected: false)
cell.selectionStyle = .none
return cell
} else {
cell.textLabel?.text = String.localized("SETTINGS_VIEW_CONTROLLER_CELL_CURRENT_CERTIFICATE_NOSELECTED")
cell.textLabel?.textColor = .secondaryLabel
cell.selectionStyle = .none
}
case "Certificates":
cell.setAccessoryIcon(with: "rectangle.dashed.and.paperclip")
cell.selectionStyle = .default
Expand Down

0 comments on commit d1bd11b

Please sign in to comment.