Skip to content

Commit

Permalink
Merge pull request #248 from TeamDATEROAD/chore-empty-view
Browse files Browse the repository at this point in the history
[chore] 엠티뷰, 에러뷰 이미지 변경
  • Loading branch information
jihyunniiii authored Sep 13, 2024
2 parents 7b5cf96 + 8e58d23 commit 37236e8
Show file tree
Hide file tree
Showing 26 changed files with 395 additions and 331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ enum class EmptyViewType(
),
READ(
titleRes = R.string.empty_view_read,
imageRes = R.drawable.ic_empty_read
imageRes = R.drawable.img_empty_read
),
LOOK(
titleRes = R.string.empty_view_look,
imageRes = R.drawable.ic_empty_look
imageRes = R.drawable.img_empty_look
),
TIMELINE(
titleRes = R.string.empty_view_timeline,
imageRes = R.drawable.ic_empty_timeline
imageRes = R.drawable.img_empty_running
),
PAST(
titleRes = R.string.empty_view_past,
imageRes = R.drawable.ic_empty_default
imageRes = R.drawable.img_empty_envelope
),
MY_COURSE_READ(
titleRes = R.string.empty_view_my_course_read,
imageRes = R.drawable.ic_empty_default
imageRes = R.drawable.img_empty_envelope
),
MY_COURSE_ENROLL(
titleRes = R.string.empty_view_my_course_enroll,
imageRes = R.drawable.ic_empty_my_page_enroll
imageRes = R.drawable.img_empty_running
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package org.sopt.dateroad.presentation.ui.component.view
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
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.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -37,7 +35,6 @@ fun DateRoadEmptyView(
contentDescription = null,
contentScale = ContentScale.FillWidth
)
Spacer(modifier = Modifier.height(16.dp))
Text(
modifier = Modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun DateRoadErrorView() {
Image(
modifier = Modifier
.fillMaxWidth(),
painter = painterResource(id = R.drawable.ic_error_server),
painter = painterResource(id = R.drawable.img_error_server),
contentDescription = null
)
Spacer(modifier = Modifier.height(16.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fun DateRoadLoadingView() {
Image(
modifier = Modifier
.fillMaxWidth(),
painter = painterResource(id = R.drawable.ic_loading_server),
painter = painterResource(id = R.drawable.img_loading_server),
contentDescription = null,
contentScale = ContentScale.FillWidth
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fun CourseDetailUnopenedDetail(
}
Spacer(modifier = Modifier.height(8.dp))
Image(
painter = painterResource(id = R.drawable.ic_course_detail_is_not_access),
painter = painterResource(id = R.drawable.img_course_detail_is_not_access),
contentDescription = null,
modifier = Modifier
.align(Alignment.CenterHorizontally)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.sopt.dateroad.presentation.ui.mycourse

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
Expand All @@ -11,13 +10,12 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.flowWithLifecycle
import org.sopt.dateroad.R
Expand Down Expand Up @@ -111,18 +109,12 @@ fun MyCourseScreen(
LazyColumn {
if (myCourseUiState.courses.isEmpty()) {
item {
Box(
modifier = Modifier
.fillParentMaxSize(),
contentAlignment = Alignment.Center
) {
DateRoadEmptyView(
emptyViewType = when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> EmptyViewType.MY_COURSE_ENROLL
MyCourseType.READ -> EmptyViewType.MY_COURSE_READ
}
)
}
DateRoadEmptyView(
emptyViewType = when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> EmptyViewType.MY_COURSE_ENROLL
MyCourseType.READ -> EmptyViewType.MY_COURSE_READ
}
)
}
}
items(myCourseUiState.courses) { course ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.sopt.dateroad.presentation.ui.past

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
Expand All @@ -11,7 +10,6 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -95,12 +93,7 @@ fun PastScreen(
onLeftIconClick = popBackStack
)
if (pastUiState.timelines.isEmpty()) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
DateRoadEmptyView(emptyViewType = EmptyViewType.PAST)
}
DateRoadEmptyView(emptyViewType = EmptyViewType.PAST)
} else {
LazyColumn(
modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 6.dp, bottom = 11.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ fun ProfileScreen(
Image(
painter = when (profileUiState.profileType) {
ProfileType.ENROLL -> if (profileUiState.signUp.image.isEmpty() || profileUiState.signUp.image == "null") {
painterResource(id = R.drawable.ic_enroll_profile_default)
painterResource(id = R.drawable.img_enroll_profile_default)
} else {
rememberAsyncImagePainter(model = profileUiState.signUp.image)
}

ProfileType.EDIT -> if (profileUiState.editProfile.image.isNullOrEmpty()) {
painterResource(id = R.drawable.ic_enroll_profile_default)
painterResource(id = R.drawable.img_enroll_profile_default)
} else {
rememberAsyncImagePainter(model = profileUiState.editProfile.image)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fun SignInScreen(
horizontalAlignment = Alignment.CenterHorizontally
) {
Spacer(modifier = Modifier.weight(226f))
Image(painter = painterResource(id = R.drawable.ic_splash_logo), contentDescription = null)
Image(painter = painterResource(id = R.drawable.img_splash_logo), contentDescription = null)
Spacer(modifier = Modifier.weight(167f))
DateRoadKakaoLoginButton(
modifier = Modifier.padding(horizontal = 30.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fun SplashScreen() {
horizontalAlignment = Alignment.CenterHorizontally
) {
Spacer(modifier = Modifier.weight(226f / (226f + 284f)))
Image(painter = painterResource(id = R.drawable.ic_splash_logo), contentDescription = null)
Image(painter = painterResource(id = R.drawable.img_splash_logo), contentDescription = null)
Spacer(modifier = Modifier.weight(284f / (226f + 284f)))
}
}
Expand Down
73 changes: 0 additions & 73 deletions app/src/main/res/drawable/ic_empty_default.xml

This file was deleted.

Binary file removed app/src/main/res/drawable/ic_empty_look.png
Binary file not shown.
Loading

0 comments on commit 37236e8

Please sign in to comment.