Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all codes for naver #308

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ data class MovieColors(
val divider: Color,
val star: Color,
val dim: Color,
val naver: Color,
val onNaver: Color,
val cgv: Color,
val onCgv: Color,
val lotte: Color,
Expand Down Expand Up @@ -66,8 +64,6 @@ fun lightMovieColors(
divider: Color = Color(0xFFF5F5F5),
star: Color = Color(0xFFFFC107),
dim: Color = Color(0xDDFFFFFF),
naver: Color = Color(0xFF1EC800),
onNaver: Color = material.surface,
cgv: Color = Color.White,
onCgv: Color = Color(0xFFE51F20),
lotte: Color = Color(0xFFED1D24),
Expand All @@ -85,8 +81,6 @@ fun lightMovieColors(
divider = divider,
star = star,
dim = dim,
naver = naver,
onNaver = onNaver,
cgv = cgv,
onCgv = onCgv,
lotte = lotte,
Expand All @@ -106,8 +100,6 @@ fun darkMovieColors(
divider: Color = Color(0xFF212121),
star: Color = Color(0xFFFFC107),
dim: Color = Color(0xAA000000),
naver: Color = Color(0xFF1EC800),
onNaver: Color = material.surface,
cgv: Color = Color.White,
onCgv: Color = Color(0xFFE51F20),
lotte: Color = Color(0xFFED1D24),
Expand All @@ -125,8 +117,6 @@ fun darkMovieColors(
divider = divider,
star = star,
dim = dim,
naver = naver,
onNaver = onNaver,
cgv = cgv,
onCgv = onCgv,
lotte = lotte,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ data class MovieDetailModel(
val cgv: CgvInfoModel?,
val lotte: LotteInfoModel?,
val megabox: MegaboxInfoModel?,
val naver: NaverInfoModel?,
val imdb: ImdbInfoModel?,
val rt: RottenTomatoInfoModel?,
val mc: MetascoreInfoModel?,
Expand Down
21 changes: 0 additions & 21 deletions data/model/src/main/java/soup/movie/model/NaverInfoModel.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class MovieDetailResponse(
val cgv: CgvInfoResponse? = null,
val lotte: LotteInfoResponse? = null,
val megabox: MegaboxInfoResponse? = null,
val naver: NaverInfoResponse? = null,
val imdb: ImdbInfoResponse? = null,
val rt: RottenTomatoInfoResponse? = null,
val mc: MetascoreInfoResponse? = null,
Expand Down Expand Up @@ -78,7 +77,6 @@ fun MovieDetailResponse.asModel(): MovieDetailModel {
cgv = cgv?.asModel(),
lotte = lotte?.asModel(),
megabox = megabox?.asModel(),
naver = naver?.asModel(),
imdb = imdb?.asModel(),
rt = rt?.asModel(),
mc = mc?.asModel(),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
* Copyright 2024 SOUP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package soup.movie.feature.detail.impl

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Card
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import soup.movie.core.designsystem.theme.MovieTheme
import soup.movie.resources.R

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun BoxOffice(
uiModel: BoxOfficeItemUiModel,
onClick: () -> Unit,
) {
Card(
onClick = onClick,
modifier = Modifier.padding(start = 12.dp, end = 12.dp, bottom = 8.dp),
shape = RoundedCornerShape(16.dp),
backgroundColor = MovieTheme.colors.surface,
elevation = MovieTheme.elevations.card,
) {
Row(
modifier = Modifier
.padding(top = 12.dp, bottom = 14.dp)
.fillMaxWidth(),
) {
Column(
modifier = Modifier.weight(1f),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "λ°•μŠ€μ˜€ν”ΌμŠ€",
color = MovieTheme.colors.onSurface,
style = MovieTheme.typography.body2,
modifier = Modifier.alpha(0.7f),
)
Text(
text = stringResource(R.string.rank, uiModel.rank),
color = MovieTheme.colors.onSurface,
style = MovieTheme.typography.subtitle1,
fontSize = 18.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(top = 2.dp),
)
Text(
text = stringResource(R.string.rank_date, uiModel.rankDate),
color = MovieTheme.colors.surface,
style = MovieTheme.typography.body2,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier
.padding(top = 6.dp)
.background(
color = MovieTheme.colors.onSurface,
shape = RoundedCornerShape(percent = 50),
)
.padding(vertical = 1.dp, horizontal = 8.dp),
)
}
Column(
modifier = Modifier.weight(1f),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "λˆ„μ  κ΄€κ°μˆ˜",
color = MovieTheme.colors.onSurface,
style = MovieTheme.typography.body2,
modifier = Modifier.alpha(0.7f),
)
Text(
text = stringResource(R.string.audience, uiModel.audience),
color = MovieTheme.colors.onSurface,
style = MovieTheme.typography.subtitle1,
fontSize = 18.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(top = 2.dp),
)
Text(
text = stringResource(R.string.screen_days, uiModel.screenDays),
color = MovieTheme.colors.surface,
style = MovieTheme.typography.body2,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier
.padding(top = 6.dp)
.background(
color = MovieTheme.colors.onSurface,
shape = RoundedCornerShape(percent = 50),
)
.padding(vertical = 1.dp, horizontal = 8.dp),
)
}
}
}
}

@Preview
@Composable
private fun BoxOfficePreview() {
MovieTheme {
BoxOffice(
uiModel = BoxOfficeItemUiModel(
rank = 1,
rankDate = "2024.11.10.",
audience = 1000,
screenDays = 7,
),
onClick = {},
)
}
}
Loading
Loading