From c866bb9fb195eb77b62221212a2b2f158ae7ae0e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 9 Oct 2022 18:02:49 +0530 Subject: feat(app): support toggling read-only status in DecryptScreen --- .../src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui-compose/src') diff --git a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt index 81255979..2bdf2de3 100644 --- a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt +++ b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt @@ -21,13 +21,14 @@ public fun PasswordField( value: String, label: String, initialVisibility: Boolean, + readOnly: Boolean, modifier: Modifier = Modifier, ) { var visible by remember { mutableStateOf(initialVisibility) } TextField( value = value, onValueChange = {}, - readOnly = true, + readOnly = readOnly, label = { Text(label) }, visualTransformation = if (visible) VisualTransformation.None else PasswordVisualTransformation(), -- cgit v1.2.3