mirror of
https://github.com/bitwarden/android.git
synced 2024-11-23 18:06:08 +03:00
PM-12667 Update the names of the the existing icon assets to match with design language (#4040)
This commit is contained in:
parent
3d4c901039
commit
0cb8e369ae
77 changed files with 123 additions and 123 deletions
|
@ -48,7 +48,7 @@ sealed class AutofillCipher {
|
||||||
val number: String,
|
val number: String,
|
||||||
) : AutofillCipher() {
|
) : AutofillCipher() {
|
||||||
override val iconRes: Int
|
override val iconRes: Int
|
||||||
@DrawableRes get() = R.drawable.ic_card_item
|
@DrawableRes get() = R.drawable.ic_payment_card
|
||||||
|
|
||||||
override val isTotpEnabled: Boolean
|
override val isTotpEnabled: Boolean
|
||||||
get() = false
|
get() = false
|
||||||
|
@ -67,6 +67,6 @@ sealed class AutofillCipher {
|
||||||
val username: String,
|
val username: String,
|
||||||
) : AutofillCipher() {
|
) : AutofillCipher() {
|
||||||
override val iconRes: Int
|
override val iconRes: Int
|
||||||
@DrawableRes get() = R.drawable.ic_login_item
|
@DrawableRes get() = R.drawable.ic_globe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ private fun CompleteRegistrationContent(
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
BitwardenActionCardSmall(
|
BitwardenActionCardSmall(
|
||||||
actionIcon = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
actionIcon = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
actionText = stringResource(id = R.string.what_makes_a_password_strong),
|
actionText = stringResource(id = R.string.what_makes_a_password_strong),
|
||||||
callToActionText = stringResource(id = R.string.learn_more),
|
callToActionText = stringResource(id = R.string.learn_more),
|
||||||
onCardClicked = handler.onMakeStrongPassword,
|
onCardClicked = handler.onMakeStrongPassword,
|
||||||
|
|
|
@ -275,7 +275,7 @@ private fun LoginScreenContent(
|
||||||
if (state.shouldShowLoginWithDevice) {
|
if (state.shouldShowLoginWithDevice) {
|
||||||
BitwardenOutlinedButtonWithIcon(
|
BitwardenOutlinedButtonWithIcon(
|
||||||
label = stringResource(id = R.string.log_in_with_device),
|
label = stringResource(id = R.string.log_in_with_device),
|
||||||
icon = rememberVectorPainter(id = R.drawable.ic_device),
|
icon = rememberVectorPainter(id = R.drawable.ic_mobile),
|
||||||
onClick = onLoginWithDeviceClick,
|
onClick = onLoginWithDeviceClick,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.testTag("LogInWithAnotherDeviceButton")
|
.testTag("LogInWithAnotherDeviceButton")
|
||||||
|
|
|
@ -168,7 +168,7 @@ private fun TryGeneratorCard(
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
trailingContent = {
|
trailingContent = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_navigate_next),
|
painter = rememberVectorPainter(id = R.drawable.ic_chevron_right),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
@ -131,7 +131,7 @@ private fun NeverLoseAccessContent(
|
||||||
AccountRecoveryTipRow(
|
AccountRecoveryTipRow(
|
||||||
title = stringResource(R.string.write_your_password_down),
|
title = stringResource(R.string.write_your_password_down),
|
||||||
description = stringResource(R.string.keep_it_secret_keep_it_safe),
|
description = stringResource(R.string.keep_it_secret_keep_it_safe),
|
||||||
icon = rememberVectorPainter(id = R.drawable.ic_edit),
|
icon = rememberVectorPainter(id = R.drawable.ic_pencil),
|
||||||
modifier = Modifier.padding(horizontal = 16.dp),
|
modifier = Modifier.padding(horizontal = 16.dp),
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
|
@ -264,7 +264,7 @@ private fun StartRegistrationContent(
|
||||||
)
|
)
|
||||||
if (isNewOnboardingUiEnabled) {
|
if (isNewOnboardingUiEnabled) {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip_small,
|
vectorIconRes = R.drawable.ic_question_circle_small,
|
||||||
contentDescription = stringResource(R.string.help_with_server_geolocations),
|
contentDescription = stringResource(R.string.help_with_server_geolocations),
|
||||||
onClick = handler.onServerGeologyHelpClick,
|
onClick = handler.onServerGeologyHelpClick,
|
||||||
contentColor = BitwardenTheme.colorScheme.icon.secondary,
|
contentColor = BitwardenTheme.colorScheme.icon.secondary,
|
||||||
|
|
|
@ -67,7 +67,7 @@ private fun BitwardenMediumTopAppBar_preview() {
|
||||||
),
|
),
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_more,
|
vectorIconRes = R.drawable.ic_ellipsis_vertical,
|
||||||
contentDescription = "",
|
contentDescription = "",
|
||||||
onClick = { },
|
onClick = { },
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,7 +52,7 @@ fun BitwardenOverflowActionItem(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
) {
|
) {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_more,
|
vectorIconRes = R.drawable.ic_ellipsis_vertical,
|
||||||
contentDescription = stringResource(id = R.string.more),
|
contentDescription = stringResource(id = R.string.more),
|
||||||
onClick = { isOverflowMenuVisible = !isOverflowMenuVisible },
|
onClick = { isOverflowMenuVisible = !isOverflowMenuVisible },
|
||||||
modifier = Modifier.testTag(tag = "HeaderBarOptionsButton"),
|
modifier = Modifier.testTag(tag = "HeaderBarOptionsButton"),
|
||||||
|
|
|
@ -64,7 +64,7 @@ private fun BitwardenFilledButtonWithIcon_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
BitwardenFilledButtonWithIcon(
|
BitwardenFilledButtonWithIcon(
|
||||||
label = "Test Button",
|
label = "Test Button",
|
||||||
icon = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
icon = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
onClick = {},
|
onClick = {},
|
||||||
isEnabled = true,
|
isEnabled = true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -47,7 +47,7 @@ fun BitwardenFilledIconButton(
|
||||||
private fun BitwardenFilledIconButton_preview() {
|
private fun BitwardenFilledIconButton_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
BitwardenFilledIconButton(
|
BitwardenFilledIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = "Sample Icon",
|
contentDescription = "Sample Icon",
|
||||||
onClick = {},
|
onClick = {},
|
||||||
)
|
)
|
||||||
|
|
|
@ -62,7 +62,7 @@ private fun BitwardenFilledTonalButtonWithIcon_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
BitwardenFilledTonalButtonWithIcon(
|
BitwardenFilledTonalButtonWithIcon(
|
||||||
label = "Sample Text",
|
label = "Sample Text",
|
||||||
icon = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
icon = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
onClick = {},
|
onClick = {},
|
||||||
modifier = Modifier.padding(horizontal = 16.dp),
|
modifier = Modifier.padding(horizontal = 16.dp),
|
||||||
)
|
)
|
||||||
|
|
|
@ -78,7 +78,7 @@ fun BitwardenStandardIconButton(
|
||||||
private fun BitwardenStandardIconButton_preview() {
|
private fun BitwardenStandardIconButton_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = "Sample Icon",
|
contentDescription = "Sample Icon",
|
||||||
onClick = {},
|
onClick = {},
|
||||||
)
|
)
|
||||||
|
|
|
@ -109,7 +109,7 @@ private fun ActionCardSmallWithTrailingIcon_preview() {
|
||||||
onCardClicked = {},
|
onCardClicked = {},
|
||||||
trailingContent = {
|
trailingContent = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_navigate_next),
|
painter = rememberVectorPainter(id = R.drawable.ic_chevron_right),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
)
|
)
|
||||||
|
|
|
@ -92,7 +92,7 @@ fun BitwardenDateSelectButton(
|
||||||
enabled = shouldShowDialog,
|
enabled = shouldShowDialog,
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_region_select_dropdown),
|
painter = rememberVectorPainter(id = R.drawable.ic_down_triangle),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
)
|
)
|
||||||
|
|
|
@ -77,7 +77,7 @@ fun BitwardenTimeSelectButton(
|
||||||
enabled = shouldShowDialog,
|
enabled = shouldShowDialog,
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_region_select_dropdown),
|
painter = rememberVectorPainter(id = R.drawable.ic_down_triangle),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
)
|
)
|
||||||
|
|
|
@ -111,7 +111,7 @@ fun BitwardenMultiSelectButton(
|
||||||
tooltip?.let {
|
tooltip?.let {
|
||||||
Spacer(modifier = Modifier.width(3.dp))
|
Spacer(modifier = Modifier.width(3.dp))
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip_small,
|
vectorIconRes = R.drawable.ic_question_circle_small,
|
||||||
contentDescription = it.contentDescription,
|
contentDescription = it.contentDescription,
|
||||||
onClick = it.onClick,
|
onClick = it.onClick,
|
||||||
isEnabled = isEnabled,
|
isEnabled = isEnabled,
|
||||||
|
@ -126,7 +126,7 @@ fun BitwardenMultiSelectButton(
|
||||||
enabled = shouldShowDialog,
|
enabled = shouldShowDialog,
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_region_select_dropdown),
|
painter = rememberVectorPainter(id = R.drawable.ic_down_triangle),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
)
|
)
|
||||||
|
|
|
@ -83,7 +83,7 @@ fun EnvironmentSelector(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_region_select_dropdown),
|
painter = rememberVectorPainter(id = R.drawable.ic_down_triangle),
|
||||||
contentDescription = stringResource(id = R.string.region),
|
contentDescription = stringResource(id = R.string.region),
|
||||||
tint = BitwardenTheme.colorScheme.icon.secondary,
|
tint = BitwardenTheme.colorScheme.icon.secondary,
|
||||||
)
|
)
|
||||||
|
|
|
@ -103,9 +103,9 @@ fun BitwardenPasswordField(
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
modifier = Modifier.semantics { showPasswordTestTag?.let { testTag = it } },
|
modifier = Modifier.semantics { showPasswordTestTag?.let { testTag = it } },
|
||||||
vectorIconRes = if (showPassword) {
|
vectorIconRes = if (showPassword) {
|
||||||
R.drawable.ic_visibility_off
|
R.drawable.ic_eye_slash
|
||||||
} else {
|
} else {
|
||||||
R.drawable.ic_visibility
|
R.drawable.ic_eye
|
||||||
},
|
},
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = if (showPassword) R.string.hide else R.string.show,
|
id = if (showPassword) R.string.hide else R.string.show,
|
||||||
|
|
|
@ -98,7 +98,7 @@ private fun BitwardenTextFieldWithActions_preview() {
|
||||||
onValueChange = {},
|
onValueChange = {},
|
||||||
actions = {
|
actions = {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
painter = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
contentDescription = "Action 1",
|
contentDescription = "Action 1",
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
|
|
|
@ -91,7 +91,7 @@ fun BitwardenGroupItem(
|
||||||
)
|
)
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_navigate_next),
|
painter = rememberVectorPainter(id = R.drawable.ic_chevron_right),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -108,7 +108,7 @@ private fun BitwardenGroupItem_preview() {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
label = "Sample Label",
|
label = "Sample Label",
|
||||||
supportingLabel = "5",
|
supportingLabel = "5",
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_send_text),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_file_text),
|
||||||
startIconTestTag = "Test Tag",
|
startIconTestTag = "Test Tag",
|
||||||
onClick = {},
|
onClick = {},
|
||||||
)
|
)
|
||||||
|
|
|
@ -152,7 +152,7 @@ fun BitwardenListItem(
|
||||||
|
|
||||||
if (selectionDataList.isNotEmpty()) {
|
if (selectionDataList.isNotEmpty()) {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_more_horizontal,
|
vectorIconRes = R.drawable.ic_ellipsis_horizontal,
|
||||||
contentDescription = stringResource(id = R.string.options),
|
contentDescription = stringResource(id = R.string.options),
|
||||||
onClick = { shouldShowDialog = true },
|
onClick = { shouldShowDialog = true },
|
||||||
modifier = Modifier.semantics { optionsTestTag?.let { testTag = it } },
|
modifier = Modifier.semantics { optionsTestTag?.let { testTag = it } },
|
||||||
|
@ -196,7 +196,7 @@ private fun BitwardenListItem_preview() {
|
||||||
BitwardenListItem(
|
BitwardenListItem(
|
||||||
label = "Sample Label",
|
label = "Sample Label",
|
||||||
supportingLabel = "Jan 3, 2024, 10:35 AM",
|
supportingLabel = "Jan 3, 2024, 10:35 AM",
|
||||||
startIcon = IconData.Local(R.drawable.ic_send_text),
|
startIcon = IconData.Local(R.drawable.ic_file_text),
|
||||||
onClick = {},
|
onClick = {},
|
||||||
selectionDataList = persistentListOf(),
|
selectionDataList = persistentListOf(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -44,12 +44,12 @@ private fun BitwardenRowOfIconButtons_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
BitwardenRowOfActions {
|
BitwardenRowOfActions {
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
painter = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
contentDescription = "Icon 1",
|
contentDescription = "Icon 1",
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_tooltip),
|
painter = rememberVectorPainter(id = R.drawable.ic_question_circle),
|
||||||
contentDescription = "Icon 2",
|
contentDescription = "Icon 2",
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
)
|
)
|
||||||
|
|
|
@ -77,7 +77,7 @@ private fun BitwardenSwitchWithActions_preview() {
|
||||||
onCheckedChange = {},
|
onCheckedChange = {},
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = R.string.master_password_re_prompt_help,
|
id = R.string.master_password_re_prompt_help,
|
||||||
),
|
),
|
||||||
|
|
|
@ -243,10 +243,10 @@ private fun CipherView.toIconData(
|
||||||
@get:DrawableRes
|
@get:DrawableRes
|
||||||
private val CipherType.iconRes: Int
|
private val CipherType.iconRes: Int
|
||||||
get() = when (this) {
|
get() = when (this) {
|
||||||
CipherType.LOGIN -> R.drawable.ic_login_item
|
CipherType.LOGIN -> R.drawable.ic_globe
|
||||||
CipherType.SECURE_NOTE -> R.drawable.ic_secure_note_item
|
CipherType.SECURE_NOTE -> R.drawable.ic_note
|
||||||
CipherType.CARD -> R.drawable.ic_card_item
|
CipherType.CARD -> R.drawable.ic_payment_card
|
||||||
CipherType.IDENTITY -> R.drawable.ic_identity_item
|
CipherType.IDENTITY -> R.drawable.ic_id_card
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -351,8 +351,8 @@ private fun SendView.toDisplayItem(
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(
|
iconData = IconData.Local(
|
||||||
iconRes = when (type) {
|
iconRes = when (type) {
|
||||||
SendType.TEXT -> R.drawable.ic_send_text
|
SendType.TEXT -> R.drawable.ic_file_text
|
||||||
SendType.FILE -> R.drawable.ic_send_file
|
SendType.FILE -> R.drawable.ic_file
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
extraIconList = toLabelIcons(clock = clock),
|
extraIconList = toLabelIcons(clock = clock),
|
||||||
|
|
|
@ -161,7 +161,7 @@ private fun TrailingContent(
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
}
|
}
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_navigate_next),
|
painter = rememberVectorPainter(id = R.drawable.ic_chevron_right),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
@ -287,7 +287,7 @@ private fun BlockAutoFillListItem(
|
||||||
color = BitwardenTheme.colorScheme.text.primary,
|
color = BitwardenTheme.colorScheme.text.primary,
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_edit_alt),
|
painter = rememberVectorPainter(id = R.drawable.ic_pencil_square),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
|
|
|
@ -59,7 +59,7 @@ fun SendContent(
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
label = stringResource(id = R.string.type_text),
|
label = stringResource(id = R.string.type_text),
|
||||||
supportingLabel = state.textTypeCount.toString(),
|
supportingLabel = state.textTypeCount.toString(),
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_send_text),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_file_text),
|
||||||
onClick = sendHandlers.onTextTypeClick,
|
onClick = sendHandlers.onTextTypeClick,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
@ -72,7 +72,7 @@ fun SendContent(
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
label = stringResource(id = R.string.type_file),
|
label = stringResource(id = R.string.type_file),
|
||||||
supportingLabel = state.fileTypeCount.toString(),
|
supportingLabel = state.fileTypeCount.toString(),
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_send_file),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_file),
|
||||||
onClick = sendHandlers.onFileTypeClick,
|
onClick = sendHandlers.onFileTypeClick,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
|
|
@ -124,7 +124,7 @@ private fun SendListItem_preview() {
|
||||||
SendListItem(
|
SendListItem(
|
||||||
label = "Sample Label",
|
label = "Sample Label",
|
||||||
supportingLabel = "Jan 3, 2024, 10:35 AM",
|
supportingLabel = "Jan 3, 2024, 10:35 AM",
|
||||||
startIcon = IconData.Local(R.drawable.ic_send_text),
|
startIcon = IconData.Local(R.drawable.ic_file_text),
|
||||||
trailingLabelIcons = persistentListOf(),
|
trailingLabelIcons = persistentListOf(),
|
||||||
showMoreOptions = true,
|
showMoreOptions = true,
|
||||||
onClick = {},
|
onClick = {},
|
||||||
|
|
|
@ -386,8 +386,8 @@ data class SendState(
|
||||||
* Indicates the type of send this, a text or file.
|
* Indicates the type of send this, a text or file.
|
||||||
*/
|
*/
|
||||||
enum class Type(@DrawableRes val iconRes: Int) {
|
enum class Type(@DrawableRes val iconRes: Int) {
|
||||||
FILE(iconRes = R.drawable.ic_send_file),
|
FILE(iconRes = R.drawable.ic_file),
|
||||||
TEXT(iconRes = R.drawable.ic_send_text),
|
TEXT(iconRes = R.drawable.ic_file_text),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,9 +315,9 @@ private fun AddSendOptions(
|
||||||
Icon(
|
Icon(
|
||||||
painter = rememberVectorPainter(
|
painter = rememberVectorPainter(
|
||||||
if (isExpanded) {
|
if (isExpanded) {
|
||||||
R.drawable.ic_expand_up
|
R.drawable.ic_chevron_up
|
||||||
} else {
|
} else {
|
||||||
R.drawable.ic_expand_down
|
R.drawable.ic_chevron_down
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
|
|
|
@ -19,7 +19,7 @@ enum class SendStatusIcon(
|
||||||
testTag = "DisabledSendIcon",
|
testTag = "DisabledSendIcon",
|
||||||
),
|
),
|
||||||
PASSWORD(
|
PASSWORD(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
testTag = "PasswordProtectedSendIcon",
|
testTag = "PasswordProtectedSendIcon",
|
||||||
),
|
),
|
||||||
|
|
|
@ -224,7 +224,7 @@ fun LazyListScope.vaultAddEditCardItems(
|
||||||
.padding(horizontal = 16.dp),
|
.padding(horizontal = 16.dp),
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = R.string.master_password_re_prompt_help,
|
id = R.string.master_password_re_prompt_help,
|
||||||
),
|
),
|
||||||
|
|
|
@ -325,7 +325,7 @@ fun LazyListScope.vaultAddEditIdentityItems(
|
||||||
.padding(horizontal = 16.dp),
|
.padding(horizontal = 16.dp),
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = R.string.master_password_re_prompt_help,
|
id = R.string.master_password_re_prompt_help,
|
||||||
),
|
),
|
||||||
|
|
|
@ -246,7 +246,7 @@ fun LazyListScope.vaultAddEditLoginItems(
|
||||||
.padding(horizontal = 16.dp),
|
.padding(horizontal = 16.dp),
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = R.string.master_password_re_prompt_help,
|
id = R.string.master_password_re_prompt_help,
|
||||||
),
|
),
|
||||||
|
|
|
@ -104,7 +104,7 @@ fun LazyListScope.vaultAddEditSecureNotesItems(
|
||||||
.padding(horizontal = 16.dp),
|
.padding(horizontal = 16.dp),
|
||||||
actions = {
|
actions = {
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_tooltip,
|
vectorIconRes = R.drawable.ic_question_circle,
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
id = R.string.master_password_re_prompt_help,
|
id = R.string.master_password_re_prompt_help,
|
||||||
),
|
),
|
||||||
|
|
|
@ -241,7 +241,7 @@ fun VaultItemScreen(
|
||||||
onClick = remember(viewModel) {
|
onClick = remember(viewModel) {
|
||||||
{ viewModel.trySendAction(VaultItemAction.Common.EditClick) }
|
{ viewModel.trySendAction(VaultItemAction.Common.EditClick) }
|
||||||
},
|
},
|
||||||
painter = rememberVectorPainter(id = R.drawable.ic_edit),
|
painter = rememberVectorPainter(id = R.drawable.ic_pencil),
|
||||||
contentDescription = stringResource(id = R.string.edit_item),
|
contentDescription = stringResource(id = R.string.edit_item),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.testTag(tag = "EditItemButton")
|
.testTag(tag = "EditItemButton")
|
||||||
|
|
|
@ -128,7 +128,7 @@ fun VaultItemListingContent(
|
||||||
|
|
||||||
items(state.displayCollectionList) { collection ->
|
items(state.displayCollectionList) { collection ->
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_collection),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_collections),
|
||||||
label = collection.name,
|
label = collection.name,
|
||||||
supportingLabel = collection.count.toString(),
|
supportingLabel = collection.count.toString(),
|
||||||
onClick = { collectionClick(collection.id) },
|
onClick = { collectionClick(collection.id) },
|
||||||
|
|
|
@ -397,8 +397,8 @@ private fun SendView.toDisplayItem(
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(
|
iconData = IconData.Local(
|
||||||
iconRes = when (type) {
|
iconRes = when (type) {
|
||||||
SendType.TEXT -> R.drawable.ic_send_text
|
SendType.TEXT -> R.drawable.ic_file_text
|
||||||
SendType.FILE -> R.drawable.ic_send_file
|
SendType.FILE -> R.drawable.ic_file
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
iconTestTag = null,
|
iconTestTag = null,
|
||||||
|
@ -413,8 +413,8 @@ private fun SendView.toDisplayItem(
|
||||||
@get:DrawableRes
|
@get:DrawableRes
|
||||||
private val CipherType.iconRes: Int
|
private val CipherType.iconRes: Int
|
||||||
get() = when (this) {
|
get() = when (this) {
|
||||||
CipherType.LOGIN -> R.drawable.ic_login_item
|
CipherType.LOGIN -> R.drawable.ic_globe
|
||||||
CipherType.SECURE_NOTE -> R.drawable.ic_secure_note_item
|
CipherType.SECURE_NOTE -> R.drawable.ic_note
|
||||||
CipherType.CARD -> R.drawable.ic_card_item
|
CipherType.CARD -> R.drawable.ic_payment_card
|
||||||
CipherType.IDENTITY -> R.drawable.ic_identity_item
|
CipherType.IDENTITY -> R.drawable.ic_id_card
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ fun VaultContent(
|
||||||
|
|
||||||
item {
|
item {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.access_time),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_clock),
|
||||||
label = stringResource(id = R.string.verification_codes),
|
label = stringResource(id = R.string.verification_codes),
|
||||||
supportingLabel = state.totpItemsCount.toString(),
|
supportingLabel = state.totpItemsCount.toString(),
|
||||||
onClick = vaultHandlers.verificationCodesClick,
|
onClick = vaultHandlers.verificationCodesClick,
|
||||||
|
@ -135,7 +135,7 @@ fun VaultContent(
|
||||||
|
|
||||||
item {
|
item {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_login_item),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_globe),
|
||||||
startIconTestTag = "LoginCipherIcon",
|
startIconTestTag = "LoginCipherIcon",
|
||||||
label = stringResource(id = R.string.type_login),
|
label = stringResource(id = R.string.type_login),
|
||||||
supportingLabel = state.loginItemsCount.toString(),
|
supportingLabel = state.loginItemsCount.toString(),
|
||||||
|
@ -150,7 +150,7 @@ fun VaultContent(
|
||||||
|
|
||||||
item {
|
item {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_card_item),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_payment_card),
|
||||||
startIconTestTag = "CardCipherIcon",
|
startIconTestTag = "CardCipherIcon",
|
||||||
label = stringResource(id = R.string.type_card),
|
label = stringResource(id = R.string.type_card),
|
||||||
supportingLabel = state.cardItemsCount.toString(),
|
supportingLabel = state.cardItemsCount.toString(),
|
||||||
|
@ -165,7 +165,7 @@ fun VaultContent(
|
||||||
|
|
||||||
item {
|
item {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_identity_item),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_id_card),
|
||||||
startIconTestTag = "IdentityCipherIcon",
|
startIconTestTag = "IdentityCipherIcon",
|
||||||
label = stringResource(id = R.string.type_identity),
|
label = stringResource(id = R.string.type_identity),
|
||||||
supportingLabel = state.identityItemsCount.toString(),
|
supportingLabel = state.identityItemsCount.toString(),
|
||||||
|
@ -180,7 +180,7 @@ fun VaultContent(
|
||||||
|
|
||||||
item {
|
item {
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_secure_note_item),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_note),
|
||||||
startIconTestTag = "SecureNoteCipherIcon",
|
startIconTestTag = "SecureNoteCipherIcon",
|
||||||
label = stringResource(id = R.string.type_secure_note),
|
label = stringResource(id = R.string.type_secure_note),
|
||||||
supportingLabel = state.secureNoteItemsCount.toString(),
|
supportingLabel = state.secureNoteItemsCount.toString(),
|
||||||
|
@ -299,7 +299,7 @@ fun VaultContent(
|
||||||
|
|
||||||
items(state.collectionItems) { collection ->
|
items(state.collectionItems) { collection ->
|
||||||
BitwardenGroupItem(
|
BitwardenGroupItem(
|
||||||
startIcon = rememberVectorPainter(id = R.drawable.ic_collection),
|
startIcon = rememberVectorPainter(id = R.drawable.ic_collections),
|
||||||
label = collection.name,
|
label = collection.name,
|
||||||
supportingLabel = collection.itemCount.toString(),
|
supportingLabel = collection.itemCount.toString(),
|
||||||
onClick = { vaultHandlers.collectionClick(collection) },
|
onClick = { vaultHandlers.collectionClick(collection) },
|
||||||
|
|
|
@ -63,7 +63,7 @@ fun VaultEntryListItem(
|
||||||
private fun VaultEntryListItem_preview() {
|
private fun VaultEntryListItem_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
VaultEntryListItem(
|
VaultEntryListItem(
|
||||||
startIcon = IconData.Local(R.drawable.ic_login_item),
|
startIcon = IconData.Local(R.drawable.ic_globe),
|
||||||
startIconTestTag = "Test Tag",
|
startIconTestTag = "Test Tag",
|
||||||
label = "Example Login",
|
label = "Example Login",
|
||||||
supportingLabel = "Username",
|
supportingLabel = "Username",
|
||||||
|
|
|
@ -91,7 +91,7 @@ fun VaultFilter(
|
||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
BitwardenStandardIconButton(
|
BitwardenStandardIconButton(
|
||||||
vectorIconRes = R.drawable.ic_more_horizontal,
|
vectorIconRes = R.drawable.ic_ellipsis_horizontal,
|
||||||
contentDescription = stringResource(id = R.string.filter_by_vault),
|
contentDescription = stringResource(id = R.string.filter_by_vault),
|
||||||
onClick = { shouldShowSelectionDialog = true },
|
onClick = { shouldShowSelectionDialog = true },
|
||||||
modifier = Modifier.testTag(tag = "OpenOrgFilter"),
|
modifier = Modifier.testTag(tag = "OpenOrgFilter"),
|
||||||
|
|
|
@ -819,7 +819,7 @@ data class VaultState(
|
||||||
data class Login(
|
data class Login(
|
||||||
override val id: String,
|
override val id: String,
|
||||||
override val name: Text,
|
override val name: Text,
|
||||||
override val startIcon: IconData = IconData.Local(R.drawable.ic_login_item),
|
override val startIcon: IconData = IconData.Local(R.drawable.ic_globe),
|
||||||
override val startIconTestTag: String = "LoginCipherIcon",
|
override val startIconTestTag: String = "LoginCipherIcon",
|
||||||
override val extraIconList: List<IconRes> = emptyList(),
|
override val extraIconList: List<IconRes> = emptyList(),
|
||||||
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
||||||
|
@ -839,7 +839,7 @@ data class VaultState(
|
||||||
data class Card(
|
data class Card(
|
||||||
override val id: String,
|
override val id: String,
|
||||||
override val name: Text,
|
override val name: Text,
|
||||||
override val startIcon: IconData = IconData.Local(R.drawable.ic_card_item),
|
override val startIcon: IconData = IconData.Local(R.drawable.ic_payment_card),
|
||||||
override val startIconTestTag: String = "CardCipherIcon",
|
override val startIconTestTag: String = "CardCipherIcon",
|
||||||
override val extraIconList: List<IconRes> = emptyList(),
|
override val extraIconList: List<IconRes> = emptyList(),
|
||||||
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
||||||
|
@ -869,7 +869,7 @@ data class VaultState(
|
||||||
data class Identity(
|
data class Identity(
|
||||||
override val id: String,
|
override val id: String,
|
||||||
override val name: Text,
|
override val name: Text,
|
||||||
override val startIcon: IconData = IconData.Local(R.drawable.ic_identity_item),
|
override val startIcon: IconData = IconData.Local(R.drawable.ic_id_card),
|
||||||
override val startIconTestTag: String = "IdentityCipherIcon",
|
override val startIconTestTag: String = "IdentityCipherIcon",
|
||||||
override val extraIconList: List<IconRes> = emptyList(),
|
override val extraIconList: List<IconRes> = emptyList(),
|
||||||
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
||||||
|
@ -887,7 +887,7 @@ data class VaultState(
|
||||||
data class SecureNote(
|
data class SecureNote(
|
||||||
override val id: String,
|
override val id: String,
|
||||||
override val name: Text,
|
override val name: Text,
|
||||||
override val startIcon: IconData = IconData.Local(R.drawable.ic_secure_note_item),
|
override val startIcon: IconData = IconData.Local(R.drawable.ic_note),
|
||||||
override val startIconTestTag: String = "SecureNoteCipherIcon",
|
override val startIconTestTag: String = "SecureNoteCipherIcon",
|
||||||
override val extraIconList: List<IconRes> = emptyList(),
|
override val extraIconList: List<IconRes> = emptyList(),
|
||||||
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
override val overflowOptions: List<ListingItemOverflowAction.VaultAction>,
|
||||||
|
|
|
@ -151,9 +151,9 @@ fun List<LoginUriView>?.toLoginIconData(
|
||||||
usePasskeyDefaultIcon: Boolean,
|
usePasskeyDefaultIcon: Boolean,
|
||||||
): IconData {
|
): IconData {
|
||||||
val defaultIconRes = if (usePasskeyDefaultIcon) {
|
val defaultIconRes = if (usePasskeyDefaultIcon) {
|
||||||
R.drawable.ic_login_item_passkey
|
R.drawable.ic_bw_passkey
|
||||||
} else {
|
} else {
|
||||||
R.drawable.ic_login_item
|
R.drawable.ic_globe
|
||||||
}
|
}
|
||||||
|
|
||||||
var uri = this
|
var uri = this
|
||||||
|
|
|
@ -127,7 +127,7 @@ fun VaultVerificationCodeItem(
|
||||||
private fun VerificationCodeItem_preview() {
|
private fun VerificationCodeItem_preview() {
|
||||||
BitwardenTheme {
|
BitwardenTheme {
|
||||||
VaultVerificationCodeItem(
|
VaultVerificationCodeItem(
|
||||||
startIcon = IconData.Local(R.drawable.ic_login_item),
|
startIcon = IconData.Local(R.drawable.ic_globe),
|
||||||
label = "Sample Label",
|
label = "Sample Label",
|
||||||
supportingLabel = "Supporting Label",
|
supportingLabel = "Supporting Label",
|
||||||
authCode = "1234567890".chunked(3).joinToString(" "),
|
authCode = "1234567890".chunked(3).joinToString(" "),
|
||||||
|
|
|
@ -417,7 +417,7 @@ data class VerificationCodeDisplayItem(
|
||||||
val periodSeconds: Int,
|
val periodSeconds: Int,
|
||||||
val authCode: String,
|
val authCode: String,
|
||||||
val hideAuthCode: Boolean,
|
val hideAuthCode: Boolean,
|
||||||
val startIcon: IconData = IconData.Local(R.drawable.ic_login_item),
|
val startIcon: IconData = IconData.Local(R.drawable.ic_globe),
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,12 +14,12 @@ enum class VaultTrailingIcon(
|
||||||
val testTag: String,
|
val testTag: String,
|
||||||
) {
|
) {
|
||||||
COLLECTION(
|
COLLECTION(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
ATTACHMENT(
|
ATTACHMENT(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
|
|
@ -61,7 +61,7 @@ class InlinePresentationSpecExtensionsTest {
|
||||||
val autofillCipher: AutofillCipher.Card = mockk {
|
val autofillCipher: AutofillCipher.Card = mockk {
|
||||||
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
||||||
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
||||||
every { this@mockk.iconRes } returns R.drawable.ic_card_item
|
every { this@mockk.iconRes } returns R.drawable.ic_payment_card
|
||||||
}
|
}
|
||||||
val pendingIntent: PendingIntent = mockk()
|
val pendingIntent: PendingIntent = mockk()
|
||||||
every {
|
every {
|
||||||
|
@ -94,7 +94,7 @@ class InlinePresentationSpecExtensionsTest {
|
||||||
fun `createCipherInlinePresentationOrNull should return presentation with card icon when card cipher and compatible`() {
|
fun `createCipherInlinePresentationOrNull should return presentation with card icon when card cipher and compatible`() {
|
||||||
// Setup
|
// Setup
|
||||||
val icon: Icon = mockk()
|
val icon: Icon = mockk()
|
||||||
val iconRes = R.drawable.ic_card_item
|
val iconRes = R.drawable.ic_payment_card
|
||||||
val autofillCipher: AutofillCipher.Card = mockk {
|
val autofillCipher: AutofillCipher.Card = mockk {
|
||||||
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
||||||
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
||||||
|
@ -154,11 +154,11 @@ class InlinePresentationSpecExtensionsTest {
|
||||||
ContextCompat.getString(testContext, R.string.type_login)
|
ContextCompat.getString(testContext, R.string.type_login)
|
||||||
} returns LOGIN
|
} returns LOGIN
|
||||||
val icon: Icon = mockk()
|
val icon: Icon = mockk()
|
||||||
val iconRes = R.drawable.ic_login_item
|
val iconRes = R.drawable.ic_globe
|
||||||
val autofillCipher: AutofillCipher.Login = mockk {
|
val autofillCipher: AutofillCipher.Login = mockk {
|
||||||
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
every { this@mockk.name } returns AUTOFILL_CIPHER_NAME
|
||||||
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
every { this@mockk.subtitle } returns AUTOFILL_CIPHER_SUBTITLE
|
||||||
every { this@mockk.iconRes } returns R.drawable.ic_login_item
|
every { this@mockk.iconRes } returns R.drawable.ic_globe
|
||||||
}
|
}
|
||||||
val pendingIntent: PendingIntent = mockk()
|
val pendingIntent: PendingIntent = mockk()
|
||||||
prepareForCompatibleCipherInlinePresentation(
|
prepareForCompatibleCipherInlinePresentation(
|
||||||
|
|
|
@ -26,16 +26,16 @@ fun createMockDisplayItemForCipher(
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item,
|
fallbackIconRes = R.drawable.ic_globe,
|
||||||
),
|
),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -75,15 +75,15 @@ fun createMockDisplayItemForCipher(
|
||||||
titleTestTag = "CipherNameLabel",
|
titleTestTag = "CipherNameLabel",
|
||||||
subtitle = null,
|
subtitle = null,
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_secure_note_item),
|
iconData = IconData.Local(R.drawable.ic_note),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -112,15 +112,15 @@ fun createMockDisplayItemForCipher(
|
||||||
titleTestTag = "CipherNameLabel",
|
titleTestTag = "CipherNameLabel",
|
||||||
subtitle = "mockBrand-$number, *er-$number",
|
subtitle = "mockBrand-$number, *er-$number",
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_card_item),
|
iconData = IconData.Local(R.drawable.ic_payment_card),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -155,15 +155,15 @@ fun createMockDisplayItemForCipher(
|
||||||
titleTestTag = "CipherNameLabel",
|
titleTestTag = "CipherNameLabel",
|
||||||
subtitle = "mockFirstName-${number}mockLastName-$number",
|
subtitle = "mockFirstName-${number}mockLastName-$number",
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_identity_item),
|
iconData = IconData.Local(R.drawable.ic_id_card),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -199,10 +199,10 @@ fun createMockDisplayItemForSend(
|
||||||
titleTestTag = "SendNameLabel",
|
titleTestTag = "SendNameLabel",
|
||||||
subtitle = "Oct 27, 2023, 12:00 PM",
|
subtitle = "Oct 27, 2023, 12:00 PM",
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_send_file),
|
iconData = IconData.Local(R.drawable.ic_file),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
testTag = "PasswordProtectedSendIcon",
|
testTag = "PasswordProtectedSendIcon",
|
||||||
),
|
),
|
||||||
|
@ -237,10 +237,10 @@ fun createMockDisplayItemForSend(
|
||||||
titleTestTag = "SendNameLabel",
|
titleTestTag = "SendNameLabel",
|
||||||
subtitle = "Oct 27, 2023, 12:00 PM",
|
subtitle = "Oct 27, 2023, 12:00 PM",
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_send_text),
|
iconData = IconData.Local(R.drawable.ic_file_text),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
testTag = "PasswordProtectedSendIcon",
|
testTag = "PasswordProtectedSendIcon",
|
||||||
),
|
),
|
||||||
|
|
|
@ -2079,14 +2079,14 @@ private fun createDisplayItem(number: Int): VaultItemListingState.DisplayItem =
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = "mockSubtitle-$number",
|
subtitle = "mockSubtitle-$number",
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_card_item),
|
iconData = IconData.Local(R.drawable.ic_payment_card),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_disabled,
|
iconRes = R.drawable.ic_send_disabled,
|
||||||
contentDescription = R.string.disabled.asText(),
|
contentDescription = R.string.disabled.asText(),
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
|
|
|
@ -1382,7 +1382,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
|
||||||
subtitleTestTag = "PasskeyName",
|
subtitleTestTag = "PasskeyName",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item_passkey,
|
fallbackIconRes = R.drawable.ic_bw_passkey,
|
||||||
),
|
),
|
||||||
isAutofill = true,
|
isAutofill = true,
|
||||||
),
|
),
|
||||||
|
@ -1462,7 +1462,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
|
||||||
subtitleTestTag = "PasskeyName",
|
subtitleTestTag = "PasskeyName",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item_passkey,
|
fallbackIconRes = R.drawable.ic_bw_passkey,
|
||||||
),
|
),
|
||||||
isFido2Creation = true,
|
isFido2Creation = true,
|
||||||
),
|
),
|
||||||
|
|
|
@ -511,7 +511,7 @@ class VaultItemListingDataExtensionsTest {
|
||||||
subtitleTestTag = "PasskeyName",
|
subtitleTestTag = "PasskeyName",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item_passkey,
|
fallbackIconRes = R.drawable.ic_bw_passkey,
|
||||||
),
|
),
|
||||||
isAutofill = true,
|
isAutofill = true,
|
||||||
shouldShowMasterPasswordReprompt = true,
|
shouldShowMasterPasswordReprompt = true,
|
||||||
|
@ -597,7 +597,7 @@ class VaultItemListingDataExtensionsTest {
|
||||||
subtitleTestTag = "PasskeyName",
|
subtitleTestTag = "PasskeyName",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item_passkey,
|
fallbackIconRes = R.drawable.ic_bw_passkey,
|
||||||
),
|
),
|
||||||
isAutofill = true,
|
isAutofill = true,
|
||||||
shouldShowMasterPasswordReprompt = false,
|
shouldShowMasterPasswordReprompt = false,
|
||||||
|
|
|
@ -30,16 +30,16 @@ fun createMockDisplayItemForCipher(
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Network(
|
iconData = IconData.Network(
|
||||||
"https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
"https://vault.bitwarden.com/icons/www.mockuri.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item,
|
fallbackIconRes = R.drawable.ic_globe,
|
||||||
),
|
),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -82,15 +82,15 @@ fun createMockDisplayItemForCipher(
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = subtitle,
|
subtitle = subtitle,
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_secure_note_item),
|
iconData = IconData.Local(R.drawable.ic_note),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -122,15 +122,15 @@ fun createMockDisplayItemForCipher(
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = subtitle,
|
subtitle = subtitle,
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_card_item),
|
iconData = IconData.Local(R.drawable.ic_payment_card),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -168,15 +168,15 @@ fun createMockDisplayItemForCipher(
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = subtitle,
|
subtitle = subtitle,
|
||||||
subtitleTestTag = "CipherSubTitleLabel",
|
subtitleTestTag = "CipherSubTitleLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_identity_item),
|
iconData = IconData.Local(R.drawable.ic_id_card),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_collection,
|
iconRes = R.drawable.ic_collections,
|
||||||
contentDescription = R.string.collections.asText(),
|
contentDescription = R.string.collections.asText(),
|
||||||
testTag = "CipherInCollectionIcon",
|
testTag = "CipherInCollectionIcon",
|
||||||
),
|
),
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_attachment,
|
iconRes = R.drawable.ic_paperclip,
|
||||||
contentDescription = R.string.attachments.asText(),
|
contentDescription = R.string.attachments.asText(),
|
||||||
testTag = "CipherWithAttachmentsIcon",
|
testTag = "CipherWithAttachmentsIcon",
|
||||||
),
|
),
|
||||||
|
@ -215,10 +215,10 @@ fun createMockDisplayItemForSend(
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = "Oct 27, 2023, 12:00 PM",
|
subtitle = "Oct 27, 2023, 12:00 PM",
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_send_file),
|
iconData = IconData.Local(R.drawable.ic_file),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
testTag = "PasswordProtectedSendIcon",
|
testTag = "PasswordProtectedSendIcon",
|
||||||
),
|
),
|
||||||
|
@ -256,10 +256,10 @@ fun createMockDisplayItemForSend(
|
||||||
secondSubtitleTestTag = null,
|
secondSubtitleTestTag = null,
|
||||||
subtitle = "Oct 27, 2023, 12:00 PM",
|
subtitle = "Oct 27, 2023, 12:00 PM",
|
||||||
subtitleTestTag = "SendDateLabel",
|
subtitleTestTag = "SendDateLabel",
|
||||||
iconData = IconData.Local(R.drawable.ic_send_text),
|
iconData = IconData.Local(R.drawable.ic_file_text),
|
||||||
extraIconList = listOf(
|
extraIconList = listOf(
|
||||||
IconRes(
|
IconRes(
|
||||||
iconRes = R.drawable.ic_send_password,
|
iconRes = R.drawable.ic_key,
|
||||||
contentDescription = R.string.password.asText(),
|
contentDescription = R.string.password.asText(),
|
||||||
testTag = "PasswordProtectedSendIcon",
|
testTag = "PasswordProtectedSendIcon",
|
||||||
),
|
),
|
||||||
|
|
|
@ -405,7 +405,7 @@ class VaultDataExtensionsTest {
|
||||||
usePasskeyDefaultIcon = false,
|
usePasskeyDefaultIcon = false,
|
||||||
)
|
)
|
||||||
|
|
||||||
val expected = IconData.Local(iconRes = R.drawable.ic_login_item)
|
val expected = IconData.Local(iconRes = R.drawable.ic_globe)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ class VaultDataExtensionsTest {
|
||||||
usePasskeyDefaultIcon = true,
|
usePasskeyDefaultIcon = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
val expected = IconData.Local(iconRes = R.drawable.ic_login_item_passkey)
|
val expected = IconData.Local(iconRes = R.drawable.ic_bw_passkey)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ class VaultDataExtensionsTest {
|
||||||
usePasskeyDefaultIcon = false,
|
usePasskeyDefaultIcon = false,
|
||||||
)
|
)
|
||||||
|
|
||||||
val expected = IconData.Local(iconRes = R.drawable.ic_login_item)
|
val expected = IconData.Local(iconRes = R.drawable.ic_globe)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
}
|
}
|
||||||
|
@ -467,7 +467,7 @@ class VaultDataExtensionsTest {
|
||||||
usePasskeyDefaultIcon = true,
|
usePasskeyDefaultIcon = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
val expected = IconData.Local(iconRes = R.drawable.ic_login_item_passkey)
|
val expected = IconData.Local(iconRes = R.drawable.ic_bw_passkey)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
}
|
}
|
||||||
|
@ -534,7 +534,7 @@ class VaultDataExtensionsTest {
|
||||||
|
|
||||||
val expected = IconData.Network(
|
val expected = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri1.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri1.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item,
|
fallbackIconRes = R.drawable.ic_globe,
|
||||||
)
|
)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
|
@ -565,7 +565,7 @@ class VaultDataExtensionsTest {
|
||||||
|
|
||||||
val expected = IconData.Network(
|
val expected = IconData.Network(
|
||||||
uri = "https://vault.bitwarden.com/icons/www.mockuri1.com/icon.png",
|
uri = "https://vault.bitwarden.com/icons/www.mockuri1.com/icon.png",
|
||||||
fallbackIconRes = R.drawable.ic_login_item_passkey,
|
fallbackIconRes = R.drawable.ic_bw_passkey,
|
||||||
)
|
)
|
||||||
|
|
||||||
assertEquals(expected, actual)
|
assertEquals(expected, actual)
|
||||||
|
|
Loading…
Reference in a new issue