Compare commits

..

3 Commits

Author SHA1 Message Date
Sofiya Tepikin 2c4536fdee Bump i18next from 22.0.2 to 22.4.13
Bumps [i18next](https://github.com/i18next/i18next) from 22.0.2 to 22.4.13.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v22.0.2...v22.4.13)
2023-03-21 09:05:28 +00:00
Sofiya Tepikin f11eb3d1a1 Merge branch 'fix/outdated-snapshot' into 'main'
Fix outdated snapshot

See merge request bloodyhealth/drip!593
2023-01-19 09:31:57 +00:00
Sofiya Tepikin 5f83464649 Fix outdated snapshot 2023-01-19 10:23:48 +01:00
8 changed files with 67 additions and 82 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import App from './app'
import AppLoadingView from './common/app-loading'
import AppStatusBar from './common/app-status-bar'
import AcceptLicense from './AcceptLicense'
import PasswordPrompt from './PasswordPrompt'
import PasswordPrompt from './password-prompt'
export default function AppWrapper() {
const [isLoading, setIsLoading] = useState(true)
@@ -10,34 +10,26 @@ import Header from './header'
import { saveEncryptionFlag } from '../local-storage'
import { deleteDbAndOpenNew, openDb } from '../db'
import { passwordPrompt as labels, shared } from '../i18n/en/labels'
import { Containers, Spacing } from '../styles'
import { useTranslation } from 'react-i18next'
const cancelButton = { text: shared.cancel, style: 'cancel' }
const PasswordPrompt = ({ enableShowApp }) => {
const [password, setPassword] = useState(null)
const { t } = useTranslation(null, { keyPrefix: 'password' })
const cancelButton = {
text: t('forgotPasswordDialog.cancel'),
style: 'cancel',
}
const isPasswordEntered = Boolean(password)
const unlockApp = async () => {
const hash = new SHA512().hex(password)
const connected = await openDb(hash)
if (!connected) {
Alert.alert(
t('incorrectPasswordDialog.incorrectPassword'),
t('incorrectPasswordDialog.incorrectPasswordMessage'),
[
{
text: t('incorrectPasswordDialog.tryAgain'),
onPress: () => setPassword(null),
},
]
)
Alert.alert(shared.incorrectPassword, shared.incorrectPasswordMessage, [
{
text: shared.tryAgain,
onPress: () => setPassword(null),
},
])
return
}
enableShowApp()
@@ -50,22 +42,19 @@ const PasswordPrompt = ({ enableShowApp }) => {
}
const onDeleteData = () => {
Alert.alert(t('confirmationDialog.title'), t('confirmationDialog.text'), [
Alert.alert(labels.areYouSureTitle, labels.areYouSure, [
cancelButton,
{
text: t('confirmationDialog.confirm'),
text: labels.reallyDeleteData,
onPress: onDeleteDataConfirmation,
},
])
}
const onConfirmDeletion = async () => {
Alert.alert(t('forgotPassword'), t('forgotPasswordDialog.text'), [
Alert.alert(labels.deleteDatabaseTitle, labels.deleteDatabaseExplainer, [
cancelButton,
{
text: t('forgotPasswordDialog.confirm'),
onPress: onDeleteData,
},
{ text: labels.deleteData, onPress: onDeleteData },
])
}
@@ -76,13 +65,17 @@ const PasswordPrompt = ({ enableShowApp }) => {
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={150}>
<AppTextInput
onChangeText={setPassword}
secureTextEntry
placeholder={t('enterPassword')}
secureTextEntry={true}
placeholder={labels.enterPassword}
/>
<View style={styles.containerButtons}>
<Button onPress={onConfirmDeletion}>{t('forgotPassword')}</Button>
<Button disabled={!password} isCTA={!!password} onPress={unlockApp}>
{t('unlockApp')}
<Button onPress={onConfirmDeletion}>{labels.forgotPassword}</Button>
<Button
disabled={!isPasswordEntered}
isCTA={isPasswordEntered}
onPress={unlockApp}
>
{labels.title}
</Button>
</View>
</KeyboardAvoidingView>
+1
View File
@@ -0,0 +1 @@
{}
-20
View File
@@ -132,26 +132,6 @@
"title": "Settings"
}
},
"password": {
"confirmationDialog": {
"confirm": "Yes, I am sure",
"text": "Are you absolutely sure you want to permanently delete all your data?",
"title": "Are you sure?"
},
"enterPassword": "Enter password here",
"forgotPassword": "Forgot your password?",
"forgotPasswordDialog": {
"cancel": "Cancel",
"confirm": "Yes, delete all my data",
"text": "If you've forgotten your password, unfortunately, there is nothing we can do to recover your data, because it is encrypted with the password only you know. You can, however, delete all your encrypted data and start fresh. Once all data has been erased, you can set a new password in the settings, if you like."
},
"incorrectPasswordDialog": {
"incorrectPassword": "Password incorrect",
"incorrectPasswordMessage": "That password is incorrect.",
"tryAgain": "Try again"
},
"unlockApp": "Unlock app"
},
"stats": {
"noData": "At least one completed cycle is needed to display stats.",
"intro": "Basic statistics about the length of your cycles.",
+25
View File
@@ -26,6 +26,17 @@ export const shared = {
learnMore: 'Learn more',
}
export const stats = {
cycleLengthExplainer: 'Basic statistics about the length of your cycles.',
emptyStats: 'At least one completed cycle is needed to display stats.',
daysLabel: 'days',
basisOfStatsEnd: 'completed\ncycles',
averageLabel: 'Average cycle',
minLabel: `Shortest`,
maxLabel: `Longest`,
stdLabel: `Standard\ndeviation`,
}
export const bleedingPrediction = {
predictionInFuture: (startDays, endDays) =>
`Your next period is likely to start in ${startDays} to ${endDays} days.`,
@@ -38,6 +49,20 @@ export const bleedingPrediction = {
`Based on your documented data, your period was likely to start between ${startDate} and ${endDate}.`,
}
export const passwordPrompt = {
title: 'Unlock app',
enterPassword: 'Enter password here',
deleteDatabaseExplainer:
"If you've forgotten your password, unfortunately, there is nothing we can do to recover your data, because it is encrypted with the password only you know. You can, however, delete all your encrypted data and start fresh. Once all data has been erased, you can set a new password in the settings, if you like.",
forgotPassword: 'Forgot your password?',
deleteDatabaseTitle: 'Forgot your password?',
deleteData: 'Yes, delete all my data',
areYouSureTitle: 'Are you sure?',
areYouSure:
'Are you absolutely sure you want to permanently delete all your data?',
reallyDeleteData: 'Yes, I am sure',
}
export const fertilityStatus = {
fertile: 'fertile',
infertile: 'infertile',
+1 -1
View File
@@ -36,7 +36,7 @@
"@react-native-community/datetimepicker": "^6.3.1",
"@react-native-community/push-notification-ios": "^1.8.0",
"csvtojson": "^2.0.8",
"i18next": "^22.0.2",
"i18next": "^22.4.13",
"jshashes": "^1.0.8",
"moment": "^2.29.4",
"object-path": "^0.11.4",
+1 -1
View File
@@ -63,7 +63,7 @@ exports[`License screen should match the snapshot 1`] = `
]
}
>
Copyright (C) 2022 Heart of Code e.V.
Copyright (C) 2023 Heart of Code e.V.
This 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:
</Text>
+15 -29
View File
@@ -1110,26 +1110,12 @@
pirates "^4.0.5"
source-map-support "^0.5.16"
"@babel/runtime@^7.12.5":
version "7.20.1"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9"
integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==
"@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.20.6", "@babel/runtime@^7.8.4":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"
integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==
dependencies:
regenerator-runtime "^0.13.10"
"@babel/runtime@^7.14.5", "@babel/runtime@^7.8.4":
version "7.15.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a"
integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.17.2":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a"
integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==
dependencies:
regenerator-runtime "^0.13.4"
regenerator-runtime "^0.13.11"
"@babel/template@^7.0.0", "@babel/template@^7.15.4", "@babel/template@^7.3.3":
version "7.15.4"
@@ -4355,12 +4341,12 @@ husky@^8.0.0:
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==
i18next@^22.0.2:
version "22.0.2"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.2.tgz#04634aa751388625735cdb41f625a6b0dd1dcb2f"
integrity sha512-rGXWILemhx0dpNE5PfudVU1g4SdW0hkh4WYHaP8Cl6gm1KkMdBckmNqj9WvYqp8fOSocqX5FFJeadwiOZHLSXQ==
i18next@^22.4.13:
version "22.4.13"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.13.tgz#02e291ab0056eab13b7d356fb454ff991923eaa0"
integrity sha512-GX7flMHRRqQA0I1yGLmaZ4Hwt1JfLqagk8QPDPZsqekbKtXsuIngSVWM/s3SLgNkrEXjA+0sMGNuOEkkmyqmWg==
dependencies:
"@babel/runtime" "^7.17.2"
"@babel/runtime" "^7.20.6"
iconv-lite@^0.6.2:
version "0.6.3"
@@ -7241,12 +7227,12 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
regenerator-runtime@^0.13.10:
version "0.13.10"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee"
integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==
regenerator-runtime@^0.13.11:
version "0.13.11"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4:
regenerator-runtime@^0.13.2:
version "0.13.9"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==