@ -49,10 +49,16 @@ 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 {
LazyColumn ( modifier = Modifier . padding ( innerPadding ) ) {
Column (
item ( key = " header " ) { ExplainerView ( ) }
modifier = Modifier
. padding ( innerPadding )
. focusable ( )
. verticalScroll ( rememberScrollState ( ) )
. fillMaxSize ( )
) {
ExplainerView ( )
items ( items = statusItems , key = { " status_ ${it.title} " } ) { statusItem ->
statusItems . forEach { statusItem ->
Lists . ItemDivider ( )
Lists . ItemDivider ( )
ListItem (
ListItem (
@ -60,28 +66,27 @@ 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
item ( key = " nodeKey " ) {
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 )
}
)
item ( key = " tailnetLockKey " ) {
// 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 )
}
)
}
}
}
}
}
}
@ -95,7 +100,8 @@ private fun ExplainerView() {
ClickableText (
ClickableText (
explainerText ( ) ,
explainerText ( ) ,
onClick = { handler . openUri ( Links . TAILNET _LOCK _KB _URL ) } ,
onClick = { handler . openUri ( Links . TAILNET _LOCK _KB _URL ) } ,
style = MaterialTheme . typography . bodyMedium )
style = MaterialTheme . typography . bodyMedium
)
}
}
}
}
@ -109,10 +115,11 @@ fun explainerText(): AnnotatedString {
pushStringAnnotation ( tag = " tailnetLockSupportURL " , annotation = Links . TAILNET _LOCK _KB _URL )
pushStringAnnotation ( tag = " tailnetLockSupportURL " , annotation = Links . TAILNET _LOCK _KB _URL )
withStyle (
withStyle (
style =
style = SpanStyle (
SpanStyle (
color = MaterialTheme . colorScheme . link ,
color = MaterialTheme . colorScheme . link ,
textDecoration = TextDecoration . Underline ) ) {
textDecoration = TextDecoration . Underline
)
) {
append ( stringResource ( id = R . string . learn _more ) )
append ( stringResource ( id = R . string . learn _more ) )
}
}
pop ( )
pop ( )