mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 17:05:44 +03:00
PM-11175 update to new empty vault screen (#4046)
This commit is contained in:
parent
e7450171cd
commit
49d9a46917
7 changed files with 153 additions and 100 deletions
|
@ -72,7 +72,7 @@ data class WelcomeState(
|
|||
*/
|
||||
@Parcelize
|
||||
data object CardOne : WelcomeCard() {
|
||||
override val imageRes: Int get() = R.drawable.welcome_1
|
||||
override val imageRes: Int get() = R.drawable.img_vault_items
|
||||
override val titleRes: Int get() = R.string.privacy_prioritized
|
||||
override val messageRes: Int get() = R.string.welcome_message_1
|
||||
}
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
package com.x8bit.bitwarden.ui.vault.feature.vault
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.x8bit.bitwarden.R
|
||||
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
|
||||
import com.x8bit.bitwarden.ui.platform.base.util.standardHorizontalMargin
|
||||
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButtonWithIcon
|
||||
import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText
|
||||
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
|
||||
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
|
||||
|
@ -31,8 +34,9 @@ fun VaultNoItems(
|
|||
addItemClickAction: () -> Unit,
|
||||
policyDisablesSend: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
message: String = stringResource(id = R.string.no_items),
|
||||
buttonText: String = stringResource(id = R.string.add_an_item),
|
||||
headerText: String = stringResource(id = R.string.save_and_protect_your_data),
|
||||
message: String = stringResource(R.string.the_vault_protects_more_than_just_passwords),
|
||||
buttonText: String = stringResource(R.string.new_login),
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier.verticalScroll(rememberScrollState()),
|
||||
|
@ -42,44 +46,86 @@ fun VaultNoItems(
|
|||
BitwardenPolicyWarningText(
|
||||
text = stringResource(id = R.string.send_disabled_warning),
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp)
|
||||
.standardHorizontalMargin()
|
||||
.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.weight(1F))
|
||||
|
||||
Icon(
|
||||
painter = rememberVectorPainter(id = R.drawable.ic_search),
|
||||
Image(
|
||||
painter = rememberVectorPainter(id = R.drawable.img_vault_items),
|
||||
contentDescription = null,
|
||||
tint = BitwardenTheme.colorScheme.icon.primary,
|
||||
modifier = Modifier
|
||||
.size(74.dp)
|
||||
.padding(horizontal = 16.dp),
|
||||
.size(100.dp)
|
||||
.standardHorizontalMargin(),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
Text(
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
.standardHorizontalMargin(),
|
||||
text = headerText,
|
||||
style = BitwardenTheme.typography.titleMedium,
|
||||
color = BitwardenTheme.colorScheme.text.primary,
|
||||
)
|
||||
Spacer(Modifier.height(12.dp))
|
||||
Text(
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
text = message,
|
||||
style = BitwardenTheme.typography.bodyMedium,
|
||||
color = BitwardenTheme.colorScheme.text.primary,
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
BitwardenFilledTonalButton(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
label = buttonText,
|
||||
BitwardenFilledButtonWithIcon(
|
||||
icon = rememberVectorPainter(R.drawable.ic_plus),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
onClick = addItemClickAction,
|
||||
label = buttonText,
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.weight(1F))
|
||||
Spacer(modifier = Modifier.navigationBarsPadding())
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(name = "Light theme")
|
||||
@Preview(name = "Dark theme", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||
@Composable
|
||||
private fun VaultNoItems_preview() {
|
||||
BitwardenTheme {
|
||||
|
||||
Column(
|
||||
modifier = Modifier.background(BitwardenTheme.colorScheme.background.primary),
|
||||
) {
|
||||
VaultNoItems(
|
||||
addItemClickAction = {},
|
||||
policyDisablesSend = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(name = "Light theme")
|
||||
@Preview(name = "Dark theme", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||
@Composable
|
||||
private fun VaultNoItemsPolicyDisabled_preview() {
|
||||
BitwardenTheme {
|
||||
|
||||
Column(
|
||||
modifier = Modifier.background(BitwardenTheme.colorScheme.background.primary),
|
||||
) {
|
||||
VaultNoItems(
|
||||
addItemClickAction = {},
|
||||
policyDisablesSend = true,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
80
app/src/main/res/drawable/img_vault_items.xml
Normal file
80
app/src/main/res/drawable/img_vault_items.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="201dp"
|
||||
android:viewportWidth="200"
|
||||
android:viewportHeight="201">
|
||||
<path
|
||||
android:pathData="M0,38.17C0,31.26 5.6,25.67 12.5,25.67H79.17C86.07,25.67 91.67,31.26 91.67,38.17V79.83C91.67,86.74 86.07,92.33 79.17,92.33H12.5C5.6,92.33 0,86.74 0,79.83V38.17Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M79.17,29.83H12.5C7.9,29.83 4.17,33.56 4.17,38.17V79.83C4.17,84.44 7.9,88.17 12.5,88.17H79.17C83.77,88.17 87.5,84.44 87.5,79.83V38.17C87.5,33.56 83.77,29.83 79.17,29.83ZM12.5,25.67C5.6,25.67 0,31.26 0,38.17V79.83C0,86.74 5.6,92.33 12.5,92.33H79.17C86.07,92.33 91.67,86.74 91.67,79.83V38.17C91.67,31.26 86.07,25.67 79.17,25.67H12.5Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M0,121.5C0,114.6 5.6,109 12.5,109H79.17C86.07,109 91.67,114.6 91.67,121.5V163.17C91.67,170.07 86.07,175.67 79.17,175.67H12.5C5.6,175.67 0,170.07 0,163.17V121.5Z"
|
||||
android:fillColor="#DBE5F6"/>
|
||||
<path
|
||||
android:pathData="M79.17,113.17H12.5C7.9,113.17 4.17,116.9 4.17,121.5V163.17C4.17,167.77 7.9,171.5 12.5,171.5H79.17C83.77,171.5 87.5,167.77 87.5,163.17V121.5C87.5,116.9 83.77,113.17 79.17,113.17ZM12.5,109C5.6,109 0,114.6 0,121.5V163.17C0,170.07 5.6,175.67 12.5,175.67H79.17C86.07,175.67 91.67,170.07 91.67,163.17V121.5C91.67,114.6 86.07,109 79.17,109H12.5Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M108.33,38.17C108.33,31.26 113.93,25.67 120.83,25.67H187.5C194.4,25.67 200,31.26 200,38.17V79.83C200,86.74 194.4,92.33 187.5,92.33H120.83C113.93,92.33 108.33,86.74 108.33,79.83V38.17Z"
|
||||
android:fillColor="#DBE5F6"/>
|
||||
<path
|
||||
android:pathData="M187.5,29.83H120.83C116.23,29.83 112.5,33.56 112.5,38.17V79.83C112.5,84.44 116.23,88.17 120.83,88.17H187.5C192.1,88.17 195.83,84.44 195.83,79.83V38.17C195.83,33.56 192.1,29.83 187.5,29.83ZM120.83,25.67C113.93,25.67 108.33,31.26 108.33,38.17V79.83C108.33,86.74 113.93,92.33 120.83,92.33H187.5C194.4,92.33 200,86.74 200,79.83V38.17C200,31.26 194.4,25.67 187.5,25.67H120.83Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M108.33,121.5C108.33,114.6 113.93,109 120.83,109H187.5C194.4,109 200,114.6 200,121.5V163.17C200,170.07 194.4,175.67 187.5,175.67H120.83C113.93,175.67 108.33,170.07 108.33,163.17V121.5Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M187.5,113.17H120.83C116.23,113.17 112.5,116.9 112.5,121.5V163.17C112.5,167.77 116.23,171.5 120.83,171.5H187.5C192.1,171.5 195.83,167.77 195.83,163.17V121.5C195.83,116.9 192.1,113.17 187.5,113.17ZM120.83,109C113.93,109 108.33,114.6 108.33,121.5V163.17C108.33,170.07 113.93,175.67 120.83,175.67H187.5C194.4,175.67 200,170.07 200,163.17V121.5C200,114.6 194.4,109 187.5,109H120.83Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M112.5,42.33H195.83V50.67H112.5V42.33Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M120.83,73.58C120.83,72.43 121.77,71.5 122.92,71.5H135.42C136.57,71.5 137.5,72.43 137.5,73.58C137.5,74.73 136.57,75.67 135.42,75.67H122.92C121.77,75.67 120.83,74.73 120.83,73.58Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M122.92,127.75C122.92,126.6 123.85,125.67 125,125.67H183.33C184.48,125.67 185.42,126.6 185.42,127.75C185.42,128.9 184.48,129.83 183.33,129.83H125C123.85,129.83 122.92,128.9 122.92,127.75Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M122.92,142.33C122.92,141.18 123.85,140.25 125,140.25H183.33C184.48,140.25 185.42,141.18 185.42,142.33C185.42,143.48 184.48,144.42 183.33,144.42H125C123.85,144.42 122.92,143.48 122.92,142.33Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M122.92,156.92C122.92,155.77 123.85,154.83 125,154.83H152.08C153.23,154.83 154.17,155.77 154.17,156.92C154.17,158.07 153.23,159 152.08,159H125C123.85,159 122.92,158.07 122.92,156.92Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M52.08,127.75C52.08,126.6 53.02,125.67 54.17,125.67H79.17C80.32,125.67 81.25,126.6 81.25,127.75C81.25,128.9 80.32,129.83 79.17,129.83H54.17C53.02,129.83 52.08,128.9 52.08,127.75Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M52.08,136.08C52.08,134.93 53.02,134 54.17,134H64.58C65.73,134 66.67,134.93 66.67,136.08C66.67,137.23 65.73,138.17 64.58,138.17H54.17C53.02,138.17 52.08,137.23 52.08,136.08Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M143.75,73.58C143.75,72.43 144.68,71.5 145.83,71.5H164.58C165.73,71.5 166.67,72.43 166.67,73.58C166.67,74.73 165.73,75.67 164.58,75.67H145.83C144.68,75.67 143.75,74.73 143.75,73.58Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M43.75,130.88C43.75,137.2 38.62,142.33 32.29,142.33C25.96,142.33 20.83,137.2 20.83,130.88C20.83,124.55 25.96,119.42 32.29,119.42C38.62,119.42 43.75,124.55 43.75,130.88Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M32.29,138.17C36.32,138.17 39.58,134.9 39.58,130.88C39.58,126.85 36.32,123.58 32.29,123.58C28.27,123.58 25,126.85 25,130.88C25,134.9 28.27,138.17 32.29,138.17ZM32.29,142.33C38.62,142.33 43.75,137.2 43.75,130.88C43.75,124.55 38.62,119.42 32.29,119.42C25.96,119.42 20.83,124.55 20.83,130.88C20.83,137.2 25.96,142.33 32.29,142.33Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M54.43,154.88C55.63,157.76 56.25,160.05 56.25,163.17C56.25,164.32 55.32,165.25 54.17,165.25H10.42C9.27,165.25 8.33,164.32 8.33,163.17C8.33,160.05 8.95,157.76 10.16,154.88C11.36,152.01 13.13,149.4 15.35,147.19C17.58,144.99 20.22,143.25 23.12,142.05C26.03,140.86 29.15,140.25 32.29,140.25C35.44,140.25 38.55,140.86 41.46,142.05C44.37,143.25 47.01,144.99 49.23,147.19C51.46,149.4 53.22,152.01 54.43,154.88Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M51.95,161.08C51.75,159.61 51.31,158.24 50.58,156.49C49.59,154.13 48.14,151.97 46.3,150.15C44.47,148.34 42.28,146.9 39.88,145.91C37.48,144.92 34.9,144.42 32.29,144.42C29.69,144.42 27.11,144.92 24.7,145.91C22.3,146.9 20.12,148.34 18.28,150.15C16.45,151.97 14.99,154.13 14,156.49C13.27,158.24 12.83,159.61 12.63,161.08H51.95ZM56.25,163.17C56.25,160.05 55.63,157.76 54.43,154.88C53.22,152.01 51.46,149.4 49.23,147.19C47.01,144.99 44.37,143.25 41.46,142.05C38.55,140.86 35.44,140.25 32.29,140.25C29.15,140.25 26.03,140.86 23.12,142.05C20.22,143.25 17.58,144.99 15.35,147.19C13.13,149.4 11.36,152.01 10.16,154.88C8.95,157.76 8.33,160.05 8.33,163.17C8.33,164.32 9.27,165.25 10.42,165.25H54.17C55.32,165.25 56.25,164.32 56.25,163.17Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M29.17,79.83C36.88,79.83 43.61,75.64 47.21,69.42H50.36C51.46,69.42 52.52,68.98 53.3,68.2L56.25,65.25L60.16,68.38C60.92,68.98 62,68.98 62.76,68.38L66.67,65.25L69.61,68.2C70.39,68.98 71.45,69.42 72.56,69.42H75.08C76.35,69.42 77.54,68.84 78.33,67.85L84.38,60.3C84.98,59.54 84.98,58.46 84.38,57.7L78.33,50.15C77.54,49.16 76.35,48.58 75.08,48.58H47.21C43.61,42.36 36.88,38.17 29.17,38.17C17.66,38.17 8.33,47.49 8.33,59C8.33,70.51 17.66,79.83 29.17,79.83ZM25,63.17C27.3,63.17 29.17,61.3 29.17,59C29.17,56.7 27.3,54.83 25,54.83C22.7,54.83 20.83,56.7 20.83,59C20.83,61.3 22.7,63.17 25,63.17Z"
|
||||
android:fillColor="#FFBF00"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M44.81,65.25H50.36L55.94,59.67L61.46,64.08L66.98,59.67L72.56,65.25L75.08,65.25L80.08,59L75.08,52.75L44.81,52.75L43.61,50.67C40.72,45.68 35.33,42.33 29.17,42.33C19.96,42.33 12.5,49.8 12.5,59C12.5,68.2 19.96,75.67 29.17,75.67C35.33,75.67 40.72,72.32 43.61,67.33L44.81,65.25ZM81.12,57.7L81.12,57.7L81.12,57.7ZM33.33,59C33.33,63.6 29.6,67.33 25,67.33C20.4,67.33 16.67,63.6 16.67,59C16.67,54.4 20.4,50.67 25,50.67C29.6,50.67 33.33,54.4 33.33,59ZM47.21,69.42C43.61,75.64 36.88,79.83 29.17,79.83C17.66,79.83 8.33,70.51 8.33,59C8.33,47.49 17.66,38.17 29.17,38.17C36.88,38.17 43.61,42.36 47.21,48.58H75.08C76.35,48.58 77.54,49.16 78.33,50.15L84.38,57.7C84.98,58.46 84.98,59.54 84.38,60.3L78.33,67.85C77.54,68.84 76.35,69.42 75.08,69.42H72.56C71.45,69.42 70.39,68.98 69.61,68.2L66.67,65.25L62.76,68.38C62,68.98 60.92,68.98 60.16,68.38L56.25,65.25L53.3,68.2C52.52,68.98 51.46,69.42 50.36,69.42H47.21ZM29.17,59C29.17,61.3 27.3,63.17 25,63.17C22.7,63.17 20.83,61.3 20.83,59C20.83,56.7 22.7,54.83 25,54.83C27.3,54.83 29.17,56.7 29.17,59Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
|
@ -1,80 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="152dp"
|
||||
android:height="152dp"
|
||||
android:viewportWidth="152"
|
||||
android:viewportHeight="152">
|
||||
<path
|
||||
android:pathData="M0,28.5C0,23.25 4.25,19 9.5,19H60.17C65.41,19 69.67,23.25 69.67,28.5V60.17C69.67,65.41 65.41,69.67 60.17,69.67H9.5C4.25,69.67 0,65.41 0,60.17V28.5Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M60.17,22.17H9.5C6,22.17 3.17,25 3.17,28.5V60.17C3.17,63.66 6,66.5 9.5,66.5H60.17C63.66,66.5 66.5,63.66 66.5,60.17V28.5C66.5,25 63.66,22.17 60.17,22.17ZM9.5,19C4.25,19 0,23.25 0,28.5V60.17C0,65.41 4.25,69.67 9.5,69.67H60.17C65.41,69.67 69.67,65.41 69.67,60.17V28.5C69.67,23.25 65.41,19 60.17,19H9.5Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M0,91.83C0,86.59 4.25,82.33 9.5,82.33H60.17C65.41,82.33 69.67,86.59 69.67,91.83V123.5C69.67,128.75 65.41,133 60.17,133H9.5C4.25,133 0,128.75 0,123.5V91.83Z"
|
||||
android:fillColor="#DBE5F6"/>
|
||||
<path
|
||||
android:pathData="M60.17,85.5H9.5C6,85.5 3.17,88.34 3.17,91.83V123.5C3.17,127 6,129.83 9.5,129.83H60.17C63.66,129.83 66.5,127 66.5,123.5V91.83C66.5,88.34 63.66,85.5 60.17,85.5ZM9.5,82.33C4.25,82.33 0,86.59 0,91.83V123.5C0,128.75 4.25,133 9.5,133H60.17C65.41,133 69.67,128.75 69.67,123.5V91.83C69.67,86.59 65.41,82.33 60.17,82.33H9.5Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M82.33,28.5C82.33,23.25 86.59,19 91.83,19H142.5C147.75,19 152,23.25 152,28.5V60.17C152,65.41 147.75,69.67 142.5,69.67H91.83C86.59,69.67 82.33,65.41 82.33,60.17V28.5Z"
|
||||
android:fillColor="#DBE5F6"/>
|
||||
<path
|
||||
android:pathData="M142.5,22.17H91.83C88.34,22.17 85.5,25 85.5,28.5V60.17C85.5,63.66 88.34,66.5 91.83,66.5H142.5C146,66.5 148.83,63.66 148.83,60.17V28.5C148.83,25 146,22.17 142.5,22.17ZM91.83,19C86.59,19 82.33,23.25 82.33,28.5V60.17C82.33,65.41 86.59,69.67 91.83,69.67H142.5C147.75,69.67 152,65.41 152,60.17V28.5C152,23.25 147.75,19 142.5,19H91.83Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M82.33,91.83C82.33,86.59 86.59,82.33 91.83,82.33H142.5C147.75,82.33 152,86.59 152,91.83V123.5C152,128.75 147.75,133 142.5,133H91.83C86.59,133 82.33,128.75 82.33,123.5V91.83Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M142.5,85.5H91.83C88.34,85.5 85.5,88.34 85.5,91.83V123.5C85.5,127 88.34,129.83 91.83,129.83H142.5C146,129.83 148.83,127 148.83,123.5V91.83C148.83,88.34 146,85.5 142.5,85.5ZM91.83,82.33C86.59,82.33 82.33,86.59 82.33,91.83V123.5C82.33,128.75 86.59,133 91.83,133H142.5C147.75,133 152,128.75 152,123.5V91.83C152,86.59 147.75,82.33 142.5,82.33H91.83Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M85.5,31.67H148.83V38H85.5V31.67Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M91.83,55.42C91.83,54.54 92.54,53.83 93.42,53.83H102.92C103.79,53.83 104.5,54.54 104.5,55.42C104.5,56.29 103.79,57 102.92,57H93.42C92.54,57 91.83,56.29 91.83,55.42Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M93.42,96.58C93.42,95.71 94.12,95 95,95H139.33C140.21,95 140.92,95.71 140.92,96.58C140.92,97.46 140.21,98.17 139.33,98.17H95C94.12,98.17 93.42,97.46 93.42,96.58Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M93.42,107.67C93.42,106.79 94.12,106.08 95,106.08H139.33C140.21,106.08 140.92,106.79 140.92,107.67C140.92,108.54 140.21,109.25 139.33,109.25H95C94.12,109.25 93.42,108.54 93.42,107.67Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M93.42,118.75C93.42,117.88 94.12,117.17 95,117.17H115.58C116.46,117.17 117.17,117.88 117.17,118.75C117.17,119.62 116.46,120.33 115.58,120.33H95C94.12,120.33 93.42,119.62 93.42,118.75Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M39.58,96.58C39.58,95.71 40.29,95 41.17,95H60.17C61.04,95 61.75,95.71 61.75,96.58C61.75,97.46 61.04,98.17 60.17,98.17H41.17C40.29,98.17 39.58,97.46 39.58,96.58Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M39.58,102.92C39.58,102.04 40.29,101.33 41.17,101.33H49.08C49.96,101.33 50.67,102.04 50.67,102.92C50.67,103.79 49.96,104.5 49.08,104.5H41.17C40.29,104.5 39.58,103.79 39.58,102.92Z"
|
||||
android:fillColor="#020F66"/>
|
||||
<path
|
||||
android:pathData="M109.25,55.42C109.25,54.54 109.96,53.83 110.83,53.83H125.08C125.96,53.83 126.67,54.54 126.67,55.42C126.67,56.29 125.96,57 125.08,57H110.83C109.96,57 109.25,56.29 109.25,55.42Z"
|
||||
android:fillColor="#AAC3EF"/>
|
||||
<path
|
||||
android:pathData="M33.25,98.96C33.25,103.77 29.35,107.67 24.54,107.67C19.73,107.67 15.83,103.77 15.83,98.96C15.83,94.15 19.73,90.25 24.54,90.25C29.35,90.25 33.25,94.15 33.25,98.96Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M24.54,104.5C27.6,104.5 30.08,102.02 30.08,98.96C30.08,95.9 27.6,93.42 24.54,93.42C21.48,93.42 19,95.9 19,98.96C19,102.02 21.48,104.5 24.54,104.5ZM24.54,107.67C29.35,107.67 33.25,103.77 33.25,98.96C33.25,94.15 29.35,90.25 24.54,90.25C19.73,90.25 15.83,94.15 15.83,98.96C15.83,103.77 19.73,107.67 24.54,107.67Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M41.36,117.21C42.28,119.39 42.75,121.13 42.75,123.5C42.75,124.38 42.04,125.08 41.17,125.08H7.92C7.04,125.08 6.33,124.38 6.33,123.5C6.33,121.13 6.8,119.39 7.72,117.21C8.64,115.02 9.98,113.03 11.67,111.36C13.36,109.69 15.37,108.36 17.57,107.46C19.78,106.55 22.15,106.08 24.54,106.08C26.93,106.08 29.3,106.55 31.51,107.46C33.72,108.36 35.73,109.69 37.42,111.36C39.11,113.03 40.45,115.02 41.36,117.21Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M39.48,121.92C39.33,120.8 39,119.76 38.44,118.43C37.69,116.63 36.59,114.99 35.19,113.61C33.79,112.23 32.14,111.13 30.31,110.39C28.48,109.64 26.52,109.25 24.54,109.25C22.56,109.25 20.6,109.64 18.78,110.39C16.95,111.13 15.29,112.23 13.89,113.61C12.5,114.99 11.39,116.63 10.64,118.43C10.09,119.76 9.75,120.8 9.6,121.92H39.48ZM42.75,123.5C42.75,121.13 42.28,119.39 41.36,117.21C40.45,115.02 39.11,113.03 37.42,111.36C35.73,109.69 33.72,108.36 31.51,107.46C29.3,106.55 26.93,106.08 24.54,106.08C22.15,106.08 19.78,106.55 17.57,107.46C15.37,108.36 13.36,109.69 11.67,111.36C9.98,113.03 8.64,115.02 7.72,117.21C6.8,119.39 6.33,121.13 6.33,123.5C6.33,124.38 7.04,125.08 7.92,125.08H41.17C42.04,125.08 42.75,124.38 42.75,123.5Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M22.17,60.17C28.03,60.17 33.14,56.98 35.88,52.25H38.27C39.11,52.25 39.92,51.92 40.51,51.32L42.75,49.08L45.72,51.46C46.3,51.92 47.12,51.92 47.7,51.46L50.67,49.08L52.91,51.32C53.5,51.92 54.31,52.25 55.15,52.25H57.06C58.02,52.25 58.93,51.81 59.53,51.06L64.13,45.32C64.59,44.74 64.59,43.92 64.13,43.34L59.53,37.61C58.93,36.85 58.02,36.42 57.06,36.42H35.88C33.14,31.68 28.03,28.5 22.17,28.5C13.42,28.5 6.33,35.59 6.33,44.33C6.33,53.08 13.42,60.17 22.17,60.17ZM19,47.5C20.75,47.5 22.17,46.08 22.17,44.33C22.17,42.58 20.75,41.17 19,41.17C17.25,41.17 15.83,42.58 15.83,44.33C15.83,46.08 17.25,47.5 19,47.5Z"
|
||||
android:fillColor="#FFBF00"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M34.06,49.08H38.27L42.52,44.84L46.71,48.19L50.9,44.84L55.15,49.08L57.06,49.08L60.86,44.33L57.06,39.58L34.06,39.58L33.14,38C30.95,34.21 26.85,31.67 22.17,31.67C15.17,31.67 9.5,37.34 9.5,44.33C9.5,51.33 15.17,57 22.17,57C26.85,57 30.95,54.46 33.14,50.66L34.06,49.08ZM61.65,43.34L61.65,43.35L61.65,43.34ZM25.33,44.33C25.33,47.83 22.5,50.67 19,50.67C15.5,50.67 12.67,47.83 12.67,44.33C12.67,40.84 15.5,38 19,38C22.5,38 25.33,40.84 25.33,44.33ZM35.88,52.25C33.14,56.98 28.03,60.17 22.17,60.17C13.42,60.17 6.33,53.08 6.33,44.33C6.33,35.59 13.42,28.5 22.17,28.5C28.03,28.5 33.14,31.68 35.88,36.42H57.06C58.02,36.42 58.93,36.85 59.53,37.61L64.13,43.34C64.59,43.92 64.59,44.74 64.13,45.32L59.53,51.06C58.93,51.81 58.02,52.25 57.06,52.25H55.15C54.31,52.25 53.5,51.92 52.91,51.32L50.67,49.08L47.7,51.46C47.12,51.92 46.3,51.92 45.72,51.46L42.75,49.08L40.51,51.32C39.92,51.92 39.11,52.25 38.27,52.25H35.88ZM22.17,44.33C22.17,46.08 20.75,47.5 19,47.5C17.25,47.5 15.83,46.08 15.83,44.33C15.83,42.58 17.25,41.17 19,41.17C20.75,41.17 22.17,42.58 22.17,44.33Z"
|
||||
android:fillColor="#020F66"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
|
@ -1012,4 +1012,7 @@ Do you want to switch to this account?</string>
|
|||
<string name="master_password_hint_not_specified">Master password hint</string>
|
||||
<string name="master_password_important_hint">Important: Your master password cannot be recovered if you forget it! 12 characters minimum.</string>
|
||||
<string name="get_started">Get started</string>
|
||||
<string name="save_and_protect_your_data">Save and protect your data</string>
|
||||
<string name="the_vault_protects_more_than_just_passwords">The vault protects more than just passwords. Store secure logins, IDs, cards and notes securely here.</string>
|
||||
<string name="new_login">New login</string>
|
||||
</resources>
|
||||
|
|
|
@ -14,6 +14,7 @@ import androidx.compose.ui.test.onAllNodesWithText
|
|||
import androidx.compose.ui.test.onNodeWithContentDescription
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.compose.ui.test.performScrollTo
|
||||
import androidx.compose.ui.test.performScrollToNode
|
||||
import androidx.core.net.toUri
|
||||
import com.x8bit.bitwarden.R
|
||||
|
@ -636,7 +637,10 @@ class VaultScreenTest : BaseComposeTest() {
|
|||
@Test
|
||||
fun `add an item button click should send AddItemClick action`() {
|
||||
mutableStateFlow.update { it.copy(viewState = VaultState.ViewState.NoItems) }
|
||||
composeTestRule.onNodeWithText("Add an Item").performClick()
|
||||
composeTestRule
|
||||
.onNodeWithText("New login")
|
||||
.performScrollTo()
|
||||
.performClick()
|
||||
verify { viewModel.trySendAction(VaultAction.AddItemClick) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue