@@ -39,6 +39,7 @@ import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenMediumTopAppBa
39
39
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
40
40
import com.x8bit.bitwarden.ui.platform.components.appbar.action.BitwardenOverflowActionItem
41
41
import com.x8bit.bitwarden.ui.platform.components.appbar.action.OverflowMenuItemData
42
+ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButton
42
43
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
43
44
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTonalIconButton
44
45
import com.x8bit.bitwarden.ui.platform.components.card.BitwardenInfoCalloutCard
@@ -302,8 +303,8 @@ private fun ScrollContent(
302
303
.fillMaxHeight()
303
304
.verticalScroll(rememberScrollState()),
304
305
) {
306
+ Spacer (modifier = Modifier .height(12 .dp))
305
307
if (state.isUnderPolicy) {
306
- Spacer (modifier = Modifier .height(8 .dp))
307
308
BitwardenInfoCalloutCard (
308
309
text = stringResource(id = R .string.password_generator_policy_in_effect),
309
310
modifier = Modifier
@@ -312,16 +313,29 @@ private fun ScrollContent(
312
313
.fillMaxWidth(),
313
314
)
314
315
315
- Spacer (modifier = Modifier .height(8 .dp))
316
+ Spacer (modifier = Modifier .height(12 .dp))
316
317
}
317
318
318
319
GeneratedStringItem (
319
320
generatedText = state.generatedText,
320
- onCopyClick = onCopyClick,
321
321
onRegenerateClick = onRegenerateClick,
322
+ modifier = Modifier
323
+ .padding(horizontal = 16 .dp)
324
+ .fillMaxWidth(),
325
+ )
326
+
327
+ Spacer (modifier = Modifier .height(12 .dp))
328
+
329
+ BitwardenFilledButton (
330
+ label = stringResource(id = R .string.copy),
331
+ onClick = onCopyClick,
332
+ modifier = Modifier
333
+ .testTag(tag = " CopyValueButton" )
334
+ .fillMaxWidth()
335
+ .padding(horizontal = 16 .dp),
322
336
)
323
337
324
- Spacer (modifier = Modifier .height(16 .dp))
338
+ Spacer (modifier = Modifier .height(24 .dp))
325
339
326
340
BitwardenListHeaderText (
327
341
label = stringResource(id = R .string.options),
@@ -365,22 +379,15 @@ private fun ScrollContent(
365
379
@Composable
366
380
private fun GeneratedStringItem (
367
381
generatedText : String ,
368
- onCopyClick : () -> Unit ,
369
382
onRegenerateClick : () -> Unit ,
370
383
modifier : Modifier = Modifier ,
371
384
) {
372
385
BitwardenTextFieldWithActions (
373
- label = " " ,
386
+ label = null ,
374
387
textFieldTestTag = " GeneratedPasswordLabel" ,
375
388
value = generatedText,
376
389
singleLine = false ,
377
390
actions = {
378
- BitwardenTonalIconButton (
379
- vectorIconRes = R .drawable.ic_copy,
380
- contentDescription = stringResource(id = R .string.copy),
381
- onClick = onCopyClick,
382
- modifier = Modifier .testTag(" CopyValueButton" ),
383
- )
384
391
BitwardenTonalIconButton (
385
392
vectorIconRes = R .drawable.ic_generate,
386
393
contentDescription = stringResource(id = R .string.generate_password),
@@ -393,7 +400,7 @@ private fun GeneratedStringItem(
393
400
textStyle = BitwardenTheme .typography.sensitiveInfoSmall,
394
401
shouldAddCustomLineBreaks = true ,
395
402
visualTransformation = nonLetterColorVisualTransformation(),
396
- modifier = modifier.padding(horizontal = 16 .dp) ,
403
+ modifier = modifier,
397
404
textToolbarType = TextToolbarType .NONE ,
398
405
)
399
406
}
0 commit comments