mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 10:35:19 +00:00
AccessibilityId WIP - up to AccessibilityId_reveal_recovery_phrase_button
This commit is contained in:
parent
a8d72dfcc0
commit
399796bac3
@ -91,7 +91,7 @@ internal fun StartConversationScreen(
|
|||||||
Spacer(modifier = Modifier.height(LocalDimensions.current.smallSpacing))
|
Spacer(modifier = Modifier.height(LocalDimensions.current.smallSpacing))
|
||||||
QrImage(
|
QrImage(
|
||||||
string = accountId,
|
string = accountId,
|
||||||
Modifier.contentDescription(R.string.AccessibilityId_qr_code),
|
Modifier.contentDescription(R.string.AccessibilityId_qrCode),
|
||||||
icon = R.drawable.session
|
icon = R.drawable.session
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -84,12 +84,12 @@ internal fun LandingScreen(
|
|||||||
buttons = listOf(
|
buttons = listOf(
|
||||||
DialogButtonModel(
|
DialogButtonModel(
|
||||||
text = GetString(R.string.onboardingTos),
|
text = GetString(R.string.onboardingTos),
|
||||||
contentDescription = GetString(R.string.AccessibilityId_terms_of_service_button),
|
contentDescription = GetString(R.string.AccessibilityId_onboardingTos),
|
||||||
onClick = openTerms
|
onClick = openTerms
|
||||||
),
|
),
|
||||||
DialogButtonModel(
|
DialogButtonModel(
|
||||||
text = GetString(R.string.onboardingPrivacy),
|
text = GetString(R.string.onboardingPrivacy),
|
||||||
contentDescription = GetString(R.string.AccessibilityId_privacy_policy_button),
|
contentDescription = GetString(R.string.AccessibilityId_onboardingPrivacy),
|
||||||
onClick = openPrivacyPolicy
|
onClick = openPrivacyPolicy
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -158,7 +158,7 @@ internal fun LandingScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.contentDescription(R.string.AccessibilityId_create_account_button),
|
.contentDescription(R.string.AccessibilityId_onboardingAccountCreate),
|
||||||
onClick = createAccount
|
onClick = createAccount
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(LocalDimensions.current.smallSpacing))
|
Spacer(modifier = Modifier.height(LocalDimensions.current.smallSpacing))
|
||||||
@ -167,7 +167,7 @@ internal fun LandingScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.contentDescription(R.string.AccessibilityId_restore_account_button),
|
.contentDescription(R.string.AccessibilityId_onboardingAccountExists),
|
||||||
onClick = loadAccount
|
onClick = loadAccount
|
||||||
)
|
)
|
||||||
BorderlessHtmlButton(
|
BorderlessHtmlButton(
|
||||||
@ -175,7 +175,7 @@ internal fun LandingScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.contentDescription(R.string.AccessibilityId_open_url),
|
.contentDescription(R.string.AccessibilityId_urlOpenBrowser),
|
||||||
onClick = { isUrlDialogVisible = true }
|
onClick = { isUrlDialogVisible = true }
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(LocalDimensions.current.xxsSpacing))
|
Spacer(modifier = Modifier.height(LocalDimensions.current.xxsSpacing))
|
||||||
|
@ -100,7 +100,7 @@ private fun RecoveryPassword(state: State, onChange: (String) -> Unit = {}, onCo
|
|||||||
SessionOutlinedTextField(
|
SessionOutlinedTextField(
|
||||||
text = state.recoveryPhrase,
|
text = state.recoveryPhrase,
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
contentDescription = stringResource(R.string.AccessibilityId_recovery_phrase_input),
|
contentDescription = stringResource(R.string.AccessibilityId_recoveryPhrase),
|
||||||
placeholder = stringResource(R.string.recoveryPasswordEnter),
|
placeholder = stringResource(R.string.recoveryPasswordEnter),
|
||||||
onChange = onChange,
|
onChange = onChange,
|
||||||
onContinue = onContinue,
|
onContinue = onContinue,
|
||||||
|
@ -20,7 +20,7 @@ internal fun LoadingScreen(progress: Float) {
|
|||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
ProgressArc(
|
ProgressArc(
|
||||||
progress,
|
progress,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_loading_animation)
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_loadAccountProgressMessage)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
stringResource(R.string.waitOneMoment),
|
stringResource(R.string.waitOneMoment),
|
||||||
|
@ -72,7 +72,7 @@ internal fun MessageNotificationsScreen(
|
|||||||
NotificationRadioButton(
|
NotificationRadioButton(
|
||||||
R.string.notificationsFastMode,
|
R.string.notificationsFastMode,
|
||||||
R.string.notificationsFastModeDescriptionAndroid,
|
R.string.notificationsFastModeDescriptionAndroid,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_fast_mode_notifications_button),
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_notificationsFastMode),
|
||||||
tag = R.string.recommended,
|
tag = R.string.recommended,
|
||||||
checked = state.pushEnabled,
|
checked = state.pushEnabled,
|
||||||
onClick = { setEnabled(true) }
|
onClick = { setEnabled(true) }
|
||||||
@ -86,7 +86,7 @@ internal fun MessageNotificationsScreen(
|
|||||||
NotificationRadioButton(
|
NotificationRadioButton(
|
||||||
R.string.notificationsSlowMode,
|
R.string.notificationsSlowMode,
|
||||||
R.string.notificationsSlowModeDescription,
|
R.string.notificationsSlowModeDescription,
|
||||||
modifier = Modifier.contentDescription(R.string.AccessibilityId_slow_mode_notifications_button),
|
modifier = Modifier.contentDescription(R.string.AccessibilityId_notificationsSlowMode),
|
||||||
checked = state.pushDisabled,
|
checked = state.pushDisabled,
|
||||||
onClick = { setEnabled(false) }
|
onClick = { setEnabled(false) }
|
||||||
)
|
)
|
||||||
|
@ -101,7 +101,7 @@ fun QrPage(string: String) {
|
|||||||
string = string,
|
string = string,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = LocalDimensions.current.mediumSpacing, bottom = LocalDimensions.current.xsSpacing)
|
.padding(top = LocalDimensions.current.mediumSpacing, bottom = LocalDimensions.current.xsSpacing)
|
||||||
.contentDescription(R.string.AccessibilityId_qr_code),
|
.contentDescription(R.string.AccessibilityId_qrCode),
|
||||||
icon = R.drawable.session
|
icon = R.drawable.session
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.settings_general, menu)
|
menuInflater.inflate(R.menu.settings_general, menu)
|
||||||
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
menu.findItem(R.id.action_qr_code)?.contentDescription = resources.getString(R.string.AccessibilityId_view_qr_code)
|
menu.findItem(R.id.action_qr_code)?.contentDescription = resources.getString(R.string.AccessibilityId_qrView)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -523,7 +523,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
LargeItemButton(
|
LargeItemButton(
|
||||||
R.string.sessionRecoveryPassword,
|
R.string.sessionRecoveryPassword,
|
||||||
R.drawable.ic_shield_outline,
|
R.drawable.ic_shield_outline,
|
||||||
Modifier.contentDescription(R.string.AccessibilityId_recovery_password_menu_item)
|
Modifier.contentDescription(R.string.AccessibilityId_sessionRecoveryPasswordMenuItem)
|
||||||
) { show<RecoveryPasswordActivity>() }
|
) { show<RecoveryPasswordActivity>() }
|
||||||
Divider()
|
Divider()
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ internal fun RecoveryPasswordScreen(
|
|||||||
Column(
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(LocalDimensions.current.smallSpacing),
|
verticalArrangement = Arrangement.spacedBy(LocalDimensions.current.smallSpacing),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.contentDescription(R.string.AccessibilityId_recovery_password)
|
.contentDescription(R.string.AccessibilityId_sessionRecoveryPassword)
|
||||||
.verticalScroll(rememberScrollState())
|
.verticalScroll(rememberScrollState())
|
||||||
.padding(bottom = LocalDimensions.current.smallSpacing)
|
.padding(bottom = LocalDimensions.current.smallSpacing)
|
||||||
) {
|
) {
|
||||||
@ -99,7 +99,7 @@ private fun RecoveryPasswordCell(
|
|||||||
seed,
|
seed,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = LocalDimensions.current.spacing)
|
.padding(vertical = LocalDimensions.current.spacing)
|
||||||
.contentDescription(R.string.AccessibilityId_qr_code),
|
.contentDescription(R.string.AccessibilityId_qrCode),
|
||||||
contentPadding = 10.dp,
|
contentPadding = 10.dp,
|
||||||
icon = R.drawable.session_shield
|
icon = R.drawable.session_shield
|
||||||
)
|
)
|
||||||
@ -136,7 +136,7 @@ private fun RecoveryPassword(mnemonic: String) {
|
|||||||
Text(
|
Text(
|
||||||
mnemonic,
|
mnemonic,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.contentDescription(R.string.AccessibilityId_recovery_password_container)
|
.contentDescription(R.string.AccessibilityId_sessionRecoveryPasswordContainer)
|
||||||
.padding(vertical = LocalDimensions.current.spacing)
|
.padding(vertical = LocalDimensions.current.spacing)
|
||||||
.border()
|
.border()
|
||||||
.padding(LocalDimensions.current.spacing),
|
.padding(LocalDimensions.current.spacing),
|
||||||
@ -168,7 +168,7 @@ private fun HideRecoveryPasswordCell(onHide: () -> Unit = {}) {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.wrapContentWidth()
|
.wrapContentWidth()
|
||||||
.align(Alignment.CenterVertically)
|
.align(Alignment.CenterVertically)
|
||||||
.contentDescription(R.string.AccessibilityId_hide_recovery_password_button),
|
.contentDescription(R.string.AccessibilityId_recoveryPasswordHideRecoveryPassword),
|
||||||
color = LocalColors.current.danger,
|
color = LocalColors.current.danger,
|
||||||
onClick = onHide
|
onClick = onHide
|
||||||
)
|
)
|
||||||
|
@ -46,7 +46,7 @@ class RecoveryPasswordActivity : BaseActionBarActivity() {
|
|||||||
cancelButton()
|
cancelButton()
|
||||||
dangerButton(
|
dangerButton(
|
||||||
R.string.yes,
|
R.string.yes,
|
||||||
contentDescription = R.string.AccessibilityId_confirm_button
|
contentDescription = R.string.AccessibilityId_recoveryPasswordHidePermanentlyConfirm
|
||||||
) {
|
) {
|
||||||
viewModel.permanentlyHidePassword()
|
viewModel.permanentlyHidePassword()
|
||||||
finish()
|
finish()
|
||||||
|
@ -175,12 +175,12 @@ fun PreviewXCloseDialog(){
|
|||||||
buttons = listOf(
|
buttons = listOf(
|
||||||
DialogButtonModel(
|
DialogButtonModel(
|
||||||
text = GetString(R.string.onboardingTos),
|
text = GetString(R.string.onboardingTos),
|
||||||
contentDescription = GetString(R.string.AccessibilityId_terms_of_service_button),
|
contentDescription = GetString(R.string.AccessibilityId_onboardingTos),
|
||||||
onClick = {}
|
onClick = {}
|
||||||
),
|
),
|
||||||
DialogButtonModel(
|
DialogButtonModel(
|
||||||
text = GetString(R.string.onboardingPrivacy),
|
text = GetString(R.string.onboardingPrivacy),
|
||||||
contentDescription = GetString(R.string.AccessibilityId_privacy_policy_button),
|
contentDescription = GetString(R.string.AccessibilityId_onboardingPrivacy),
|
||||||
onClick = {}
|
onClick = {}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -177,7 +177,7 @@ fun OutlineCopyButton(
|
|||||||
val interactionSource = remember { MutableInteractionSource() }
|
val interactionSource = remember { MutableInteractionSource() }
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
modifier = modifier.contentDescription(R.string.AccessibilityId_copy_button),
|
modifier = modifier.contentDescription(R.string.AccessibilityId_copy),
|
||||||
interactionSource = interactionSource,
|
interactionSource = interactionSource,
|
||||||
style = style,
|
style = style,
|
||||||
type = ButtonType.Outline(color),
|
type = ButtonType.Outline(color),
|
||||||
|
@ -134,7 +134,7 @@ fun SessionOutlinedTextField(
|
|||||||
Text(
|
Text(
|
||||||
it,
|
it,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
.contentDescription(R.string.AccessibilityId_error_message),
|
.contentDescription(R.string.AccessibilityId_theError),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = LocalType.current.base.bold(),
|
style = LocalType.current.base.bold(),
|
||||||
color = LocalColors.current.danger
|
color = LocalColors.current.danger
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||||
android:layout_marginTop="@dimen/large_spacing"
|
android:layout_marginTop="@dimen/large_spacing"
|
||||||
android:contentDescription="@string/AccessibilityId_account_id_input"
|
android:contentDescription="@string/AccessibilityId_accountIdOrOnsEnter"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/accountIdOrOnsEnter"
|
android:hint="@string/accountIdOrOnsEnter"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
android:title="@string/accountIdCopy"
|
android:title="@string/accountIdCopy"
|
||||||
android:id="@+id/menu_copy_account_id"
|
android:id="@+id/menu_copy_account_id"
|
||||||
android:icon="@drawable/ic_content_copy_white_24dp"
|
android:icon="@drawable/ic_content_copy_white_24dp"
|
||||||
android:contentDescription="@string/AccessibilityId_copy_account_id" />
|
android:contentDescription="@string/AccessibilityId_accountIdCopy" />
|
||||||
</menu>
|
</menu>
|
@ -6,7 +6,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/action_qr_code"
|
android:id="@+id/action_qr_code"
|
||||||
android:title=""
|
android:title=""
|
||||||
android:contentDescription="@string/AccessibilityId_view_qr_code"
|
android:contentDescription="@string/AccessibilityId_qrView"
|
||||||
android:icon="@drawable/ic_qr_code_24"
|
android:icon="@drawable/ic_qr_code_24"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
@ -4,26 +4,26 @@
|
|||||||
<!-- NOTE: Only non-translated Accessibility IDs for automated testing exist in this file. -->
|
<!-- NOTE: Only non-translated Accessibility IDs for automated testing exist in this file. -->
|
||||||
|
|
||||||
<!-- Onboarding related -->
|
<!-- Onboarding related -->
|
||||||
<string name="AccessibilityId_account_id_input">Account id input box</string>
|
<string name="AccessibilityId_accountIdOrOnsEnter">Account id input box</string>
|
||||||
<string name="AccessibilityId_confirm_button">Confirm button</string>
|
<string name="AccessibilityId_recoveryPasswordHidePermanentlyConfirm">Confirm button</string>
|
||||||
<string name="AccessibilityId_copy_account_id">Copy Account ID</string>
|
<string name="AccessibilityId_accountIdCopy">Copy Account ID</string>
|
||||||
<string name="AccessibilityId_copy_button">Copy button</string>
|
<string name="AccessibilityId_copy">Copy button</string>
|
||||||
<string name="AccessibilityId_error_message">Error message</string>
|
<string name="AccessibilityId_theError">Error message</string>
|
||||||
<string name="AccessibilityId_hide_recovery_password_button">Hide recovery password button</string>
|
<string name="AccessibilityId_recoveryPasswordHideRecoveryPassword">Hide recovery password button</string>
|
||||||
<string name="AccessibilityId_qr_code">QR code</string>
|
<string name="AccessibilityId_qrCode">QR code</string>
|
||||||
<string name="AccessibilityId_recovery_password">Recovery password</string>
|
<string name="AccessibilityId_sessionRecoveryPassword">Recovery password</string>
|
||||||
<string name="AccessibilityId_recovery_password_container">Recovery password container</string>
|
<string name="AccessibilityId_sessionRecoveryPasswordContainer">Recovery password container</string>
|
||||||
<string name="AccessibilityId_recovery_password_menu_item">Recovery password menu item</string>
|
<string name="AccessibilityId_sessionRecoveryPasswordMenuItem">Recovery password menu item</string>
|
||||||
<string name="AccessibilityId_view_qr_code">View QR code</string>
|
<string name="AccessibilityId_qrView">View QR code</string>
|
||||||
<string name="AccessibilityId_fast_mode_notifications_button">Fast mode notifications button</string>
|
<string name="AccessibilityId_notificationsFastMode">Fast mode notifications button</string>
|
||||||
<string name="AccessibilityId_slow_mode_notifications_button">Slow mode notifications button</string>
|
<string name="AccessibilityId_notificationsSlowMode">Slow mode notifications button</string>
|
||||||
<string name="AccessibilityId_loading_animation">Loading animation</string>
|
<string name="AccessibilityId_loadAccountProgressMessage">Loading animation</string>
|
||||||
<string name="AccessibilityId_create_account_button">Create account button</string>
|
<string name="AccessibilityId_onboardingAccountCreate">Create account button</string>
|
||||||
<string name="AccessibilityId_restore_account_button">Restore your session button</string>
|
<string name="AccessibilityId_onboardingAccountExists">Restore your session button</string>
|
||||||
<string name="AccessibilityId_open_url">Open URL</string>
|
<string name="AccessibilityId_urlOpenBrowser">Open URL</string>
|
||||||
<string name="AccessibilityId_terms_of_service_button">Terms of service button</string>
|
<string name="AccessibilityId_onboardingTos">Terms of service button</string>
|
||||||
<string name="AccessibilityId_privacy_policy_button">Privacy policy button</string>
|
<string name="AccessibilityId_onboardingPrivacy">Privacy policy button</string>
|
||||||
<string name="AccessibilityId_recovery_phrase_input">Recovery phrase input</string>
|
<string name="AccessibilityId_recoveryPhrase">Recovery phrase input</string>
|
||||||
<string name="AccessibilityId_reveal_recovery_phrase_button">Reveal recovery phrase button</string>
|
<string name="AccessibilityId_reveal_recovery_phrase_button">Reveal recovery phrase button</string>
|
||||||
<string name="AccessibilityId_help_desk_link">Help desk link</string>
|
<string name="AccessibilityId_help_desk_link">Help desk link</string>
|
||||||
<string name="AccessibilityId_invite_friend_button">Invite friend button</string>
|
<string name="AccessibilityId_invite_friend_button">Invite friend button</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user