diff --git a/bisqapps/shared/presentation/build.gradle.kts b/bisqapps/shared/presentation/build.gradle.kts index 32907f37..ec5a99b6 100644 --- a/bisqapps/shared/presentation/build.gradle.kts +++ b/bisqapps/shared/presentation/build.gradle.kts @@ -88,11 +88,8 @@ kotlin { implementation(libs.androidx.lifecycle.runtime.compose) implementation(libs.logging.kermit) implementation(libs.kotlinx.coroutines) - implementation("io.coil-kt.coil3:coil-compose:3.0.0-rc02") - implementation("io.coil-kt.coil3:coil-svg:3.0.0-rc02") implementation("org.jetbrains.androidx.navigation:navigation-compose:2.7.0-alpha07") - implementation("cafe.adriel.lyricist:lyricist:1.7.0") } diff --git a/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_chat_outlined.png b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_chat_outlined.png new file mode 100644 index 00000000..e6097f7f Binary files /dev/null and b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_chat_outlined.png differ diff --git a/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_star_outlined.png b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_star_outlined.png new file mode 100644 index 00000000..634f9f1c Binary files /dev/null and b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_star_outlined.png differ diff --git a/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_tag_outlined.png b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_tag_outlined.png new file mode 100644 index 00000000..9d6c95bc Binary files /dev/null and b/bisqapps/shared/presentation/src/commonMain/composeResources/drawable/icon_tag_outlined.png differ diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/CurrencyProfileCard.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/CurrencyProfileCard.kt index d892d340..3bfdcca4 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/CurrencyProfileCard.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/CurrencyProfileCard.kt @@ -16,7 +16,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.BisqTheme import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.ExperimentalResourceApi diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/MaterialTextField.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/MaterialTextField.kt index 8ee962d0..c14406c0 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/MaterialTextField.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/MaterialTextField.kt @@ -21,13 +21,10 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.focus.onFocusChanged import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import bisqapps.shared.presentation.generated.resources.Res -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.* -import org.jetbrains.compose.resources.Font @Composable fun MaterialTextField(text: String,onValueChanged: (String) -> Unit) { diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Button.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Button.kt index 2f0b6da8..4aa6527e 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Button.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Button.kt @@ -1,15 +1,12 @@ -package network.bisq.mobile.presentation.ui.components.foundation +package network.bisq.mobile.presentation.ui.components.atoms import androidx.compose.foundation.layout.* -import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Button import androidx.compose.material3.ButtonColors import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import coil3.Image import network.bisq.mobile.presentation.ui.theme.BisqTheme // TODO: diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/ProgressBar.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/ProgressBar.kt index 050ec883..fff981cc 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/ProgressBar.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/ProgressBar.kt @@ -1,3 +1,5 @@ +package network.bisq.mobile.presentation.ui.components.atoms + import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Text.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Text.kt index 0f0519c2..2d77c639 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Text.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/atoms/Text.kt @@ -1,4 +1,4 @@ -package network.bisq.mobile.presentation.ui.components.foundation +package network.bisq.mobile.presentation.ui.components.atoms import androidx.compose.runtime.Composable import androidx.compose.material3.Text diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/molecules/TopBar.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/molecules/TopBar.kt index 53aa1943..9f0b2d01 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/molecules/TopBar.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/components/molecules/TopBar.kt @@ -1,4 +1,4 @@ -package network.bisq.mobile.presentation.ui.components +package network.bisq.mobile.presentation.ui.components.molecules import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -7,22 +7,16 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import bisqapps.shared.presentation.generated.resources.Res -import coil3.compose.AsyncImage import network.bisq.mobile.presentation.ui.components.atoms.icons.BellIcon import network.bisq.mobile.presentation.ui.components.atoms.icons.BisqLogoSmall import network.bisq.mobile.presentation.ui.components.atoms.icons.UserIcon -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.BisqTheme import org.jetbrains.compose.resources.ExperimentalResourceApi @@ -50,7 +44,6 @@ fun TopBar(title: String = "",isHome:Boolean = false) { Spacer(modifier = Modifier.width(12.dp)) UserIcon(modifier = Modifier.size(30.dp)) } - }, ) } \ No newline at end of file diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/navigation/BottomNavigation.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/navigation/BottomNavigation.kt index 80edfd46..ad95c5bf 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/navigation/BottomNavigation.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/navigation/BottomNavigation.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.unit.dp -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.model.BottomNavigationItem import network.bisq.mobile.presentation.ui.theme.BisqTheme import org.jetbrains.compose.resources.ExperimentalResourceApi diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/CreateProfileScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/CreateProfileScreen.kt index 9cc4ab5b..2d281532 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/CreateProfileScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/CreateProfileScreen.kt @@ -14,8 +14,8 @@ import bisqapps.shared.presentation.generated.resources.Res import bisqapps.shared.presentation.generated.resources.img_bot_image import network.bisq.mobile.components.MaterialTextField import network.bisq.mobile.presentation.ui.components.atoms.icons.BisqLogo -import network.bisq.mobile.presentation.ui.components.foundation.BisqButton -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqButton +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.components.layout.BisqScrollLayout import network.bisq.mobile.presentation.ui.navigation.Routes import network.bisq.mobile.presentation.ui.theme.* diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/ExchangeScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/ExchangeScreen.kt index d806f420..78c77a7f 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/ExchangeScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/ExchangeScreen.kt @@ -20,17 +20,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.dp import androidx.navigation.NavController -import bisqapps.shared.presentation.generated.resources.* import bisqapps.shared.presentation.generated.resources.Res import bisqapps.shared.presentation.generated.resources.currency_euro import bisqapps.shared.presentation.generated.resources.currency_gpb import bisqapps.shared.presentation.generated.resources.currency_usd -import coil3.compose.AsyncImage import network.bisq.mobile.presentation.ui.components.CurrencyProfileCard import network.bisq.mobile.components.MaterialTextField -import network.bisq.mobile.presentation.ui.components.TopBar +import network.bisq.mobile.presentation.ui.components.molecules.TopBar import network.bisq.mobile.presentation.ui.components.atoms.icons.SortIcon -import network.bisq.mobile.presentation.ui.components.atoms.icons.UserIcon import org.jetbrains.compose.resources.ExperimentalResourceApi @OptIn(ExperimentalResourceApi::class) diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/GettingStartedScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/GettingStartedScreen.kt index 549b4fca..0f615042 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/GettingStartedScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/GettingStartedScreen.kt @@ -27,13 +27,14 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.navigation.NavController +import bisqapps.shared.presentation.generated.resources.* import bisqapps.shared.presentation.generated.resources.Res +import bisqapps.shared.presentation.generated.resources.icon_tag_outlined import bisqapps.shared.presentation.generated.resources.img_fiat_btc import bisqapps.shared.presentation.generated.resources.img_learn_and_discover -import coil3.compose.AsyncImage import kotlinx.coroutines.flow.StateFlow -import network.bisq.mobile.presentation.ui.components.TopBar -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.molecules.TopBar +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.* import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.ExperimentalResourceApi @@ -133,15 +134,15 @@ fun WelcomeCard(title: String, buttonText: String) { ) Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { FeatureCard( - imagePath = "drawable/rounded_browser.svg", + image = Res.drawable.icon_tag_outlined, title = "Start trading or browser open offers in the offerbook" ) FeatureCard( - imagePath = "drawable/rounded_chat.svg", + image = Res.drawable.icon_chat_outlined, title = "Chat based and guided user interface for trading" ) FeatureCard( - imagePath = "drawable/rounded_star.svg", + image = Res.drawable.icon_star_outlined, title = "Security is based on seller’s reputation" ) } @@ -187,13 +188,14 @@ fun PriceProfileCard(price: String, priceText: String) { @OptIn(ExperimentalResourceApi::class) @Composable -fun FeatureCard(imagePath: String, title: String) { +fun FeatureCard(image: DrawableResource, title: String) { Row(verticalAlignment = Alignment.CenterVertically) { - AsyncImage( - model = Res.getUri(imagePath), - contentDescription = null, - modifier = Modifier.size(20.dp) - ) +// AsyncImage( +// model = Res.getUri(imagePath), +// contentDescription = null, +// modifier = Modifier.size(20.dp) +// ) + Image(painterResource(image), null, Modifier.size(20.dp)) Spacer(modifier = Modifier.width(9.dp)) BisqText.smallRegular( text = title, diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/MyTrades.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/MyTrades.kt index c6230eb8..935509ca 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/MyTrades.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/MyTrades.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.sp import androidx.navigation.NavController -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.BisqTheme import org.jetbrains.compose.resources.ExperimentalResourceApi diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/OnBoardingScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/OnBoardingScreen.kt index f3d63128..1eb2c024 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/OnBoardingScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/OnBoardingScreen.kt @@ -36,8 +36,8 @@ import bisqapps.shared.presentation.generated.resources.img_learn_and_discover import kotlinx.coroutines.launch import network.bisq.mobile.presentation.ui.components.atoms.icons.BisqLogo -import network.bisq.mobile.presentation.ui.components.foundation.BisqButton -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqButton +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.components.layout.BisqScrollLayout import network.bisq.mobile.presentation.ui.model.OnBoardingPage import network.bisq.mobile.presentation.ui.navigation.Routes diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SettingsScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SettingsScreen.kt index cb570319..72ee31b4 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SettingsScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SettingsScreen.kt @@ -5,14 +5,11 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.sp import androidx.navigation.NavController -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.theme.BisqTheme import org.jetbrains.compose.resources.ExperimentalResourceApi diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SplashScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SplashScreen.kt index e0ba1c7e..0d2a22c1 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SplashScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/SplashScreen.kt @@ -1,36 +1,25 @@ package network.bisq.mobile.presentation.ui.screens -import BisqProgressBar -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.* import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableFloatStateOf import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.navigation.NavController -import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.ExperimentalResourceApi -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch - -import network.bisq.mobile.presentation.ui.navigation.Routes -import bisqapps.shared.presentation.generated.resources.Res -import bisqapps.shared.presentation.generated.resources.bisq_logo import cafe.adriel.lyricist.LocalStrings -import cafe.adriel.lyricist.rememberStrings +import network.bisq.mobile.presentation.ui.components.atoms.BisqProgressBar import network.bisq.mobile.presentation.ui.components.atoms.icons.BisqLogo -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.components.layout.BisqStaticLayout import network.bisq.mobile.presentation.ui.theme.* // TODO: Remove innerPadding once StaticLayout, ScrollLayout are fully done. -@OptIn(ExperimentalResourceApi::class) @Composable fun SplashScreen( rootNavController: NavController, diff --git a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/URLScreen.kt b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/URLScreen.kt index ed68b82e..52ea8e77 100644 --- a/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/URLScreen.kt +++ b/bisqapps/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/presentation/ui/screens/URLScreen.kt @@ -23,8 +23,8 @@ import bisqapps.shared.presentation.generated.resources.Res import bisqapps.shared.presentation.generated.resources.icon_question_mark import network.bisq.mobile.components.MaterialTextField import network.bisq.mobile.presentation.ui.components.atoms.icons.BisqLogo -import network.bisq.mobile.presentation.ui.components.foundation.BisqButton -import network.bisq.mobile.presentation.ui.components.foundation.BisqText +import network.bisq.mobile.presentation.ui.components.atoms.BisqButton +import network.bisq.mobile.presentation.ui.components.atoms.BisqText import network.bisq.mobile.presentation.ui.components.layout.BisqScrollLayout import network.bisq.mobile.presentation.ui.navigation.Routes import network.bisq.mobile.presentation.ui.theme.*