feat: long press to show copy on current user's public key label

pull/689/head
Ryan Zhao 3 years ago
parent e5c3c23e74
commit 3e30ceb032

@ -212,8 +212,8 @@ private final class EnterPublicKeyVC : UIViewController {
return result return result
}() }()
private lazy var userPublicKeyLabel: UILabel = { private lazy var userPublicKeyLabel: SRCopyableLabel = {
let result = UILabel() let result = SRCopyableLabel()
result.textColor = Colors.text result.textColor = Colors.text
result.font = Fonts.spaceMono(ofSize: Values.mediumFontSize) result.font = Fonts.spaceMono(ofSize: Values.mediumFontSize)
result.numberOfLines = 0 result.numberOfLines = 0
@ -272,7 +272,11 @@ private final class EnterPublicKeyVC : UIViewController {
// Remove background color // Remove background color
view.backgroundColor = .clear view.backgroundColor = .clear
// User session id container // User session id container
let userPublicKeyContainer = UIView(wrapping: userPublicKeyLabel, withInsets: .zero, shouldAdaptForIPadWithWidth: Values.iPadUserSessionIdContainerWidth) let userPublicKeyContainer = UIView(
wrapping: userPublicKeyLabel,
withInsets: .zero,
shouldAdaptForIPadWithWidth: Values.iPadUserSessionIdContainerWidth
)
// Explanation label // Explanation label
let explanationLabel = UILabel() let explanationLabel = UILabel()
explanationLabel.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity) explanationLabel.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity)

Loading…
Cancel
Save