Skip to content

Commit

Permalink
Merge pull request #172 from TimerTiTi/release-1.3.0
Browse files Browse the repository at this point in the history
Release 1.3.0
  • Loading branch information
koreatlwls authored Jul 19, 2024
2 parents d7af3f3 + d51c2dc commit 4bdaae6
Show file tree
Hide file tree
Showing 45 changed files with 372 additions and 254 deletions.
4 changes: 2 additions & 2 deletions build-logic/src/main/kotlin/com/titi/common/BuildInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object BuildType {

object AppConfig {
const val APP_ID = "com.titi.app"
const val APP_VERSION_NAME = "1.2.1"
const val APP_VERSION_CODE = 36
const val APP_VERSION_NAME = "1.3.0"
const val APP_VERSION_CODE = 38
const val APP_NAME = "TiTi"
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private fun TdsAnimatedCounterPreview() {
TdsAnimatedCounter(
count = 13,
color = TdsColor.TEXT.getColor(),
textStyle = TdsTextStyle.BLACK_TEXT_STYLE,
textStyle = TdsTextStyle.EXTRA_BOLD_TEXT_STYLE,
fontSize = 40.sp,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fun TdsCircularProgressIndicator(

CircularProgressIndicator(
modifier = Modifier.fillMaxSize(),
progress = sumTime / maxTime.toFloat(),
progress = { sumTime / maxTime.toFloat() },
color = color,
trackColor = color.copy(alpha = 0.5f),
strokeCap = StrokeCap.Round,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -53,16 +54,19 @@ fun TdsDialog(
Spacer(modifier = Modifier.height(24.dp))

TdsText(
modifier = Modifier.padding(horizontal = 12.dp),
text = tdsDialogInfo.title,
textStyle = TdsTextStyle.EXTRA_BOLD_TEXT_STYLE,
fontSize = 17.sp,
color = TdsColor.TEXT,
textAlign = TextAlign.Center,
)

tdsDialogInfo.message?.let { message ->
Spacer(modifier = Modifier.height(8.dp))

TdsText(
modifier = Modifier.padding(horizontal = 12.dp),
text = message,
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
fontSize = 13.sp,
Expand Down Expand Up @@ -194,7 +198,7 @@ private fun TdsAlertDialogPreview() {
TdsDialog(
tdsDialogInfo = TdsDialogInfo.Alert(
title = "새로운 기록 설정",
message = "2023.03.10 목표시간 설정",
message = "2023.03.10 목표",
cancelable = false,
onDismiss = {},
confirmText = "Confirm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ fun TdsTaskListItem(
AnimatedVisibility(visible = tdsTask.isTaskTargetTimeOn) {
Row(modifier = Modifier.padding(top = 4.dp)) {
TdsText(
text =
stringResource(
R.string.task_set_goal_time,
tdsTask.taskTargetTime.getTimeString(),
),
text = stringResource(R.string.tasks_popup_settasktargettime) +
" : ${tdsTask.taskTargetTime.getTimeString()}",
textStyle = TdsTextStyle.NORMAL_TEXT_STYLE,
fontSize = 14.sp,
color = TdsColor.LIGHT_GRAY,
Expand All @@ -94,7 +91,7 @@ fun TdsTaskListItem(

TdsText(
modifier = Modifier.clickable { onEdit() },
text = stringResource(R.string.edit),
text = stringResource(R.string.common_text_edit),
textStyle = TdsTextStyle.NORMAL_TEXT_STYLE,
fontSize = 14.sp,
color = themeColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ 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.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.titi.app.core.designsystem.R
import com.titi.app.core.designsystem.model.TdsTaskData
import com.titi.app.core.designsystem.theme.TdsColor
import com.titi.app.core.designsystem.theme.TdsTextStyle
Expand Down Expand Up @@ -73,7 +75,7 @@ fun TdsTaskResultList(
.fillMaxWidth()
.padding(top = 8.dp)
.clickable { onClickAddTask?.invoke() },
text = "+ 기록추가",
text = "+ " + stringResource(R.string.editdaily_button_appendnewhistory),
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
color = TdsColor.TEXT,
fontSize = 14.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private fun TdsTextPreview() {
TdsText(
text = "ABC",
color = TdsColor.TEXT,
textStyle = TdsTextStyle.BLACK_TEXT_STYLE,
textStyle = TdsTextStyle.EXTRA_BOLD_TEXT_STYLE,
fontSize = 40.sp,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private fun TdsTimeCounterPreview() {
seconds = 20,
),
color = TdsColor.TEXT.getColor(),
textStyle = TdsTextStyle.BLACK_TEXT_STYLE,
textStyle = TdsTextStyle.EXTRA_BOLD_TEXT_STYLE,
fontSize = 40.sp,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fun TdsTimer(
modifier = Modifier
.size(outCircularSize)
.align(Alignment.Center),
progress = outCircularAnimateProgress.value,
progress = { outCircularAnimateProgress.value },
color = if (savedTime < 60 && recordingMode == 1) {
TdsColor.RED.getColor()
} else {
Expand All @@ -104,7 +104,7 @@ fun TdsTimer(
modifier = Modifier
.size(inCircularSize)
.align(Alignment.Center),
progress = inCircularAnimateProgress.value,
progress = { inCircularAnimateProgress.value },
color = inCircularLineTrackColor,
trackColor = Color.Transparent,
strokeWidth = inCircularTrackWidth,
Expand All @@ -120,7 +120,7 @@ fun TdsTimer(
Spacer(modifier = Modifier.weight(2f))

TdsText(
text = stringResource(R.string.sum_time),
text = stringResource(R.string.recording_text_sumtime),
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
fontSize = subTextSize.sp,
color = fontColor,
Expand All @@ -140,9 +140,9 @@ fun TdsTimer(

TdsText(
text = if (recordingMode == 1) {
stringResource(R.string.timer)
stringResource(R.string.common_button_timer)
} else {
stringResource(R.string.stopwatch)
stringResource(R.string.common_button_stopwatch)
},
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
fontSize = mainTextSize.sp,
Expand All @@ -154,7 +154,7 @@ fun TdsTimer(
if (isFinish) {
TdsText(
modifier = clickStopStartModifier,
text = stringResource(id = R.string.finish_text),
text = stringResource(id = R.string.timer_text_finish),
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
fontSize = mainTimerTextSize.sp,
color = fontColor,
Expand Down Expand Up @@ -185,9 +185,9 @@ fun TdsTimer(

TdsText(
text = if (isTaskTargetTimeOn) {
stringResource(id = R.string.task_time)
stringResource(id = R.string.recording_text_tasktargettime)
} else {
stringResource(id = R.string.goal_time)
stringResource(id = R.string.recording_text_targettime)
},
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
fontSize = subTextSize.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ fun AddTaskNameDialog(onPositive: (String) -> Unit, onShowDialog: (Boolean) -> U

TdsDialog(
tdsDialogInfo = TdsDialogInfo.Confirm(
title = stringResource(id = R.string.add_task_title),
message = stringResource(id = R.string.add_task_message),
title = stringResource(id = R.string.tasks_hint_newtasktitle),
message = stringResource(id = R.string.tasks_popup_newtaskdesc),
cancelable = false,
positiveText = stringResource(id = R.string.Ok),
positiveText = stringResource(id = R.string.common_text_ok),
onPositive = {
onPositive(taskName)
},
negativeText = stringResource(id = R.string.Cancel),
negativeText = stringResource(id = R.string.common_text_cancel),
),
onShowDialog = onShowDialog,
) {
Expand All @@ -61,7 +61,7 @@ fun AddTaskNameDialog(onPositive: (String) -> Unit, onShowDialog: (Boolean) -> U
text = taskName,
placeHolder = {
TdsText(
text = stringResource(id = R.string.add_task_title),
text = stringResource(id = R.string.tasks_hint_newtasktitle),
textStyle = TdsTextStyle.NORMAL_TEXT_STYLE,
fontSize = 17.sp,
color = TdsColor.DIVIDER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ fun EditTaskNameDialog(

TdsDialog(
tdsDialogInfo = TdsDialogInfo.Confirm(
title = stringResource(id = R.string.modify_task_title),
message = stringResource(id = R.string.add_task_message),
positiveText = stringResource(id = R.string.Ok),
title = stringResource(id = R.string.tasks_popup_edittaskname),
message = stringResource(id = R.string.tasks_popup_newtaskdesc),
positiveText = stringResource(id = R.string.common_text_ok),
onPositive = {
onPositive(editTaskName)
},
negativeText = stringResource(id = R.string.Cancel),
negativeText = stringResource(id = R.string.common_text_cancel),
),
onShowDialog = onShowDialog,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,82 +6,77 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.intl.Locale
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.sp
import com.titi.app.core.designsystem.R

val hgggothicssiProFontFamily =
FontFamily(
Font(R.font.hgggothicssi_pro_00g, FontWeight.Thin),
Font(R.font.hgggothicssi_pro_20g, FontWeight.ExtraLight),
Font(R.font.hgggothicssi_pro_40g, FontWeight.Normal),
Font(R.font.hgggothicssi_pro_60g, FontWeight.SemiBold),
Font(R.font.hgggothicssi_pro_80g, FontWeight.ExtraBold),
Font(R.font.hgggothicssi_pro_99g, FontWeight.Black),
)
val misansFontFamily =
FontFamily(
Font(R.font.misans_normal, FontWeight.Normal),
Font(R.font.misans_medium, FontWeight.SemiBold),
Font(R.font.misans_semibold, FontWeight.ExtraBold),
)

@Immutable
data class TdsTypography(
val thinTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.Thin,
fontSize = 1.sp,
),
val extraLightTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.ExtraLight,
fontSize = 1.sp,
),
val normalTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.Normal,
fontSize = 1.sp,
),
val semiBoldTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.SemiBold,
fontSize = 1.sp,
),
val extraBoldTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.ExtraBold,
fontSize = 1.sp,
),
val blackTextStyle: TextStyle =
TextStyle(
fontFamily = hgggothicssiProFontFamily,
fontWeight = FontWeight.Black,
fontSize = 1.sp,
),
)

enum class TdsTextStyle {
THIN_TEXT_STYLE,
EXTRA_LIGHT_TEXT_STYLE,
NORMAL_TEXT_STYLE,
SEMI_BOLD_TEXT_STYLE,
EXTRA_BOLD_TEXT_STYLE,
BLACK_TEXT_STYLE,
;

@Composable
fun getTextStyle(fontSize: TextUnit) = when (this) {
THIN_TEXT_STYLE -> TiTiTheme.textStyle.thinTextStyle.copy(fontSize = fontSize)
EXTRA_LIGHT_TEXT_STYLE ->
TiTiTheme.textStyle.extraLightTextStyle.copy(
fontSize = fontSize,
)
NORMAL_TEXT_STYLE -> TiTiTheme.textStyle.normalTextStyle.copy(fontSize = fontSize)
SEMI_BOLD_TEXT_STYLE -> TiTiTheme.textStyle.semiBoldTextStyle.copy(fontSize = fontSize)
EXTRA_BOLD_TEXT_STYLE ->
NORMAL_TEXT_STYLE -> {
val fontFamily = if (Locale.current.language == "zh") {
misansFontFamily
} else {
hgggothicssiProFontFamily
}
TiTiTheme.textStyle.normalTextStyle.copy(fontFamily = fontFamily, fontSize = fontSize)
}
SEMI_BOLD_TEXT_STYLE -> {
val fontFamily = if (Locale.current.language == "zh") {
misansFontFamily
} else {
hgggothicssiProFontFamily
}
TiTiTheme.textStyle.semiBoldTextStyle.copy(fontFamily = fontFamily, fontSize = fontSize)
}
EXTRA_BOLD_TEXT_STYLE -> {
val fontFamily = if (Locale.current.language == "zh") {
misansFontFamily
} else {
hgggothicssiProFontFamily
}
TiTiTheme.textStyle.extraBoldTextStyle.copy(
fontFamily = fontFamily,
fontSize = fontSize,
)
BLACK_TEXT_STYLE -> TiTiTheme.textStyle.blackTextStyle.copy(fontSize = fontSize)
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4bdaae6

Please sign in to comment.