Add FAQ button to settings
This commit is contained in:
parent
1326516735
commit
873279b65b
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Wird gesendet ...";
|
||||
"view_open_group_invitation_description" = "Gruppeneinladung öffnen";
|
||||
"vc_conversation_settings_invite_button_title" = "Mitglieder hinzufügen";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -542,3 +542,4 @@
|
|||
"vc_share_sending_message" = "Sending...";
|
||||
"view_open_group_invitation_description" = "Open group invitation";
|
||||
"vc_conversation_settings_invite_button_title" = "Add Members";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Enviando...";
|
||||
"view_open_group_invitation_description" = "Abrir invitación de grupo";
|
||||
"vc_conversation_settings_invite_button_title" = "Añadir Miembros";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "در حال ارسال...";
|
||||
"view_open_group_invitation_description" = "Open group invitation";
|
||||
"vc_conversation_settings_invite_button_title" = "Add Members";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Lähetetään...";
|
||||
"view_open_group_invitation_description" = "Avaa ryhmäkutsu";
|
||||
"vc_conversation_settings_invite_button_title" = "Lisää jäseniä";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Envoi...";
|
||||
"view_open_group_invitation_description" = "Invitation à un groupe ouvert";
|
||||
"vc_conversation_settings_invite_button_title" = "Ajouter des membres";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "भेजा जा रहा है...";
|
||||
"view_open_group_invitation_description" = "ग्रुप आमंत्रण खोलें";
|
||||
"vc_conversation_settings_invite_button_title" = "सदस्य जोड़ें";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Slanje...";
|
||||
"view_open_group_invitation_description" = "Otvori pozivnicu za grupu";
|
||||
"vc_conversation_settings_invite_button_title" = "Dodaj članove";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Sending...";
|
||||
"view_open_group_invitation_description" = "Open group invitation";
|
||||
"vc_conversation_settings_invite_button_title" = "Add Members";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Sending...";
|
||||
"view_open_group_invitation_description" = "Open group invitation";
|
||||
"vc_conversation_settings_invite_button_title" = "Add Members";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "送信中…";
|
||||
"view_open_group_invitation_description" = "公開グループからの招待";
|
||||
"vc_conversation_settings_invite_button_title" = "メンバーを追加する";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Aan het verzenden...";
|
||||
"view_open_group_invitation_description" = "Open groepsuitnodiging";
|
||||
"vc_conversation_settings_invite_button_title" = "Voeg deelnemers toe";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Wysyłanie...";
|
||||
"view_open_group_invitation_description" = "Otwórz zaproszenie do grupy";
|
||||
"vc_conversation_settings_invite_button_title" = "Dodaj użytkowników";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Enviando...";
|
||||
"view_open_group_invitation_description" = "Convite para grupo aberto";
|
||||
"vc_conversation_settings_invite_button_title" = "Adicionar Membros";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Отправка...";
|
||||
"view_open_group_invitation_description" = "Открыть приглашение в группу";
|
||||
"vc_conversation_settings_invite_button_title" = "Добавить участников";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Odosiela sa...";
|
||||
"view_open_group_invitation_description" = "Otvoriť skupinovú pozvánku";
|
||||
"vc_conversation_settings_invite_button_title" = "Pridať členov";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Skickar...";
|
||||
"view_open_group_invitation_description" = "Öppen gruppinbjudan";
|
||||
"vc_conversation_settings_invite_button_title" = "Lägg till medlemmar";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "กำลังส่ง...";
|
||||
"view_open_group_invitation_description" = "การเชิญเข้าร่วมกลุ่ม";
|
||||
"vc_conversation_settings_invite_button_title" = "เพิ่มสมาชิก";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "Sending...";
|
||||
"view_open_group_invitation_description" = "Open group invitation";
|
||||
"vc_conversation_settings_invite_button_title" = "Add Members";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "傳送中⋯";
|
||||
"view_open_group_invitation_description" = "打開群組邀請";
|
||||
"vc_conversation_settings_invite_button_title" = "新增成員";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -537,3 +537,4 @@
|
|||
"vc_share_sending_message" = "正在发送…";
|
||||
"view_open_group_invitation_description" = "打开群组邀请";
|
||||
"vc_conversation_settings_invite_button_title" = "添加成员";
|
||||
"vc_settings_faq_button_title" = "FAQ";
|
||||
|
|
|
@ -143,6 +143,12 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
inviteButton.setTitleColor(Colors.text, for: UIControl.State.normal)
|
||||
inviteButton.titleLabel!.font = .boldSystemFont(ofSize: Values.smallFontSize)
|
||||
inviteButton.addTarget(self, action: #selector(sendInvitation), for: UIControl.Event.touchUpInside)
|
||||
// FAQ button
|
||||
let faqButton = UIButton()
|
||||
faqButton.setTitle(NSLocalizedString("vc_settings_faq_button_title", comment: ""), for: UIControl.State.normal)
|
||||
faqButton.setTitleColor(Colors.text, for: UIControl.State.normal)
|
||||
faqButton.titleLabel!.font = .boldSystemFont(ofSize: Values.smallFontSize)
|
||||
faqButton.addTarget(self, action: #selector(openFAQ), for: UIControl.Event.touchUpInside)
|
||||
// Help translate button
|
||||
let helpTranslateButton = UIButton()
|
||||
helpTranslateButton.setTitle(NSLocalizedString("vc_settings_help_us_translate_button_title", comment: ""), for: UIControl.State.normal)
|
||||
|
@ -157,7 +163,7 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
logoContainer.pin(.bottom, to: .bottom, of: logoImageView)
|
||||
logoImageView.centerXAnchor.constraint(equalTo: logoContainer.centerXAnchor, constant: -2).isActive = true
|
||||
// Main stack view
|
||||
let stackView = UIStackView(arrangedSubviews: [ topStackView, settingButtonsStackView, inviteButton, helpTranslateButton, logoContainer, versionLabel ])
|
||||
let stackView = UIStackView(arrangedSubviews: [ topStackView, settingButtonsStackView, inviteButton, faqButton, helpTranslateButton, logoContainer, versionLabel ])
|
||||
stackView.axis = .vertical
|
||||
stackView.spacing = Values.largeSpacing
|
||||
stackView.alignment = .fill
|
||||
|
@ -225,21 +231,10 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
}, completion: nil)
|
||||
}
|
||||
|
||||
func avatarActionSheetTitle() -> String? {
|
||||
return "Update Profile Picture"
|
||||
}
|
||||
|
||||
func fromViewController() -> UIViewController {
|
||||
return self
|
||||
}
|
||||
|
||||
func hasClearAvatarAction() -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func clearAvatarActionLabel() -> String {
|
||||
return "Clear"
|
||||
}
|
||||
func avatarActionSheetTitle() -> String? { return "Update Profile Picture" }
|
||||
func fromViewController() -> UIViewController { return self }
|
||||
func hasClearAvatarAction() -> Bool { return false }
|
||||
func clearAvatarActionLabel() -> String { return "Clear" }
|
||||
|
||||
// MARK: Updating
|
||||
private func handleIsEditingDisplayNameChanged() {
|
||||
|
@ -437,17 +432,6 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
let notificationSettingsVC = NotificationSettingsViewController()
|
||||
navigationController!.pushViewController(notificationSettingsVC, animated: true)
|
||||
}
|
||||
|
||||
@objc private func sendInvitation() {
|
||||
let invitation = "Hey, I've been using Session to chat with complete privacy and security. Come join me! Download it at https://getsession.org/. My Session ID is \(getUserHexEncodedPublicKey())!"
|
||||
let shareVC = UIActivityViewController(activityItems: [ invitation ], applicationActivities: nil)
|
||||
navigationController!.present(shareVC, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc private func helpTranslate() {
|
||||
let url = URL(string: "https://crowdin.com/project/session-ios")!
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
@objc private func showSeed() {
|
||||
let seedModal = SeedModal()
|
||||
|
@ -462,4 +446,20 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
|||
nukeDataModal.modalTransitionStyle = .crossDissolve
|
||||
present(nukeDataModal, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc private func sendInvitation() {
|
||||
let invitation = "Hey, I've been using Session to chat with complete privacy and security. Come join me! Download it at https://getsession.org/. My Session ID is \(getUserHexEncodedPublicKey()) !"
|
||||
let shareVC = UIActivityViewController(activityItems: [ invitation ], applicationActivities: nil)
|
||||
navigationController!.present(shareVC, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc private func openFAQ() {
|
||||
let url = URL(string: "https://getsession.org/faq")!
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
@objc private func helpTranslate() {
|
||||
let url = URL(string: "https://crowdin.com/project/session-ios")!
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue