forked from github/wulkanowy-mirror
Add some login help messages (#716)
This commit is contained in:
parent
a880b3a9db
commit
42aacb755c
@ -111,6 +111,18 @@ class LoginAdvancedFragment : BaseFragment(), LoginAdvancedView {
|
||||
}
|
||||
}
|
||||
|
||||
override fun showMobileApiWarningMessage() {
|
||||
loginFormAdvancedWarningInfo.text = getString(R.string.login_advanced_warning_mobile_api)
|
||||
}
|
||||
|
||||
override fun showScraperWarningMessage() {
|
||||
loginFormAdvancedWarningInfo.text = getString(R.string.login_advanced_warning_scraper)
|
||||
}
|
||||
|
||||
override fun showHybridWarningMessage() {
|
||||
loginFormAdvancedWarningInfo.text = getString(R.string.login_advanced_warning_hybrid)
|
||||
}
|
||||
|
||||
override fun setDefaultCredentials(username: String, pass: String, symbol: String, token: String, pin: String) {
|
||||
loginFormUsername.setText(username)
|
||||
loginFormPass.setText(pass)
|
||||
|
@ -86,9 +86,18 @@ class LoginAdvancedPresenter @Inject constructor(
|
||||
fun onLoginModeSelected(type: Sdk.Mode) {
|
||||
view?.run {
|
||||
when (type) {
|
||||
Sdk.Mode.API -> showOnlyMobileApiModeInputs()
|
||||
Sdk.Mode.SCRAPPER -> showOnlyScrapperModeInputs()
|
||||
Sdk.Mode.HYBRID -> showOnlyHybridModeInputs()
|
||||
Sdk.Mode.API -> {
|
||||
showOnlyMobileApiModeInputs()
|
||||
showMobileApiWarningMessage()
|
||||
}
|
||||
Sdk.Mode.SCRAPPER -> {
|
||||
showOnlyScrapperModeInputs()
|
||||
showScraperWarningMessage()
|
||||
}
|
||||
Sdk.Mode.HYBRID -> {
|
||||
showOnlyHybridModeInputs()
|
||||
showHybridWarningMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,12 @@ interface LoginAdvancedView : BaseView {
|
||||
|
||||
fun initView()
|
||||
|
||||
fun showMobileApiWarningMessage()
|
||||
|
||||
fun showScraperWarningMessage()
|
||||
|
||||
fun showHybridWarningMessage()
|
||||
|
||||
fun setDefaultCredentials(username: String, pass: String, symbol: String, token: String, pin: String)
|
||||
|
||||
fun setUsernameLabel(label: String)
|
||||
|
@ -124,7 +124,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
||||
override fun setErrorSymbolRequired(focus: Boolean) {
|
||||
with(loginFormSymbolLayout) {
|
||||
if (focus) requestFocus()
|
||||
error = getString(R.string.login_field_required)
|
||||
error = getString(R.string.login_symbol_helper)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="24dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormUsernameLayout"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormAdvancedWarningInfo"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHeader">
|
||||
@ -80,6 +80,22 @@
|
||||
android:text="@string/login_type_hybrid" />
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginFormAdvancedWarningInfo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:lineSpacingExtra="3sp"
|
||||
android:text="@string/login_advanced_warning_scraper"
|
||||
android:textColor="?colorTimetableChange"
|
||||
app:layout_constraintBottom_toTopOf="@id/loginFormUsernameLayout"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/loginTypeSwitch" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginFormUsernameLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
@ -95,7 +111,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormPassLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginTypeSwitch">
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormAdvancedWarningInfo">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginFormUsername"
|
||||
|
@ -42,13 +42,28 @@
|
||||
android:text="@string/login_recover_title"
|
||||
android:textSize="16sp"
|
||||
app:fontFamily="sans-serif-light"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginRecoverNameLayout"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginRecoverInfoMessage"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginRecoverInfoMessage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/login_recover_warning"
|
||||
android:textColor="?colorTimetableChange"
|
||||
app:layout_constraintBottom_toTopOf="@id/loginRecoverNameLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/loginFormHeader" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginRecoverNameLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
@ -64,7 +79,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginRecoverHostLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHeader">
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginRecoverInfoMessage">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginRecoverName"
|
||||
|
@ -43,7 +43,7 @@
|
||||
<string name="login_symbol_hint">Symbol</string>
|
||||
<string name="login_sign_in">Anmelden</string>
|
||||
<string name="login_invalid_password">Passwort ist zu kurz</string>
|
||||
<string name="login_incorrect_password">Anmeldedaten sind falsch</string>
|
||||
<string name="login_incorrect_password">Anmeldedaten sind falsch. Stellen Sie sicher, dass das richtige UONET+-Register ausgewählt ist</string>
|
||||
<string name="login_invalid_pin">Ungültige PIN</string>
|
||||
<string name="login_invalid_token">Ungültige token</string>
|
||||
<string name="login_expired_token">Token ist nicht mehr gültig</string>
|
||||
|
@ -44,7 +44,7 @@
|
||||
<string name="login_api_key_hint">Klucz API</string>
|
||||
<string name="login_sign_in">Zaloguj</string>
|
||||
<string name="login_invalid_password">To hasło jest za krótkie</string>
|
||||
<string name="login_incorrect_password">Dane logowania są niepoprawne</string>
|
||||
<string name="login_incorrect_password">Dane logowania są niepoprawne. Upewnij się, że został wybrany odpowiedni dziennik UONET+</string>
|
||||
<string name="login_invalid_pin">Nieprawidłowy PIN</string>
|
||||
<string name="login_invalid_token">Nieprawidłowy token</string>
|
||||
<string name="login_expired_token">Token stracił ważność</string>
|
||||
@ -56,11 +56,15 @@
|
||||
<string name="login_symbol_helper">Symbol znajdziesz na stronie dziennika w Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
||||
<string name="login_select_student">Wybierz uczniów do zalogowania w aplikacji</string>
|
||||
<string name="login_advanced">Inne opcje</string>
|
||||
<string name="login_advanced_warning_mobile_api">W tym trybie nie działa szczęśliwy numerek, uczeń na tle klasy, podsumowanie frekwencji, usprawiedliwianie nieobecności, lekcje zrealizowane, informacje o szkole i podgląd listy zarejestrowanych urządzeń</string>
|
||||
<string name="login_advanced_warning_scraper">Tryb ten wyświetla te same dane, które widoczne są na stronie internetowej dziennika</string>
|
||||
<string name="login_advanced_warning_hybrid">Połączenie najlepszych cech dwóch pozostałych trybów. Działa szybciej niż scraper i zapewnia funkcje niedostępne w trybie Mobilne API. Jest w fazie eksperymentalnej</string>
|
||||
<string name="login_privacy_policy">Polityka prywatności</string>
|
||||
<string name="login_contact_header">Problemy z logowaniem? Napisz do nas!</string>
|
||||
<string name="login_contact_email">Email</string>
|
||||
<string name="login_contact_discord">Discord</string>
|
||||
<string name="login_email_intent_title">Wyślij email</string>
|
||||
<string name="login_recover_warning">Upewnij się, że został wybrany odpowiedni dziennik UONET+!</string>
|
||||
<string name="login_recover_button">Nie pamiętam hasła</string>
|
||||
<string name="login_recover_title">Przywróć swoje konto</string>
|
||||
<string name="login_recover">Przywróć</string>
|
||||
@ -402,5 +406,5 @@
|
||||
<string name="error_service_unavailable">Trwa przerwa techniczna dziennika UONET+. Spróbuj ponownie później</string>
|
||||
<string name="error_unknown">Wystąpił nieoczekiwany błąd</string>
|
||||
<string name="error_feature_disabled">Funkcja wyłączona przez szkołę</string>
|
||||
<string name="error_feature_not_available">Funkcja niedostępna w tym trybie</string>
|
||||
<string name="error_feature_not_available">Funkcja niedostępna. Zaloguj się w innym trybie niż Mobilne API</string>
|
||||
</resources>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<string name="login_symbol_hint">Symbol</string>
|
||||
<string name="login_sign_in">Sign in</string>
|
||||
<string name="login_invalid_password">Password too short</string>
|
||||
<string name="login_incorrect_password">Login details are incorrect</string>
|
||||
<string name="login_incorrect_password">Login details are incorrect. Make sure the correct UONET+ register is selected</string>
|
||||
<string name="login_invalid_pin">Invalid PIN</string>
|
||||
<string name="login_invalid_token">Invalid token</string>
|
||||
<string name="login_expired_token">Token expired</string>
|
||||
@ -57,6 +57,9 @@
|
||||
<string name="login_symbol_helper">The symbol can be found on the register page in Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne</string>
|
||||
<string name="login_select_student">Select students to log in to the application</string>
|
||||
<string name="login_advanced">Other options</string>
|
||||
<string name="login_advanced_warning_mobile_api">In this mode, a lucky number does not work, a class grade stats, summary of attendance, excuse for absence, completed lessons, school information and preview of the list of registered devices</string>
|
||||
<string name="login_advanced_warning_scraper">This mode displays the same data as it appears on the register website</string>
|
||||
<string name="login_advanced_warning_hybrid">The combination of the best features of the other two modes. It works faster than scraper and provides features not available in the Mobile API mode. It is in the experimental phase</string>
|
||||
<string name="login_privacy_policy">Privacy policy</string>
|
||||
<string name="login_contact_header">Trouble signing in? Contact us!</string>
|
||||
<string name="login_contact_email">Email</string>
|
||||
@ -64,6 +67,7 @@
|
||||
<string name="login_email_intent_title">Send email</string>
|
||||
<string name="login_email_subject" translatable="false">Zgłoszenie: Problemy z logowaniem</string>
|
||||
<string name="login_email_text" translatable="false">Informacje o aplikacji:\n\nUrządzenie: %1$s\nWersja SDK: %2$s\nWersja aplikacji: %3$s\n\nOpis problemu:</string>
|
||||
<string name="login_recover_warning">Make sure the correct UONET+ register is selected!</string>
|
||||
<string name="login_recover_button">I forgot my password</string>
|
||||
<string name="login_recover_title">Recover your account</string>
|
||||
<string name="login_recover">Recover</string>
|
||||
@ -385,5 +389,5 @@
|
||||
<string name="error_service_unavailable">Maintenance underway UONET + register. Try again later</string>
|
||||
<string name="error_unknown">An unexpected error occurred</string>
|
||||
<string name="error_feature_disabled">Feature disabled by your school</string>
|
||||
<string name="error_feature_not_available">Feature not available in this mode</string>
|
||||
<string name="error_feature_not_available">Feature not available. Login in a mode other than Mobile API</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user