diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt index 1a5001b2c..2c2e9ab70 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt @@ -15,7 +15,6 @@ 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.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -42,6 +41,7 @@ import com.x8bit.bitwarden.ui.platform.components.dialog.BasicDialogState import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenBasicDialog import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenLoadingDialog import com.x8bit.bitwarden.ui.platform.components.dialog.LoadingDialogState +import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularProgressIndicator import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.text.BitwardenClickableText import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter @@ -210,7 +210,7 @@ private fun LoginWithDeviceScreenContent( .align(Alignment.Start), ) { if (state.isResendNotificationLoading) { - CircularProgressIndicator( + BitwardenCircularProgressIndicator( modifier = Modifier .padding(horizontal = 64.dp) .size(size = 16.dp), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenLoadingContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenLoadingContent.kt index de9e18b1b..efff17013 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenLoadingContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenLoadingContent.kt @@ -4,10 +4,10 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.navigationBarsPadding -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularProgressIndicator /** * A Bitwarden-themed, re-usable loading state. @@ -21,7 +21,7 @@ fun BitwardenLoadingContent( verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally, ) { - CircularProgressIndicator() + BitwardenCircularProgressIndicator() Spacer(modifier = Modifier.navigationBarsPadding()) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenLoadingDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenLoadingDialog.kt index fb40ce3a3..cd110f7be 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenLoadingDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenLoadingDialog.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -26,6 +25,7 @@ import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties import com.x8bit.bitwarden.ui.platform.base.util.Text import com.x8bit.bitwarden.ui.platform.base.util.asText +import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularProgressIndicator import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.parcelize.Parcelize @@ -76,7 +76,7 @@ fun BitwardenLoadingDialog( bottom = 8.dp, ), ) - CircularProgressIndicator( + BitwardenCircularProgressIndicator( modifier = Modifier .testTag("AlertProgressIndicator") .padding( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularProgressIndicator.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularProgressIndicator.kt new file mode 100644 index 000000000..05b3c07a6 --- /dev/null +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularProgressIndicator.kt @@ -0,0 +1,15 @@ +package com.x8bit.bitwarden.ui.platform.components.indicator + +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +/** + * A Bitwarden-styled [CircularProgressIndicator]. + */ +@Composable +fun BitwardenCircularProgressIndicator( + modifier: Modifier = Modifier, +) { + CircularProgressIndicator(modifier = modifier) +} diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt index 3b2967105..7d65fa1c2 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -36,6 +35,7 @@ import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar import com.x8bit.bitwarden.ui.platform.components.appbar.action.BitwardenOverflowActionItem import com.x8bit.bitwarden.ui.platform.components.appbar.action.OverflowMenuItemData import com.x8bit.bitwarden.ui.platform.components.divider.BitwardenHorizontalDivider +import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularProgressIndicator import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import kotlinx.collections.immutable.persistentListOf @@ -151,7 +151,7 @@ private fun PasswordHistoryLoading(modifier: Modifier = Modifier) { verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally, ) { - CircularProgressIndicator() + BitwardenCircularProgressIndicator() Spacer(modifier = Modifier.navigationBarsPadding()) } }