Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
/local.properties
.idea
.DS_Store
/build
*/build
**/build
# Paparazzi failure output folder
**/out
/captures
Expand Down
5 changes: 3 additions & 2 deletions android/app-newm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ dependencies {
implementation(libs.kotlinx.collections.immutable)
implementation(libs.circuit.retained)
implementation(compose.material)
implementation(compose.components.resources)
implementation(libs.androidx.media3.datasource)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.database)
Expand All @@ -120,9 +121,9 @@ dependencies {
implementation(compose.components.resources)
implementation(project(Modules.BARCODE_SCANNER))
implementation(project(Modules.CORE_ANDROID_IMPLEMENTATIONS))

implementation(project(Modules.CORE_UI))
implementation(project(Modules.CORE_RESOURCES))
implementation(project(Modules.CORE_THEME))
implementation(project(Modules.CORE_UI_UTILS))
implementation(project(Modules.MUSIC_PLAYER))
implementation(project(Modules.SHARED))
implementation(project(Modules.SHARED_COMPOSE_FEATURES))
Expand Down
2 changes: 1 addition & 1 deletion android/app-newm/src/main/java/io/newm/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.slack.circuit.retained.LocalRetainedStateRegistry
import com.slack.circuit.retained.lifecycleRetainedStateRegistry
import com.slack.circuit.runtime.presenter.Presenter
import com.slack.circuit.runtime.ui.Ui
import io.newm.core.theme.NewmTheme
import io.newm.core.ui.theme.NewmTheme
import io.newm.screens.Screen
import io.newm.screens.Screen.NFTLibrary
import io.newm.screens.forceupdate.ForceAppUpdatePresenter
Expand Down
2 changes: 1 addition & 1 deletion android/app-newm/src/main/java/io/newm/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import com.slack.circuit.retained.LocalRetainedStateRegistry
import com.slack.circuit.retained.lifecycleRetainedStateRegistry
import com.slack.circuit.runtime.presenter.Presenter
import com.slack.circuit.runtime.ui.Ui
import io.newm.core.theme.NewmTheme
import io.newm.core.ui.LocalSnackBarHostState
import io.newm.core.ui.theme.NewmTheme
import io.newm.screens.forceupdate.ForceAppUpdateState
import io.newm.screens.forceupdate.ForceAppUpdateUi
import io.newm.screens.forceupdate.openAppPlayStore
Expand Down
20 changes: 10 additions & 10 deletions android/app-newm/src/main/java/io/newm/NewmAppComposable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -50,16 +51,15 @@ import com.slack.circuit.backstack.rememberSaveableBackStack
import com.slack.circuit.foundation.NavigableCircuitContent
import com.slack.circuit.foundation.rememberCircuitNavigator
import io.newm.core.resources.R
import io.newm.core.theme.Black
import io.newm.core.theme.BrightOrange
import io.newm.core.theme.DarkPink
import io.newm.core.theme.DarkViolet
import io.newm.core.theme.Gray100
import io.newm.core.theme.LightSkyBlue
import io.newm.core.theme.OceanGreen
import io.newm.core.theme.YellowJacket
import io.newm.core.theme.inter
import io.newm.core.ui.LocalSnackBarHostState
import io.newm.core.ui.theme.Black
import io.newm.core.ui.theme.BrightOrange
import io.newm.core.ui.theme.DarkPink
import io.newm.core.ui.theme.DarkViolet
import io.newm.core.ui.theme.Gray100
import io.newm.core.ui.theme.LightSkyBlue
import io.newm.core.ui.theme.OceanGreen
import io.newm.core.ui.theme.YellowJacket
import io.newm.core.ui.utils.drawWithBrush
import io.newm.core.ui.utils.iconGradient
import io.newm.feature.musicplayer.MiniPlayer
Expand Down Expand Up @@ -332,7 +332,7 @@ private fun RowScope.HomeBottomNavigationItem(
label = {
Text(
text = label,
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 9.sp,
maxLines = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import io.newm.core.resources.R
import io.newm.core.theme.NewmTheme
import io.newm.core.ui.OnboardingMainImage
import io.newm.core.ui.buttons.PrimaryButton
import io.newm.core.ui.theme.NewmTheme
import io.newm.shared.commonPublic.analytics.NewmAppEventLogger

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand All @@ -32,14 +33,13 @@ import coil3.request.ImageRequest
import coil3.request.error
import coil3.request.placeholder
import io.newm.core.resources.R
import io.newm.core.theme.CerisePink
import io.newm.core.theme.Gray16
import io.newm.core.theme.GraySuit
import io.newm.core.theme.SteelPink
import io.newm.core.theme.White
import io.newm.core.theme.inter
import io.newm.core.ui.LoadingScreen
import io.newm.core.ui.buttons.SecondaryButton
import io.newm.core.ui.theme.CerisePink
import io.newm.core.ui.theme.Gray16
import io.newm.core.ui.theme.GraySuit
import io.newm.core.ui.theme.SteelPink
import io.newm.core.ui.theme.White
import io.newm.core.ui.utils.ErrorScreen
import io.newm.core.ui.utils.textGradient
import io.newm.shared.commonPublic.analytics.NewmAppEventLogger
Expand Down Expand Up @@ -88,7 +88,7 @@ fun PortfolioScreen(
Text(
text = stringResource(id = R.string.title_investment_portfolio),
modifier = Modifier.padding(16.dp),
style = MaterialTheme.typography.h1.copy(textGradient(SteelPink, CerisePink)),
style = MaterialTheme.typography.h4.copy(textGradient(SteelPink, CerisePink)),
)

Box(modifier = Modifier.padding(all = 16.dp).background(color = Gray16).fillMaxWidth()) {
Expand All @@ -104,7 +104,7 @@ fun PortfolioScreen(
)
SecondaryButton(
modifier = Modifier.padding(vertical = 32.dp),
labelResId = R.string.claim,
label = stringResource(R.string.claim),
onClick = {
Toast.makeText(currentContext, "Coming soon!", Toast.LENGTH_SHORT).show()
},
Expand Down Expand Up @@ -157,15 +157,15 @@ private fun StreamTokenRowItem(track: NFTTrack) {
Column(modifier = Modifier.padding(start = 12.dp)) {
Text(
text = track.title,
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 14.sp,
color = White,
)
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
text = track.artists.joinToString(", "),
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 12.sp,
color = GraySuit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.IntOffset
Expand All @@ -60,21 +59,30 @@ import coil3.compose.AsyncImage
import coil3.request.ImageRequest
import coil3.request.error
import coil3.request.placeholder
import io.newm.core.resources.R
import io.newm.core.theme.CerisePink
import io.newm.core.theme.DarkPink
import io.newm.core.theme.DarkViolet
import io.newm.core.theme.Gray16
import io.newm.core.theme.GraySuit
import io.newm.core.theme.NewmTheme
import io.newm.core.theme.Purple
import io.newm.core.theme.StatusGreen
import io.newm.core.theme.SteelPink
import io.newm.core.theme.White
import io.newm.core.theme.inter
import io.newm.core.theme.raleway
import io.newm.core.resources.Res
import io.newm.core.resources.downloaded_description
import io.newm.core.resources.filter_description
import io.newm.core.resources.ic_download
import io.newm.core.resources.ic_downloaded
import io.newm.core.resources.ic_library_filter
import io.newm.core.resources.library_download
import io.newm.core.resources.library_download_description
import io.newm.core.resources.library_remove_description
import io.newm.core.resources.library_search
import io.newm.core.resources.nft_library_error_message
import io.newm.core.resources.title_nft_library
import io.newm.core.ui.LoadingScreen
import io.newm.core.ui.text.SearchBar
import io.newm.core.ui.theme.CerisePink
import io.newm.core.ui.theme.DarkPink
import io.newm.core.ui.theme.DarkViolet
import io.newm.core.ui.theme.Gray16
import io.newm.core.ui.theme.GraySuit
import io.newm.core.ui.theme.NewmTheme
import io.newm.core.ui.theme.Purple
import io.newm.core.ui.theme.StatusGreen
import io.newm.core.ui.theme.SteelPink
import io.newm.core.ui.theme.White
import io.newm.core.ui.utils.ErrorScreen
import io.newm.core.ui.utils.drawWithBrush
import io.newm.core.ui.utils.textGradient
Expand All @@ -90,6 +98,8 @@ import io.newm.shared.commonPublic.analytics.NewmAppEventLogger
import io.newm.shared.commonPublic.analytics.events.AppScreens
import io.newm.shared.commonPublic.models.NFTTrack
import kotlinx.coroutines.launch
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource
import kotlin.math.roundToInt

internal const val TAG_NFT_LIBRARY_SCREEN = "TAG_NFT_LIBRARY_SCREEN"
Expand Down Expand Up @@ -128,7 +138,7 @@ fun NFTLibraryScreenUi(
is NFTLibraryState.Error -> {
LaunchedEffect(Unit) { eventLogger.logPageLoad(AppScreens.ErrorScreen.name) }
ErrorScreen(
title = stringResource(R.string.nft_library_error_message),
title = stringResource(Res.string.nft_library_error_message),
message = state.message,
)
}
Expand All @@ -138,11 +148,11 @@ fun NFTLibraryScreenUi(

LaunchedEffect(Unit) { eventLogger.logPageLoad(AppScreens.NFTLibraryScreen.name) }
Text(
text = stringResource(id = R.string.title_nft_library),
text = stringResource(Res.string.title_nft_library),
modifier = Modifier.padding(16.dp),
style =
TextStyle(
fontFamily = raleway,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 32.sp,
brush = textGradient(SteelPink, CerisePink),
Expand Down Expand Up @@ -208,7 +218,7 @@ private fun NFTTracks(
verticalAlignment = Alignment.CenterVertically,
) {
SearchBar(
placeholderResId = R.string.library_search,
placeholderResId = Res.string.library_search,
modifier = Modifier.fillMaxWidth().weight(1f),
onQueryChange = onQueryChange,
)
Expand All @@ -217,8 +227,8 @@ private fun NFTTracks(
onClick = { scope.launch { filterSheetState.show() } },
) {
Icon(
painter = painterResource(id = R.drawable.ic_library_filter),
contentDescription = stringResource(R.string.filter_description),
painter = painterResource(Res.drawable.ic_library_filter),
contentDescription = stringResource(Res.string.filter_description),
modifier = Modifier.drawWithBrush(LibraryBrush),
)
}
Expand Down Expand Up @@ -364,8 +374,8 @@ private fun TrackRowItem(
ImageRequest
.Builder(LocalContext.current)
.data(track.imageUrl)
.error(R.drawable.ic_default_track_cover_art)
.placeholder(R.drawable.ic_default_track_cover_art)
.error(io.newm.core.resources.R.drawable.ic_default_track_cover_art)
.placeholder(io.newm.core.resources.R.drawable.ic_default_track_cover_art)
.build(),
modifier = Modifier.size(48.dp).clip(RoundedCornerShape(4.dp)),
contentScale = ContentScale.Crop,
Expand All @@ -374,7 +384,7 @@ private fun TrackRowItem(
Column(modifier = Modifier.padding(start = 12.dp)) {
Text(
text = track.title,
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 14.sp,
color = if (isSelected) StatusGreen else White,
Expand Down Expand Up @@ -402,8 +412,8 @@ private fun TrackRowItem(

is DownloadState.Completed -> {
Icon(
painter = painterResource(id = R.drawable.ic_downloaded),
contentDescription = stringResource(R.string.downloaded_description),
painter = painterResource(Res.drawable.ic_downloaded),
contentDescription = stringResource(Res.string.downloaded_description),
tint = StatusGreen,
modifier = Modifier.size(16.dp),
)
Expand All @@ -417,7 +427,7 @@ private fun TrackRowItem(

Text(
text = track.artists.joinToString(","),
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 12.sp,
color = GraySuit,
Expand Down Expand Up @@ -449,15 +459,15 @@ fun DownloadButton(
) {
IconButton(onClick = onClick, modifier = Modifier.size(16.dp)) {
Icon(
painter = painterResource(id = R.drawable.ic_download),
contentDescription = stringResource(R.string.library_download_description),
painter = painterResource(Res.drawable.ic_download),
contentDescription = stringResource(Res.string.library_download_description),
)
}
Text(
text = stringResource(id = R.string.library_download),
text = stringResource(Res.string.library_download),
style =
TextStyle(
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 12.sp,
color = White,
Expand All @@ -478,14 +488,14 @@ fun RemoveButton(
IconButton(onClick = onClick, modifier = Modifier.size(16.dp)) {
Icon(
imageVector = Icons.Default.Delete,
contentDescription = stringResource(R.string.library_remove_description),
contentDescription = stringResource(Res.string.library_remove_description),
)
}
Text(
text = stringResource(id = R.string.library_remove_description),
text = stringResource(Res.string.library_remove_description),
style =
TextStyle(
fontFamily = inter,
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 12.sp,
color = White,
Expand Down
Loading