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
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ data class ChatMessageConversationScreen(val messageId: ID) : AppScreen(), ChatG
)
Column {
Text(text = user.username,
style = CodeTheme.typography.subtitle2
style = CodeTheme.typography.screenTitle
)
state.lastSeen?.let {
Text(
text = "Last seen ${it.formatDateRelatively()}",
style = CodeTheme.typography.caption,
color = BrandLight,
color = CodeTheme.colors.textSecondary,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ private fun PhoneCountrySelection(
.padding(start = CodeTheme.dimens.inset)
.align(Alignment.CenterVertically),
text = countryCode.name,
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.Bold)
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.Bold)
)
Text(
modifier = Modifier
.padding(CodeTheme.dimens.inset)
.align(Alignment.CenterVertically),
color = BrandLight,
color = CodeTheme.colors.textSecondary,
text = "+${countryCode.phoneCode}",
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.Bold)
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.Bold)
)
}
Divider(
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/ui/components/Badge.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fun Badge(
Text(
text = text,
color = contentColor,
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.W700),
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.W700),
modifier = Modifier
.drawBehind {
drawCircle(
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/getcode/ui/components/BottomBarView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ fun BottomBarView(
CompositionLocalProvider(LocalContentColor provides White) {
Column(verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2)) {
Text(
style = CodeTheme.typography.subtitle1,
style = CodeTheme.typography.textLarge,
text = bottomBarMessage.title
)
Text(
style = CodeTheme.typography.body2,
style = CodeTheme.typography.textSmall,
text = bottomBarMessage.subtitle,
color = LocalContentColor.current.copy(alpha = 0.8f)
)
Expand Down Expand Up @@ -101,7 +101,7 @@ fun BottomBarView(
onClose(BottomBarManager.BottomBarActionType.Tertiary)
}
.padding(vertical = CodeTheme.dimens.grid.x2),
style = CodeTheme.typography.button,
style = CodeTheme.typography.textLarge,
color = White,
text = it
)
Expand Down
9 changes: 4 additions & 5 deletions app/src/main/java/com/getcode/ui/components/CodeButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ fun CodeButton(
shape = shape,
contentColor = textColor,
) {
Text(
text = text,
style = CodeTheme.typography.button,
)
Text(text = text)
}
}

Expand Down Expand Up @@ -139,7 +136,9 @@ fun CodeButton(
}

else -> {
content()
ProvideTextStyle(value = CodeTheme.typography.textMedium) {
content()
}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions app/src/main/java/com/getcode/ui/components/CodeKeyPad.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ private fun KeyBoardButton(
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text(
text = text,
style = CodeTheme.typography.button.copy(
fontSize = 32.sp,
fontWeight = FontWeight.Normal,
textAlign = TextAlign.Center
),
style = CodeTheme.typography.keyboard,
modifier = Modifier
.fillMaxWidth()
.padding(vertical = CodeTheme.dimens.staticGrid.x1)
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/getcode/ui/components/CodeSeedView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ private fun SeedItem(
text = "$number.",
modifier = Modifier.padding(end = CodeTheme.dimens.grid.x3)
.width(CodeTheme.dimens.grid.x6),
style = CodeTheme.typography.body1.copy(
style = CodeTheme.typography.textMedium.copy(
textAlign = TextAlign.End
),
color = BrandLight
color = CodeTheme.colors.textSecondary
)
Box {
Text(
modifier = Modifier.alpha(if (isVisible) 1f else 0f),
text = text,
style = CodeTheme.typography.body1
style = CodeTheme.typography.textMedium
)
Text(
modifier = Modifier.alpha(if (!isVisible) 1f else 0f),
text = "-".repeat(text.length),
style = CodeTheme.typography.body1
style = CodeTheme.typography.textMedium
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/ui/components/OtpBox.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun OtpBox(
text = character,
modifier = Modifier
.align(Alignment.Center),
style = CodeTheme.typography.h6.copy(fontWeight = FontWeight.Normal),
style = CodeTheme.typography.displayExtraSmall,
color = Color.White,
)
}
Expand Down
5 changes: 1 addition & 4 deletions app/src/main/java/com/getcode/ui/components/SheetTitle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ fun BoxScope.SheetTitleText(modifier: Modifier = Modifier, text: String) {
Text(
text = text,
color = Color.White,
style = CodeTheme.typography.h6.copy(
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center
),
style = CodeTheme.typography.screenTitle,
modifier = modifier.align(Alignment.Center)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ object SlideToConfirmDefaults {
Text(
text = text,
color = hintTextColor,
style = CodeTheme.typography.body1,
style = CodeTheme.typography.textMedium,
modifier = modifier,
)
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/getcode/ui/components/TextInput.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ fun TextInput(
onStateChanged: () -> Unit = { },
keyboardActions: KeyboardActions = KeyboardActions(),
keyboardOptions: KeyboardOptions = KeyboardOptions(),
style: TextStyle = CodeTheme.typography.body1,
placeholderStyle: TextStyle = CodeTheme.typography.body1,
style: TextStyle = CodeTheme.typography.textMedium,
placeholderStyle: TextStyle = CodeTheme.typography.textMedium,
shape: Shape = CodeTheme.shapes.extraSmall,
colors: TextFieldColors = inputColors(),
enabled: Boolean = true,
Expand Down Expand Up @@ -135,8 +135,8 @@ fun SecureTextInput(
placeholder: String = "",
state: TextFieldState,
onStateChanged: () -> Unit = { },
style: TextStyle = CodeTheme.typography.subtitle1,
placeholderStyle: TextStyle = CodeTheme.typography.subtitle1,
style: TextStyle = CodeTheme.typography.textLarge,
placeholderStyle: TextStyle = CodeTheme.typography.textLarge,
shape: Shape = RectangleShape,
colors: TextFieldColors = inputColors(),
enabled: Boolean = true,
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/getcode/ui/components/TextSection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ fun TextSection(title: String, description: String) {
Column(verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2)) {
Text(
text = title,
style = CodeTheme.typography.subtitle1
style = CodeTheme.typography.textLarge
)
Text(
text = description,
style = CodeTheme.typography.body2
style = CodeTheme.typography.textSmall
)
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/ui/components/TitleBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fun TitleBar(
Text(
text = title,
color = Color.White,
style = CodeTheme.typography.subtitle2,
style = CodeTheme.typography.screenTitle,
modifier = Modifier.align(Alignment.Center)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private fun TopBarView(
)
Text(
text = topBarMessage.title,
style = CodeTheme.typography.body1.copy(
style = CodeTheme.typography.textMedium.copy(
fontWeight = FontWeight.Bold,
fontSize = 18.sp,
lineHeight = 20.sp
Expand All @@ -141,7 +141,7 @@ private fun TopBarView(
modifier = Modifier
.padding(horizontal = CodeTheme.dimens.inset),
text = topBarMessage.message,
style = CodeTheme.typography.body1.copy(
style = CodeTheme.typography.textMedium.copy(
fontSize = 15.sp,
lineHeight = 18.sp
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fun TwitterUsernameDisplay(
painter = rememberVectorPainter(image = ImageVector.vectorResource(id = R.drawable.ic_twitter_x)),
contentDescription = null
)
Text(text = username, style = CodeTheme.typography.subtitle1)
Text(text = username, style = CodeTheme.typography.textLarge)
verificationStatus?.let { status ->
status.checkmark()?.let { asset ->
Image(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fun AnnouncementMessage(
) {
Text(
text = text,
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.W500)
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.W500)
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/getcode/ui/components/chat/ChatNode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fun ChatNode(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(text = chat.localizedTitle, maxLines = 1, style = CodeTheme.typography.body1)
Text(text = chat.localizedTitle, maxLines = 1, style = CodeTheme.typography.textMedium)
chat.lastMessageMillis?.let {
val isToday = DateUtils.isToday(it)
Text(
Expand All @@ -69,7 +69,7 @@ fun ChatNode(
} else {
DateUtils.getDateRelatively(it)
},
style = CodeTheme.typography.body2,
style = CodeTheme.typography.textSmall,
color = if (hasUnreadMessages) ChatNodeDefaults.UnreadIndicator else CodeTheme.colors.brandLight,
)
}
Expand All @@ -81,7 +81,7 @@ fun ChatNode(
Text(
modifier = Modifier.weight(1f),
text = chat.messagePreview,
style = CodeTheme.typography.body1,
style = CodeTheme.typography.textMedium,
color = CodeTheme.colors.brandLight,
maxLines = 2,
overflow = TextOverflow.Ellipsis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal fun DateWithStatus(
modifier = Modifier.weight(1f, fill = false),
text = date.formatTimeRelatively(),
style = DateWithStatusDefaults.DateTextStyle,
color = BrandLight,
color = CodeTheme.colors.textSecondary,
maxLines = 1
)
if (status.isValid() && status != MessageStatus.Incoming) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal fun EncryptedContent(modifier: Modifier = Modifier, date: Instant) {
modifier = Modifier.align(Alignment.End),
text = date.formatTimeRelatively(),
style = CodeTheme.typography.caption,
color = BrandLight,
color = CodeTheme.colors.textSecondary,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ internal fun MessagePayment(
Text(
text = price,
color = Color.White,
style = CodeTheme.typography.h3
style = CodeTheme.typography.displaySmall
)
}
)
Text(
text = contents.verb.localizedText,
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.W500)
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.W500)
)
} else {
Text(
text = contents.verb.localizedText,
style = CodeTheme.typography.body1.copy(fontWeight = FontWeight.W500)
style = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.W500)
)
PriceWithFlag(
currencyCode = amount.rate.currency,
Expand All @@ -89,7 +89,7 @@ internal fun MessagePayment(
Text(
text = price,
color = Color.White,
style = CodeTheme.typography.h3
style = CodeTheme.typography.displaySmall
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private fun rememberAlignmentRule(

@Composable
private fun MessageContent(maxWidth: Int, message: String, date: Instant, status: MessageStatus) {
val contentStyle = CodeTheme.typography.body1.copy(fontWeight = FontWeight.W500)
val contentStyle = CodeTheme.typography.textMedium.copy(fontWeight = FontWeight.W500)
val alignmentRule by rememberAlignmentRule(
contentTextStyle = contentStyle,
maxWidth = maxWidth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DownloadCodeTip @Inject constructor(
return {
Text(
text = stringResource(R.string.action_tapToShareDownloadLink),
style = CodeTheme.typography.body1
style = CodeTheme.typography.textMedium
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fun ShareDownloadScreen() {
Text(
modifier = Modifier.fillMaxWidth(0.6f),
text = stringResource(R.string.title_scanToDownloadCode),
style = CodeTheme.typography.subtitle1,
style = CodeTheme.typography.textLarge,
textAlign = TextAlign.Center
)

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/view/login/AccessKey.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ fun AccessKey(
top = CodeTheme.dimens.grid.x3,
bottom = CodeTheme.dimens.grid.x6
),
style = CodeTheme.typography.body2.copy(textAlign = TextAlign.Center),
style = CodeTheme.typography.textSmall.copy(textAlign = TextAlign.Center),
color = White,
text = stringResource(R.string.subtitle_accessKeyDescription)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fun CameraPermission(navigator: CodeNavigator = LocalCodeNavigator.current) {
end.linkTo(parent.end)
},
text = stringResource(R.string.permissions_description_camera),
style = CodeTheme.typography.body1
style = CodeTheme.typography.textMedium
.copy(textAlign = TextAlign.Center),
)

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/getcode/view/login/InviteCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fun InviteCode(
)
.background(White05),
value = dataState.inviteCode,
textStyle = CodeTheme.typography.subtitle1,
textStyle = CodeTheme.typography.textLarge,
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Text),
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.Transparent,
Expand Down Expand Up @@ -116,10 +116,10 @@ fun InviteCode(
modifier = Modifier.constrainAs(captionText) {
linkTo(inviteCodeRow.bottom, captionText.top, topMargin = x4)
},
style = CodeTheme.typography.body2.copy(
style = CodeTheme.typography.textSmall.copy(
textAlign = TextAlign.Center
),
color = BrandLight,
color = CodeTheme.colors.textSecondary,
text = stringResource(id = R.string.subtitle_inviteCodeDescription)
)

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/view/login/LoginHome.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fun LoginHome(
text = bottomString,
style = CodeTheme.typography.caption.copy(
textAlign = TextAlign.Center,
color = BrandLight
color = CodeTheme.colors.textSecondary
),
modifier = Modifier
.constrainAs(toc) {
Expand Down
Loading