MainView, strings: show toggle when logged out (#257)

Fix logged out strings

Updates tailscale/corp#18202

Signed-off-by: kari-ts <kari@tailscale.com>
pull/258/head
kari-ts 8 months ago committed by GitHub
parent cf56dd6793
commit af2e33d130
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -91,7 +91,7 @@ fun MainView(navigation: MainViewNavigation, viewModel: MainViewModel = viewMode
.padding(top = 10.dp),
verticalAlignment = Alignment.CenterVertically) {
val isOn = viewModel.vpnToggleState.collectAsState(initial = false)
if (state.value != Ipn.State.NeedsLogin && state.value != Ipn.State.NoState) {
if (state.value != Ipn.State.NoState) {
TintedSwitch(onCheckedChange = { viewModel.toggleVpn() }, checked = isOn.value)
Spacer(Modifier.size(3.dp))
}

@ -67,7 +67,7 @@
<!-- State strings -->
<string name="waiting">Loading…</string>
<string name="placeholder">--</string>
<string name="please_login">Please Login</string>
<string name="please_login">Login Required</string>
<string name="stopped">Stopped</string>
<!-- Time conversion templates -->

Loading…
Cancel
Save