aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Willy Woitas <dutscher_sbf@hotmail.com>2024-02-18 01:49:42 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-18 06:19:42 +0530
commit315728415b2269981a04ee51af7ef18412d7bf70 (patch)
tree1ee3e41e7022fa376b99bff5413eb6119481b839 /src/containers
parent6.7.1-nightly.20 [skip ci] (diff)
downloadferdium-app-315728415b2269981a04ee51af7ef18412d7bf70.tar.gz
ferdium-app-315728415b2269981a04ee51af7ef18412d7bf70.tar.zst
ferdium-app-315728415b2269981a04ee51af7ef18412d7bf70.zip
feat: Parse 2FA SMS token and copy to clipboard (#1561)
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/settings/EditSettingsScreen.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/containers/settings/EditSettingsScreen.tsx b/src/containers/settings/EditSettingsScreen.tsx
index 272297700..5d1b09296 100644
--- a/src/containers/settings/EditSettingsScreen.tsx
+++ b/src/containers/settings/EditSettingsScreen.tsx
@@ -99,6 +99,16 @@ const messages = defineMessages({
99 id: 'settings.app.form.notifyTaskBarOnMessage', 99 id: 'settings.app.form.notifyTaskBarOnMessage',
100 defaultMessage: 'Notify TaskBar/Dock on new message', 100 defaultMessage: 'Notify TaskBar/Dock on new message',
101 }, 101 },
102 isTwoFactorAutoCatcherEnabled: {
103 id: 'settings.app.form.isTwoFactorAutoCatcherEnabled',
104 defaultMessage:
105 'Auto-catch two-factor codes from notifications (Ex.: android messages) and copy to clipboard',
106 },
107 twoFactorAutoCatcherMatcher: {
108 id: 'settings.app.form.twoFactorAutoCatcherMatcher',
109 defaultMessage:
110 'Comma-separated and case-insensitive words/expressions to catch two-factor codes from. Ex.: token, code, sms, verify',
111 },
102 navigationBarBehaviour: { 112 navigationBarBehaviour: {
103 id: 'settings.app.form.navigationBarBehaviour', 113 id: 'settings.app.form.navigationBarBehaviour',
104 defaultMessage: 'Navigation bar behaviour', 114 defaultMessage: 'Navigation bar behaviour',
@@ -383,6 +393,10 @@ class EditSettingsScreen extends Component<
383 privateNotifications: Boolean(settingsData.privateNotifications), 393 privateNotifications: Boolean(settingsData.privateNotifications),
384 clipboardNotifications: Boolean(settingsData.clipboardNotifications), 394 clipboardNotifications: Boolean(settingsData.clipboardNotifications),
385 notifyTaskBarOnMessage: Boolean(settingsData.notifyTaskBarOnMessage), 395 notifyTaskBarOnMessage: Boolean(settingsData.notifyTaskBarOnMessage),
396 isTwoFactorAutoCatcherEnabled: Boolean(
397 settingsData.isTwoFactorAutoCatcherEnabled,
398 ),
399 twoFactorAutoCatcherMatcher: settingsData.twoFactorAutoCatcherMatcher,
386 navigationBarBehaviour: settingsData.navigationBarBehaviour, 400 navigationBarBehaviour: settingsData.navigationBarBehaviour,
387 webRTCIPHandlingPolicy: settingsData.webRTCIPHandlingPolicy, 401 webRTCIPHandlingPolicy: settingsData.webRTCIPHandlingPolicy,
388 searchEngine: settingsData.searchEngine, 402 searchEngine: settingsData.searchEngine,
@@ -680,6 +694,23 @@ class EditSettingsScreen extends Component<
680 default: DEFAULT_APP_SETTINGS.notifyTaskBarOnMessage, 694 default: DEFAULT_APP_SETTINGS.notifyTaskBarOnMessage,
681 type: 'checkbox', 695 type: 'checkbox',
682 }, 696 },
697 isTwoFactorAutoCatcherEnabled: {
698 label: intl.formatMessage(messages.isTwoFactorAutoCatcherEnabled),
699 value: ifUndefined<boolean>(
700 settings.all.app.isTwoFactorAutoCatcherEnabled,
701 DEFAULT_APP_SETTINGS.isTwoFactorAutoCatcherEnabled,
702 ),
703 default: DEFAULT_APP_SETTINGS.isTwoFactorAutoCatcherEnabled,
704 type: 'checkbox',
705 },
706 twoFactorAutoCatcherMatcher: {
707 label: intl.formatMessage(messages.twoFactorAutoCatcherMatcher),
708 value: ifUndefined<string>(
709 settings.all.app.twoFactorAutoCatcherMatcher,
710 DEFAULT_APP_SETTINGS.twoFactorAutoCatcherMatcher,
711 ),
712 default: DEFAULT_APP_SETTINGS.twoFactorAutoCatcherMatcher,
713 },
683 navigationBarBehaviour: { 714 navigationBarBehaviour: {
684 label: intl.formatMessage(messages.navigationBarBehaviour), 715 label: intl.formatMessage(messages.navigationBarBehaviour),
685 value: ifUndefined<string>( 716 value: ifUndefined<string>(
@@ -1257,6 +1288,12 @@ class EditSettingsScreen extends Component<
1257 this.props.stores.settings.app.useGrayscaleServices 1288 this.props.stores.settings.app.useGrayscaleServices
1258 } 1289 }
1259 isSplitModeEnabled={this.props.stores.settings.app.splitMode} 1290 isSplitModeEnabled={this.props.stores.settings.app.splitMode}
1291 isTwoFactorAutoCatcherEnabled={
1292 this.props.stores.settings.app.isTwoFactorAutoCatcherEnabled
1293 }
1294 twoFactorAutoCatcherMatcher={
1295 this.props.stores.settings.app.twoFactorAutoCatcherMatcher
1296 }
1260 isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser} 1297 isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser}
1261 openProcessManager={() => this.openProcessManager()} 1298 openProcessManager={() => this.openProcessManager()}
1262 isOnline={app.isOnline} 1299 isOnline={app.isOnline}