diff --git a/app/src/main/java/org/jellyfin/androidtv/ui/startup/fragment/ConnectHelpAlertFragment.kt b/app/src/main/java/org/jellyfin/androidtv/ui/startup/fragment/ConnectHelpAlertFragment.kt index 56c08c14fa..fed084e942 100644 --- a/app/src/main/java/org/jellyfin/androidtv/ui/startup/fragment/ConnectHelpAlertFragment.kt +++ b/app/src/main/java/org/jellyfin/androidtv/ui/startup/fragment/ConnectHelpAlertFragment.kt @@ -30,79 +30,77 @@ import androidx.fragment.compose.content import androidx.tv.material3.Button import androidx.tv.material3.ButtonDefaults import androidx.tv.material3.Icon +import androidx.tv.material3.MaterialTheme import androidx.tv.material3.Surface import androidx.tv.material3.Text -import androidx.tv.material3.MaterialTheme import org.jellyfin.androidtv.R import org.jellyfin.androidtv.ui.composable.overscan -import org.jellyfin.androidtv.ui.shared.theme.JellyfinMaterialTheme class ConnectHelpAlertFragment : Fragment() { - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ) = content { - ConnectHelpAlert() - } + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ) = content { + ConnectHelpAlert() + } - @Composable - fun ConnectHelpAlert() { - val focusRequester = FocusRequester() + @Composable + fun ConnectHelpAlert() { + val focusRequester = FocusRequester() - JellyfinMaterialTheme { - Surface( - ) { - Row( - modifier = Modifier - .fillMaxWidth() - .fillMaxHeight() - .overscan(), - horizontalArrangement = Arrangement.SpaceEvenly - ) { - Column( - modifier = Modifier - .width(400.dp) - .align(Alignment.CenterVertically) - ) { - Text( - text = stringResource(R.string.login_help_title), - style = MaterialTheme.typography.displayMedium - ) - Text( - modifier = Modifier.padding(top = 16.dp), - text = stringResource(R.string.login_help_description), - style = MaterialTheme.typography.bodyLarge - ) - Button(modifier = Modifier.padding(top = 24.dp).align(Alignment.Start) - .focusRequester(focusRequester).focusable(), onClick = { - parentFragmentManager.popBackStack() - }) { - Icon( - imageVector = Icons.Default.Done, - contentDescription = null, - modifier = Modifier.size(ButtonDefaults.IconSize) - ) - Spacer(Modifier.size(ButtonDefaults.IconSpacing)) - Text( - text = stringResource(id = R.string.btn_got_it), - style = MaterialTheme.typography.bodyLarge - ) - } - } - Image( - painter = painterResource(R.drawable.qr_jellyfin_docs), - contentDescription = stringResource(R.string.app_name), - modifier = Modifier - .width(200.dp) - .align(Alignment.CenterVertically) - ) - } - } - } - LaunchedEffect(Unit) { - focusRequester.requestFocus() - } - } + Surface { + Row( + modifier = Modifier + .fillMaxWidth() + .fillMaxHeight() + .overscan(), + horizontalArrangement = Arrangement.SpaceEvenly + ) { + Column( + modifier = Modifier + .width(400.dp) + .align(Alignment.CenterVertically) + ) { + Text( + text = stringResource(R.string.login_help_title), + style = MaterialTheme.typography.displayMedium + ) + Text( + modifier = Modifier.padding(top = 16.dp), + text = stringResource(R.string.login_help_description), + style = MaterialTheme.typography.bodyLarge + ) + Button(modifier = Modifier + .padding(top = 24.dp) + .align(Alignment.Start) + .focusRequester(focusRequester).focusable(), + onClick = { parentFragmentManager.popBackStack() } + ) { + Icon( + imageVector = Icons.Default.Done, + contentDescription = null, + modifier = Modifier.size(ButtonDefaults.IconSize) + ) + Spacer(Modifier.size(ButtonDefaults.IconSpacing)) + Text( + text = stringResource(id = R.string.btn_got_it), + style = MaterialTheme.typography.bodyLarge + ) + } + } + Image( + painter = painterResource(R.drawable.qr_jellyfin_docs), + contentDescription = stringResource(R.string.app_name), + modifier = Modifier + .width(200.dp) + .align(Alignment.CenterVertically) + ) + } + } + LaunchedEffect(Unit) { + focusRequester.requestFocus() + } + } }