Skip to content

Commit

Permalink
Merge pull request #175 from TimerTiTi/release-1.3.1
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
koreatlwls authored Jul 22, 2024
2 parents 4bdaae6 + ec6f3db commit 09b30a2
Show file tree
Hide file tree
Showing 20 changed files with 195 additions and 212 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.3.0"
const val APP_VERSION_CODE = 38
const val APP_VERSION_NAME = "1.3.1"
const val APP_VERSION_CODE = 39
const val APP_NAME = "TiTi"
}
2 changes: 0 additions & 2 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ dependencies {
implementation(project(":core:util"))

implementation(libs.threetenabp)
implementation(libs.balloon)
implementation(libs.picker)
}
Original file line number Diff line number Diff line change
@@ -1,89 +1,81 @@
package com.titi.app.core.designsystem.component

import android.annotation.SuppressLint
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.TimePicker
import androidx.compose.material3.TimePickerState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
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.sp
import com.chargemap.compose.numberpicker.AMPMHours
import com.chargemap.compose.numberpicker.HoursNumberPicker
import com.skydoves.balloon.ArrowPositionRules
import com.skydoves.balloon.BalloonAnimation
import com.skydoves.balloon.BalloonSizeSpec
import com.skydoves.balloon.compose.Balloon
import com.skydoves.balloon.compose.rememberBalloonBuilder
import com.skydoves.balloon.compose.setBackgroundColor
import com.titi.app.core.designsystem.R
import com.titi.app.core.designsystem.model.TdsDialogInfo
import com.titi.app.core.designsystem.theme.TdsColor
import com.titi.app.core.designsystem.theme.TdsTextStyle
import com.titi.app.core.util.toOnlyTime
import java.time.LocalDateTime

@SuppressLint("DefaultLocale")
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun TdsTimePicker(
state: TimePickerState,
themeColor: TdsColor,
localDateTime: LocalDateTime,
pickerValue: AMPMHours,
onValueChange: (AMPMHours) -> Unit,
onTimeChanged: (LocalDateTime) -> Unit,
) {
val builder = rememberBalloonBuilder {
setArrowSize(10)
setArrowPosition(0.5f)
setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
setWidth(BalloonSizeSpec.WRAP)
setHeight(BalloonSizeSpec.WRAP)
setPadding(12)
setMarginHorizontal(12)
setCornerRadius(8f)
setBackgroundColor(color = Color(0xCCFFFFFF))
setBalloonAnimation(BalloonAnimation.ELASTIC)
var showTimePicker by remember {
mutableStateOf(false)
}

Balloon(
builder = builder,
balloonContent = {
HoursNumberPicker(
modifier = Modifier
.width(180.dp)
.height(120.dp),
value = pickerValue,
dividersColor = Color.Transparent,
onValueChange = {
onValueChange(it as AMPMHours)
if (showTimePicker) {
TdsDialog(
tdsDialogInfo = TdsDialogInfo.Confirm(
title = "",
positiveText = stringResource(R.string.common_text_ok),
negativeText = stringResource(R.string.common_text_cancel),
onPositive = {
onTimeChanged(
localDateTime.withHour(state.hour).withMinute(state.minute),
)
},
)
},
) { balloonWindow ->
TdsText(
modifier = Modifier
.width(90.dp)
.background(
color = themeColor
.getColor()
.copy(0.5f),
shape = RoundedCornerShape(4.dp),
)
.border(
width = 2.dp,
color = themeColor.getColor(),
shape = RoundedCornerShape(4.dp),
)
.padding(vertical = 4.dp)
.clickable { balloonWindow.showAlignBottom() },
text = localDateTime.toOnlyTime(),
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
color = TdsColor.TEXT,
fontSize = 22.sp,
textAlign = TextAlign.Center,
)
),
onShowDialog = { showTimePicker = it },
) {
TimePicker(state = state)
}
}

TdsText(
modifier = Modifier
.width(90.dp)
.background(
color = themeColor
.getColor()
.copy(0.5f),
shape = RoundedCornerShape(4.dp),
)
.border(
width = 2.dp,
color = themeColor.getColor(),
shape = RoundedCornerShape(4.dp),
)
.padding(vertical = 4.dp)
.clickable { showTimePicker = true },
text = localDateTime.toOnlyTime(),
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE,
color = TdsColor.TEXT,
fontSize = 22.sp,
textAlign = TextAlign.Center,
)
}
14 changes: 9 additions & 5 deletions core/designsystem/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="recordingcolorselector_text_backgroundcolor">배경</string>
<string name="recordingcolorselector_text_textcolor">텍스트</string>
<string name="tasks_hint_newtasktitle">새로운 Task</string>
<string name="tasks_popup_newtaskdesc">12자리 내의 새로운 Task명을 입력하세요</string>
<string name="tasks_popup_newtaskdesc">12자리 내의 새로운 Task명을 입력하세요.</string>
<string name="tasks_popup_edittaskname">Task명 수정</string>
<string name="tasks_popup_settasktargettime">목표시간 설정</string>
<string name="timer_text_settimertimetitle">타이머 시간 설정</string>
Expand All @@ -19,14 +19,14 @@
<string name="common_text_ok">확인</string>
<string name="common_text_done">완료</string>
<string name="common_text_edit">편집</string>
<string name="measure_popup_permissiontitle">알람을 설정하기 위해 권한이 필요로 합니다</string>
<string name="measure_popup_permissiontitle">알람을 설정하기 위해 권한이 필요로 합니다.</string>
<string name="measure_popup_permissiondesc">설정 하러 가시겠습니까?</string>
<string name="colorselector_text_color">컬러</string>
<string name="colorselector_text_setgraphcolor">그래프의 컬러를 설정합니다</string>
<string name="colorselector_text_setgraphcolor">그래프의 컬러를 설정합니다.</string>
<string name="colorselector_text_colordirectiontitle">컬러 방향</string>
<string name="colorselector_text_colordirectiondesc">컬러 조합의 방향을 설정합니다</string>
<string name="colorselector_text_colordirectiondesc">컬러 조합의 방향을 설정합니다.</string>
<string name="common_text_targettime">목표 시간</string>
<string name="logsetting_text_dailytargettimedesc">원형 프로그래스바의 목표 시간을 설정합니다</string>
<string name="logsetting_text_dailytargettimedesc">원형 프로그래스바의 목표 시간을 설정합니다.</string>
<string name="common_popup_setmonthtargettime">Month의 목표 시간을 입력해주세요 (시간 단위)</string>
<string name="common_popup_setweektargettime">Week의 목표 시간을 입력해주세요 (시간 단위)</string>
<string name="save_toast_donemessage">모든 사진이 갤러리에 저장되었습니다.</string>
Expand Down Expand Up @@ -61,4 +61,8 @@
<string name="setting_text_notification">알림</string>
<string name="measure_text_measuring">측정이 진행 중 입니다.</string>
<string name="toast_text_startrecording">기록 시작!</string>
<string name="setting_text_develop">개발자</string>
<string name="recording_text_setnewrecordtitle">새로운 기록 설정</string>
<string name="settings_text_dailyeditcreate">Daily 수정/생성</string>
<string name="edit_text_duplicatehistory">중복된 내역이 존재 합니다.</string>
</resources>
36 changes: 20 additions & 16 deletions core/designsystem/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="recordingcolorselector_text_backgroundcolor">后台</string>
<string name="recordingcolorselector_text_textcolor">文本</string>
<string name="tasks_hint_newtasktitle">新 Task</string>
<string name="tasks_popup_newtaskdesc">Task名称的最大长度为 12</string>
<string name="tasks_popup_newtaskdesc">Task名称的最大长度为 12</string>
<string name="tasks_popup_edittaskname">修改 Task 名称</string>
<string name="tasks_popup_settasktargettime">设定目标时间</string>
<string name="timer_text_settimertimetitle">定时器时间设置</string>
Expand All @@ -19,18 +19,18 @@
<string name="common_text_ok">确认</string>
<string name="common_text_done">结束</string>
<string name="common_text_edit">编辑</string>
<string name="measure_popup_permissiontitle">您需要权限来设置闹钟</string>
<string name="measure_popup_permissiontitle">您需要权限来设置闹钟</string>
<string name="measure_popup_permissiondesc">"您要去设置吗? "</string>
<string name="colorselector_text_color">颜色</string>
<string name="colorselector_text_setgraphcolor">设置图表的颜色</string>
<string name="colorselector_text_setgraphcolor">设置图表的颜色</string>
<string name="colorselector_text_colordirectiontitle">颜色方向</string>
<string name="colorselector_text_colordirectiondesc">设置颜色组合的方向</string>
<string name="colorselector_text_colordirectiondesc">设置颜色组合的方向</string>
<string name="common_text_targettime">目标时间</string>
<string name="logsetting_text_dailytargettimedesc">设置圆形程序栏的目标时间</string>
<string name="logsetting_text_dailytargettimedesc">设置圆形程序栏的目标时间</string>
<string name="common_popup_setmonthtargettime">请输入 Month 的目标时间\\n(以小时为单位)</string>
<string name="common_popup_setweektargettime">请输入 Week 的目标时间\\n(以小时为单位)</string>
<string name="save_toast_donemessage">所有的照片都保存在画廊里了.</string>
<string name="save_toast_nograph">没有选中的图表.</string>
<string name="save_toast_donemessage">所有的照片都保存在画廊里了</string>
<string name="save_toast_nograph">没有选中的图表</string>
<string name="editdaily_button_appendnewhistory">新建记录</string>
<string name="editdaily_text_infohowtoeditdaily">选择 Task 修改记录后\n请按 SAVE</string>
<string name="editdaily_text_startat">起始时刻</string>
Expand All @@ -47,18 +47,22 @@
<string name="settings_button_updatehistory">更新细目</string>
<string name="colorselector_popup_backgroundtitle">"确定要设置相应的颜色作为背景色吗? "</string>
<string name="edit_popup_nosavetitle">"不保存变更事项就出去吗? "</string>
<string name="edit_text_notaskname">请输入Task名.</string>
<string name="edit_text_notaskname">请输入Task名</string>
<string name="timer_text_finish">结束</string>
<string name="alarm_text_timerfinish">"计时器已结束 ! "</string>
<string name="alarm_text_5minutes">还剩5分钟.</string>
<string name="alarm_text_message">时间已经过去了</string>
<string name="daily_popup_savepermissiontitle">您需要一个权限来保存您的照片 .</string>
<string name="alarm_text_timerfinish">"计时器已结束! "</string>
<string name="alarm_text_5minutes">还剩5分钟</string>
<string name="alarm_text_message">时间已经过去了</string>
<string name="daily_popup_savepermissiontitle">您需要一个权限来保存您的照片</string>
<string name="daily_popup_savepermissiondesc">"允许吗? "</string>
<string name="save_taost_failmessage">保存到画廊失败</string>
<string name="task_popup_checktitle">请选择Task.</string>
<string name="tasks_text_createtask">请生成Task.</string>
<string name="save_taost_failmessage">保存到画廊失败</string>
<string name="task_popup_checktitle">请选择Task</string>
<string name="tasks_text_createtask">请生成Task</string>
<string name="timer_popup_finishtime">即将结束 : %1$s</string>
<string name="setting_text_notification">告示</string>
<string name="measure_text_measuring">测量正在进行中.</string>
<string name="measure_text_measuring">测量正在进行中</string>
<string name="toast_text_startrecording">开始录制!</string>
<string name="setting_text_develop">"开发者 "</string>
<string name="recording_text_setnewrecordtitle">新建日志设置</string>
<string name="settings_text_dailyeditcreate">"每日修改/创建 "</string>
<string name="edit_text_duplicatehistory">重复的历史存在。</string>
</resources>
6 changes: 5 additions & 1 deletion core/designsystem/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@
<string name="daily_popup_savepermissiondesc">Do you want to allow it?</string>
<string name="save_taost_failmessage">Saving to gallery failed.</string>
<string name="task_popup_checktitle">Please select Task.</string>
<string name="tasks_text_createtask">Create task plz</string>
<string name="tasks_text_createtask">Create task</string>
<string name="timer_popup_finishtime">Finish Time : %1$s</string>
<string name="setting_text_notification">Notification</string>
<string name="measure_text_measuring">Measurement is in progress.</string>
<string name="toast_text_startrecording">Start Recording!</string>
<string name="setting_text_develop">Developer</string>
<string name="recording_text_setnewrecordtitle">Setting New Record</string>
<string name="settings_text_dailyeditcreate">Daily Modify/Create</string>
<string name="edit_text_duplicatehistory">Duplicate history exists.</string>
</resources>
2 changes: 0 additions & 2 deletions feature/edit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ android {
dependencies {
implementation(project(":domain:daily"))
implementation(project(":domain:color"))

implementation(libs.picker)
}

This file was deleted.

Loading

0 comments on commit 09b30a2

Please sign in to comment.