From d8e022005ad2c2ac0c82080b13a246d5d65ddc68 Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:00:40 +0900 Subject: [PATCH 01/24] =?UTF-8?q?[ui]:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85-=EC=9E=A5=EB=A5=B4=EC=84=A0=ED=83=9D=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B5=AC=ED=98=84=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/signin/screen/SignupGenreScreen.kt | 146 ++++++++++++++++++ app/src/main/res/values/strings.xml | 9 ++ 2 files changed, 155 insertions(+) create mode 100644 app/src/main/java/com/texthip/thip/ui/signin/screen/SignupGenreScreen.kt diff --git a/app/src/main/java/com/texthip/thip/ui/signin/screen/SignupGenreScreen.kt b/app/src/main/java/com/texthip/thip/ui/signin/screen/SignupGenreScreen.kt new file mode 100644 index 00000000..369e6b7a --- /dev/null +++ b/app/src/main/java/com/texthip/thip/ui/signin/screen/SignupGenreScreen.kt @@ -0,0 +1,146 @@ +package com.texthip.thip.ui.signin.screen + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.FlowRow +import com.texthip.thip.ui.mypage.component.RoleCard +import com.texthip.thip.ui.mypage.mock.RoleItem +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.texthip.thip.R +import com.texthip.thip.ui.common.forms.WarningTextField +import com.texthip.thip.ui.common.topappbar.InputTopAppBar +import com.texthip.thip.ui.theme.ThipTheme +import com.texthip.thip.ui.theme.ThipTheme.colors +import com.texthip.thip.ui.theme.ThipTheme.typography +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch + + +@Composable +fun SignupGenreScreen() { + var selectedIndex by rememberSaveable { mutableStateOf(-1) } + val isRightButtonEnabled by remember { derivedStateOf { selectedIndex != -1 } } + + val roleCards = listOf( + RoleItem( + stringResource(R.string.literature), + stringResource(R.string.literary_person), + R.drawable.character_literature, + colors.NeonGreen + ), + RoleItem( + stringResource(R.string.science_it), + stringResource(R.string.scientist), + R.drawable.character_science, + colors.Lavendar + ), + RoleItem( + stringResource(R.string.social_science), + stringResource(R.string.sociologist), + R.drawable.character_sociology, + colors.Orange + ), + RoleItem( + stringResource(R.string.art), + stringResource(R.string.artist), + R.drawable.character_art, + colors.Pink + ), + RoleItem( + stringResource(R.string.humanities), + stringResource(R.string.philosopher), + R.drawable.character_humanities, + colors.Skyblue + ) + ) + + Column( + Modifier + .fillMaxSize() + ) { + InputTopAppBar( + title = stringResource(R.string.settings_2), + isRightButtonEnabled = isRightButtonEnabled, + rightButtonName = stringResource(R.string.next), + isLeftIconVisible = false, + onLeftClick = {}, + onRightClick = { + // TODO 다음 화면으로 이동 + } + ) + + Spacer(modifier = Modifier.height(40.dp)) + + Column( + modifier = Modifier + .padding(horizontal = 20.dp) + .fillMaxWidth() + ) { + Text( + text = stringResource(R.string.select_genre), + style = typography.smalltitle_sb600_s18_h24, + color = colors.White, + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 8.dp) + ) + Text( + text = stringResource(R.string.genre_can_be_changed), + style = typography.copy_r400_s14, + color = colors.White, + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 20.dp) + ) + LazyVerticalGrid( + columns = GridCells.Adaptive(minSize = 152.dp), // 카드 최소 크기 + modifier = Modifier + .fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), + userScrollEnabled = false, + ) { + items(roleCards.size) { index -> + RoleCard( + genre = roleCards[index].genre, + role = roleCards[index].role, + imageResId = roleCards[index].imageResId, + genreColor = colors.White, + roleColor = roleCards[index].roleColor, + selected = selectedIndex == index, + onClick = { selectedIndex = index } + ) + } + } + } + } +} + + +@Preview +@Composable +private fun SignupGenreScreenPrev() { + ThipTheme { + SignupGenreScreen() + } +} \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e61783ec..58d39fd6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -81,8 +81,10 @@ 칭호 편집 장르는 칭호와 연결돼요. 아래에서 하나를 선택해주세요. + 정말로 탈퇴하시겠어요? \'예\'를 누르면 모든 기록이 사라져요. + 문학 문학가 과학·IT @@ -93,7 +95,9 @@ 예술가 인문학 철학자 + 또 THIP 해주실거죠? + THIP 떠나기 탈퇴 주의사항 회원탈퇴 시 계정정보는 @@ -104,10 +108,13 @@ 주의사항을 확인하였으며 이에 동의합니다. 탈퇴 완료 다음에 또 만나요! + + 푸시 알림 알림센터의 모든 알림을 포함해요 푸시 알림이 해제되었어요. 푸시 알림이 설정되었어요. + texthip2025@gmail.com 이메일로 닉네임과 문의사항을 보내주시면\n빠른 시일 내로 해결해 드릴게요! @@ -238,6 +245,8 @@ 안녕하세요, %1$s님 이제 Thip에서 활동할 준비를 모두 마쳤어요! 지금 바로 Thip 시작하기 + 관심있는 장르를 하나 선택해주세요. + 이후 내 정보에서 변경이 가능해요. 내 구독 리스트 From 108c38c2459cb614cbc4a4fdeb39046bd70c40ce Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:01:23 +0900 Subject: [PATCH 02/24] =?UTF-8?q?[fix]:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=88=98=EC=A0=95=20-=20lazygrid=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thip/ui/mypage/screen/MypageEditScreen.kt | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/texthip/thip/ui/mypage/screen/MypageEditScreen.kt b/app/src/main/java/com/texthip/thip/ui/mypage/screen/MypageEditScreen.kt index 2994b8bf..759ec7b2 100644 --- a/app/src/main/java/com/texthip/thip/ui/mypage/screen/MypageEditScreen.kt +++ b/app/src/main/java/com/texthip/thip/ui/mypage/screen/MypageEditScreen.kt @@ -10,6 +10,8 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -26,6 +28,7 @@ import com.texthip.thip.ui.common.forms.FormTextFieldDefault import com.texthip.thip.ui.common.topappbar.InputTopAppBar import com.texthip.thip.ui.mypage.component.RoleCard import com.texthip.thip.ui.mypage.mock.RoleItem +import com.texthip.thip.ui.theme.ThipTheme import com.texthip.thip.ui.theme.ThipTheme.colors import com.texthip.thip.ui.theme.ThipTheme.typography @@ -125,18 +128,21 @@ fun EditProfileScreen() { ) - FlowRow( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(20.dp), - verticalArrangement = Arrangement.spacedBy(16.dp) + LazyVerticalGrid( + columns = GridCells.Adaptive(minSize = 152.dp), // 카드 최소 크기 + modifier = Modifier + .fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), + userScrollEnabled = false, ) { - roleCards.forEachIndexed { index, RoleItem -> + items(roleCards.size) { index -> RoleCard( - genre = RoleItem.genre, - role = RoleItem.role, - imageResId = RoleItem.imageResId, + genre = roleCards[index].genre, + role = roleCards[index].role, + imageResId = roleCards[index].imageResId, genreColor = colors.White, - roleColor = RoleItem.roleColor, + roleColor = roleCards[index].roleColor, selected = selectedIndex == index, onClick = { selectedIndex = index } ) @@ -150,5 +156,7 @@ fun EditProfileScreen() { @Preview @Composable private fun EditProfileScreenPrev() { - EditProfileScreen() + ThipTheme { + EditProfileScreen() + } } \ No newline at end of file From f5c57f4cfe8c2f6ac89d2651a8f7ce0e863b7d25 Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:25:22 +0900 Subject: [PATCH 03/24] =?UTF-8?q?[fix]:=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=ED=81=AC=EA=B8=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thip/ui/common/header/AuthorHeader.kt | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt index b2ea1afc..ef46552f 100644 --- a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt +++ b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt @@ -41,6 +41,7 @@ fun AuthorHeader( badgeText: String, buttonText: String, buttonWidth: Dp? = null, + showButton: Boolean = true, onButtonClick: () -> Unit = {} ) { Row( @@ -54,13 +55,13 @@ fun AuthorHeader( painter = profileImage, contentDescription = "작성자 장르이미지", modifier = Modifier - .size(48.dp) + .size(54.dp) .clip(CircleShape) ) } else { Box( modifier = Modifier - .size(48.dp) + .size(54.dp) .clip(CircleShape) .background(colors.Grey) ) @@ -82,7 +83,8 @@ fun AuthorHeader( maxLines = 1 ) } - OutlinedButton( + if (showButton) { + OutlinedButton( modifier = Modifier .then( if (buttonWidth != null) @@ -94,7 +96,8 @@ fun AuthorHeader( text = buttonText, textStyle = typography.view_m500_s14, onClick = onButtonClick - ) + ) + } } } @@ -102,12 +105,23 @@ fun AuthorHeader( @Composable fun PreviewAuthorHeader() { ThipTheme { - AuthorHeader( - profileImage = null, - nickname = "열자자제한열열자제한", - badgeText = "칭호칭호칭호", - buttonText = "구독", - buttonWidth = 60.dp - ) + Column { + AuthorHeader( + profileImage = null, + nickname = "열자자제한열열자제한", + badgeText = "칭호칭호칭호", + buttonText = "구독", + buttonWidth = 60.dp, + modifier = Modifier.padding(bottom = 20.dp) + ) + AuthorHeader( + profileImage = null, + nickname = "열자자제한열열자제한", + badgeText = "칭호칭호칭호", + buttonText = "구독", + buttonWidth = 60.dp, + showButton = false + ) + } } } \ No newline at end of file From 839d2fd1777455b8fcd0581dbe68aedb1d1041d8 Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:30:12 +0900 Subject: [PATCH 04/24] =?UTF-8?q?[fix]:=20showButton=20=EC=9D=B8=EC=9E=90?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EA=B0=84=EB=8B=A8=ED=95=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/texthip/thip/ui/common/header/AuthorHeader.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt index ef46552f..35d8cd6f 100644 --- a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt +++ b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt @@ -39,8 +39,8 @@ fun AuthorHeader( profileImage: Painter?, nickname: String, badgeText: String, - buttonText: String, - buttonWidth: Dp? = null, + buttonText: String = "", + buttonWidth: Dp = 60.dp, showButton: Boolean = true, onButtonClick: () -> Unit = {} ) { @@ -111,14 +111,12 @@ fun PreviewAuthorHeader() { nickname = "열자자제한열열자제한", badgeText = "칭호칭호칭호", buttonText = "구독", - buttonWidth = 60.dp, modifier = Modifier.padding(bottom = 20.dp) ) AuthorHeader( profileImage = null, nickname = "열자자제한열열자제한", badgeText = "칭호칭호칭호", - buttonText = "구독", buttonWidth = 60.dp, showButton = false ) From 5a5109f70ff6d1b4d10943855756eb71f7f4e306 Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:42:19 +0900 Subject: [PATCH 05/24] =?UTF-8?q?[ui]:=20=EB=82=B4=ED=94=BC=EB=93=9C=5F?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=ED=97=A4=EB=8D=94=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thip/ui/common/header/AuthorHeader.kt | 15 ++---- .../texthip/thip/ui/feed/screen/FeedScreen.kt | 48 +++++++++++++++---- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt index 35d8cd6f..ca1e59da 100644 --- a/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt +++ b/app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt @@ -2,8 +2,6 @@ package com.texthip.thip.ui.common.header import androidx.compose.foundation.Image import androidx.compose.foundation.background -import androidx.compose.foundation.border -import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -14,29 +12,24 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape -import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import com.texthip.thip.ui.common.buttons.OutlinedButton import com.texthip.thip.ui.theme.ThipTheme import com.texthip.thip.ui.theme.ThipTheme.colors import com.texthip.thip.ui.theme.ThipTheme.typography -import com.texthip.thip.R -import com.texthip.thip.ui.common.buttons.OutlinedButton -import com.texthip.thip.ui.theme.Grey02 +import coil.compose.rememberAsyncImagePainter @Composable fun AuthorHeader( modifier: Modifier = Modifier, - profileImage: Painter?, + profileImage: String?, nickname: String, badgeText: String, buttonText: String = "", @@ -52,7 +45,7 @@ fun AuthorHeader( ) { if (profileImage != null) { Image( - painter = profileImage, + painter = rememberAsyncImagePainter(profileImage), contentDescription = "작성자 장르이미지", modifier = Modifier .size(54.dp) diff --git a/app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt b/app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt index 6b6c5b83..11080517 100644 --- a/app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt +++ b/app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt @@ -1,42 +1,70 @@ package com.texthip.thip.ui.feed.screen +import android.widget.Space import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.navigation.NavController import com.texthip.thip.R -import com.texthip.thip.ui.common.topappbar.LeftNameTopAppBar +import com.texthip.thip.ui.common.header.AuthorHeader +import com.texthip.thip.ui.common.header.HeaderMenuBarTab import com.texthip.thip.ui.common.topappbar.LogoTopAppBar +import com.texthip.thip.ui.theme.ThipTheme import com.texthip.thip.ui.theme.ThipTheme.colors @Composable -fun FeedScreen(navController: NavController) { +fun FeedScreen(navController: NavController? = null, + nickname: String, + userRole: String) { + var selectedIndex = rememberSaveable { mutableIntStateOf(0) } + Column( Modifier - .background(colors.Black) .fillMaxSize() ) { LogoTopAppBar( leftIcon = painterResource(R.drawable.ic_plusfriend), - hasNotification = true, + hasNotification = false, onLeftClick = {}, onRightClick = {} ) + Spacer(modifier = Modifier.height(40.dp)) + HeaderMenuBarTab( + titles = listOf("피드", "내 피드"), + selectedTabIndex = selectedIndex.value, + onTabSelected = { selectedIndex.value = it } + ) Column( modifier = Modifier - .padding(horizontal = 20.dp) .fillMaxSize() ) { - + Spacer(modifier = Modifier.height(32.dp)) + AuthorHeader( + profileImage = null, + nickname = nickname, + badgeText = userRole, + buttonText = "", + buttonWidth = 60.dp, + showButton = false + ) } } +} + +@Preview +@Composable +private fun FeesScreenPrev() { + ThipTheme { + FeedScreen(nickname = "ThipUser01", userRole = "문학 칭호") + } } \ No newline at end of file From f8b330d0cdf2b463bb73ca025aaba657dd7ea181 Mon Sep 17 00:00:00 2001 From: JJUYAAA Date: Mon, 14 Jul 2025 15:42:56 +0900 Subject: [PATCH 06/24] =?UTF-8?q?[fix]:=20=ED=97=A4=EB=8D=94=5F=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20painter->String=20=EB=B3=80=EA=B2=BD=20(#4?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 2 +- .idea/gradle.xml | 2 +- .idea/misc.xml | 2 +- app/build.gradle.kts | 1 + .../java/com/texthip/thip/ui/feed/mock/MySubscriptionData.kt | 2 +- .../main/java/com/texthip/thip/ui/navigator/MainNavHost.kt | 4 +++- gradle/libs.versions.toml | 2 ++ 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b86273d9..b589d56e 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 639c779c..dec7287d 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -6,7 +6,7 @@