Skip to content

Commit

Permalink
All images converted to PNG, tested in both iOS, Android and removed …
Browse files Browse the repository at this point in the history
…coil3 lib dependency
  • Loading branch information
nostrbuddha authored and rodvar committed Nov 11, 2024
1 parent e5fbd09 commit a8d4a66
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 63 deletions.
3 changes: 0 additions & 3 deletions bisqapps/shared/presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")

}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -50,7 +44,6 @@ fun TopBar(title: String = "",isHome:Boolean = false) {
Spacer(modifier = Modifier.width(12.dp))
UserIcon(modifier = Modifier.size(30.dp))
}

},
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)
}
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down

0 comments on commit a8d4a66

Please sign in to comment.