use hidden characters instead of blur
This commit is contained in:
@@ -100,6 +100,10 @@ function CreateDialogInner({passwords}: {passwords: string[]}) {
|
|||||||
const error =
|
const error =
|
||||||
validationError || (!name.match(/^[a-zA-Z0-9-_ ]*$/) && regexFailError)
|
validationError || (!name.match(/^[a-zA-Z0-9-_ ]*$/) && regexFailError)
|
||||||
|
|
||||||
|
const renderedPassword = showPassword
|
||||||
|
? data?.password
|
||||||
|
: '•'.repeat(data?.password.length || 8)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.ScrollableInner label={_(msg`Add app password`)}>
|
<Dialog.ScrollableInner label={_(msg`Add app password`)}>
|
||||||
<View style={[native(a.pt_md)]}>
|
<View style={[native(a.pt_md)]}>
|
||||||
@@ -201,16 +205,7 @@ function CreateDialogInner({passwords}: {passwords: string[]}) {
|
|||||||
size="large"
|
size="large"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary">
|
color="secondary">
|
||||||
<ButtonText
|
<ButtonText>{renderedPassword}</ButtonText>
|
||||||
style={{
|
|
||||||
color: showPassword
|
|
||||||
? t.atoms.text.color
|
|
||||||
: 'transparent',
|
|
||||||
textShadowColor: t.atoms.text.color,
|
|
||||||
textShadowRadius: showPassword ? 0 : 8,
|
|
||||||
}}>
|
|
||||||
{data.password}
|
|
||||||
</ButtonText>
|
|
||||||
<ButtonIcon icon={CopyIcon} />
|
<ButtonIcon icon={CopyIcon} />
|
||||||
</CopyButton>
|
</CopyButton>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user