diff --git a/app/src/main/java/com/brainwallet/navigation/MainNav.kt b/app/src/main/java/com/brainwallet/navigation/MainNav.kt index 79aba049..8e30f3b6 100644 --- a/app/src/main/java/com/brainwallet/navigation/MainNav.kt +++ b/app/src/main/java/com/brainwallet/navigation/MainNav.kt @@ -136,6 +136,4 @@ fun NavGraphBuilder.mainNavGraph( val route: Route.GameHub = navBackStackEntry.toRoute() GameHubScreen(onNavigate = onNavigate) } - - // todo add more composable screens } diff --git a/app/src/main/java/com/brainwallet/ui/bentosections/gamehubbento/GameHubBentoScreen.kt b/app/src/main/java/com/brainwallet/ui/bentosections/gamehubbento/GameHubBentoScreen.kt new file mode 100644 index 00000000..865d40ee --- /dev/null +++ b/app/src/main/java/com/brainwallet/ui/bentosections/gamehubbento/GameHubBentoScreen.kt @@ -0,0 +1,179 @@ +package com.brainwallet.ui.bentosections.gamehubbento + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shadow +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.PreviewLightDark +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.brainwallet.R +import com.brainwallet.ui.theme.BoldenVan +import com.brainwallet.ui.theme.IBMPlexSans +import com.brainwallet.ui.theme.bentoBorderGradient +import com.brainwallet.ui.theme.gameHubBackgroundGradient +import com.brainwallet.ui.theme.gameTaglineGradient +import com.brainwallet.ui.theme.gameTitleGradient + +@Composable +fun GameHubBentoScreen( + modifier: Modifier = Modifier, + onClick: () -> Unit = {} +) { + val gameHubBackground = R.drawable.game_hub_bk + Card( + modifier = modifier.fillMaxWidth(), + shape = RoundedCornerShape(16.dp), + elevation = CardDefaults.cardElevation(defaultElevation = 0.dp), + onClick = onClick + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .weight(1f) + .background(brush = gameHubBackgroundGradient) + .border( + width = 0.7.dp, + brush = bentoBorderGradient, + shape = RoundedCornerShape(16.dp) + ) + ) { + Image( + painter = painterResource(gameHubBackground), + contentDescription = "game_hub_background", + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop + ) + val textWidthRatio = 0.85f + Column( + modifier = Modifier + .padding(start = 16.dp) + .fillMaxHeight(), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.Start + ) { + Box( + modifier = Modifier.fillMaxWidth(textWidthRatio) + .height(44.dp) + ) { + Text( + text = "FALLINMOJI", + style = TextStyle( + fontFamily = BoldenVan, + fontWeight = FontWeight.Normal, + fontSize = 39.sp, + shadow = Shadow( + color = Color.Black.copy(alpha = 0.5f), + offset = Offset(x = 4f, y = 4f), + blurRadius = 4f + ) + ), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(textWidthRatio) + ) + + Text( + text = "FALLINMOJI", + style = TextStyle( + brush = gameTitleGradient, + fontFamily = BoldenVan, + fontWeight = FontWeight.Normal, + fontSize = 39.sp + ), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(textWidthRatio) + ) + } + Box( + modifier = Modifier.fillMaxWidth(textWidthRatio) + .padding(top = 1.dp) + ) { + Text( + text = stringResource(R.string.game_hub_tagline), + style = TextStyle( + fontFamily = IBMPlexSans, + fontWeight = FontWeight.Medium, + fontSize = 13.sp, + shadow = Shadow( + color = Color.Black.copy(alpha = 0.5f), + offset = Offset(x = 4f, y = 4f), + blurRadius = 4f + ) + ), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(textWidthRatio) + ) + Text( + text = stringResource(R.string.game_hub_tagline), + style = TextStyle( + brush = gameTaglineGradient, + fontFamily = IBMPlexSans, + fontWeight = FontWeight.Medium, + fontSize = 13.sp + ), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.fillMaxWidth(textWidthRatio) + ) + } + } + + Column( + modifier = Modifier + .padding(10.dp) + .fillMaxHeight(), + verticalArrangement = Arrangement.Top, + horizontalAlignment = Alignment.Start + ) { + Text( + text = stringResource(R.string.game_hub_label), + color = Color.White, + style = TextStyle( + fontFamily = IBMPlexSans, + fontWeight = FontWeight.Normal, + fontSize = 10.sp + ), + modifier = Modifier.padding(start = 1.dp, end = 1.dp) + .background( + color = Color.White.copy(alpha = 0.2f), + shape = RoundedCornerShape(6.dp) + ).padding(horizontal = 10.dp, vertical = 2.dp) + ) + } + } + } +} + +@PreviewLightDark +@Composable +private fun GameHubBentoScreenPreview() { + Box(modifier = Modifier.height(120.dp)) { + GameHubBentoScreen() + } +} diff --git a/app/src/main/java/com/brainwallet/ui/composable/BentoBottomNavBar.kt b/app/src/main/java/com/brainwallet/ui/composable/BentoBottomNavBar.kt index 234075b8..72b9f983 100644 --- a/app/src/main/java/com/brainwallet/ui/composable/BentoBottomNavBar.kt +++ b/app/src/main/java/com/brainwallet/ui/composable/BentoBottomNavBar.kt @@ -1,6 +1,8 @@ package com.brainwallet.ui.composable import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.material3.Icon import androidx.compose.material3.NavigationBar import androidx.compose.material3.NavigationBarItem @@ -10,8 +12,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewLightDark +import androidx.compose.ui.graphics.Color import com.brainwallet.R import com.brainwallet.navigation.Route +import com.brainwallet.ui.layoutconstants.bottomNavHeight import com.grunt.brainwallet.core.presentation.theme.BrainwalletTheme /** @@ -28,9 +32,11 @@ fun BentoBottomNavBar( modifier: Modifier = Modifier, ) { NavigationBar( - modifier = modifier, containerColor = BrainwalletTheme.colors.surface, - contentColor = BrainwalletTheme.colors.content + contentColor = BrainwalletTheme.colors.content, + modifier = modifier + .navigationBarsPadding() + .height(bottomNavHeight) ) { NavigationBarItem( selected = currentRoute is Route.Send, @@ -41,7 +47,14 @@ fun BentoBottomNavBar( contentDescription = stringResource(id = R.string.send_tab_description) ) }, - label = { Text("Send") } + label = { Text("Send") }, + colors = androidx.compose.material3.NavigationBarItemDefaults.colors( + selectedIconColor = BrainwalletTheme.colors.content, + selectedTextColor = BrainwalletTheme.colors.content, + indicatorColor = Color.Transparent, + unselectedIconColor = BrainwalletTheme.colors.content.copy(0.8f), + unselectedTextColor = BrainwalletTheme.colors.content.copy(0.8f) + ) ) NavigationBarItem( selected = currentRoute is Route.BuyReceive, @@ -52,7 +65,14 @@ fun BentoBottomNavBar( contentDescription = stringResource(id = R.string.buy_receive_tab_description) ) }, - label = { Text("Buy/Receive") } + label = { Text("Buy/Receive") }, + colors = androidx.compose.material3.NavigationBarItemDefaults.colors( + selectedIconColor = BrainwalletTheme.colors.content, + selectedTextColor = BrainwalletTheme.colors.content, + indicatorColor = Color.Transparent, + unselectedIconColor = BrainwalletTheme.colors.content.copy(0.8f), + unselectedTextColor = BrainwalletTheme.colors.content.copy(0.8f) + ) ) NavigationBarItem( selected = currentRoute is Route.GameHub, @@ -63,7 +83,14 @@ fun BentoBottomNavBar( contentDescription = stringResource(id = R.string.game_hub_tab_description) ) }, - label = { Text("Game Hub") } + label = { Text("Game Hub") }, + colors = androidx.compose.material3.NavigationBarItemDefaults.colors( + selectedIconColor = BrainwalletTheme.colors.content, + selectedTextColor = BrainwalletTheme.colors.content, + indicatorColor = Color.Transparent, + unselectedIconColor = BrainwalletTheme.colors.content.copy(0.8f), + unselectedTextColor = BrainwalletTheme.colors.content.copy(0.8f) + ) ) NavigationBarItem( selected = currentRoute is Route.History, @@ -74,7 +101,14 @@ fun BentoBottomNavBar( contentDescription = stringResource(id = R.string.history_tab_description) ) }, - label = { Text("History") } + label = { Text("History") }, + colors = androidx.compose.material3.NavigationBarItemDefaults.colors( + selectedIconColor = BrainwalletTheme.colors.content, + selectedTextColor = BrainwalletTheme.colors.content, + indicatorColor = Color.Transparent, + unselectedIconColor = BrainwalletTheme.colors.content.copy(0.8f), + unselectedTextColor = BrainwalletTheme.colors.content.copy(0.8f) + ) ) } } diff --git a/app/src/main/java/com/brainwallet/ui/layoutconstants/Constants.kt b/app/src/main/java/com/brainwallet/ui/layoutconstants/Constants.kt new file mode 100644 index 00000000..49ecdd0f --- /dev/null +++ b/app/src/main/java/com/brainwallet/ui/layoutconstants/Constants.kt @@ -0,0 +1,11 @@ +package com.brainwallet.ui.layoutconstants + +import androidx.compose.ui.unit.dp + +val topAppBarHtPlus = 64.dp + 16.dp +val balanceGameBentoHeight = 105.dp +val bottomNavHeight = 85.dp +val gameHubHeight = 120.dp +val transRowHeight = 60.dp + +val mainHeightComponentsFactor = balanceGameBentoHeight + gameHubHeight + transRowHeight + bottomNavHeight diff --git a/app/src/main/java/com/brainwallet/ui/screens/buyreceive/BuyReceiveScreen.kt b/app/src/main/java/com/brainwallet/ui/screens/buyreceive/BuyReceiveScreen.kt index dfcf875d..dcd936dd 100644 --- a/app/src/main/java/com/brainwallet/ui/screens/buyreceive/BuyReceiveScreen.kt +++ b/app/src/main/java/com/brainwallet/ui/screens/buyreceive/BuyReceiveScreen.kt @@ -35,7 +35,6 @@ import com.brainwallet.ui.composable.LargeButton import com.grunt.brainwallet.core.presentation.theme.BrainwalletTheme import org.koin.compose.viewmodel.koinViewModel -// TODO: wip @Composable fun BuyReceiveScreen( onNavigate: OnNavigate, diff --git a/app/src/main/java/com/brainwallet/ui/screens/home/MainScreen.kt b/app/src/main/java/com/brainwallet/ui/screens/home/MainScreen.kt index c583d06c..2afc6a8c 100644 --- a/app/src/main/java/com/brainwallet/ui/screens/home/MainScreen.kt +++ b/app/src/main/java/com/brainwallet/ui/screens/home/MainScreen.kt @@ -1,12 +1,18 @@ package com.brainwallet.ui.screens.home +import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.GridItemSpan import androidx.compose.foundation.lazy.grid.LazyVerticalGrid @@ -41,15 +47,22 @@ import kotlinx.coroutines.launch import org.koin.compose.viewmodel.koinViewModel import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.material3.ModalBottomSheet +import androidx.compose.ui.tooling.preview.PreviewLightDark +import com.brainwallet.data.model.AppSetting +import com.brainwallet.ui.bentosections.gamehubbento.GameHubBentoScreen import com.brainwallet.ui.composable.HomeBentoContainer +import com.brainwallet.ui.layoutconstants.balanceGameBentoHeight +import com.brainwallet.ui.layoutconstants.bottomNavHeight +import com.brainwallet.ui.layoutconstants.mainHeightComponentsFactor +import com.brainwallet.ui.layoutconstants.transRowHeight import com.brainwallet.ui.screens.buyreceive.BuyReceiveScreen import com.brainwallet.ui.screens.gamehub.GameHubScreen import com.brainwallet.ui.screens.home.history.HistoryScreen +import com.brainwallet.ui.theme.BrainwalletAppTheme /** * The main screen of the application, featuring a bento-style grid layout. * It integrates the top bar, bottom navigation, and content grid. - * * @param modifier The modifier to be applied to the component. */ @@ -78,7 +91,7 @@ fun MainScreen( drawerContent = { ModalDrawerSheet { BentoRail( - appVersion = "v.X.X.X (XXXXXXXXXXXX)" + appVersion = "vX.X.X (XXXXXXXXXXXX)" ) } } @@ -86,48 +99,23 @@ fun MainScreen( Scaffold( modifier = modifier, containerColor = BrainwalletTheme.colors.surface, - topBar = { - Row( - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 16.dp), - verticalAlignment = Alignment.CenterVertically - ) { - BentoSettingsButton { - scope.launch { - drawerState.apply { - if (isClosed) open() else close() - } - } - } - Spacer(modifier = Modifier.weight(1f)) - - BentoThemeButton { - scope.launch { - print("Theme button clicked") - } - } - } - }, + contentWindowInsets = WindowInsets.systemBars, bottomBar = { BentoBottomNavBar( currentRoute = currentRoute, onItemClick = { route: Route -> - currentRoute = route // Keep this to highlight the correct icon + currentRoute = route if (route == Route.Main) { - // If Home is clicked, just ensure the sheet is closed scope.launch { sheetState.hide() }.invokeOnCompletion { if (!sheetState.isVisible) { isSheetOpen = false } } } else { - // For any other route, set the content and open the sheet modalContentRoute = route isSheetOpen = true } - // The onNavigate call might still be needed depending on your navigation architecture onNavigate.invoke(UiEffect.Navigate(route)) } ) @@ -140,35 +128,71 @@ fun MainScreen( "Transaction History View", "Tutorials Bento View", "LTC Price Bento View", - "Favourites Bento View", - "Game Hub Bento View" + "Favourites Bento View" ) } - LazyVerticalGrid( - columns = GridCells.Fixed(2), + BoxWithConstraints( modifier = Modifier - .padding(paddingValues) - .padding(16.dp), - horizontalArrangement = Arrangement.spacedBy(16.dp), - verticalArrangement = Arrangement.spacedBy(16.dp), + .fillMaxSize() ) { - item(span = { GridItemSpan(2) }) { - HomeBentoContainer(name = gridItems[0], modifier = Modifier.height(150.dp)) - } - item(span = { GridItemSpan(2) }) { - HomeBentoContainer(name = gridItems[1], modifier = Modifier.height(100.dp)) - } - item(span = { GridItemSpan(1) }) { - HomeBentoContainer(name = gridItems[2], modifier = Modifier.height(220.dp)) - } - item(span = { GridItemSpan(1) }) { - Column(verticalArrangement = Arrangement.spacedBy(16.dp)) { - HomeBentoContainer(name = gridItems[3], modifier = Modifier.height(100.dp)) - HomeBentoContainer(name = gridItems[4], modifier = Modifier.height(100.dp)) + val verticalSpacing = 16.dp + val fixedElementsHeight = mainHeightComponentsFactor + (verticalSpacing * 3) + val gridContentAreaHeight = this.maxHeight + -paddingValues.calculateTopPadding() + -paddingValues.calculateBottomPadding() + val availableHeight = gridContentAreaHeight - fixedElementsHeight - bottomNavHeight + val bentoBox4Height = (availableHeight / 2) - (verticalSpacing / 2) + val bentoBox5Height = (availableHeight / 2) - (verticalSpacing / 2) + Column { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 16.dp), + verticalAlignment = Alignment.CenterVertically + ) { + BentoSettingsButton { + scope.launch { + drawerState.apply { + if (isClosed) open() else close() + } + } + } + Spacer(modifier = Modifier.weight(1f)) + + BentoThemeButton { + scope.launch { + print("Theme button clicked") + } + } + } + LazyVerticalGrid( + columns = GridCells.Fixed(2), + modifier = Modifier.padding(horizontal = 16.dp, vertical = 1.dp), + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), + userScrollEnabled = false + ) { + item(span = { GridItemSpan(2) }) { + HomeBentoContainer(name = gridItems[0], modifier = Modifier.height(balanceGameBentoHeight)) + } + item(span = { GridItemSpan(2) }) { + HomeBentoContainer(name = gridItems[1], modifier = Modifier.height(transRowHeight)) + } + item(span = { GridItemSpan(1) }) { + HomeBentoContainer(name = gridItems[2], modifier = Modifier.height(availableHeight)) + } + item(span = { GridItemSpan(1) }) { + Column(verticalArrangement = Arrangement.spacedBy(16.dp)) { + HomeBentoContainer(name = gridItems[3], modifier = Modifier.height(bentoBox4Height)) + HomeBentoContainer(name = gridItems[4], modifier = Modifier.height(bentoBox5Height)) + } + } + item(span = { GridItemSpan(2) }) { + Box(modifier = Modifier.height(balanceGameBentoHeight)) { + GameHubBentoScreen() + } + } } - } - item(span = { GridItemSpan(2) }) { - HomeBentoContainer(name = gridItems[5], modifier = Modifier.height(120.dp)) } } } @@ -180,7 +204,6 @@ fun MainScreen( dragHandle = null, shape = RoundedCornerShape(24.dp) ) { - // Content of the bottom sheet when (modalContentRoute) { Route.Send -> { SendScreen( @@ -203,11 +226,17 @@ fun MainScreen( modifier = Modifier.padding(bottom = 32.dp) ) } - else -> { - // Render nothing or a placeholder if the route is unexpected - } + else -> { } } } } } } + +@Composable +@PreviewLightDark +fun MainScreenPreview() { + BrainwalletAppTheme(appSetting = AppSetting(isDarkMode = isSystemInDarkTheme())) { + MainScreen(onNavigate = {}) + } +} diff --git a/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsState.kt b/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsState.kt index e797c671..145b6f7b 100644 --- a/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsState.kt +++ b/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsState.kt @@ -23,5 +23,6 @@ data class SettingsState( val shareAnalyticsDataEnabled: Boolean = false, val lastSyncMetadata: SyncAnalyticsRepository.SyncMetadata? = null, val currentFeeOptions: List = Fee.Default.toFeeOptions(), - val selectedFeeType: String = FeeManager.LUXURY + val selectedFeeType: String = FeeManager.LUXURY, + val formattedVersion: String = "" ) diff --git a/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsViewModel.kt b/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsViewModel.kt index 48ef2eb1..7e3f54bd 100644 --- a/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsViewModel.kt +++ b/app/src/main/java/com/brainwallet/ui/screens/settings/SettingsViewModel.kt @@ -12,6 +12,7 @@ import com.brainwallet.domain.LanguageSwitcherUseCase import com.brainwallet.tools.manager.FeeManager import com.brainwallet.ui.BrainwalletViewModel import com.brainwallet.util.EventBus +import com.brainwallet.util.VersionCodeProvider import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted @@ -29,10 +30,11 @@ import org.koin.android.annotation.KoinViewModel class SettingsViewModel( private val settingRepository: SettingRepository, private val languageSwitcherUseCase: LanguageSwitcherUseCase, - private val ltcRepository: LtcRepository + private val ltcRepository: LtcRepository, + versionCodeProvider: VersionCodeProvider ) : BrainwalletViewModel() { - private val _state = MutableStateFlow(SettingsState()) + private val _state = MutableStateFlow(SettingsState(formattedVersion = versionCodeProvider.getFormatted())) val state: StateFlow = _state.asStateFlow() val appSetting = settingRepository.settings diff --git a/app/src/main/java/com/brainwallet/ui/theme/Gradient.kt b/app/src/main/java/com/brainwallet/ui/theme/Gradient.kt new file mode 100644 index 00000000..92b927e2 --- /dev/null +++ b/app/src/main/java/com/brainwallet/ui/theme/Gradient.kt @@ -0,0 +1,71 @@ +package com.brainwallet.ui.theme + +import androidx.compose.runtime.Composable +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.TileMode + +/** + * A reusable vertical gradient brush for text and backgrounds.33 + */ +val gameTitleGradient: Brush + @Composable + get() = Brush.verticalGradient( + colors = listOf( + Color(0xFFFFFFFF), + Color(0xFFFFFFFF), + Color(0xFF114CD4), + ) + ) +val gameTaglineGradient: Brush + @Composable + get() = Brush.verticalGradient( + colors = listOf( + Color(0xFFFFFFFF), + Color(0xFFFFFFFF), + Color(0xFFFFFFFF), + Color(0x1A114CD4), + ) + ) +val gameHubBackgroundGradient: Brush + + @Composable + get() = Brush.radialGradient( + colors = listOf( + Color(0x80000000), + Color(0x4D5827E2) + ), + center = Offset(100 / 2.0f, 200 / 2.0f), + radius = 100 / 2.0f, + tileMode = TileMode.Clamp + ) +val bentoBorderGradient: Brush + + @Composable + get() = Brush.verticalGradient( + colors = listOf( + Color(0x80FFFFFF), + Color(0xCC9074FF), + Color(0xFF020148), + Color(0xCC2B193B), + Color(0xCC6944BE) + ), + startY = 0f, + endY = 100f + ) + +/** + * Another example of a global gradient you could create. + */ +val primarySurfaceGradient: Brush + @Composable + get() = Brush.horizontalGradient( + colors = listOf( + // Example colors from a hypothetical theme + // MaterialTheme.colorScheme.primary, + // MaterialTheme.colorScheme.primaryContainer + Color.Blue, + Color.Cyan + ) + ) diff --git a/app/src/main/java/com/brainwallet/ui/theme/Theme.kt b/app/src/main/java/com/brainwallet/ui/theme/Theme.kt index 8e624813..34787a34 100644 --- a/app/src/main/java/com/brainwallet/ui/theme/Theme.kt +++ b/app/src/main/java/com/brainwallet/ui/theme/Theme.kt @@ -2,12 +2,32 @@ package com.brainwallet.ui.theme import androidx.compose.runtime.Composable import androidx.compose.ui.platform.ComposeView +import androidx.compose.ui.text.font.Font +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.brainwallet.data.model.AppSetting import com.brainwallet.data.repository.SettingRepository import com.grunt.brainwallet.core.presentation.theme.BrainwalletTheme +import com.brainwallet.R import org.koin.compose.koinInject +val BoldenVan = FontFamily( + Font(R.font.bolden_van, FontWeight.Normal) +) + +val IBMPlexSans = FontFamily( + Font(R.font.ibm_plex_sans_regular, FontWeight.Normal), + Font(R.font.ibm_plex_sans_medium, FontWeight.Medium), + Font(R.font.ibm_plex_sans_semi_bold, FontWeight.SemiBold), + Font(R.font.ibm_plex_sans_bold, FontWeight.Bold), + Font(R.font.ibm_plex_sans_extra_light, FontWeight.ExtraLight), + Font(R.font.ibm_plex_sans_light, FontWeight.Light), + Font(R.font.ibm_plex_sans_thin, FontWeight.Thin), + Font(R.font.ibm_plex_sans_italic, FontWeight.Normal, FontStyle.Italic) +) + @Composable fun BrainwalletAppTheme( appSetting: AppSetting = koinInject().settings.collectAsStateWithLifecycle( diff --git a/app/src/main/res/drawable/game_hub_bk.png b/app/src/main/res/drawable/game_hub_bk.png new file mode 100644 index 00000000..73004f5a Binary files /dev/null and b/app/src/main/res/drawable/game_hub_bk.png differ diff --git a/app/src/main/res/font/bolden_van.ttf b/app/src/main/res/font/bolden_van.ttf new file mode 100755 index 00000000..99e8a205 Binary files /dev/null and b/app/src/main/res/font/bolden_van.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_bold.ttf b/app/src/main/res/font/ibm_plex_sans_bold.ttf new file mode 100644 index 00000000..258c10a9 Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_bold.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_extra_light.ttf b/app/src/main/res/font/ibm_plex_sans_extra_light.ttf new file mode 100644 index 00000000..46f52c48 Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_extra_light.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_italic.ttf b/app/src/main/res/font/ibm_plex_sans_italic.ttf new file mode 100644 index 00000000..bf439563 Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_italic.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_light.ttf b/app/src/main/res/font/ibm_plex_sans_light.ttf new file mode 100644 index 00000000..56e7db7d Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_light.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_medium.ttf b/app/src/main/res/font/ibm_plex_sans_medium.ttf new file mode 100644 index 00000000..fb75072d Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_medium.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_regular.ttf b/app/src/main/res/font/ibm_plex_sans_regular.ttf new file mode 100644 index 00000000..5387ad48 Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_regular.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_semi_bold.ttf b/app/src/main/res/font/ibm_plex_sans_semi_bold.ttf new file mode 100644 index 00000000..a63f1c56 Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_semi_bold.ttf differ diff --git a/app/src/main/res/font/ibm_plex_sans_thin.ttf b/app/src/main/res/font/ibm_plex_sans_thin.ttf new file mode 100644 index 00000000..918d4a0c Binary files /dev/null and b/app/src/main/res/font/ibm_plex_sans_thin.ttf differ diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index a54eaf9e..4cdca7e9 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -461,4 +461,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 628d5741..06919c6f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -716,7 +716,6 @@ Aktueller LTC-Wert in %1$s Sprachen Sind Sie sicher, dass Sie die Sprache auf Deutsch ändern möchten? - Bitrefill Geschenkkarten kaufen\n• Prepaid-Telefone aufladen\n• Steam, Amazon, Hotels.com\n• Funktioniert in 170 Ländern Zeigen Meine Seed-Phrase anzeigen @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index db65d992..c8f7e2ec 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -715,7 +715,6 @@ Valor actual de LTC en %1$s Idiomas ¿Estás seguro de que quieres cambiar el idioma a español? - Bitrefill Compre tarjetas de regalo\n• Recargue teléfonos prepagos\n• Steam, Amazon, Hotels.com\n• Funciona en 170 países Espectáculo Mostrar mi frase inicial @@ -821,4 +820,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index 4c0cf157..e431902f 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -718,8 +718,7 @@ «• خرید LTC با جفت‌های متعدد ارز فیات • پرداخت با روش‌های متنوع • ارائه‌دهنده پرداخت جهانی» - بیت‌ریفیل - «• خرید کارت‌های هدیه + «• خرید کارت‌های هدیه • شارژ تلفن‌های پیش‌پرداخت • استیم، آمازون، Hotels.com • در ۱۷۰ کشور قابل استفاده است» @@ -857,4 +856,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 377a4086..18233f75 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -716,7 +716,6 @@ Valeur LTC actuelle en %1$s Langues Êtes-vous sûr de vouloir changer la langue en français ? - Bitrefill Achetez des cartes-cadeaux\n• Rechargez des téléphones prépayés\n• Steam, Amazon, Hotels.com\n• Fonctionne dans 170 pays Montrer Afficher la phrase de départ @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-h700dp/strings.xml b/app/src/main/res/values-h700dp/strings.xml index 815a54b3..7bf58fee 100644 --- a/app/src/main/res/values-h700dp/strings.xml +++ b/app/src/main/res/values-h700dp/strings.xml @@ -7,4 +7,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 2d3465b8..f93ff969 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -460,4 +460,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 5da14163..da1d6d1f 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -718,7 +718,6 @@ Nilai LTC saat ini di %1$s Bahasa Apakah Anda yakin ingin mengubah bahasanya ke bahasa Indonesia? - Bitrefill Beli kartu hadiah\n• Isi ulang ponsel prabayar\n• Steam, Amazon, Hotels.com\n• Berfungsi di 170 negara Menunjukkan Tunjukkan frase seed saya @@ -824,4 +823,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index c0e24056..5e7f8836 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -716,7 +716,6 @@ Valore LTC corrente in %1$s Le lingue Sei sicuro di voler cambiare la lingua in italiano? - Bitrefill Acquista buoni regalo\n• Ricarica telefoni prepagati\n• Steam, Amazon, Hotels.com\n• Funziona in 170 paesi Spettacolo Mostra la mia frase seme @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 161c15eb..83fdc5dd 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -716,7 +716,6 @@ 現在のLTC値 %1$s 言語 言語を日本語に変更してもよろしいですか? - Bitrefill ギフトカードの購入\n• プリペイド携帯電話の補充\n• Steam、Amazon、Hotels.com\n• 170 か国で利用可能 見せる 私のシードフレーズを表示 @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index c0a1f336..214c85ae 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -716,7 +716,6 @@ 현재 LTC 값 %1$s 언어 언어를 한국어로 변경하시겠습니까? - Bitrefill 기프트 카드 구매\n• 선불 전화 충전\n• Steam, Amazon, Hotels.com\n• 170개국에서 작동 보여주다 내 시드 문구 표시 @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-land/strings.xml b/app/src/main/res/values-land/strings.xml index 815a54b3..7bf58fee 100644 --- a/app/src/main/res/values-land/strings.xml +++ b/app/src/main/res/values-land/strings.xml @@ -7,4 +7,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-night/strings.xml b/app/src/main/res/values-night/strings.xml index 815a54b3..7bf58fee 100644 --- a/app/src/main/res/values-night/strings.xml +++ b/app/src/main/res/values-night/strings.xml @@ -7,4 +7,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-pa/strings.xml b/app/src/main/res/values-pa/strings.xml index e22d0a36..d49570eb 100644 --- a/app/src/main/res/values-pa/strings.xml +++ b/app/src/main/res/values-pa/strings.xml @@ -713,8 +713,7 @@ مون پے "• ایل ٹی سی کو کئی فیاٹ جوڑوں کے ساتھ خریدیں\n• متعدد طریقوں سے ادائیگی کریں\n• عالمی ادائیگی فراہم کنندہ" - بِٹریفِل - "• تحفے کے کارڈ خریدیں\n• پری پیڈ فونز کو ریفل کریں\n• سٹیم، ایمیزون، ہوٹلز ڈاٹ کام\n• 170 ممالک میں کام کرتا ہے" + "• تحفے کے کارڈ خریدیں\n• پری پیڈ فونز کو ریفل کریں\n• سٹیم، ایمیزون، ہوٹلز ڈاٹ کام\n• 170 ممالک میں کام کرتا ہے" اے یو ڈی پاؤنڈ سٹرلنگ ایچ کے ڈی @@ -851,4 +850,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 1a478eef..956dff37 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -711,8 +711,7 @@ Moonpay "- Kup LTC za pomocą wielu par walutowych - Płać wieloma metodami - Globalny dostawca płatności" - Bitrefill - "- Kupuj karty podarunkowe \n- Doładuj telefony przedpłacone \n- Steam, Amazon, Hotels.com \n- Działa w 170 krajach" + "- Kupuj karty podarunkowe \n- Doładuj telefony przedpłacone \n- Steam, Amazon, Hotels.com \n- Działa w 170 krajach" AUD GBP HKD @@ -846,4 +845,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 792fe835..7becf8f2 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -716,7 +716,6 @@ Valor LTC atual em %1$s Línguas Tem certeza de que deseja alterar o idioma para português? - Bitrefill Compre vales-presente\n• Recarregue telefones pré-pagos\n• Steam, Amazon, Hotels.com\n• Funciona em 170 países Mostrar Mostrar minha frase de semente @@ -821,4 +820,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index bc8ccf2b..5fb1a887 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -716,7 +716,6 @@ Текущее значение LTC в %1$s Языки Вы уверены, что хотите сменить язык на русский? - Bitrefill Покупайте подарочные карты\n• Пополняйте предоплаченные телефоны\n• Steam, Amazon, Hotels.com\n• Работает в 170 странах Показывать " Покажи мою початкову фразу" @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 23b3d69f..1ae93d17 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -460,4 +460,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 9355138c..661aef6b 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -738,7 +738,6 @@ %1$s cinsinden geçerli LTC değeri Diller Dili Türkçe olarak değiştirmek istediğinizden emin misiniz? - Bitrefill Hediye kartları satın alın\n• Ön ödemeli telefonları yeniden doldurun\n• Steam, Amazon, Hotels.com\n• 170 ülkede çalışıyor Göstermek " Tohum ifademi göster" @@ -846,4 +845,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index ee6daab8..1b774401 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -722,7 +722,6 @@ Скопійовано в буфер обміну. Копія Копіювати адреси гаманця - Bitrefill Купуйте подарункові картки\n• Поповнюйте передплачені телефони\n• Steam, Amazon, Hotels.com\n• Працює в 170 країнах Показати Покажи мою початкову фразу @@ -829,4 +828,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-w1240dp/strings.xml b/app/src/main/res/values-w1240dp/strings.xml index 815a54b3..7bf58fee 100644 --- a/app/src/main/res/values-w1240dp/strings.xml +++ b/app/src/main/res/values-w1240dp/strings.xml @@ -7,4 +7,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-w600dp/strings.xml b/app/src/main/res/values-w600dp/strings.xml index 815a54b3..7bf58fee 100644 --- a/app/src/main/res/values-w600dp/strings.xml +++ b/app/src/main/res/values-w600dp/strings.xml @@ -7,4 +7,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ccafff75..d1b54719 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -716,7 +716,6 @@ 当前的LTC值 %1$s 语言能力 您确定要将语言更改为中文吗? - Bitrefill 购买礼品卡\n• 为预付费手机充值\n• Steam、亚马逊、Hotels.com\n• 适用于 170 个国家/地区 展示 显示我的助记词 @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 567a3bc6..de33bd8f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -715,7 +715,6 @@ 當前的LTC值 %1$s 語言能力 您確定要將語言改為中文嗎? - Bitrefill 購買禮品卡\n• 為預付費手機充值\n• Steam、亞馬遜、Hotels.com\n• 適用於 170 個國家/地區 展示 顯示我的助記詞 @@ -822,4 +821,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 40210680..3287f36f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -720,7 +720,6 @@ Moonpay "• Buy LTC with many fiat pairs\n• Pay with multiple methods\n• Global payment provider" - Bitrefill "• Buy gift cards\n• Refill prepaid phones\n• Steam, Amazon, Hotels.com\n• Works in 170 countries" AUD @@ -816,7 +815,7 @@ down-left-arrow logo toggle-dark-mode - toggle-lock-mode + toggle-lock-mode Security Language Currency @@ -854,7 +853,6 @@ Do be deposited to your LTC Address: Buy with Moonpay New Address - Buy / Receive Custom Reset / Start Over @@ -866,4 +864,6 @@ Send Litecoin Game Hub History + ARE YOU GOOD ENOUGH TO BE #1? + GAME HUB diff --git a/config/detekt-app-baseline.xml b/config/detekt-app-baseline.xml index 659c15ab..9332c8ed 100644 --- a/config/detekt-app-baseline.xml +++ b/config/detekt-app-baseline.xml @@ -604,6 +604,7 @@ UnusedPrivateMember:UnLockScreenHeader.kt$@PreviewLightDark @Composable private fun UnLockScreenHeaderPreview() UnusedPrivateMember:GameHubScreen.kt$@PreviewLightDark @Composable private fun GameHubScreenPreview() UnusedPrivateMember:HistoryScreen.kt$@PreviewLightDark @Composable private fun HistoryScreenPreview() + UnusedPrivateMember:GameHubBentoScreen.kt$@PreviewLightDark @Composable private fun GameHubBentoScreenPreview() WildcardImport:FragmentBalanceSeedReminder.kt$import android.widget.* Wrapping:AppModule.kt$AppModule$( Wrapping:CurrencyDetail.kt$(