Skip to content

Commit

Permalink
Add Terms of Use and Privacy Policy links in Legal section
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Jan 6, 2025
1 parent 3ad379c commit ed64a6a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
10 changes: 8 additions & 2 deletions ElementX/Sources/Application/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,16 @@ final class AppSettings {
let logoURL: URL = "https://element.io/mobile-icon.png"
/// A URL that contains that app's copyright notice.
let copyrightURL: URL = "https://element.io/copyright"
// Tchap: replace Terms of Use and Privacy policy URLs.
// /// A URL that contains the app's Terms of use.
// let acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms"
// /// A URL that contains the app's Privacy Policy.
// let privacyURL: URL = "https://element.io/privacy"
// Tchap: Tchap Terms of Use and Privacy policy
/// A URL that contains the app's Terms of use.
let acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms"
let acceptableUseURL: URL = "https://tchap.numerique.gouv.fr/cgu" // Tchap
/// A URL that contains the app's Privacy Policy.
let privacyURL: URL = "https://element.io/privacy"
let privacyURL: URL = "https://tchap.numerique.gouv.fr/politique-de-confidentialite/" // Tchap
/// An email address that should be used for support requests.
let supportEmailAddress = "support@element.io"
/// A URL where users can go read more about encryption in general.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ struct LegalInformationScreen: View {
Section {
ListRow(label: .plain(title: L10n.commonCopyright),
kind: .button { openURL(context.viewState.copyrightURL) })
ListRow(label: .plain(title: L10n.commonAcceptableUsePolicy),
// Tchap: Customize "About" menu into "Legal" menu
// ListRow(label: .plain(title: L10n.commonAcceptableUsePolicy),
ListRow(label: .plain(title: TchapL10n.legalTermsOfUse),
kind: .button { openURL(context.viewState.acceptableUseURL) })
ListRow(label: .plain(title: L10n.commonPrivacyPolicy),
// Tchap: Customize "About" menu into "Legal" menu
// ListRow(label: .plain(title: L10n.commonPrivacyPolicy),
ListRow(label: .plain(title: TchapL10n.legalPrivacyPolicy),
kind: .button { openURL(context.viewState.privacyURL) })
}
}
.compoundList()
.navigationTitle(L10n.commonAbout)
// Tchap: Customize "About" menu into "Legal" menu
.navigationTitle(TchapL10n.commonLegal)
.navigationBarTitleDisplayMode(.inline)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ struct SettingsScreen: View {

private var generalSection: some View {
Section {
ListRow(label: .default(title: L10n.commonAbout,
// Tchap: Customize "About" menu into "Legal" menu
// ListRow(label: .default(title: L10n.commonAbout,
ListRow(label: .default(title: TchapL10n.commonLegal,
icon: \.info),
kind: .navigationLink {
context.send(viewAction: .about)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
Copyright © 2024 Tchap. All rights reserved.
*/

common_legal = "Legals";

legal_terms_of_use = "Terms of use";
legal_privacy_policy = "Privacy policy";
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
Copyright © 2024 Tchap. All rights reserved.
*/

common_legal = "Mentions légales";

legal_terms_of_use = "Conditions Générales d'Utilisation";
legal_privacy_policy = "Politique de confidentialité";

0 comments on commit ed64a6a

Please sign in to comment.