@@ -87,48 +87,46 @@ fun TailnetLockSetupView(
87
87
subtitle = stringResource(R .string.tailnet_lock_key_explainer))
88
88
}
89
89
}
90
+ }
90
91
}
91
92
92
93
@Composable
93
94
private fun ExplainerView () {
94
- val handler = LocalUriHandler .current
95
+ val handler = LocalUriHandler .current
95
96
96
- Lists .MultilineDescription {
97
- ClickableText (
98
- explainerText(),
99
- onClick = { handler.openUri(Links .TAILNET_LOCK_KB_URL ) },
100
- style = MaterialTheme .typography.bodyMedium
101
- )
102
- }
97
+ Lists .MultilineDescription {
98
+ ClickableText (
99
+ explainerText(),
100
+ onClick = { handler.openUri(Links .TAILNET_LOCK_KB_URL ) },
101
+ style = MaterialTheme .typography.bodyMedium)
102
+ }
103
103
}
104
104
105
105
@Composable
106
106
fun explainerText (): AnnotatedString {
107
- val annotatedString = buildAnnotatedString {
108
- withStyle(SpanStyle (color = MaterialTheme .colorScheme.defaultTextColor)) {
109
- append(stringResource(id = R .string.tailnet_lock_explainer))
110
- }
107
+ return buildAnnotatedString {
108
+ withStyle(SpanStyle (color = MaterialTheme .colorScheme.defaultTextColor)) {
109
+ append(stringResource(id = R .string.tailnet_lock_explainer))
110
+ }
111
111
112
- pushStringAnnotation(tag = " tailnetLockSupportURL" , annotation = Links .TAILNET_LOCK_KB_URL )
112
+ pushStringAnnotation(tag = " tailnetLockSupportURL" , annotation = Links .TAILNET_LOCK_KB_URL )
113
113
114
- withStyle(
115
- style = SpanStyle (
114
+ withStyle(
115
+ style =
116
+ SpanStyle (
116
117
color = MaterialTheme .colorScheme.link,
117
- textDecoration = TextDecoration .Underline
118
- )
119
- ) {
120
- append(stringResource(id = R .string.learn_more))
118
+ textDecoration = TextDecoration .Underline )) {
119
+ append(stringResource(id = R .string.learn_more))
121
120
}
122
- pop()
123
- }
124
- return annotatedString
121
+ pop()
122
+ }
125
123
}
126
124
127
125
@Composable
128
126
@Preview
129
127
fun TailnetLockSetupViewPreview () {
130
- val vm = TailnetLockSetupViewModel ()
131
- vm.nodeKey.set(" 8BADF00D-EA7-1337-DEAD-BEEF" )
132
- vm.tailnetLockKey.set(" C0FFEE-CAFE-50DA" )
133
- TailnetLockSetupView (backToSettings = {}, vm)
128
+ val vm = TailnetLockSetupViewModel ()
129
+ vm.nodeKey.set(" 8BADF00D-EA7-1337-DEAD-BEEF" )
130
+ vm.tailnetLockKey.set(" C0FFEE-CAFE-50DA" )
131
+ TailnetLockSetupView (backToSettings = {}, vm)
134
132
}
0 commit comments