mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
update MediaHero heights and refactor SeriesHero
- Increase `MediaHero` height from 200dp to 300dp in `EpisodeScreen` and `MovieScreen`. - Replace `SeriesHero` with `MediaHero` in `SeriesScreen` and increase height to 350dp. - Remove redundant `SeriesHero` component from `SeriesComponents.kt`. - Update `SeriesViewModel` to use `ImageType.PRIMARY` for the hero image URL. - Remove comments from `MediaHero.kt`.
This commit is contained in:
@@ -70,7 +70,7 @@ private fun EpisodeScreenInternal(
|
|||||||
MediaHero(
|
MediaHero(
|
||||||
imageUrl = episode.heroImageUrl,
|
imageUrl = episode.heroImageUrl,
|
||||||
backgroundColor = MaterialTheme.colorScheme.background,
|
backgroundColor = MaterialTheme.colorScheme.background,
|
||||||
height = 200.dp,
|
height = 300.dp,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
EpisodeDetails(
|
EpisodeDetails(
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ private fun MovieScreenInternal(
|
|||||||
MediaHero(
|
MediaHero(
|
||||||
imageUrl = movie.heroImageUrl,
|
imageUrl = movie.heroImageUrl,
|
||||||
backgroundColor = MaterialTheme.colorScheme.background,
|
backgroundColor = MaterialTheme.colorScheme.background,
|
||||||
height = 200.dp,
|
height = 300.dp,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
MovieDetails(
|
MovieDetails(
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.Dp
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.hilt.navigation.compose.hiltViewModel
|
import androidx.hilt.navigation.compose.hiltViewModel
|
||||||
@@ -51,7 +50,6 @@ import hu.bbara.purefin.common.ui.MediaCastRow
|
|||||||
import hu.bbara.purefin.common.ui.MediaGhostIconButton
|
import hu.bbara.purefin.common.ui.MediaGhostIconButton
|
||||||
import hu.bbara.purefin.common.ui.MediaMetaChip
|
import hu.bbara.purefin.common.ui.MediaMetaChip
|
||||||
import hu.bbara.purefin.common.ui.components.MediaActionButton
|
import hu.bbara.purefin.common.ui.components.MediaActionButton
|
||||||
import hu.bbara.purefin.common.ui.components.MediaHero
|
|
||||||
import hu.bbara.purefin.common.ui.components.PurefinAsyncImage
|
import hu.bbara.purefin.common.ui.components.PurefinAsyncImage
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -78,20 +76,6 @@ internal fun SeriesTopBar(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
|
||||||
internal fun SeriesHero(
|
|
||||||
imageUrl: String,
|
|
||||||
height: Dp,
|
|
||||||
modifier: Modifier = Modifier
|
|
||||||
) {
|
|
||||||
MediaHero(
|
|
||||||
imageUrl = imageUrl,
|
|
||||||
backgroundColor = MaterialTheme.colorScheme.background,
|
|
||||||
height = height,
|
|
||||||
modifier = modifier,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@OptIn(ExperimentalLayoutApi::class)
|
@OptIn(ExperimentalLayoutApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
internal fun SeriesMetaChips(series: SeriesUiModel) {
|
internal fun SeriesMetaChips(series: SeriesUiModel) {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import androidx.compose.ui.unit.sp
|
|||||||
import androidx.hilt.navigation.compose.hiltViewModel
|
import androidx.hilt.navigation.compose.hiltViewModel
|
||||||
import hu.bbara.purefin.app.content.ContentMockData
|
import hu.bbara.purefin.app.content.ContentMockData
|
||||||
import hu.bbara.purefin.common.ui.PurefinWaitingScreen
|
import hu.bbara.purefin.common.ui.PurefinWaitingScreen
|
||||||
|
import hu.bbara.purefin.common.ui.components.MediaHero
|
||||||
import hu.bbara.purefin.navigation.ItemDto
|
import hu.bbara.purefin.navigation.ItemDto
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -71,9 +72,10 @@ private fun SeriesScreenInternal(
|
|||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.verticalScroll(rememberScrollState())
|
.verticalScroll(rememberScrollState())
|
||||||
) {
|
) {
|
||||||
SeriesHero(
|
MediaHero(
|
||||||
imageUrl = series.heroImageUrl,
|
imageUrl = series.heroImageUrl,
|
||||||
height = 200.dp,
|
height = 350.dp,
|
||||||
|
backgroundColor = MaterialTheme.colorScheme.background,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class SeriesViewModel @Inject constructor(
|
|||||||
heroImageUrl = JellyfinImageHelper.toImageUrl(
|
heroImageUrl = JellyfinImageHelper.toImageUrl(
|
||||||
url = serverUrl,
|
url = serverUrl,
|
||||||
itemId = seriesItemResult.id,
|
itemId = seriesItemResult.id,
|
||||||
type = ImageType.BACKDROP
|
type = ImageType.PRIMARY
|
||||||
),
|
),
|
||||||
seasonTabs = seasonUiModels,
|
seasonTabs = seasonUiModels,
|
||||||
cast = seriesItemResult.people.orEmpty().map { it.toCastMember() }
|
cast = seriesItemResult.people.orEmpty().map { it.toCastMember() }
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ fun MediaHero(
|
|||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentScale = ContentScale.Crop
|
contentScale = ContentScale.Crop
|
||||||
)
|
)
|
||||||
// Vertical gradient for transition to content
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.matchParentSize()
|
.matchParentSize()
|
||||||
|
|||||||
Reference in New Issue
Block a user