From 10f731525b2a602db0c093b1b0e6dfa534edf768 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Mon, 8 Aug 2022 12:37:20 +0200 Subject: [PATCH 01/12] Prettify enter-new-password --- .../settings/password/enter-new-password.js | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/components/settings/password/enter-new-password.js b/components/settings/password/enter-new-password.js index 15f5d08..7ce4733 100644 --- a/components/settings/password/enter-new-password.js +++ b/components/settings/password/enter-new-password.js @@ -13,7 +13,6 @@ import settings from '../../../i18n/en/settings' const LISTENER_TYPE = 'create-or-change-pw' export default class EnterNewPassword extends Component { - constructor() { super() this.state = { @@ -52,15 +51,12 @@ export default class EnterNewPassword extends Component { this.setState({ passwordConfirmation }) } - render () { - const { - password, - passwordConfirmation, - shouldShowErrorMessage - } = this.state + render() { + const { password, passwordConfirmation, shouldShowErrorMessage } = + this.state const labels = settings.passwordSettings const isButtonActive = - (password.length > 0) && (passwordConfirmation.length > 0) + password.length > 0 && passwordConfirmation.length > 0 return ( @@ -80,9 +76,9 @@ export default class EnterNewPassword extends Component { value={passwordConfirmation} secureTextEntry={true} /> - {shouldShowErrorMessage && + {shouldShowErrorMessage && ( {labels.passwordsDontMatch} - } + )} @@ -94,6 +90,6 @@ export default class EnterNewPassword extends Component { const styles = StyleSheet.create({ error: { color: Colors.orange, - marginTop: Spacing.base - } -}) \ No newline at end of file + marginTop: Spacing.base, + }, +}) From c689a08fe3998b513b694729178c21bb2b036a9b Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Mon, 8 Aug 2022 12:38:20 +0200 Subject: [PATCH 02/12] Disable button when no input --- components/settings/password/enter-new-password.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/settings/password/enter-new-password.js b/components/settings/password/enter-new-password.js index 7ce4733..33c4c28 100644 --- a/components/settings/password/enter-new-password.js +++ b/components/settings/password/enter-new-password.js @@ -79,7 +79,11 @@ export default class EnterNewPassword extends Component { {shouldShowErrorMessage && ( {labels.passwordsDontMatch} )} - From 02d873b8f6a187e99cd98b1966ba9b87f07ba3a2 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Mon, 8 Aug 2022 13:31:17 +0200 Subject: [PATCH 03/12] Bump version number 1.2208.8 --- ios/drip.xcodeproj/project.pbxproj | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/drip.xcodeproj/project.pbxproj b/ios/drip.xcodeproj/project.pbxproj index 9ad4ebe..4eb0cd6 100644 --- a/ios/drip.xcodeproj/project.pbxproj +++ b/ios/drip.xcodeproj/project.pbxproj @@ -897,7 +897,7 @@ "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "$(inherited)", ); - MARKETING_VERSION = 1.2208.2; + MARKETING_VERSION = 1.2208.8; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -980,7 +980,7 @@ "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "$(inherited)", ); - MARKETING_VERSION = 1.2208.2; + MARKETING_VERSION = 1.2208.8; OTHER_LDFLAGS = ( "-ObjC", "-lc++", diff --git a/package-lock.json b/package-lock.json index d8a26bb..beb0085 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "drip.", - "version": "1.2208.2", + "version": "1.2208.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index caa7fea..997e49c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drip.", - "version": "1.2208.2", + "version": "1.2208.8", "contributors": [ "Julia Friesel ", "Marie Kochsiek", From 5e449016380eeb297a398591ace1a5e0caf691e5 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 14:22:55 +0000 Subject: [PATCH 04/12] Fix deprecated way of using writeCopyTo - realm method --- db/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/db/index.js b/db/index.js index 71c5e1d..67f4ca0 100644 --- a/db/index.js +++ b/db/index.js @@ -205,12 +205,7 @@ export async function changeEncryptionAndRestartApp(hash) { const copyPath = dir.join('/') const exists = await fs.exists(copyPath) if (exists) await fs.unlink(copyPath) - // for some reason, realm complains if we give it a key with value undefined - if (key) { - db.writeCopyTo(copyPath, key) - } else { - db.writeCopyTo(copyPath) - } + db.writeCopyTo({ path: copyPath, encryptionKey: key }) db.close() await fs.unlink(defaultPath) await fs.moveFile(copyPath, defaultPath) From 04bd981871f0b3154b608b953aa2ed87cfdea4be Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Tue, 9 Aug 2022 13:16:58 +0200 Subject: [PATCH 05/12] Remove email and hence typo from text --- i18n/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/en.json b/i18n/en.json index 93240c7..90fab96 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ "settings": { "license": { "title": "drip. an open-source cycle tracking app", - "text": "Copyright (C) {{currentYear}} Heart of Code e.V.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html\n\nYou can contact us at drip@mailbox.org." + "text": "Copyright (C) {{currentYear}} Heart of Code e.V.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html." }, "privacyPolicy": { "title": "Privacy Policy", From 0ec23219bf19b3730e28d751178f3375c7f4b67b Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 13:54:22 +0200 Subject: [PATCH 06/12] Prettify files before other changes Prettify --- components/app-wrapper.js | 10 ++++----- components/app.js | 24 +++++++++------------ components/settings/password/create.js | 5 ++--- components/settings/password/index.js | 30 ++++++++++---------------- components/settings/password/update.js | 17 ++++++--------- 5 files changed, 35 insertions(+), 51 deletions(-) diff --git a/components/app-wrapper.js b/components/app-wrapper.js index 6810d24..2769da4 100644 --- a/components/app-wrapper.js +++ b/components/app-wrapper.js @@ -12,7 +12,7 @@ import AppStatusBar from './common/app-status-bar' import License from './License' import PasswordPrompt from './password-prompt' -import store from "../store" +import store from '../store' export default class AppWrapper extends Component { constructor() { @@ -51,7 +51,7 @@ export default class AppWrapper extends Component { enableShowLicenseAgreement = () => { this.setState({ shouldShowLicenseAgreement: true, - isCheckingLicenseAgreement: false + isCheckingLicenseAgreement: false, }) } @@ -62,7 +62,7 @@ export default class AppWrapper extends Component { enableShowApp = () => { this.setState({ shouldShowApp: true, - shouldShowPasswordPrompt: false + shouldShowPasswordPrompt: false, }) } @@ -79,7 +79,7 @@ export default class AppWrapper extends Component { if (isCheckingLicenseAgreement) { initialView = } else if (shouldShowLicenseAgreement) { - initialView = + initialView = } else if (shouldShowPasswordPrompt) { initialView = } else if (shouldShowApp) { @@ -100,5 +100,5 @@ export default class AppWrapper extends Component { const styles = StyleSheet.create({ container: { flex: 1, - } + }, }) diff --git a/components/app.js b/components/app.js index f8a0350..885c282 100644 --- a/components/app.js +++ b/components/app.js @@ -17,7 +17,6 @@ import setupNotifications from '../lib/notifications' import { getCycleDay, closeDb } from '../db' class App extends Component { - static propTypes = { date: PropTypes.string, navigation: PropTypes.object.isRequired, @@ -80,8 +79,8 @@ class App extends Component { return ( -
- +
+ ) @@ -90,25 +89,22 @@ class App extends Component { const styles = StyleSheet.create({ container: { - flex: 1 - } + flex: 1, + }, }) const mapStateToProps = (state) => { - return({ + return { date: getDate(state), - navigation: getNavigation(state) - }) + navigation: getNavigation(state), + } } const mapDispatchToProps = (dispatch) => { - return({ + return { navigate: (page) => dispatch(navigate(page)), goBack: () => dispatch(goBack()), - }) + } } -export default connect( - mapStateToProps, - mapDispatchToProps -)(App) +export default connect(mapStateToProps, mapDispatchToProps)(App) diff --git a/components/settings/password/create.js b/components/settings/password/create.js index 8838b30..b081afc 100644 --- a/components/settings/password/create.js +++ b/components/settings/password/create.js @@ -23,7 +23,7 @@ export default class CreatePassword extends Component { showBackUpReminder(this.toggleSettingPassword, () => {}) } - render () { + render() { const { isSettingPassword } = this.state const labels = settings.passwordSettings @@ -36,6 +36,5 @@ export default class CreatePassword extends Component { } else { return } - } -} \ No newline at end of file +} diff --git a/components/settings/password/index.js b/components/settings/password/index.js index 5e67e5d..dd480c3 100644 --- a/components/settings/password/index.js +++ b/components/settings/password/index.js @@ -18,7 +18,7 @@ export default class PasswordSetting extends Component { this.state = { isPasswordSet: hasEncryptionObservable.value, isChangingPassword: false, - isDeletingPassword: false + isDeletingPassword: false, } } @@ -39,18 +39,10 @@ export default class PasswordSetting extends Component { } render() { + const { isPasswordSet, isChangingPassword, isDeletingPassword } = this.state - const { - isPasswordSet, - isChangingPassword, - isDeletingPassword, - } = this.state - - const { - title, - explainerEnabled, - explainerDisabled - } = labels.passwordSettings + const { title, explainerEnabled, explainerDisabled } = + labels.passwordSettings return ( @@ -59,19 +51,19 @@ export default class PasswordSetting extends Component { {isPasswordSet ? explainerEnabled : explainerDisabled} - {!isPasswordSet && } + {!isPasswordSet && } - {(isPasswordSet && !isDeletingPassword) && ( + {isPasswordSet && !isDeletingPassword && ( )} - {(isPasswordSet && !isChangingPassword) && ( + {isPasswordSet && !isChangingPassword && ( )} diff --git a/components/settings/password/update.js b/components/settings/password/update.js index a711262..270defd 100644 --- a/components/settings/password/update.js +++ b/components/settings/password/update.js @@ -12,7 +12,7 @@ import settings from '../../../i18n/en/settings' export default class ChangePassword extends Component { static propTypes = { onStartChange: PropTypes.func, - onCancelChange: PropTypes.func + onCancelChange: PropTypes.func, } constructor() { @@ -21,7 +21,7 @@ export default class ChangePassword extends Component { this.state = { currentPassword: null, enteringCurrentPassword: false, - enteringNewPassword: false + enteringNewPassword: false, } } @@ -41,7 +41,7 @@ export default class ChangePassword extends Component { this.setState({ currentPassword: null, enteringNewPassword: true, - enteringCurrentPassword: false + enteringCurrentPassword: false, }) } @@ -49,17 +49,14 @@ export default class ChangePassword extends Component { this.setState({ currentPassword: null, enteringNewPassword: false, - enteringCurrentPassword: false + enteringCurrentPassword: false, }) this.props.onCancelChange() } render() { - const { - enteringCurrentPassword, - enteringNewPassword, - currentPassword - } = this.state + const { enteringCurrentPassword, enteringNewPassword, currentPassword } = + this.state const labels = settings.passwordSettings const isPasswordSet = currentPassword !== null @@ -86,4 +83,4 @@ export default class ChangePassword extends Component { ) } -} \ No newline at end of file +} From 08b0dc773424f2da87e70e664c7fb1d2e6b1dbf6 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 15:40:48 +0200 Subject: [PATCH 07/12] Reset app state without closing/restarting it --- components/app-wrapper.js | 2 +- components/app.js | 4 +-- components/settings/password/create.js | 6 +++- components/settings/password/delete.js | 11 ++----- .../settings/password/enter-new-password.js | 11 ++++--- components/settings/password/index.js | 29 +++++++++++++++++-- components/settings/password/update.js | 6 +++- db/index.js | 3 +- 8 files changed, 51 insertions(+), 21 deletions(-) diff --git a/components/app-wrapper.js b/components/app-wrapper.js index 2769da4..616ad0a 100644 --- a/components/app-wrapper.js +++ b/components/app-wrapper.js @@ -83,7 +83,7 @@ export default class AppWrapper extends Component { } else if (shouldShowPasswordPrompt) { initialView = } else if (shouldShowApp) { - initialView = + initialView = this.checkDbPasswordSet()} /> } return ( diff --git a/components/app.js b/components/app.js index 885c282..082fb28 100644 --- a/components/app.js +++ b/components/app.js @@ -53,7 +53,7 @@ class App extends Component { } render() { - const { date, navigation, goBack } = this.props + const { date, navigation, goBack, restartApp } = this.props const { currentPage } = navigation if (!currentPage) { @@ -80,7 +80,7 @@ class App extends Component { return (
- + ) diff --git a/components/settings/password/create.js b/components/settings/password/create.js index b081afc..ba358e5 100644 --- a/components/settings/password/create.js +++ b/components/settings/password/create.js @@ -34,7 +34,11 @@ export default class CreatePassword extends Component { ) } else { - return + return ( + + ) } } } diff --git a/components/settings/password/delete.js b/components/settings/password/delete.js index 8f078d7..593efca 100644 --- a/components/settings/password/delete.js +++ b/components/settings/password/delete.js @@ -4,13 +4,12 @@ import PropTypes from 'prop-types' import Button from '../../common/button' import ConfirmWithPassword from '../common/confirm-with-password' -import { changeEncryptionAndRestartApp } from '../../../db' import labels from '../../../i18n/en/settings' export default class DeletePassword extends Component { static propTypes = { onStartDelete: PropTypes.func, - onCancelDelete: PropTypes.func + onCancelDelete: PropTypes.func, } constructor() { @@ -24,10 +23,6 @@ export default class DeletePassword extends Component { this.props.onStartDelete() } - startDeletePassword = async () => { - await changeEncryptionAndRestartApp() - } - cancelConfirmationWithPassword = () => { this.setState({ enteringCurrentPassword: false }) this.props.onCancelDelete() @@ -39,7 +34,7 @@ export default class DeletePassword extends Component { if (enteringCurrentPassword) { return ( ) @@ -51,4 +46,4 @@ export default class DeletePassword extends Component { ) } -} \ No newline at end of file +} diff --git a/components/settings/password/enter-new-password.js b/components/settings/password/enter-new-password.js index 33c4c28..75890f7 100644 --- a/components/settings/password/enter-new-password.js +++ b/components/settings/password/enter-new-password.js @@ -6,14 +6,14 @@ import AppText from '../../common/app-text' import AppTextInput from '../../common/app-text-input' import Button from '../../common/button' -import { requestHash, changeEncryptionAndRestartApp } from '../../../db' +import { requestHash } from '../../../db' import { Colors, Spacing } from '../../../styles' import settings from '../../../i18n/en/settings' const LISTENER_TYPE = 'create-or-change-pw' export default class EnterNewPassword extends Component { - constructor() { + constructor(props) { super() this.state = { password: '', @@ -22,13 +22,16 @@ export default class EnterNewPassword extends Component { } nodejs.channel.addListener( LISTENER_TYPE, - changeEncryptionAndRestartApp, + props.changeEncryptionAndRestart, this ) } componentWillUnmount() { - nodejs.channel.removeListener(LISTENER_TYPE, changeEncryptionAndRestartApp) + nodejs.channel.removeListener( + LISTENER_TYPE, + this.props.changeEncryptionAndRestart + ) } savePassword = () => { diff --git a/components/settings/password/index.js b/components/settings/password/index.js index dd480c3..e637cab 100644 --- a/components/settings/password/index.js +++ b/components/settings/password/index.js @@ -1,4 +1,9 @@ import React, { Component } from 'react' +import { connect } from 'react-redux' + +import { navigate } from '../../../slices/navigation' + +import { changeDbEncryption } from '../../../db' import AppPage from '../../common/app-page' import AppText from '../../common/app-text' @@ -11,7 +16,7 @@ import DeletePassword from './delete' import { hasEncryptionObservable } from '../../../local-storage' import labels from '../../../i18n/en/settings' -export default class PasswordSetting extends Component { +class PasswordSetting extends Component { constructor(props) { super(props) @@ -38,6 +43,12 @@ export default class PasswordSetting extends Component { this.setState({ isDeletingPassword: false }) } + changeEncryptionAndRestart = async (hash) => { + await changeDbEncryption(hash) + await this.props.restartApp() + this.props.navigate('Home') + } + render() { const { isPasswordSet, isChangingPassword, isDeletingPassword } = this.state @@ -51,12 +62,17 @@ export default class PasswordSetting extends Component { {isPasswordSet ? explainerEnabled : explainerDisabled} - {!isPasswordSet && } + {!isPasswordSet && ( + + )} {isPasswordSet && !isDeletingPassword && ( )} @@ -64,6 +80,7 @@ export default class PasswordSetting extends Component { )} @@ -71,3 +88,11 @@ export default class PasswordSetting extends Component { ) } } + +const mapDispatchToProps = (dispatch) => { + return { + navigate: (page) => dispatch(navigate(page)), + } +} + +export default connect(null, mapDispatchToProps)(PasswordSetting) diff --git a/components/settings/password/update.js b/components/settings/password/update.js index 270defd..4e0aa15 100644 --- a/components/settings/password/update.js +++ b/components/settings/password/update.js @@ -70,7 +70,11 @@ export default class ChangePassword extends Component { } if (enteringNewPassword) { - return + return ( + + ) } return ( diff --git a/db/index.js b/db/index.js index 67f4ca0..06905de 100644 --- a/db/index.js +++ b/db/index.js @@ -195,7 +195,7 @@ export function requestHash(type, pw) { ) } -export async function changeEncryptionAndRestartApp(hash) { +export async function changeDbEncryption(hash) { let key if (hash) key = hashToInt8Array(hash) const defaultPath = db.path @@ -209,7 +209,6 @@ export async function changeEncryptionAndRestartApp(hash) { db.close() await fs.unlink(defaultPath) await fs.moveFile(copyPath, defaultPath) - restartApp() } export function isDbEmpty() { From e9bf86006ee1e16b2d22e53ee05f4945775e046a Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 15:59:27 +0200 Subject: [PATCH 08/12] Cleanup --- db/index.js | 1 - db/restart-app/index.android.js | 5 ----- db/restart-app/index.ios.js | 11 ----------- package-lock.json | 5 ----- package.json | 4 +--- 5 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 db/restart-app/index.android.js delete mode 100644 db/restart-app/index.ios.js diff --git a/db/index.js b/db/index.js index 06905de..2a0a3a1 100644 --- a/db/index.js +++ b/db/index.js @@ -2,7 +2,6 @@ import Realm from 'realm' import { LocalDate, ChronoUnit } from '@js-joda/core' import nodejs from 'nodejs-mobile-react-native' import fs from 'react-native-fs' -import { restartApp } from './restart-app' import schemas from './schemas' import cycleModule from '../lib/cycle' diff --git a/db/restart-app/index.android.js b/db/restart-app/index.android.js deleted file mode 100644 index 3a84dc2..0000000 --- a/db/restart-app/index.android.js +++ /dev/null @@ -1,5 +0,0 @@ -// Current version of react-native-restart doesn't work with our ios setup -// therefore we have a fork and use different libraries on the platforms -import restart from 'react-native-restart' - -export const restartApp = restart.Restart diff --git a/db/restart-app/index.ios.js b/db/restart-app/index.ios.js deleted file mode 100644 index 0f3db9b..0000000 --- a/db/restart-app/index.ios.js +++ /dev/null @@ -1,11 +0,0 @@ -// Current version of react-native-restart doesn't work with our ios setup -// therefore we have a fork and use different libraries on the platforms -import RNExitApp from 'react-native-exit-app-v2' -import { Alert } from 'react-native' - -export const restartApp = () => { - Alert.alert('Closing app', 'App is shutting down. Please restart.') - setTimeout(() => { - RNExitApp.exitApp() - }, 3000) -} diff --git a/package-lock.json b/package-lock.json index beb0085..1a3fe2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15384,11 +15384,6 @@ "resolved": "https://registry.npmjs.org/react-native-document-picker/-/react-native-document-picker-4.3.0.tgz", "integrity": "sha512-ygcY0ijlVuhxzdWnhqd917yMUFT9FF0b4CM81LWoY4/bpQYz5PGUdRAdh25kS0VA+cEUYNL2iI7OpHXq00epPA==" }, - "react-native-exit-app-v2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/react-native-exit-app-v2/-/react-native-exit-app-v2-1.2.2.tgz", - "integrity": "sha512-RWCfmus7h99M1aONqBnWG3g3TFRzKsmok6cLAuqN5NVQAxpcgzbJZgAryA/ADpmBrBP5EIJnCBFo64ApQGOZPw==" - }, "react-native-fs": { "version": "2.20.0", "resolved": "https://registry.npmjs.org/react-native-fs/-/react-native-fs-2.20.0.tgz", diff --git a/package.json b/package.json index 997e49c..0004f69 100644 --- a/package.json +++ b/package.json @@ -46,12 +46,10 @@ "react-native": "0.62.0", "react-native-calendars": "^1.1287.0", "react-native-document-picker": "^4.2.0", - "react-native-exit-app-v2": "^1.2.2", "react-native-fs": "^2.20.0", "react-native-hyperlink": "0.0.19", "react-native-modal-datetime-picker": "8.0.0", - "react-native-push-notification": "3.2.1", - "react-native-restart": "0.0.24", + "react-native-push-notification": "3.2.1", "react-native-share": "^3.0.0", "react-native-simple-toast": "^1.1.3", "react-native-size-matters": "^0.4.0", From 55fd07b2563f136d8255b5ebcb00ac96f43afebb Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Wed, 10 Aug 2022 16:17:10 +0200 Subject: [PATCH 09/12] Fixes linter failing --- components/app.js | 1 + components/settings/password/create.js | 5 +++++ components/settings/password/delete.js | 1 + components/settings/password/enter-new-password.js | 4 ++++ components/settings/password/index.js | 5 +++++ components/settings/password/update.js | 1 + 6 files changed, 17 insertions(+) diff --git a/components/app.js b/components/app.js index 082fb28..83afdf9 100644 --- a/components/app.js +++ b/components/app.js @@ -22,6 +22,7 @@ class App extends Component { navigation: PropTypes.object.isRequired, navigate: PropTypes.func, goBack: PropTypes.func, + restartApp: PropTypes.func, } constructor(props) { diff --git a/components/settings/password/create.js b/components/settings/password/create.js index ba358e5..f024c3f 100644 --- a/components/settings/password/create.js +++ b/components/settings/password/create.js @@ -1,4 +1,5 @@ import React, { Component } from 'react' +import PropTypes from 'prop-types' import Button from '../../common/button' @@ -8,6 +9,10 @@ import showBackUpReminder from './show-backup-reminder' import settings from '../../../i18n/en/settings' export default class CreatePassword extends Component { + static propTypes = { + changeEncryptionAndRestart: PropTypes.func, + } + constructor() { super() diff --git a/components/settings/password/delete.js b/components/settings/password/delete.js index 593efca..d195c99 100644 --- a/components/settings/password/delete.js +++ b/components/settings/password/delete.js @@ -10,6 +10,7 @@ export default class DeletePassword extends Component { static propTypes = { onStartDelete: PropTypes.func, onCancelDelete: PropTypes.func, + changeEncryptionAndRestart: PropTypes.func, } constructor() { diff --git a/components/settings/password/enter-new-password.js b/components/settings/password/enter-new-password.js index 75890f7..a593e13 100644 --- a/components/settings/password/enter-new-password.js +++ b/components/settings/password/enter-new-password.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import { StyleSheet } from 'react-native' import nodejs from 'nodejs-mobile-react-native' +import PropTypes from 'prop-types' import AppText from '../../common/app-text' import AppTextInput from '../../common/app-text-input' @@ -13,6 +14,9 @@ import settings from '../../../i18n/en/settings' const LISTENER_TYPE = 'create-or-change-pw' export default class EnterNewPassword extends Component { + static propTypes = { + changeEncryptionAndRestart: PropTypes.func, + } constructor(props) { super() this.state = { diff --git a/components/settings/password/index.js b/components/settings/password/index.js index e637cab..90a081c 100644 --- a/components/settings/password/index.js +++ b/components/settings/password/index.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import { connect } from 'react-redux' +import PropTypes from 'prop-types' import { navigate } from '../../../slices/navigation' @@ -17,6 +18,10 @@ import { hasEncryptionObservable } from '../../../local-storage' import labels from '../../../i18n/en/settings' class PasswordSetting extends Component { + static propTypes = { + navigate: PropTypes.func, + restartApp: PropTypes.func, + } constructor(props) { super(props) diff --git a/components/settings/password/update.js b/components/settings/password/update.js index 4e0aa15..a83d701 100644 --- a/components/settings/password/update.js +++ b/components/settings/password/update.js @@ -13,6 +13,7 @@ export default class ChangePassword extends Component { static propTypes = { onStartChange: PropTypes.func, onCancelChange: PropTypes.func, + changeEncryptionAndRestart: PropTypes.func, } constructor() { From 038ed9e11fa069974ae96470a74e005796d9bfe2 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Thu, 11 Aug 2022 08:20:25 +0200 Subject: [PATCH 10/12] Bump version number 1.2208.11 --- ios/drip.xcodeproj/project.pbxproj | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/drip.xcodeproj/project.pbxproj b/ios/drip.xcodeproj/project.pbxproj index 4eb0cd6..84633b1 100644 --- a/ios/drip.xcodeproj/project.pbxproj +++ b/ios/drip.xcodeproj/project.pbxproj @@ -897,7 +897,7 @@ "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "$(inherited)", ); - MARKETING_VERSION = 1.2208.8; + MARKETING_VERSION = 1.2208.11; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -980,7 +980,7 @@ "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "$(inherited)", ); - MARKETING_VERSION = 1.2208.8; + MARKETING_VERSION = 1.2208.11; OTHER_LDFLAGS = ( "-ObjC", "-lc++", diff --git a/package-lock.json b/package-lock.json index 1a3fe2b..123dfa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "drip.", - "version": "1.2208.8", + "version": "1.2208.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0004f69..ae2f2b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drip.", - "version": "1.2208.8", + "version": "1.2208.11", "contributors": [ "Julia Friesel ", "Marie Kochsiek", From f61f450c91fcc8b0ad100beeaf9597f0bb4d507b Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Thu, 11 Aug 2022 08:29:26 +0200 Subject: [PATCH 11/12] Setting for ITSAppUsesNonExemptEncryption --- ios/drip/Info.plist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios/drip/Info.plist b/ios/drip/Info.plist index 12c07c1..d912bdd 100644 --- a/ios/drip/Info.plist +++ b/ios/drip/Info.plist @@ -22,6 +22,8 @@ ???? CFBundleVersion 1 + ITSAppUsesNonExemptEncryption + LSRequiresIPhoneOS NSAppTransportSecurity @@ -81,9 +83,9 @@ UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown + UIUserInterfaceStyle + Light UIViewControllerBasedStatusBarAppearance - UIUserInterfaceStyle - Light From c6c084e1157768412385f96c6cb99736d760a183 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Mon, 15 Aug 2022 18:16:25 +0200 Subject: [PATCH 12/12] Fix after merge conflicts --- package-lock.json | 5 ----- package.json | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 123dfa4..8d36114 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15418,11 +15418,6 @@ "@react-native-community/push-notification-ios": "^1.0.1" } }, - "react-native-restart": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/react-native-restart/-/react-native-restart-0.0.24.tgz", - "integrity": "sha512-pvJNU3NwQk6bCG2gOWcQpZ4IxhtELB0K9gzmtixfsaTFbW1UXXHkJNjk1kHazcbH5hrD7QbUkR63fsAVh8X4VQ==" - }, "react-native-share": { "version": "3.8.5", "resolved": "https://registry.npmjs.org/react-native-share/-/react-native-share-3.8.5.tgz", diff --git a/package.json b/package.json index ae2f2b1..5dee2b3 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "react-native-fs": "^2.20.0", "react-native-hyperlink": "0.0.19", "react-native-modal-datetime-picker": "8.0.0", - "react-native-push-notification": "3.2.1", + "react-native-push-notification": "3.2.1", "react-native-share": "^3.0.0", "react-native-simple-toast": "^1.1.3", "react-native-size-matters": "^0.4.0",