From f11bdd8906c63da807d8e5da2979ab2545781936 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:29:11 +0100 Subject: [PATCH] Add support URLs to the app setting overrides. (#3987) * Add support URLs to the app setting overrides. * Use a cache for pkl packages. * Remove the fake secrets from enterprise unit tests. --- .github/workflows/unit_tests_enterprise.yml | 13 +++++++------ ElementX/Sources/Application/AppSettings.swift | 16 ++++++++++++---- Enterprise | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/unit_tests_enterprise.yml b/.github/workflows/unit_tests_enterprise.yml index 8c9d7a7ef..cf2a05bc3 100644 --- a/.github/workflows/unit_tests_enterprise.yml +++ b/.github/workflows/unit_tests_enterprise.yml @@ -36,15 +36,16 @@ jobs: - name: Setup environment run: source ci_scripts/ci_common.sh && setup_github_actions_environment + + - uses: actions/cache@v4 + with: + path: ~/.pkl/cache + key: ${{ runner.os }}-pkl-${{ hashFiles('Secrets/Secrets.pkl') }} + restore-keys: | + ${{ runner.os }}-pkl- - name: Configure Enterprise run: bundle exec fastlane config_element_pro - env: - MAPLIBRE_API_KEY: WeDontNeedOneForUnitTests - SENTRY_DSN: https://sentry.localhost - POSTHOG_HOST: https://posthog.localhost - POSTHOG_API_KEY: WeDontNeedOneForUnitTests - RAGESHAKE_SERVER_URL: https://rageshake.localhost - name: SwiftFormat run: swiftformat --lint . diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index f0a475967..b2a04f424 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -98,6 +98,10 @@ final class AppSettings { acceptableUseURL: URL, privacyURL: URL, supportEmailAddress: String, + encryptionURL: URL, + chatBackupDetailsURL: URL, + identityPinningViolationDetailsURL: URL, + elementWebHosts: [String], bugReportApplicationID: String, analyticsTermsURL: URL?, mapTilerConfiguration: MapTilerConfiguration) { @@ -110,6 +114,10 @@ final class AppSettings { self.acceptableUseURL = acceptableUseURL self.privacyURL = privacyURL self.supportEmailAddress = supportEmailAddress + self.encryptionURL = encryptionURL + self.chatBackupDetailsURL = chatBackupDetailsURL + self.identityPinningViolationDetailsURL = identityPinningViolationDetailsURL + self.elementWebHosts = elementWebHosts self.bugReportApplicationID = bugReportApplicationID self.analyticsTermsURL = analyticsTermsURL self.mapTilerConfiguration = mapTilerConfiguration @@ -158,13 +166,13 @@ final class AppSettings { /// An email address that should be used for support requests. private(set) var supportEmailAddress = "support@element.io" /// A URL where users can go read more about encryption in general. - let encryptionURL: URL = "https://element.io/help#encryption" + private(set) var encryptionURL: URL = "https://element.io/help#encryption" /// A URL where users can go read more about the chat backup. - let chatBackupDetailsURL: URL = "https://element.io/help#encryption5" + private(set) var chatBackupDetailsURL: URL = "https://element.io/help#encryption5" /// A URL where users can go read more about identity pinning violations - let identityPinningViolationDetailsURL: URL = "https://element.io/help#encryption18" + private(set) var identityPinningViolationDetailsURL: URL = "https://element.io/help#encryption18" /// Any domains that Element web may be hosted on - used for handling links. - let elementWebHosts = ["app.element.io", "staging.element.io", "develop.element.io"] + private(set) var elementWebHosts = ["app.element.io", "staging.element.io", "develop.element.io"] @UserPreference(key: UserDefaultsKeys.appAppearance, defaultValue: .system, storageType: .userDefaults(store)) var appAppearance: AppAppearance diff --git a/Enterprise b/Enterprise index c5e9abe87..b04686d7c 160000 --- a/Enterprise +++ b/Enterprise @@ -1 +1 @@ -Subproject commit c5e9abe87c07be6302784df1c7fe1803cf601488 +Subproject commit b04686d7cb86375527393b1a4ff01cfe9a48deb8