@ -3,10 +3,13 @@
package com.tailscale.ipn.ui.view
package com.tailscale.ipn.ui.view
import androidx.compose.foundation.focusable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Icon
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MaterialTheme
@ -50,12 +53,11 @@ fun TailnetLockSetupView(
Scaffold ( topBar = { Header ( R . string . tailnet _lock , onBack = backToSettings ) } ) { innerPadding ->
Scaffold ( topBar = { Header ( R . string . tailnet _lock , onBack = backToSettings ) } ) { innerPadding ->
LoadingIndicator . Wrap {
LoadingIndicator . Wrap {
Column (
Column (
modifier = Modifier
modifier =
. padding ( innerPadding )
Modifier . padding ( innerPadding )
. focusable ( )
. focusable ( )
. verticalScroll ( rememberScrollState ( ) )
. verticalScroll ( rememberScrollState ( ) )
. fillMaxSize ( )
. fillMaxSize ( ) ) {
) {
ExplainerView ( )
ExplainerView ( )
statusItems . forEach { statusItem ->
statusItems . forEach { statusItem ->
@ -66,28 +68,23 @@ fun TailnetLockSetupView(
Icon (
Icon (
painter = painterResource ( id = statusItem . icon ) ,
painter = painterResource ( id = statusItem . icon ) ,
contentDescription = null ,
contentDescription = null ,
tint = MaterialTheme . colorScheme . onSurfaceVariant
tint = MaterialTheme . colorScheme . onSurfaceVariant )
)
} ,
} ,
headlineContent = { Text ( stringResource ( statusItem . title ) ) }
headlineContent = { Text ( stringResource ( statusItem . title ) ) } )
)
}
}
// Node key
// Node key
Lists . SectionDivider ( )
Lists . SectionDivider ( )
ClipboardValueView (
ClipboardValueView (
value = nodeKey ,
value = nodeKey ,
title = stringResource ( R . string . node _key ) ,
title = stringResource ( R . string . node _key ) ,
subtitle = stringResource ( R . string . node _key _explainer )
subtitle = stringResource ( R . string . node _key _explainer ) )
)
// Tailnet lock key
// Tailnet lock key
Lists . SectionDivider ( )
Lists . SectionDivider ( )
ClipboardValueView (
ClipboardValueView (
value = tailnetLockTlPubKey ,
value = tailnetLockTlPubKey ,
title = stringResource ( R . string . tailnet _lock _key ) ,
title = stringResource ( R . string . tailnet _lock _key ) ,
subtitle = stringResource ( R . string . tailnet _lock _key _explainer )
subtitle = stringResource ( R . string . tailnet _lock _key _explainer ) )
)
}
}
}
}
}
}
}