Add some info messages in AccountCredentialsScreen
This commit is contained in:
parent
b5484861ac
commit
345c4a2bd7
@ -49,6 +49,7 @@ import com.readrops.app.util.theme.MediumSpacer
|
||||
import com.readrops.app.util.theme.ShortSpacer
|
||||
import com.readrops.app.util.theme.spacing
|
||||
import com.readrops.db.entities.account.Account
|
||||
import com.readrops.db.entities.account.AccountType
|
||||
import org.koin.core.parameter.parametersOf
|
||||
|
||||
enum class AccountCredentialsScreenMode {
|
||||
@ -149,7 +150,16 @@ class AccountCredentialsScreen(
|
||||
label = { Text(text = stringResource(id = R.string.account_url)) },
|
||||
singleLine = true,
|
||||
isError = state.isUrlError,
|
||||
supportingText = { Text(text = state.urlError?.errorText().orEmpty()) },
|
||||
supportingText = {
|
||||
when {
|
||||
state.urlError != null -> {
|
||||
Text(text = state.urlError!!.errorText())
|
||||
}
|
||||
account.accountType == AccountType.FEVER -> {
|
||||
Text(text = stringResource(R.string.provide_full_api))
|
||||
}
|
||||
}
|
||||
},
|
||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
@ -194,9 +204,14 @@ class AccountCredentialsScreen(
|
||||
PasswordVisualTransformation(),
|
||||
isError = state.isPasswordError,
|
||||
supportingText = {
|
||||
Text(
|
||||
text = state.passwordError?.errorText().orEmpty()
|
||||
)
|
||||
when {
|
||||
state.passwordError != null -> {
|
||||
Text(text = state.passwordError!!.errorText())
|
||||
}
|
||||
account.accountType == AccountType.FRESHRSS -> {
|
||||
Text(text = stringResource(id = R.string.password_helper))
|
||||
}
|
||||
}
|
||||
},
|
||||
keyboardOptions = KeyboardOptions(
|
||||
keyboardType = KeyboardType.Password,
|
||||
|
@ -218,4 +218,5 @@
|
||||
<string name="donation_text">"Si vous considérez que mon travail vous est utile et si vous souhaitez me soutenir, vous pouvez me faire une donation. "</string>
|
||||
<string name="add_feed">Ajouter un flux</string>
|
||||
<string name="downloaded_file">Fichier téléchargé !</string>
|
||||
<string name="provide_full_api">Merci de fournir l\'URL entière de l\'API</string>
|
||||
</resources>
|
@ -231,4 +231,5 @@
|
||||
<string name="donation_text">I you find my work useful and you would like to support me, you can consider making me a donation.</string>
|
||||
<string name="add_feed">Add feed</string>
|
||||
<string name="downloaded_file">Downloaded file!</string>
|
||||
<string name="provide_full_api">Please provide the full API URL</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user