From 8e3b94f066a572e61cd6b576d75870861414a3fc Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 27 Jun 2023 22:59:34 +0700 Subject: [PATCH 1/5] fix style copy button --- src/pages/settings/Security/TwoFactorAuth/VerifyPage.js | 2 +- src/styles/styles.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js index 35dd3564c63d..a34cc3744d0a 100644 --- a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js @@ -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.verifyCodesButton]} textStyles={[styles.buttonMediumText]} /> diff --git a/src/styles/styles.js b/src/styles/styles.js index 74066af5e20a..5ea9c954ddc3 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2215,7 +2215,11 @@ const styles = { }, twoFactorAuthCodesButton: { - minWidth: 100, + minWidth: 140, + }, + + verifyCodesButton: { + minWidth: 110, }, anonymousRoomFooter: { From a1898ea4055986e83633bb4ccc23b31782aa3629 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Wed, 28 Jun 2023 02:17:34 +0700 Subject: [PATCH 2/5] update name style 2fa copy button --- src/pages/settings/Security/TwoFactorAuth/VerifyPage.js | 2 +- src/styles/styles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js index a34cc3744d0a..90765b45caa2 100644 --- a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js @@ -132,7 +132,7 @@ function VerifyPage(props) { icon={Expensicons.Copy} inline={false} onPress={() => Clipboard.setString(props.account.twoFactorAuthSecretKey)} - styles={[styles.button, styles.buttonMedium, styles.verifyCodesButton]} + styles={[styles.button, styles.buttonMedium, styles.twoFactorAuthCopyCodeButton]} textStyles={[styles.buttonMediumText]} /> diff --git a/src/styles/styles.js b/src/styles/styles.js index 5ea9c954ddc3..343e13b0ce46 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2218,7 +2218,7 @@ const styles = { minWidth: 140, }, - verifyCodesButton: { + twoFactorAuthCopyCodeButton: { minWidth: 110, }, From 8eae5b088f1eb98d19deb135d5aeb0f720cc4be6 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Thu, 29 Jun 2023 07:15:56 +0700 Subject: [PATCH 3/5] fix: style and change text to copy --- .../settings/Security/TwoFactorAuth/CodesPage.js | 5 ++--- src/styles/styles.js | 13 +++++++------ src/styles/utilities/spacing.js | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/CodesPage.js b/src/pages/settings/Security/TwoFactorAuth/CodesPage.js index 91ccee630879..39d4141a2872 100644 --- a/src/pages/settings/Security/TwoFactorAuth/CodesPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/CodesPage.js @@ -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, @@ -96,9 +95,9 @@ function CodesPage(props) { ))} - + { - 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 { @@ -2198,12 +2198,12 @@ const styles = { flexDirection: 'row', flexWrap: 'wrap', gap: 12, - height: 148, + minHeight: 148, }, twoFactorAuthCode: { fontFamily: fontFamily.MONOSPACE, - width: 100, + width: 112, textAlign: 'center', }, @@ -2212,10 +2212,11 @@ const styles = { justifyContent: 'center', gap: 12, marginTop: 20, + flexWrap: 'wrap', }, twoFactorAuthCodesButton: { - minWidth: 140, + minWidth: 112, }, twoFactorAuthCopyCodeButton: { diff --git a/src/styles/utilities/spacing.js b/src/styles/utilities/spacing.js index e6823e43e921..0e4bb8a69907 100644 --- a/src/styles/utilities/spacing.js +++ b/src/styles/utilities/spacing.js @@ -330,6 +330,10 @@ export default { paddingHorizontal: 32, }, + ph9: { + paddingHorizontal: 36, + }, + ph10: { paddingHorizontal: 40, }, From fb4e23a208d9dece3e21d30102daa0b89f64548b Mon Sep 17 00:00:00 2001 From: Nam Le Date: Thu, 29 Jun 2023 08:06:31 +0700 Subject: [PATCH 4/5] remove translation not use --- src/languages/en.js | 1 - src/languages/es.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 17653692828e..28c03c144a17 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -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', }, diff --git a/src/languages/es.js b/src/languages/es.js index 2a8af5628045..6ae536a9389b 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -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', }, From c0924e6a6d74289499011ba10b5b298e49796bdd Mon Sep 17 00:00:00 2001 From: Nam Le Date: Sat, 1 Jul 2023 01:33:29 +0700 Subject: [PATCH 5/5] fix minor --- src/styles/styles.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 90169f401d1d..dff82606a435 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2198,7 +2198,6 @@ const styles = { flexDirection: 'row', flexWrap: 'wrap', gap: 12, - minHeight: 148, }, twoFactorAuthCode: {