Skip to content

Commit

Permalink
Add SSO FAQ URL
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Jan 8, 2025
1 parent 62df1f1 commit d4d1e11
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.0.0.2929'
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
classpath "com.likethesalad.android:stem-plugin:2.9.0"
classpath 'org.owasp:dependency-check-gradle:8.2.1'
classpath 'org.owasp:dependency-check-gradle:11.1.0'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0"
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<string name="tchap_has_account_yes">Se connecter par mot de passe</string>
<string name="tchap_start_message">La messagerie instantanée du secteur public</string>
<string name="tchap_connection_sso_help">➜ Qu’est-ce que %s ?</string>
<string name="tchap_connection_sso_description">➜ Est-ce que %s est activé pour mon administration ?</string>
<string name="tchap_connection_email">Adresse mail professionnelle</string>
<string name="tchap_connection_email_help">Utilisez votre adresse professionnelle</string>
<string name="tchap_connection_password_help">Votre mot de passe doit contenir au moins 8 caractères, avec au moins un caractère de chaque type : majuscule, minuscule, chiffre, caractère spécial.</string>
Expand Down
1 change: 1 addition & 0 deletions library/ui-strings/src/main/res/values/strings_tchap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<string name="tchap_has_account_yes">Login by password</string>
<string name="tchap_start_message">Instant messaging of public sector</string>
<string name="tchap_connection_sso_help">➜ What is %s ?</string>
<string name="tchap_connection_sso_description">Is %s available for my organization ?</string>
<string name="tchap_connection_email">Professional email</string>
<string name="tchap_connection_email_help">Use your business address</string>
<string name="tchap_connection_password_help">Your password must include a lower-case letter, an upper-case letter, a number and a symbol and be at a minimum 8 characters in length.</string>
Expand Down
4 changes: 2 additions & 2 deletions vector-config/src/tchap/res/values/config-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<bool name="tchap_is_cross_signing_enabled">true</bool>
<bool name="tchap_is_key_backup_enabled">true</bool>
<bool name="tchap_is_thread_enabled">false</bool>
<bool name="tchap_is_secure_backup_required">true</bool>
<bool name="tchap_is_sso_enabled">false</bool>
<bool name="tchap_is_secure_backup_required">false</bool>
<bool name="tchap_is_sso_enabled">true</bool>

<string-array name="tchap_is_visio_supported_homeservers" translatable="false" />
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import im.vector.app.features.onboarding.OnboardingAction
import im.vector.app.features.onboarding.OnboardingViewEvents
import im.vector.app.features.onboarding.OnboardingViewModel
import im.vector.app.features.onboarding.OnboardingViewState
import im.vector.app.features.settings.VectorSettingsUrls
import im.vector.lib.strings.CommonStrings
import kotlinx.coroutines.CancellationException

Expand Down Expand Up @@ -171,5 +172,6 @@ abstract class AbstractFtueAuthFragment<VB : ViewBinding> : VectorBaseFragment<V
companion object {
const val TCHAP_SSO_URL = "https://proconnect.gouv.fr/"
const val TCHAP_SSO_PROVIDER = "ProConnect"
const val TCHAP_SSO_FAQ_URL = "${VectorSettingsUrls.HELP}/fr/article/se-connecter-a-tchap-avec-proconnect-1dh1peg/"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,14 @@ class FtueAuthLoginFragment :
}
}
SignMode.TchapSignInWithSSO -> {
views.passwordFieldTil.isVisible = false
views.loginSubmit.setLeftDrawable(im.vector.lib.ui.styles.R.drawable.ic_tchap_proconnect)
views.loginSSOHelp.text = getString(CommonStrings.tchap_connection_sso_help, TCHAP_SSO_PROVIDER)
views.loginSSODescription.text = getString(CommonStrings.tchap_connection_sso_description, TCHAP_SSO_PROVIDER)
views.loginSSOHelp.debouncedClicks { openUrlInExternalBrowser(requireContext(), TCHAP_SSO_URL) }
views.loginSSODescription.debouncedClicks { openUrlInExternalBrowser(requireContext(), TCHAP_SSO_FAQ_URL) }
views.passwordFieldTil.isVisible = false
views.loginSSOHelp.isVisible = true
views.loginSubmit.setLeftDrawable(im.vector.lib.ui.styles.R.drawable.ic_tchap_proconnect)
views.loginSSODescription.isVisible = true
}
else -> {
views.passwordField.imeOptions = EditorInfo.IME_ACTION_DONE
Expand Down
7 changes: 7 additions & 0 deletions vector/src/main/res/layout/fragment_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@
android:layout_height="wrap_content"
tools:text="@string/tchap_connection_sso_help" />

<Button
android:id="@+id/loginSSODescription"
style="@style/Widget.Vector.Button.Text.Login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="@string/tchap_connection_sso_description" />

</LinearLayout>

</androidx.core.widget.NestedScrollView>
Expand Down

0 comments on commit d4d1e11

Please sign in to comment.