Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix style copy button #21698

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ export default {
stepSuccess: 'Finished',
enabled: 'Two-factor authentication is now enabled!',
congrats: 'Congrats, now you’ve got that extra security.',
copyCodes: 'Copy codes',
copy: 'Copy',
disable: 'Disable',
},
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ export default {
stepSuccess: 'Finalizado',
enabled: '¡La autenticación de dos factores ahora está habilitada!',
congrats: 'Felicidades, ahora tienes esa seguridad adicional.',
copyCodes: 'Copiar códigos',
copy: 'Copiar',
disable: 'Deshabilitar',
},
Expand Down
5 changes: 2 additions & 3 deletions src/pages/settings/Security/TwoFactorAuth/CodesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import Clipboard from '../../../../libs/Clipboard';
import themeColors from '../../../../styles/themes/default';
import localFileDownload from '../../../../libs/localFileDownload';
import * as TwoFactorAuthActions from '../../../../libs/actions/TwoFactorAuthActions';
import * as StyleUtils from '../../../../styles/StyleUtils';

const propTypes = {
...withLocalizePropTypes,
Expand Down Expand Up @@ -96,9 +95,9 @@ function CodesPage(props) {
</Text>
))}
</View>
<View style={[styles.twoFactorAuthCodesButtonsContainer, StyleUtils.getWrappingStyle(props.isExtraSmallScreenWidth)]}>
<View style={[styles.twoFactorAuthCodesButtonsContainer]}>
<PressableWithDelayToggle
text={props.translate('twoFactorAuth.copyCodes')}
aldo-expensify marked this conversation as resolved.
Show resolved Hide resolved
text={props.translate('twoFactorAuth.copy')}
textChecked={props.translate('common.copied')}
icon={Expensicons.Copy}
inline={false}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Security/TwoFactorAuth/VerifyPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function VerifyPage(props) {
icon={Expensicons.Copy}
inline={false}
onPress={() => Clipboard.setString(props.account.twoFactorAuthSecretKey)}
styles={[styles.button, styles.buttonMedium]}
styles={[styles.button, styles.buttonMedium, styles.twoFactorAuthCopyCodeButton]}
textStyles={[styles.buttonMediumText]}
/>
</View>
Expand Down
16 changes: 10 additions & 6 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2165,14 +2165,14 @@ const styles = {
},

twoFactorAuthCodesBox: ({isExtraSmallScreenWidth, isSmallScreenWidth}) => {
let paddingHorizontal = styles.ph15;
let paddingHorizontal = styles.ph9;

if (isSmallScreenWidth) {
paddingHorizontal = styles.ph10;
paddingHorizontal = styles.ph4;
}

if (isExtraSmallScreenWidth) {
paddingHorizontal = styles.ph4;
paddingHorizontal = styles.ph2;
}

return {
Expand All @@ -2198,12 +2198,11 @@ const styles = {
flexDirection: 'row',
flexWrap: 'wrap',
gap: 12,
height: 148,
},

twoFactorAuthCode: {
fontFamily: fontFamily.MONOSPACE,
width: 100,
width: 112,
textAlign: 'center',
},

Expand All @@ -2212,10 +2211,15 @@ const styles = {
justifyContent: 'center',
gap: 12,
marginTop: 20,
flexWrap: 'wrap',
},

twoFactorAuthCodesButton: {
minWidth: 100,
minWidth: 112,
},

twoFactorAuthCopyCodeButton: {
minWidth: 110,
},

anonymousRoomFooter: {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/utilities/spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ export default {
paddingHorizontal: 32,
},

ph9: {
paddingHorizontal: 36,
},

ph10: {
paddingHorizontal: 40,
},
Expand Down