StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
feat(app): WelcomeScreen affiche progression dynamique + strings i18n EN/FR
Celtiore8cd5c2d8b84c
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.ktindex aded4686..1ab78ffd 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt@@ -5,16 +5,15 @@ import androidx.compose.foundation.layout.Boximport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.Spacerimport androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.layout.fillMaxWidthimport androidx.compose.foundation.layout.heightimport androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.widthimport androidx.compose.foundation.shape.RoundedCornerShape-import androidx.lifecycle.compose.collectAsStateWithLifecycle+import androidx.compose.material3.CircularProgressIndicator+import androidx.compose.material3.LinearProgressIndicatorimport androidx.compose.runtime.Composable-import androidx.lifecycle.compose.collectAsStateWithLifecycleimport androidx.compose.runtime.LaunchedEffect-import androidx.lifecycle.compose.collectAsStateWithLifecycle-import androidx.compose.runtime.collectAsState-import androidx.lifecycle.compose.collectAsStateWithLifecycleimport androidx.compose.runtime.getValueimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifier@@ -24,8 +23,8 @@ import androidx.compose.ui.res.stringResourceimport androidx.compose.ui.unit.dpimport androidx.hilt.lifecycle.viewmodel.compose.hiltViewModelimport androidx.lifecycle.ViewModel+import androidx.lifecycle.compose.collectAsStateWithLifecycleimport androidx.lifecycle.viewModelScope-import androidx.compose.material3.CircularProgressIndicatorimport androidx.tv.material3.MaterialThemeimport androidx.tv.material3.Surfaceimport androidx.tv.material3.SurfaceDefaults@@ -35,6 +34,7 @@ import com.streamvault.app.ui.components.shell.StatusPillimport com.streamvault.app.ui.design.AppColorsimport com.streamvault.data.sync.SyncProgressBusimport com.streamvault.domain.repository.ProviderRepository+import com.streamvault.domain.sync.Sectionimport com.streamvault.domain.sync.SyncProgressimport dagger.hilt.android.lifecycle.HiltViewModelimport javax.inject.Inject@@ -90,6 +90,7 @@ fun WelcomeScreen(viewModel: WelcomeViewModel = hiltViewModel()) {val hasProviders by viewModel.hasProviders.collectAsStateWithLifecycle()+ val syncProgress by viewModel.syncProgress.collectAsStateWithLifecycle()LaunchedEffect(hasProviders) {when (hasProviders) {@@ -125,25 +126,87 @@ fun WelcomeScreen(modifier = Modifier.padding(horizontal = 36.dp, vertical = 28.dp),horizontalAlignment = Alignment.CenterHorizontally) {+ val progress = syncProgress+ val pillLabel = if (progress != null) {+ stringResource(sectionLabelRes(progress.section))+ } else {+ stringResource(R.string.app_name)+ }+ val pillColor = if (progress != null) {+ sectionColor(progress.section)+ } else {+ AppColors.BrandMuted+ }StatusPill(- label = stringResource(R.string.app_name),- containerColor = AppColors.BrandMuted+ label = pillLabel,+ containerColor = pillColor)Spacer(modifier = Modifier.height(18.dp))- CircularProgressIndicator(color = AppColors.Brand)- Spacer(modifier = Modifier.height(18.dp))+ // D13 — spinner masqué dès qu'on a une progression structurée.+ if (progress == null) {+ CircularProgressIndicator(color = AppColors.Brand)+ Spacer(modifier = Modifier.height(18.dp))+ }Text(text = stringResource(R.string.welcome_loading_title),style = MaterialTheme.typography.titleLarge,color = AppColors.TextPrimary)Spacer(modifier = Modifier.height(6.dp))+ val subtitle = if (progress != null && progress.currentLabel.isNotBlank()) {+ progress.currentLabel+ } else {+ stringResource(R.string.welcome_loading_subtitle)+ }Text(- text = stringResource(R.string.welcome_loading_subtitle),+ text = subtitle,style = MaterialTheme.typography.bodyLarge,color = AppColors.TextSecondary)+ if (progress != null) {+ Spacer(modifier = Modifier.height(14.dp))+ if (progress.total > 0) {+ LinearProgressIndicator(+ progress = { progress.current.toFloat() / progress.total.toFloat() },+ modifier = Modifier+ .fillMaxWidth()+ .width(260.dp),+ color = AppColors.Brand,+ trackColor = AppColors.BrandMuted+ )+ } else {+ LinearProgressIndicator(+ modifier = Modifier+ .fillMaxWidth()+ .width(260.dp),+ color = AppColors.Brand,+ trackColor = AppColors.BrandMuted+ )+ }+ Spacer(modifier = Modifier.height(10.dp))+ Text(+ text = stringResource(+ R.string.sync_items_indexed_format,+ progress.itemsIndexed+ ),+ style = MaterialTheme.typography.labelLarge,+ color = AppColors.TextSecondary+ )+ }}}}}++@Composable+private fun sectionColor(section: Section): Color = when (section) {+ Section.LIVE -> AppColors.Brand+ Section.VOD -> AppColors.Success+ Section.SERIES -> AppColors.Warning+}++private fun sectionLabelRes(section: Section): Int = when (section) {+ Section.LIVE -> R.string.sync_section_live+ Section.VOD -> R.string.sync_section_vod+ Section.SERIES -> R.string.sync_section_series+}diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xmlindex c1c79ca5..bc5fbe8f 100644--- a/app/src/main/res/values-fr/strings.xml+++ b/app/src/main/res/values-fr/strings.xml@@ -13,6 +13,10 @@<string name="welcome_version">v1.0.3</string><string name="welcome_loading_title">Préparation de votre bibliothèque</string><string name="welcome_loading_subtitle">Ouverture de l\'écran de droite pour cet appareil.</string>+ <string name="sync_section_live">Live</string>+ <string name="sync_section_vod">VOD</string>+ <string name="sync_section_series">Séries</string>+ <string name="sync_items_indexed_format">%1$d éléments indexés</string><string name="welcome_tagline">IPTV premium pour le salon</string><string name="welcome_subtitle">Profitez des chaînes en direct, du visionnage de rattrapage, des films et des séries avec une expérience Android TV propriétaire.</string><string name="welcome_feature_live">Navigation en direct rapide avec mise au point à distance</string>diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xmlindex fdf19d48..45a11f97 100644--- a/app/src/main/res/values/strings.xml+++ b/app/src/main/res/values/strings.xml@@ -17,6 +17,10 @@<string name="welcome_version">v1.0.3</string><string name="welcome_loading_title">Preparing your library</string><string name="welcome_loading_subtitle">Opening the right screen for this device.</string>+ <string name="sync_section_live">Live</string>+ <string name="sync_section_vod">VOD</string>+ <string name="sync_section_series">Series</string>+ <string name="sync_items_indexed_format">%1$d items indexed</string><string name="welcome_tagline">Premium IPTV for the living room</string><string name="welcome_subtitle">Lean back into live channels, catch-up viewing, movies, and series with a first-party Android TV experience.</string><string name="welcome_feature_live">Fast live browsing with remote-first focus</string>