fix(auth): subsonic_password on bootstrap + dev compose defaults #10
@@ -131,8 +131,20 @@ fun SettingsScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (showSignOutConfirm) {
|
if (showSignOutConfirm) {
|
||||||
|
SignOutConfirmDialog(
|
||||||
|
onConfirm = {
|
||||||
|
showSignOutConfirm = false
|
||||||
|
viewModel.signOut()
|
||||||
|
},
|
||||||
|
onDismiss = { showSignOutConfirm = false },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun SignOutConfirmDialog(onConfirm: () -> Unit, onDismiss: () -> Unit) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = { showSignOutConfirm = false },
|
onDismissRequest = onDismiss,
|
||||||
title = { Text("Sign out?") },
|
title = { Text("Sign out?") },
|
||||||
text = {
|
text = {
|
||||||
Text(
|
Text(
|
||||||
@@ -142,10 +154,7 @@ fun SettingsScreen(
|
|||||||
},
|
},
|
||||||
confirmButton = {
|
confirmButton = {
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = onConfirm,
|
||||||
showSignOutConfirm = false
|
|
||||||
viewModel.signOut()
|
|
||||||
},
|
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
containerColor = MaterialTheme.colorScheme.errorContainer,
|
containerColor = MaterialTheme.colorScheme.errorContainer,
|
||||||
contentColor = MaterialTheme.colorScheme.onErrorContainer,
|
contentColor = MaterialTheme.colorScheme.onErrorContainer,
|
||||||
@@ -153,10 +162,9 @@ fun SettingsScreen(
|
|||||||
) { Text("Sign out") }
|
) { Text("Sign out") }
|
||||||
},
|
},
|
||||||
dismissButton = {
|
dismissButton = {
|
||||||
TextButton(onClick = { showSignOutConfirm = false }) { Text("Cancel") }
|
TextButton(onClick = onDismiss) { Text("Cancel") }
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
Reference in New Issue
Block a user