@ -22,6 +22,7 @@ import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.lifecycle.viewmodel.compose.viewModel
import com.tailscale.ipn.BuildConfig
import com.tailscale.ipn.BuildConfig
import com.tailscale.ipn.R
import com.tailscale.ipn.R
@ -29,6 +30,7 @@ import com.tailscale.ipn.ui.Links
import com.tailscale.ipn.ui.theme.link
import com.tailscale.ipn.ui.theme.link
import com.tailscale.ipn.ui.theme.listItem
import com.tailscale.ipn.ui.theme.listItem
import com.tailscale.ipn.ui.util.Lists
import com.tailscale.ipn.ui.util.Lists
import com.tailscale.ipn.ui.util.set
import com.tailscale.ipn.ui.viewModel.SettingsNav
import com.tailscale.ipn.ui.viewModel.SettingsNav
import com.tailscale.ipn.ui.viewModel.SettingsViewModel
import com.tailscale.ipn.ui.viewModel.SettingsViewModel
@ -177,3 +179,14 @@ fun AdminTextView(onNavigateToAdminConsole: () -> Unit) {
Lists . InfoItem ( adminStr , onClick = onNavigateToAdminConsole )
Lists . InfoItem ( adminStr , onClick = onNavigateToAdminConsole )
}
}
@Preview
@Composable
fun SettingsPreview ( ) {
val vm = SettingsViewModel ( )
vm . corpDNSEnabled . set ( true )
vm . tailNetLockEnabled . set ( true )
vm . isAdmin . set ( true )
vm . managedByOrganization . set ( " Tails and Scales Inc. " )
SettingsView ( SettingsNav ( { } , { } , { } , { } , { } , { } , { } , { } , { } , { } ) , vm )
}