Fix copy & add Session ID animation

pull/77/head
Niels Andriesse 5 years ago
parent 4fa269b886
commit c596d454cb

@ -123,17 +123,17 @@
<key>NSAppleMusicUsageDescription</key>
<string>Signal needs to use Apple Music to play media attachments.</string>
<key>NSCameraUsageDescription</key>
<string>Loki Messenger needs camera access to take pictures and scan QR codes.</string>
<string>Session needs camera access to take pictures and scan QR codes.</string>
<key>NSContactsUsageDescription</key>
<string>Signal uses your contacts to find users you know. We do not store your contacts on the server.</string>
<key>NSFaceIDUsageDescription</key>
<string>Loki Messenger's Screen Lock feature uses Face ID.</string>
<string>Session's Screen Lock feature uses Face ID.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Loki Messenger needs access to your microphone to record videos.</string>
<string>Session needs access to your microphone to record videos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Loki Messenger needs access to your library to save photos.</string>
<string>Session needs access to your library to save photos.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Loki Messenger needs access to your library to send photos.</string>
<string>Session needs access to your library to send photos.</string>
<key>UIAppFonts</key>
<array>
<string>dripicons-v2.ttf</string>

@ -9,8 +9,8 @@ final class FakeChatView : UIView {
private lazy var chatBubbles = [
getChatBubble(withText: NSLocalizedString("What's Session?", comment: ""), wasSentByCurrentUser: true),
getChatBubble(withText: NSLocalizedString("It's a secure, decentralized cross-platform private messaging app", comment: ""), wasSentByCurrentUser: false),
getChatBubble(withText: NSLocalizedString("So it doesn't collect my personal information or my conversation metadata? How's it work?", comment: ""), wasSentByCurrentUser: true),
getChatBubble(withText: NSLocalizedString("It's a secure, decentralized private messaging app", comment: ""), wasSentByCurrentUser: false),
getChatBubble(withText: NSLocalizedString("So it doesn't collect my personal information or my conversation metadata? How does it work?", comment: ""), wasSentByCurrentUser: true),
getChatBubble(withText: NSLocalizedString("Using a combination of advanced anonymous routing and end-to-end encryption technologies.", comment: ""), wasSentByCurrentUser: false),
getChatBubble(withText: NSLocalizedString("Friends don't let friends use compromised messengers. You're welcome.", comment: ""), wasSentByCurrentUser: false)
]

@ -27,7 +27,8 @@ final class SeedReminderView : UIView {
let result = UILabel()
result.textColor = Colors.text.withAlphaComponent(Values.unimportantElementOpacity)
result.font = .systemFont(ofSize: Values.verySmallFontSize)
result.lineBreakMode = .byTruncatingTail
result.lineBreakMode = .byWordWrapping
result.numberOfLines = 0
return result
}()

@ -121,7 +121,7 @@ final class DeviceLinkingModal : Modal, DeviceLinkingSessionDelegate {
subtitleLabel.text = {
switch mode {
case .master: return NSLocalizedString("Create a new account on your other device and click \"Link to an existing account\" to start the linking process", comment: "")
case .slave: return NSLocalizedString("Please check that the words below match the ones shown on your other device", comment: "")
case .slave: return NSLocalizedString("Please check that the words below match those shown on your other device", comment: "")
}
}()
mnemonicLabel.isHidden = (mode == .master)

@ -29,7 +29,7 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
let attributedTitle = NSMutableAttributedString(string: title)
attributedTitle.addAttribute(.foregroundColor, value: Colors.accent, range: (title as NSString).range(of: "80%"))
result.title = attributedTitle
result.subtitle = NSLocalizedString("Secure your account by saving your seed", comment: "")
result.subtitle = NSLocalizedString("Secure your account by saving your recovery phrase", comment: "")
result.setProgress(0.8, animated: false)
result.delegate = self
return result

@ -11,7 +11,7 @@ final class JoinPublicChatVC : UIViewController, UIPageViewControllerDataSource,
// MARK: Components
private lazy var tabBar: TabBar = {
let tabs = [
TabBar.Tab(title: NSLocalizedString("Enter Chat URL", comment: "")) { [weak self] in
TabBar.Tab(title: NSLocalizedString("Enter Channel URL", comment: "")) { [weak self] in
guard let self = self else { return }
self.pageVC.setViewControllers([ self.pages[0] ], direction: .forward, animated: false, completion: nil)
},
@ -36,7 +36,7 @@ final class JoinPublicChatVC : UIViewController, UIPageViewControllerDataSource,
}()
private lazy var scanQRCodeWrapperVC: ScanQRCodeWrapperVC = {
let message = NSLocalizedString("Scan the QR code of the public chat you'd like to join", comment: "")
let message = NSLocalizedString("Scan the QR code of the channel you'd like to join", comment: "")
let result = ScanQRCodeWrapperVC(message: message)
result.delegate = self
return result
@ -60,7 +60,7 @@ final class JoinPublicChatVC : UIViewController, UIPageViewControllerDataSource,
navigationItem.leftBarButtonItem = closeButton
// Customize title
let titleLabel = UILabel()
titleLabel.text = NSLocalizedString("Join Public Chat", comment: "")
titleLabel.text = NSLocalizedString("Join Channel", comment: "")
titleLabel.textColor = Colors.text
titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
navigationItem.titleView = titleLabel
@ -177,7 +177,7 @@ private final class EnterChatURLVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text.withAlphaComponent(Values.unimportantElementOpacity)
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Enter the URL of the public chat you'd like to join", comment: "")
explanationLabel.text = NSLocalizedString("Enter the URL of the channel you'd like to join", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping
@ -195,7 +195,7 @@ private final class EnterChatURLVC : UIViewController {
let stackView = UIStackView(arrangedSubviews: [ chatURLTextField, UIView.spacer(withHeight: Values.smallSpacing), explanationLabel, UIView.vStretchingSpacer(), nextButtonContainer ])
stackView.axis = .vertical
stackView.alignment = .fill
stackView.layoutMargins = UIEdgeInsets(top: Values.mediumSpacing, left: Values.largeSpacing, bottom: Values.mediumSpacing, right: Values.largeSpacing)
stackView.layoutMargins = UIEdgeInsets(top: Values.largeSpacing, left: Values.largeSpacing, bottom: Values.mediumSpacing, right: Values.largeSpacing)
stackView.isLayoutMarginsRelativeArrangement = true
view.addSubview(stackView)
stackView.pin(.leading, to: .leading, of: view)
@ -259,7 +259,7 @@ private final class ScanQRCodePlaceholderVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Loki Messenger needs camera access to scan QR codes", comment: "")
explanationLabel.text = NSLocalizedString("Session needs camera access to scan QR codes", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping

@ -11,7 +11,7 @@ final class LinkDeviceVC : UIViewController, UIPageViewControllerDataSource, UIP
// MARK: Components
private lazy var tabBar: TabBar = {
let tabs = [
TabBar.Tab(title: NSLocalizedString("Enter Public Key", comment: "")) { [weak self] in
TabBar.Tab(title: NSLocalizedString("Enter Session ID", comment: "")) { [weak self] in
guard let self = self else { return }
self.pageVC.setViewControllers([ self.pages[0] ], direction: .forward, animated: false, completion: nil)
},
@ -139,7 +139,7 @@ private final class EnterPublicKeyVC : UIViewController {
private var linkButtonBottomConstraint: NSLayoutConstraint!
// MARK: Components
private lazy var publicKeyTextField = TextField(placeholder: NSLocalizedString("Enter your public key", comment: ""))
private lazy var publicKeyTextField = TextField(placeholder: NSLocalizedString("Enter your Session ID", comment: ""))
// MARK: Lifecycle
override func viewDidLoad() {
@ -149,14 +149,14 @@ private final class EnterPublicKeyVC : UIViewController {
let titleLabel = UILabel()
titleLabel.textColor = Colors.text
titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
titleLabel.text = NSLocalizedString("Enter your public key", comment: "")
titleLabel.text = NSLocalizedString("Link your device", comment: "")
titleLabel.numberOfLines = 0
titleLabel.lineBreakMode = .byWordWrapping
// Set up explanation label
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = "Enter your account's public key to link your device."
explanationLabel.text = "Enter your Session ID to start the linking process."
explanationLabel.numberOfLines = 0
explanationLabel.lineBreakMode = .byWordWrapping
// Link button
@ -247,7 +247,7 @@ private final class ScanQRCodePlaceholderVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Loki Messenger needs camera access to scan QR codes", comment: "")
explanationLabel.text = NSLocalizedString("Session needs camera access to scan QR codes", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping

@ -10,7 +10,7 @@ final class NewPrivateChatVC : UIViewController, UIPageViewControllerDataSource,
// MARK: Components
private lazy var tabBar: TabBar = {
let tabs = [
TabBar.Tab(title: NSLocalizedString("Enter Public Key", comment: "")) { [weak self] in
TabBar.Tab(title: NSLocalizedString("Enter Session ID", comment: "")) { [weak self] in
guard let self = self else { return }
self.pageVC.setViewControllers([ self.pages[0] ], direction: .forward, animated: false, completion: nil)
},
@ -128,7 +128,7 @@ final class NewPrivateChatVC : UIViewController, UIPageViewControllerDataSource,
fileprivate func startNewPrivateChatIfPossible(with hexEncodedPublicKey: String) {
if !ECKeyPair.isValidHexEncodedPublicKey(candidate: hexEncodedPublicKey) {
let alert = UIAlertController(title: NSLocalizedString("Invalid Public Key", comment: ""), message: NSLocalizedString("Please check the public key you entered and try again.", comment: ""), preferredStyle: .alert)
let alert = UIAlertController(title: NSLocalizedString("Invalid Session ID", comment: ""), message: NSLocalizedString("Please check the Session ID you entered and try again.", comment: ""), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default, handler: nil))
presentAlert(alert)
} else {
@ -151,7 +151,7 @@ private final class EnterPublicKeyVC : UIViewController {
}()
// MARK: Components
private lazy var publicKeyTextField = TextField(placeholder: NSLocalizedString("Enter public key of recipient", comment: ""))
private lazy var publicKeyTextField = TextField(placeholder: NSLocalizedString("Enter Session ID of recipient", comment: ""))
private lazy var copyButton: Button = {
let result = Button(style: .unimportant, size: .medium)
@ -168,12 +168,12 @@ private final class EnterPublicKeyVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text.withAlphaComponent(Values.unimportantElementOpacity)
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Users can share their public key by going into their account settings and tapping \"Share Public Key\", or by sharing their QR code.", comment: "")
explanationLabel.text = NSLocalizedString("Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping
// Set up separator
let separator = Separator(title: NSLocalizedString("Your Public Key", comment: ""))
let separator = Separator(title: NSLocalizedString("Your Session ID", comment: ""))
// Set up user public key label
let userPublicKeyLabel = UILabel()
userPublicKeyLabel.textColor = Colors.text
@ -205,7 +205,7 @@ private final class EnterPublicKeyVC : UIViewController {
let stackView = UIStackView(arrangedSubviews: [ publicKeyTextField, UIView.spacer(withHeight: Values.smallSpacing), explanationLabel, UIView.spacer(withHeight: Values.largeSpacing), separator, UIView.spacer(withHeight: Values.veryLargeSpacing), userPublicKeyLabel, UIView.spacer(withHeight: Values.veryLargeSpacing), buttonContainer, UIView.vStretchingSpacer(), nextButtonContainer ])
stackView.axis = .vertical
stackView.alignment = .fill
stackView.layoutMargins = UIEdgeInsets(top: Values.mediumSpacing, left: Values.largeSpacing, bottom: Values.mediumSpacing, right: Values.largeSpacing)
stackView.layoutMargins = UIEdgeInsets(top: Values.largeSpacing, left: Values.largeSpacing, bottom: Values.mediumSpacing, right: Values.largeSpacing)
stackView.isLayoutMarginsRelativeArrangement = true
view.addSubview(stackView)
stackView.pin(to: view)
@ -263,7 +263,7 @@ private final class ScanQRCodePlaceholderVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Loki Messenger needs camera access to scan QR codes", comment: "")
explanationLabel.text = NSLocalizedString("Session needs camera access to scan QR codes", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping

@ -16,7 +16,7 @@ final class NukeDataModal : Modal {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text.withAlphaComponent(Values.unimportantElementOpacity)
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("This will delete your entire account, including all data, any messages currently linked to your public key, as well as your personal key pair.", comment: "")
explanationLabel.text = NSLocalizedString("This will delete your entire account, including all data, any messages currently linked to your Session ID, as well as your personal key pair.", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping

@ -130,7 +130,7 @@ final class QRCodeVC : UIViewController, UIPageViewControllerDataSource, UIPageV
fileprivate func startNewPrivateChatIfPossible(with hexEncodedPublicKey: String) {
if !ECKeyPair.isValidHexEncodedPublicKey(candidate: hexEncodedPublicKey) {
let alert = UIAlertController(title: NSLocalizedString("Invalid Public Key", comment: ""), message: NSLocalizedString("Please check the public key you entered and try again.", comment: ""), preferredStyle: .alert)
let alert = UIAlertController(title: NSLocalizedString("Invalid Session ID", comment: ""), message: NSLocalizedString("Please check the Session ID you entered and try again.", comment: ""), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default, handler: nil))
presentAlert(alert)
} else {
@ -181,10 +181,10 @@ private final class ViewMyQRCodeVC : UIViewController {
// Set up explanation label
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = Fonts.spaceMono(ofSize: Values.mediumFontSize)
let text = NSLocalizedString("This is your unique public QR code. Other users may scan this in order to begin a conversation with you.", comment: "")
explanationLabel.font = .systemFont(ofSize: Values.mediumFontSize)
let text = NSLocalizedString("This is your unique public QR code. Other users can scan this to start a conversation with you.", comment: "")
let attributedText = NSMutableAttributedString(string: text)
attributedText.addAttribute(.font, value: Fonts.boldSpaceMono(ofSize: Values.mediumFontSize), range: (text as NSString).range(of: "your unique public QR code"))
attributedText.addAttribute(.font, value: UIFont.boldSystemFont(ofSize: Values.mediumFontSize), range: (text as NSString).range(of: "your unique public QR code"))
explanationLabel.attributedText = attributedText
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
@ -239,7 +239,7 @@ private final class ScanQRCodePlaceholderVC : UIViewController {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("Loki Messenger needs camera access to scan QR codes", comment: "")
explanationLabel.text = NSLocalizedString("Session needs camera access to scan QR codes", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping

@ -152,7 +152,30 @@ final class RegisterVC : UIViewController {
}
private func updatePublicKeyLabel() {
publicKeyLabel.text = keyPair.hexEncodedPublicKey
let hexEncodedPublicKey = keyPair.hexEncodedPublicKey
let characterCount = hexEncodedPublicKey.count
var count = 0
let limit = 32
func animate() {
let numberOfIndexesToShuffle = 32 - count
let indexesToShuffle = (0..<characterCount).shuffled()[0..<numberOfIndexesToShuffle]
var mangledHexEncodedPublicKey = hexEncodedPublicKey
for index in indexesToShuffle {
let startIndex = mangledHexEncodedPublicKey.index(mangledHexEncodedPublicKey.startIndex, offsetBy: index)
let endIndex = mangledHexEncodedPublicKey.index(after: startIndex)
mangledHexEncodedPublicKey.replaceSubrange(startIndex..<endIndex, with: "0123456789abcdef__".shuffled()[0..<1])
}
count += 1
if count < limit {
publicKeyLabel.text = mangledHexEncodedPublicKey
Timer.scheduledTimer(withTimeInterval: 0.032, repeats: false) { _ in
animate()
}
} else {
publicKeyLabel.text = hexEncodedPublicKey
}
}
animate()
}
// MARK: Interaction

@ -8,7 +8,7 @@ final class RestoreVC : UIViewController {
// MARK: Components
private lazy var mnemonicTextField: TextField = {
let result = TextField(placeholder: NSLocalizedString("Enter your seed", comment: ""))
let result = TextField(placeholder: NSLocalizedString("Enter your recovery phrase", comment: ""))
result.layer.borderColor = Colors.text.cgColor
return result
}()
@ -54,14 +54,14 @@ final class RestoreVC : UIViewController {
let titleLabel = UILabel()
titleLabel.textColor = Colors.text
titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
titleLabel.text = NSLocalizedString("Restore your account using your seed", comment: "")
titleLabel.text = NSLocalizedString("Restore your account", comment: "")
titleLabel.numberOfLines = 0
titleLabel.lineBreakMode = .byWordWrapping
// Set up explanation label
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = "Enter the seed that was given to you when you signed up to restore your account."
explanationLabel.text = "Enter the recovery phrase that was given to you when you signed up to restore your account."
explanationLabel.numberOfLines = 0
explanationLabel.lineBreakMode = .byWordWrapping
// Set up legal label

@ -18,7 +18,7 @@ final class SeedModal : Modal {
let titleLabel = UILabel()
titleLabel.textColor = Colors.text
titleLabel.font = .boldSystemFont(ofSize: Values.mediumFontSize)
titleLabel.text = NSLocalizedString("Your Seed", comment: "")
titleLabel.text = NSLocalizedString("Your Recovery Phrase", comment: "")
titleLabel.numberOfLines = 0
titleLabel.lineBreakMode = .byWordWrapping
titleLabel.textAlignment = .center
@ -34,7 +34,7 @@ final class SeedModal : Modal {
let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text.withAlphaComponent(Values.unimportantElementOpacity)
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = NSLocalizedString("This is your personal password. It can be used to restore your account or migrate your account to a new device.", comment: "")
explanationLabel.text = NSLocalizedString("This is your personal recovery phrase. It can be used to restore your account or migrate your account to a new device.", comment: "")
explanationLabel.numberOfLines = 0
explanationLabel.lineBreakMode = .byWordWrapping
explanationLabel.textAlignment = .center

@ -30,7 +30,7 @@ final class SeedVCV2 : UIViewController {
let attributedTitle = NSMutableAttributedString(string: title)
attributedTitle.addAttribute(.foregroundColor, value: Colors.accent, range: (title as NSString).range(of: "90%"))
result.title = attributedTitle
result.subtitle = NSLocalizedString("Press the redacted words to view your seed and secure your account", comment: "")
result.subtitle = NSLocalizedString("Press the redacted words to view your recovery phrase and secure your account", comment: "")
result.setProgress(0.9, animated: false)
return result
}()
@ -69,7 +69,7 @@ final class SeedVCV2 : UIViewController {
navigationBar.barTintColor = Colors.navigationBarBackground
// Customize title
let navigationBarTitleLabel = UILabel()
navigationBarTitleLabel.text = NSLocalizedString("Your Seed", comment: "")
navigationBarTitleLabel.text = NSLocalizedString("Your Recovery Phrase", comment: "")
navigationBarTitleLabel.textColor = Colors.text
navigationBarTitleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
navigationItem.titleView = navigationBarTitleLabel
@ -81,7 +81,7 @@ final class SeedVCV2 : UIViewController {
let titleLabel = UILabel()
titleLabel.textColor = Colors.text
titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
titleLabel.text = NSLocalizedString("Meet your seed", comment: "")
titleLabel.text = NSLocalizedString("Meet your recovery phrase", comment: "")
titleLabel.numberOfLines = 0
titleLabel.lineBreakMode = .byWordWrapping
// Set up explanation label
@ -145,7 +145,7 @@ final class SeedVCV2 : UIViewController {
let mainStackView = UIStackView(arrangedSubviews: [ topSpacer, topStackViewContainer, bottomSpacer, copyButtonContainer ])
mainStackView.axis = .vertical
mainStackView.alignment = .fill
mainStackView.layoutMargins = UIEdgeInsets(top: 0, leading: 0, bottom: Values.onboardingButtonBottomOffset, trailing: 0)
mainStackView.layoutMargins = UIEdgeInsets(top: 0, leading: 0, bottom: Values.mediumSpacing, trailing: 0)
mainStackView.isLayoutMarginsRelativeArrangement = true
view.addSubview(mainStackView)
mainStackView.pin(.leading, to: .leading, of: view)
@ -179,7 +179,7 @@ final class SeedVCV2 : UIViewController {
self.seedReminderView.title = attributedTitle
}, completion: nil)
UIView.transition(with: seedReminderView.subtitleLabel, duration: 1, options: .transitionCrossDissolve, animations: {
self.seedReminderView.subtitle = NSLocalizedString("Make sure to store your seed in a safe place", comment: "")
self.seedReminderView.subtitle = NSLocalizedString("Make sure to store your recovery phrase in a safe place", comment: "")
}, completion: nil)
seedReminderView.setProgress(1, animated: true)
UserDefaults.standard.set(true, forKey: "hasViewedSeed")

@ -91,15 +91,15 @@ final class SettingsVC : UIViewController, AvatarViewHelperDelegate {
displayNameTextField.pin(to: displayNameContainer)
displayNameContainer.set(.height, to: 40)
displayNameTextField.alpha = 0
let displayNameLabelTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(showEditDisplayNameUI))
displayNameContainer.addGestureRecognizer(displayNameLabelTapGestureRecognizer)
let displayNameContainerTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(showEditDisplayNameUI))
displayNameContainer.addGestureRecognizer(displayNameContainerTapGestureRecognizer)
// Set up header view
let headerStackView = UIStackView(arrangedSubviews: [ profilePictureView, displayNameContainer ])
headerStackView.axis = .vertical
headerStackView.spacing = Values.smallSpacing
headerStackView.alignment = .center
// Set up separator
let separator = Separator(title: NSLocalizedString("Your Public Key", comment: ""))
let separator = Separator(title: NSLocalizedString("Your Session ID", comment: ""))
// Set up public key label
let publicKeyLabel = UILabel()
publicKeyLabel.textColor = Colors.text
@ -185,7 +185,7 @@ final class SettingsVC : UIViewController, AvatarViewHelperDelegate {
result.append(getSeparator())
result.append(getSettingButton(withTitle: NSLocalizedString("Linked Devices", comment: ""), color: Colors.text, action: #selector(showLinkedDevices)))
result.append(getSeparator())
result.append(getSettingButton(withTitle: NSLocalizedString("Show Seed", comment: ""), color: Colors.text, action: #selector(showSeed)))
result.append(getSettingButton(withTitle: NSLocalizedString("Show Recovery Phrase", comment: ""), color: Colors.text, action: #selector(showSeed)))
}
result.append(getSeparator())
result.append(getSettingButton(withTitle: NSLocalizedString("Clear All Data", comment: ""), color: Colors.destructive, action: #selector(clearAllData)))

@ -33,7 +33,7 @@ struct MessageActionBuilder {
static func copyPublicKey(conversationViewItem: ConversationViewItem, delegate: MessageActionsDelegate) -> MenuAction {
return MenuAction(image: #imageLiteral(resourceName: "Key"),
title: NSLocalizedString("Copy Public Key", comment: ""),
title: NSLocalizedString("Copy Session ID", comment: ""),
subtitle: nil,
block: { [weak delegate] _ in delegate?.copyPublicKey(for: conversationViewItem) }
)

@ -2568,7 +2568,7 @@
"Your seed couldn't be verified. Please check what you entered and try again." = "Your seed couldn't be verified. Please check what you entered and try again.";
"Search by public key" = "Search by public key";
"Start a Conversation" = "Start a Conversation";
"Invalid public key" = "Invalid public key";
"Invalid Session ID" = "Invalid Session ID";
"No search results" = "No search results";
"Calculating proof of work" = "Calculating proof of work";
"Failed to calculate proof of work." = "Failed to calculate proof of work.";
@ -2598,8 +2598,8 @@
"Enter a Public Key" = "Enter a Public Key";
"Enter a Server URL" = "Enter a Server URL";
"For example: 059abcf223aa8c10e3dc2d623688b75dd25896794717e4a9c486772664fc95e41e." = "For example: 059abcf223aa8c10e3dc2d623688b75dd25896794717e4a9c486772664fc95e41e.";
"Invalid Public Key" = "Invalid Public Key";
"Please check the public key you entered and try again." = "Please check the public key you entered and try again.";
"Invalid Session ID" = "Invalid Session ID";
"Please check the Session ID you entered and try again." = "Please check the Session ID you entered and try again.";
"Looks like you don't have any conversations yet. Get started by messaging a friend." = "Looks like you don't have any conversations yet. Get started by messaging a friend.";
"Enter the public key of the person you'd like to securely message. They can share their public key with you by going into Loki Messenger's in-app settings and clicking \"Share Public Key\"." = "Enter the public key of the person you'd like to securely message. They can share their public key with you by going into Loki Messenger's in-app settings and clicking \"Share Public Key\".";
"Unlock Loki Messenger" = "Unlock Loki Messenger";
@ -2627,8 +2627,8 @@
"Waiting for Authorization" = "Waiting for Authorization";
"Create a new account on your other device and click \"Link Device\" when you're at the \"Create Your Loki Messenger Account\" step to start the linking process" = "Create a new account on your other device and click \"Link Device\" when you're at the \"Create Your Loki Messenger Account\" step to start the linking process";
"Linking Request Received" = "Linking Request Received";
"Invalid public key" = "Invalid public key";
"Please check that the words below match the ones shown on your other device" = "Please check that the words below match the ones shown on your other device";
"Invalid Session ID" = "Invalid Session ID";
"Please check that the words below match those shown on your other device" = "Please check that the words below match those shown on your other device";
"Link to an existing device by going into its in-app settings and clicking \"Link Device\"." = "Link to an existing device by going into its in-app settings and clicking \"Link Device\".";
"Authorize" = "Authorize";
"Enter the Other Device's Public Key" = "Enter the Other Device's Public Key";
@ -2679,23 +2679,23 @@
"Delete" = "Delete";
"Search" = "Search";
"New Conversation" = "New Conversation";
"Enter public key of recipient" = "Enter public key of recipient";
"Users can share their public key by going into their account settings and tapping \"Share Public Key\", or by sharing their QR code." = "Users can share their public key by going into their account settings and tapping \"Share Public Key\", or by sharing their QR code.";
"Enter Session ID of recipient" = "Enter Session ID of recipient";
"Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code." = "Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.";
"Users can share their QR code by going into their account settings and tapping \"Share QR Code\"." = "Users can share their QR code by going into their account settings and tapping \"Share QR Code\".";
"Your Public Key" = "Your Public Key";
"Your Session ID" = "Your Session ID";
"Copy" = "Copy";
"Copied" = "Copied";
"Share" = "Share";
"Next" = "Next";
"Loki Messenger needs camera access to scan QR codes" = "Loki Messenger needs camera access to scan QR codes";
"Session needs camera access to scan QR codes" = "Session needs camera access to scan QR codes";
"Enable Camera Access" = "Enable Camera Access";
"Scan the QR code of the person you'd like to securely message. They can find their QR code by going into Loki Messenger's in-app settings and tapping \"Show QR Code\"." = "Scan the QR code of the person you'd like to securely message. They can find their QR code by going into Loki Messenger's in-app settings and tapping \"Show QR Code\".";
"Enter Public Key" = "Enter Public Key";
"Enter Chat URL" = "Enter Chat URL";
"Enter Session ID" = "Enter Session ID";
"Enter Channel URL" = "Enter Channel URL";
"Scan QR Code" = "Scan QR Code";
"Scan the QR code of the public chat you'd like to join" = "Scan the QR code of the public chat you'd like to join";
"Join Public Chat" = "Join Public Chat";
"Enter the URL of the public chat you'd like to join" = "Enter the URL of the public chat you'd like to join";
"Scan the QR code of the channel you'd like to join" = "Scan the QR code of the channel you'd like to join";
"Join Channel" = "Join Channel";
"Enter the URL of the channel you'd like to join" = "Enter the URL of the channel you'd like to join";
"Invalid URL" = "Invalid URL";
"Please check the URL you entered and try again" = "Please check the URL you entered and try again";
"Couldn't Join" = "Couldn't Join";
@ -2703,11 +2703,11 @@
"Privacy" = "Privacy";
"Notifications" = "Notifications";
"Linked Devices" = "Linked Devices";
"Show Seed" = "Show Seed";
"Show Recovery Phrase" = "Show Recovery Phrase";
"Clear All Data" = "Clear All Data";
"This will delete your entire account, including all data, any messages currently linked to your public key, as well as your personal key pair." = "This will delete your entire account, including all data, any messages currently linked to your public key, as well as your personal key pair.";
"This will delete your entire account, including all data, any messages currently linked to your Session ID, as well as your personal key pair." = "This will delete your entire account, including all data, any messages currently linked to your Session ID, as well as your personal key pair.";
"Delete" = "Delete";
"This is your personal password. It can be used to restore your account or migrate your account to a new device." = "This is your personal password. It can be used to restore your account or migrate your account to a new device.";
"This is your personal recovery phrase. It can be used to restore your account or migrate your account to a new device." = "This is your personal recovery phrase. It can be used to restore your account or migrate your account to a new device.";
"Notifications can appear while your phone is locked. You may wish to limit what is shown in these notifications." = "Notifications can appear while your phone is locked. You may wish to limit what is shown in these notifications.";
"Notifications" = "Notifications";
"Back" = "Back";
@ -2715,7 +2715,7 @@
"Scan someone's QR code to start a conversation with them" = "Scan someone's QR code to start a conversation with them";
"QR Code" = "QR Code";
"Scan Me" = "Scan Me";
"This is your unique public QR code. Other users may scan this in order to begin a conversation with you." = "This is your unique public QR code. Other users may scan this in order to begin a conversation with you.";
"This is your unique public QR code. Other users can scan this to start a conversation with you." = "This is your unique public QR code. Other users can scan this to start a conversation with you.";
"Privacy" = "Privacy";
"Unlock Loki Messenger's screen using Touch ID, Face ID, or your iOS device passcode. You can still receive message notifications while Screen Lock is enabled. Loki Messenger's notification settings allow you to customize the information that is displayed." = "Unlock Loki Messenger's screen using Touch ID, Face ID, or your iOS device passcode. You can still receive message notifications while Screen Lock is enabled. Loki Messenger's notification settings allow you to customize the information that is displayed.";
"Sound" = "Sound";
@ -2726,19 +2726,19 @@
"Enter a display name" = "Enter a display name";
"Your Session begins here..." = "Your Session begins here...";
"What's Session?" = "What's Session?";
"It's a secure, decentralized cross-platform private messaging app" = "It's a secure, decentralized cross-platform private messaging app";
"So it doesn't collect my personal information or my conversation metadata? How's it work?" = "So it doesn't collect my personal information or my conversation metadata? How's it work?";
"It's a secure, decentralized private messaging app" = "It's a secure, decentralized private messaging app";
"So it doesn't collect my personal information or my conversation metadata? How does it work?" = "So it doesn't collect my personal information or my conversation metadata? How does it work?";
"Using a combination of advanced anonymous routing and end-to-end encryption technologies." = "Using a combination of advanced anonymous routing and end-to-end encryption technologies.";
"Friends don't let friends use compromised messengers. You're welcome." = "Friends don't let friends use compromised messengers. You're welcome.";
"Create Account" = "Create Account";
"Continue your Session" = "Continue your Session";
"Say hello to your Session ID" = "Say hello to your Session ID";
"Continue" = "Continue";
"Copy Public Key" = "Copy Public Key";
"Copy Session ID" = "Copy Session ID";
"Pick your display name" = "Pick your display name";
"Enter a display name" = "Enter a display name";
"Restore your account using your seed" = "Restore your account using your seed";
"Enter your seed" = "Enter your seed";
"Restore your account" = "Restore your account";
"Enter your recovery phrase" = "Enter your recovery phrase";
"Message" = "Message";
"You" = "You";
"Encrypting message" = "Encrypting message";
@ -2746,17 +2746,22 @@
"Sending message" = "Sending message";
"Message sent securely" = "Message sent securely";
"Message failed to send" = "Message failed to send";
"Secure your account by saving your seed" = "Secure your account by saving your seed";
"Secure your account by saving your recovery phrase" = "Secure your account by saving your recovery phrase";
"Continue" = "Continue";
"Your Seed" = "Your Seed";
"Meet your seed" = "Meet your seed";
"Your Recovery Phrase" = "Your Recovery Phrase";
"Meet your recovery phrase" = "Meet your recovery phrase";
"Think of this as the crypto-equivalent of a social security number. This allows whomever has it complete access to your account." = "Think of this as the crypto-equivalent of a social security number. This allows whomever has it complete access to your account.";
"Press the redacted words to view your seed and secure your account" = "Press the redacted words to view your seed and secure your account";
"Press the redacted words to view your recovery phrase and secure your account" = "Press the redacted words to view your recovery phrase and secure your account";
"Hold to reveal" = "Hold to reveal";
"Make sure to store your seed in a safe place" = "Make sure to store your seed in a safe place";
"Make sure to store your recovery phrase in a safe place" = "Make sure to store your recovery phrase in a safe place";
"Link to an existing account" = "Link to an existing account";
"Enter your public key" = "Enter your public key";
"Link to your existing account by going into your in-app settings and clicking \"Linked Devices\"." = "Link to your existing account by going into your in-app settings and clicking \"Linked Devices\".";
"Create a new account on your other device and click \"Link to an existing account\" to start the linking process" = "Create a new account on your other device and click \"Link to an existing account\" to start the linking process";
"Group Settings" = "Group Settings";
"Your Session ID is the unique address that people can use to contact you on Session. With no connection to your real identity, your Session ID is totally anonymous and private by design." = "Your Session ID is the unique address that people can use to contact you on Session. With no connection to your real identity, your Session ID is totally anonymous and private by design.";
"Enter the recovery phrase that was given to you when you signed up to restore your account." = "Enter the recovery phrase that was given to you when you signed up to restore your account.";
"Enter Session ID" = "Enter Session ID";
"Link your device" = "Link your device";
"Enter your Session ID to start the linking process." = "Enter your Session ID to start the linking process.";
"Enter your Session ID" = "Enter your Session ID";

Loading…
Cancel
Save