aboutsummaryrefslogtreecommitdiff
path: root/ui-compose/src/main/kotlin
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-10-09 18:02:49 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-10-09 18:11:04 +0530
commitc866bb9fb195eb77b62221212a2b2f158ae7ae0e (patch)
tree99a1b4dc5ac27c9725656f09979831425ccb95e6 /ui-compose/src/main/kotlin
parent6d73b63435a2760ec9026090ecfea4846157b6ab (diff)
feat(app): support toggling read-only status in DecryptScreen
Diffstat (limited to 'ui-compose/src/main/kotlin')
-rw-r--r--ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt3
1 files changed, 2 insertions, 1 deletions
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(),