mirror of
https://github.com/FluxaMedia/fluxa.git
synced 2026-08-16 20:27:28 +00:00
Expose Stremio and Nuvio account entry points from Settings
Both onConnectStremio and MobileNuvioLoginView already existed but had no UI trigger anywhere in Settings — onConnectStremio was a dead parameter never invoked, and the Nuvio login view was only reachable from the initial onboarding screen. Added a Stremio connection tile (TV + mobile) and a Nuvio import row (mobile only, since TV's login screen has no Nuvio path) that reuse the existing Screen.Login(startOnNuvio) navigation already used by onboarding.
This commit is contained in:
parent
42422ea8a5
commit
a98521bea1
7 changed files with 32 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ fun SettingsScreen(
|
|||
onBack: () -> Unit,
|
||||
onLogout: () -> Unit,
|
||||
onConnectStremio: () -> Unit,
|
||||
onConnectNuvio: () -> Unit,
|
||||
onConnectTrakt: () -> Unit,
|
||||
onConnectMal: () -> Unit,
|
||||
onConnectSimkl: () -> Unit,
|
||||
|
|
@ -227,6 +228,7 @@ fun SettingsScreen(
|
|||
onBack = { mobileCategory = null },
|
||||
onLogout = onLogout,
|
||||
onConnectStremio = onConnectStremio,
|
||||
onConnectNuvio = onConnectNuvio,
|
||||
onConnectTrakt = onConnectTrakt,
|
||||
onConnectMal = onConnectMal,
|
||||
onConnectSimkl = onConnectSimkl,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ internal fun AccountSettings(
|
|||
profile: UserProfile,
|
||||
lang: String,
|
||||
onSwitchProfiles: () -> Unit,
|
||||
onConnectStremio: () -> Unit,
|
||||
onConnectTrakt: () -> Unit,
|
||||
onConnectMal: () -> Unit,
|
||||
onConnectSimkl: () -> Unit,
|
||||
|
|
@ -75,6 +76,12 @@ internal fun AccountSettings(
|
|||
icon = FluxaIcons.AccountCircle,
|
||||
onClick = onSwitchProfiles
|
||||
)
|
||||
SettingsConnectionTile(
|
||||
title = AppStrings.t(lang, "brand.stremio"),
|
||||
iconRes = com.fluxa.app.R.drawable.ic_stremio,
|
||||
value = if (!profile.isGuest) AppStrings.t(lang, "auto.connected") else AppStrings.t(lang, "auto.not_connected"),
|
||||
onClick = onConnectStremio
|
||||
)
|
||||
}
|
||||
SettingsSection(
|
||||
AppStrings.t(lang, "settings.sync_with"),
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ internal fun SettingsContent(
|
|||
) {
|
||||
val profileValue = profile ?: return
|
||||
when (tabId) {
|
||||
"account" -> AccountSettings(profileValue, lang, onLogout, onConnectTrakt, onConnectMal, onConnectSimkl, onConnectAnilist, onUpdateProfile)
|
||||
"account" -> AccountSettings(profileValue, lang, onLogout, onConnectStremio, onConnectTrakt, onConnectMal, onConnectSimkl, onConnectAnilist, onUpdateProfile)
|
||||
"general" -> GeneralSettings(profileValue, lang, onUpdateProfile)
|
||||
"appearance" -> {
|
||||
val categories by viewModel.categories.collectAsStateWithLifecycle()
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ internal fun MobileCategoryDetail(
|
|||
onBack: () -> Unit,
|
||||
onLogout: () -> Unit,
|
||||
onConnectStremio: () -> Unit,
|
||||
onConnectNuvio: () -> Unit,
|
||||
onConnectTrakt: () -> Unit,
|
||||
onConnectMal: () -> Unit,
|
||||
onConnectSimkl: () -> Unit,
|
||||
|
|
@ -226,6 +227,20 @@ internal fun MobileCategoryDetail(
|
|||
onClick = onLogout,
|
||||
prominent = true
|
||||
)
|
||||
MobileActionRow(
|
||||
title = AppStrings.t(lang, "brand.stremio"),
|
||||
iconRes = R.drawable.ic_stremio,
|
||||
value = if (!profile.isGuest) AppStrings.t(lang, "auto.connected") else AppStrings.t(lang, "auto.not_connected"),
|
||||
onClick = onConnectStremio,
|
||||
prominent = true
|
||||
)
|
||||
MobileActionRow(
|
||||
title = AppStrings.t(lang, "brand.nuvio"),
|
||||
iconRes = R.drawable.ic_nuvio,
|
||||
value = AppStrings.t(lang, "auto.import_nuvio_account"),
|
||||
onClick = onConnectNuvio,
|
||||
prominent = true
|
||||
)
|
||||
}
|
||||
}
|
||||
item {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ internal fun SettingsRoute(
|
|||
navigator.navigateTo(Screen.Profiles, true)
|
||||
},
|
||||
onConnectStremio = { navigator.navigateTo(Screen.Login()) },
|
||||
onConnectNuvio = { navigator.navigateTo(Screen.Login(startOnNuvio = true)) },
|
||||
onConnectTrakt = {
|
||||
if (!activeProfile?.traktAccessToken.isNullOrBlank()) {
|
||||
onShowTraktSheet()
|
||||
|
|
|
|||
|
|
@ -873,6 +873,9 @@
|
|||
"brand.myanimelist": "MyAnimeList",
|
||||
"brand.simkl": "Simkl",
|
||||
"brand.anilist": "AniList",
|
||||
"brand.stremio": "Stremio",
|
||||
"brand.nuvio": "Nuvio",
|
||||
"auto.import_nuvio_account": "Import from Nuvio",
|
||||
"brand.tmdb": "TMDB",
|
||||
"brand.netflix": "Netflix",
|
||||
"brand.prime_video": "Prime Video",
|
||||
|
|
|
|||
|
|
@ -873,6 +873,9 @@
|
|||
"brand.myanimelist": "MyAnimeList",
|
||||
"brand.simkl": "Simkl",
|
||||
"brand.anilist": "AniList",
|
||||
"brand.stremio": "Stremio",
|
||||
"brand.nuvio": "Nuvio",
|
||||
"auto.import_nuvio_account": "Nuvio'dan içe aktar",
|
||||
"brand.tmdb": "TMDB",
|
||||
"brand.netflix": "Netflix",
|
||||
"brand.prime_video": "Prime Video",
|
||||
|
|
|
|||
Loading…
Reference in a new issue