Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
05c109d
[chore]: deploymentTargetSelector.xml 파일 gitignore에 추가(#26)
JJUYAAA Jun 27, 2025
100ffc8
[refactor]: AuthorHeader 버튼 컴포넌트 활용으로 수정(#26)
JJUYAAA Jun 28, 2025
565b51d
[ui]: MenuItemButton 컴포넌트 생성(#26)
JJUYAAA Jun 28, 2025
1add505
[ui]: MyPageScreen 구현(#26)
JJUYAAA Jun 28, 2025
bc199ea
[ui]: 캐릭터 png drawable 폴더에 추가(#26)
JJUYAAA Jun 29, 2025
85aa259
[ui]: 반응 screen 구현(#26)
JJUYAAA Jun 29, 2025
0c4f8dd
[ui]: 편집 screen 구현, 칭호 카드 컴포넌트,data class 생성(#26)
JJUYAAA Jun 29, 2025
b887bf6
[ui]: 회원탈퇴 screen 구현(#26)
JJUYAAA Jun 29, 2025
384794c
[fix]: push 알림 페이지에서 토글 스위치 사용을 위한 수정(#26)
JJUYAAA Jun 30, 2025
de340a3
[ui]: Toast 컴포넌트 생성(#26)
JJUYAAA Jun 30, 2025
3717750
[ui]: 알림 설정 페이지 구현(#26)
JJUYAAA Jun 30, 2025
d2b7661
[ui]: 회원탈퇴페이지 dialog 적용(#26)
JJUYAAA Jun 30, 2025
aa65071
[chore]: 안 쓰는 import 정리(#26)
JJUYAAA Jun 30, 2025
185c3af
[feat]: 피드, 책 data class 생성(#26)
JJUYAAA Jun 30, 2025
6a30f47
[feat]: 책 Viewmodel 생성(#26)
JJUYAAA Jun 30, 2025
5704595
[ui]: 저장 페이지 - BookContent까지 구현(#26)
JJUYAAA Jun 30, 2025
f7ad94f
[ui]: 저장 페이지 - 피드 컴포넌트 생성(#26)
JJUYAAA Jun 30, 2025
1b8e9b3
[ui]: 저장 페이지 - 피드 content 구현(#26)
JJUYAAA Jun 30, 2025
9ce2027
[ui]: 회원탈퇴 페이지 생성(#26)
JJUYAAA Jun 30, 2025
f7995a4
[ui]: 회원탈퇴 페이지 수정(#26)
JJUYAAA Jun 30, 2025
c2eea1b
[ui]: SavedFeedCard 컴포넌트 수정(#26)
JJUYAAA Jun 30, 2025
ed68e22
[chore]: 패키지 이름 변경 data -> mock(#26)
JJUYAAA Jun 30, 2025
3e9b142
[chore]: mypage.component 패키지 생성(#26)
JJUYAAA Jun 30, 2025
b557592
[chore]: import 정리(#26)
JJUYAAA Jun 30, 2025
c3e106c
[ui]: ReactionScreen 버튼 컴포넌트 변경(#26)
JJUYAAA Jun 30, 2025
419ad1e
[ui]: dialog popup 수정 및 적용(#26)
JJUYAAA Jun 30, 2025
24b5928
[ui]: 탭바 수정 및 컴포넌트 수정(#26)
JJUYAAA Jun 30, 2025
a06f045
[chore]: 전달할 객체 data 수정(#26)
JJUYAAA Jun 30, 2025
c2a5d07
[refactor]: data 네이밍 수정(#26)
JJUYAAA Jul 1, 2025
d4d6f90
[refactor]: Color 파일 수정(#26)
JJUYAAA Jul 1, 2025
435a60c
[refactor]: AuthorHeader OnButtonClick 매개변수로 받을 수 있도록 수정(#26)
JJUYAAA Jul 1, 2025
1e22cd1
[refactor]: RoleCard RoundCornerShape 통일 및 밝기 수정(#26)
JJUYAAA Jul 1, 2025
1c039af
[refactor]: 저장페이지 -> 뷰모델 상태관리 일관성 있게끔 수정, 네이밍 수정(#26)
JJUYAAA Jul 1, 2025
3e893d6
[refactor]: SavedScreen, SavedFeedCard -> feedItem 적용(#26)
JJUYAAA Jul 1, 2025
1e3a2b1
[refactor]: color 수정(#26)
JJUYAAA Jul 1, 2025
198f78c
[refactor]: SavedScreen UI 간단한 수정(#26)
JJUYAAA Jul 1, 2025
dd431b3
[refactor]: SavedScreen content들 component로 분리(#26)
JJUYAAA Jul 1, 2025
da83f88
[refactor]: backgroundColor 제거(#26)
JJUYAAA Jul 1, 2025
c5fd480
[refactor]: Toast 컴포넌트명 수정 -> ToastWithDate 및 preview 수정(#26)
JJUYAAA Jul 1, 2025
6fef2cf
[refactor]: ic_heat_filled 아이콘 추가 및 적용(#26)
JJUYAAA Jul 1, 2025
83ee935
[refactor]:ReactionScreen 필터링 로직 적용, EditProfileScreen 텍스트필드 적용 및 컴포넌…
JJUYAAA Jul 2, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
.idea/deploymentTargetSelector.xml
Comment thread
JJUYAAA marked this conversation as resolved.
13 changes: 12 additions & 1 deletion .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ dependencies {
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.foundation)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.navigation.runtime.android)
implementation(libs.accompanist.pager)
implementation(libs.accompanist.pager.indicators)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package com.texthip.thip.ui.common.buttons

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
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.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
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.graphics.painter.Painter
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 com.texthip.thip.R
import com.texthip.thip.ui.theme.ThipTheme.colors
import com.texthip.thip.ui.theme.ThipTheme.typography

@Composable
fun MenuItemButton(
text: String,
icon: Painter? = null,
contentColor: Color,
backgroundColor: Color,
hasRightIcon: Boolean = false,
modifier: Modifier = Modifier,
onClick: () -> Unit = {},
) {
val hasLeftIcon = icon != null

Row(
modifier = modifier
.fillMaxWidth()
.height(56.dp)
.background(color = backgroundColor, shape = RoundedCornerShape(12.dp))
.clickable(onClick = onClick)
.padding(horizontal = 12.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Row(verticalAlignment = Alignment.CenterVertically) {
if (hasLeftIcon) {
Icon(
painter = icon,
contentDescription = null,
tint = contentColor,
)
Spacer(modifier = Modifier.width(12.dp))
}
Text(
text = text,
color = contentColor,
style = typography.smalltitle_sb600_s16_h24,
)
}
if (hasRightIcon) {
Icon(
painter = painterResource(R.drawable.ic_chevron),
contentDescription = null,
tint = contentColor,
)
}

}
}

@Preview
@Composable
private fun MenuItemButtonPreview() {
MenuItemButton(
text = stringResource(R.string.saved),
icon = painterResource(R.drawable.ic_save),
contentColor = colors.White,
backgroundColor = colors.DarkGrey02,
hasRightIcon = true,
modifier = Modifier
.fillMaxWidth(),
onClick = {}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import com.texthip.thip.R
import com.texthip.thip.ui.theme.ThipTheme.colors

@Composable
fun ToggleSwitchButton() {
var isChecked by remember { mutableStateOf(true) }

fun ToggleSwitchButton(
isChecked: Boolean,
onToggleChange: (Boolean) -> Unit
) {
//var isChecked by remember { mutableStateOf(true) }
Switch(
modifier = Modifier.padding(4.dp),
checked = isChecked,
onCheckedChange = {
isChecked = it
},
onCheckedChange = onToggleChange,
colors = SwitchDefaults.colors(
checkedThumbColor = colors.White,
checkedTrackColor = colors.Purple,
Expand All @@ -49,11 +49,16 @@ fun ToggleSwitchButton() {
@Preview
@Composable
private fun ToggleSwitchButtonPreview() {
var isChecked by remember { mutableStateOf(true) }

Column(
modifier = Modifier
.fillMaxSize()
.padding(30.dp)
) {
ToggleSwitchButton()
ToggleSwitchButton(
isChecked = isChecked,
onToggleChange = { isChecked = it }
)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.texthip.thip.ui.common.cards

import androidx.compose.ui.graphics.Color
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
Expand All @@ -25,6 +24,7 @@ import androidx.compose.runtime.setValue
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.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
Expand All @@ -51,7 +51,7 @@ fun CardAlarm(
.fillMaxWidth()
.clickable { onClick() },
colors = CardDefaults.cardColors(
containerColor = if (isRead) containerColorUnread else containerColorRead
containerColor = if (isRead) containerColorRead else containerColorUnread
),
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
shape = RoundedCornerShape(12.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import androidx.compose.foundation.clickable
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.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
Expand Down Expand Up @@ -33,15 +36,17 @@ fun FormTextFieldDefault(
hint: String,
showLimit: Boolean = false,
limit: Int = 10,
showIcon: Boolean = true
showIcon: Boolean = true,
containerColor: Color = colors.Black
) {
var text by rememberSaveable { mutableStateOf("") }
val myStyle = typography.menu_r400_s14_h24.copy(lineHeight = 14.sp)

// 글자수 제한 적용
val displayText = if (showLimit && text.length > limit) text.substring(0, limit) else text

Box(modifier = modifier) {
Box(modifier = modifier
.height(48.dp)) {
OutlinedTextField(
value = displayText,
onValueChange = {
Expand All @@ -56,15 +61,14 @@ fun FormTextFieldDefault(
)
},
textStyle = myStyle,
modifier = Modifier
.size(width = 320.dp, height = 48.dp),
modifier = Modifier.fillMaxSize(),
shape = RoundedCornerShape(12.dp),
colors = TextFieldDefaults.colors(
focusedTextColor = colors.White,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
focusedContainerColor = colors.Black,
unfocusedContainerColor = colors.Black,
focusedContainerColor = containerColor,
unfocusedContainerColor = containerColor,
cursorColor = colors.NeonGreen
),
trailingIcon = {
Expand Down
26 changes: 10 additions & 16 deletions app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ 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

@Composable
Expand All @@ -36,7 +37,8 @@ fun AuthorHeader(
profileImage: Painter?,
nickname: String,
badgeText: String,
onSubscribeClick: () -> Unit
buttonText: String,
onButtonClick: () -> Unit = {}
) {
Row(
modifier = modifier
Expand Down Expand Up @@ -77,21 +79,13 @@ fun AuthorHeader(
maxLines = 1
)
}

Box(
OutlinedButton(
modifier = Modifier
.clip(RoundedCornerShape(20.dp))
.border(1.dp, Grey02, RoundedCornerShape(20.dp))
.background(Color.Transparent)
.clickable { onSubscribeClick() }
.padding(horizontal = 12.dp, vertical = 8.dp)
) {
Text(
text = stringResource(R.string.subscribe),
style = typography.menu_m500_s14_h24,
color = colors.White
)
}
.size(width = 51.dp, height = 35.dp),
text = buttonText,
textStyle = typography.menu_m500_s14_h24,
onClick = onButtonClick
)
}
}

Expand All @@ -103,7 +97,7 @@ fun PreviewAuthorHeader() {
profileImage = null,
nickname = "열자자제한열열자제한",
badgeText = "칭호칭호칭호",
onSubscribeClick = { println("구독") }
buttonText = "구독"
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
Expand Down Expand Up @@ -45,6 +46,7 @@ fun ProfileBar(
Row(
modifier = modifier
.fillMaxWidth()
.padding( vertical = 12.dp)
.clickable { onClick() },
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ 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.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -47,7 +45,7 @@ fun DialogPopup(
verticalArrangement = Arrangement.SpaceBetween,
modifier = Modifier.fillMaxSize()
) {
Column {
Column (){
Text(
text = title,
color = colors.White,
Expand All @@ -61,7 +59,6 @@ fun DialogPopup(
)
}

//TODO: 추후 버튼 공통 컴포넌트로 변경
Row(
horizontalArrangement = Arrangement.spacedBy(20.dp),
modifier = Modifier.fillMaxWidth()
Expand All @@ -71,14 +68,14 @@ fun DialogPopup(
contentColor = colors.White,
backgroundColor = colors.Grey02,
modifier = Modifier.weight(1f),
onClick = {},
onClick = onCancel,
)
ActionMediumButton(
text = stringResource(R.string.yes),
contentColor = colors.White,
backgroundColor = colors.Purple,
modifier = Modifier.weight(1f),
onClick = {},
onClick = onConfirm,
)
}

Expand Down
Loading