Add blur to app password copy screen
This commit is contained in:
@@ -22,6 +22,7 @@ import * as Dialog from '#/components/Dialog'
|
|||||||
import * as TextInput from '#/components/forms/TextField'
|
import * as TextInput from '#/components/forms/TextField'
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron'
|
import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron'
|
||||||
|
import {Eye_Stroke2_Corner0_Rounded as EyeIcon} from '#/components/icons/Eye'
|
||||||
import {SquareBehindSquare4_Stroke2_Corner0_Rounded as CopyIcon} from '#/components/icons/SquareBehindSquare4'
|
import {SquareBehindSquare4_Stroke2_Corner0_Rounded as CopyIcon} from '#/components/icons/SquareBehindSquare4'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {CopyButton} from './CopyButton'
|
import {CopyButton} from './CopyButton'
|
||||||
@@ -47,6 +48,7 @@ function CreateDialogInner({passwords}: {passwords: string[]}) {
|
|||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const autogeneratedName = useRandomName()
|
const autogeneratedName = useRandomName()
|
||||||
|
const [showPassword, setShowPassword] = useState(false)
|
||||||
const [name, setName] = useState('')
|
const [name, setName] = useState('')
|
||||||
const [privileged, setPrivileged] = useState(false)
|
const [privileged, setPrivileged] = useState(false)
|
||||||
const {
|
const {
|
||||||
@@ -191,15 +193,37 @@ function CreateDialogInner({passwords}: {passwords: string[]}) {
|
|||||||
Use this to sign into the other app along with your handle.
|
Use this to sign into the other app along with your handle.
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<CopyButton
|
<View style={[a.flex_row, a.align_center, a.gap_sm, a.w_full]}>
|
||||||
value={data.password}
|
<View style={[a.flex_grow, a.flex_shrink_0]}>
|
||||||
label={_(msg`Copy App Password`)}
|
<CopyButton
|
||||||
size="large"
|
value={data.password}
|
||||||
variant="solid"
|
label={_(msg`Copy App Password`)}
|
||||||
color="secondary">
|
size="large"
|
||||||
<ButtonText>{data.password}</ButtonText>
|
variant="solid"
|
||||||
<ButtonIcon icon={CopyIcon} />
|
color="secondary">
|
||||||
</CopyButton>
|
<ButtonText
|
||||||
|
style={{
|
||||||
|
color: showPassword
|
||||||
|
? t.atoms.text.color
|
||||||
|
: 'transparent',
|
||||||
|
textShadowColor: t.atoms.text.color,
|
||||||
|
textShadowRadius: showPassword ? 0 : 8,
|
||||||
|
}}>
|
||||||
|
{data.password}
|
||||||
|
</ButtonText>
|
||||||
|
<ButtonIcon icon={CopyIcon} />
|
||||||
|
</CopyButton>
|
||||||
|
</View>
|
||||||
|
<Button
|
||||||
|
label={_(msg`Show Password`)}
|
||||||
|
size="small"
|
||||||
|
variant="ghost"
|
||||||
|
color="primary"
|
||||||
|
onPress={() => setShowPassword(!showPassword)}
|
||||||
|
style={[a.flex_shrink]}>
|
||||||
|
<ButtonIcon icon={EyeIcon} />
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.text_md,
|
a.text_md,
|
||||||
|
|||||||
Reference in New Issue
Block a user