diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt
index 09bb72e5a..f254c2a65 100644
--- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt
+++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt
@@ -1,11 +1,14 @@
package com.x8bit.bitwarden.ui.tools.feature.send
+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.Text
@@ -14,10 +17,13 @@ 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.card.BitwardenInfoCalloutCard
+import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/**
@@ -37,32 +43,83 @@ fun SendEmpty(
BitwardenInfoCalloutCard(
text = stringResource(id = R.string.send_disabled_warning),
modifier = Modifier
- .padding(horizontal = 16.dp)
+ .standardHorizontalMargin()
.fillMaxWidth(),
)
}
Spacer(modifier = Modifier.weight(1F))
-
+ Image(
+ painter = rememberVectorPainter(R.drawable.img_send),
+ contentDescription = null,
+ modifier = Modifier
+ .standardHorizontalMargin()
+ .size(100.dp),
+ )
+ Spacer(Modifier.height(24.dp))
Text(
textAlign = TextAlign.Center,
- text = stringResource(id = R.string.no_sends),
- style = BitwardenTheme.typography.bodyMedium,
+ text = stringResource(R.string.send_sensitive_information_safely),
+ style = BitwardenTheme.typography.titleMedium,
+ color = BitwardenTheme.colorScheme.text.primary,
modifier = Modifier
.fillMaxWidth()
- .padding(horizontal = 16.dp),
+ .standardHorizontalMargin(),
+ )
+ Spacer(modifier = Modifier.height(12.dp))
+ Text(
+ textAlign = TextAlign.Center,
+ text = stringResource(
+ R.string.share_files_and_data_securely_with_anyone_on_any_platform,
+ ),
+ style = BitwardenTheme.typography.bodyMedium,
+ color = BitwardenTheme.colorScheme.text.primary,
+ modifier = Modifier
+ .fillMaxWidth()
+ .standardHorizontalMargin(),
)
Spacer(modifier = Modifier.height(24.dp))
- BitwardenFilledTonalButton(
+ BitwardenFilledButtonWithIcon(
onClick = onAddItemClick,
label = stringResource(id = R.string.add_a_send),
- modifier = Modifier
- .fillMaxWidth()
- .padding(horizontal = 16.dp),
+ modifier = Modifier.standardHorizontalMargin(),
+ icon = rememberVectorPainter(R.drawable.ic_plus),
)
Spacer(modifier = Modifier.weight(1F))
Spacer(modifier = Modifier.navigationBarsPadding())
}
}
+
+@Preview(name = "Light mode")
+@Preview(name = "Dark mode", uiMode = Configuration.UI_MODE_NIGHT_YES)
+@Composable
+private fun SendEmpty_preview() {
+ BitwardenTheme {
+ Column(
+ modifier = Modifier.background(BitwardenTheme.colorScheme.background.primary),
+ ) {
+ SendEmpty(
+ policyDisablesSend = false,
+ onAddItemClick = {},
+ )
+ }
+ }
+}
+
+@Preview(name = "Light mode")
+@Preview(name = "Dark mode", uiMode = Configuration.UI_MODE_NIGHT_YES)
+@Composable
+private fun SendEmptyPolicyDisabled_preview() {
+ BitwardenTheme {
+ Column(
+ modifier = Modifier.background(BitwardenTheme.colorScheme.background.primary),
+ ) {
+ SendEmpty(
+ policyDisablesSend = true,
+ onAddItemClick = {},
+ )
+ }
+ }
+}
diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt
index e6e815b75..3185dcd8a 100644
--- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt
+++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt
@@ -57,8 +57,8 @@ fun VaultNoItems(
painter = rememberVectorPainter(id = R.drawable.img_vault_items),
contentDescription = null,
modifier = Modifier
- .size(100.dp)
- .standardHorizontalMargin(),
+ .standardHorizontalMargin()
+ .size(100.dp),
)
Spacer(modifier = Modifier.height(24.dp))
diff --git a/app/src/main/res/drawable-night/img_send.xml b/app/src/main/res/drawable-night/img_send.xml
new file mode 100644
index 000000000..1ccba7660
--- /dev/null
+++ b/app/src/main/res/drawable-night/img_send.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/img_send.xml b/app/src/main/res/drawable/img_send.xml
new file mode 100644
index 000000000..8dec7b8a5
--- /dev/null
+++ b/app/src/main/res/drawable/img_send.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 74b845418..e9ff5351d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -587,7 +587,7 @@ Scanning will happen automatically.
Private notes about this Send.
Deactivate this Send so that no one can access it
There are no Sends in your account.
- Add a Send
+ New send
Copy link
Share link
Send link
@@ -1012,7 +1012,9 @@ Do you want to switch to this account?
Master password hint
Important: Your master password cannot be recovered if you forget it! 12 characters minimum.
Get started
- Save and protect your data
+ Save and protect your data
The vault protects more than just passwords. Store secure logins, IDs, cards and notes securely here.
New login
+ Share files and data securely with anyone, on any platform. Your information will remain end-to-end encrypted while limiting exposure.
+ Send sensitive information, safely
diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendScreenTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendScreenTest.kt
index 480a8c723..5994323fd 100644
--- a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendScreenTest.kt
+++ b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendScreenTest.kt
@@ -16,6 +16,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.data.platform.repository.util.bufferedMutableSharedFlow
@@ -246,7 +247,8 @@ class SendScreenTest : BaseComposeTest() {
it.copy(viewState = SendState.ViewState.Empty)
}
composeTestRule
- .onNodeWithText("Add a Send")
+ .onNodeWithText("New send")
+ .performScrollTo()
.performClick()
verify { viewModel.trySendAction(SendAction.AddSendClick) }
}