ywana-core8 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -9,11 +9,14 @@ import { ChangeUserPasswordDialog } from './dialogs'
9
9
  export const ForgetUserPasswordAction = (props) => {
10
10
 
11
11
  const site = useContext(SiteContext)
12
- const { user, icon = false, onOK, onSuccess } = props
12
+ const { user, icon = false, label="Reset Password", onOK, onSuccess } = props
13
13
 
14
14
  async function execute() {
15
15
  try {
16
- await onOK(user.email)
16
+ const { email } = user
17
+ if (!email) throw new Error("Email not found")
18
+
19
+ await onOK(email)
17
20
  if (onSuccess) onSuccess()
18
21
  site.notify({
19
22
  title: <Text>Forgot Password</Text>,
@@ -30,7 +33,6 @@ export const ForgetUserPasswordAction = (props) => {
30
33
  }
31
34
  }
32
35
 
33
- const label = <Text>Forgot Password</Text>
34
36
 
35
37
  return icon ? (
36
38
  <Icon icon="mail_lock" clickable action={execute} size="small" tooltip={{ text: label, top: "-.5rem", left: "-14rem" }} />
@@ -10,6 +10,16 @@ export const LOGIN_DICTIONARY = {
10
10
  fr: 'Mot de passe oublié'
11
11
  },
12
12
 
13
+ 'Reset Password': {
14
+ en: 'Reset Password',
15
+ es: 'Restablecer contraseña',
16
+ de: 'Passwort zurücksetzen',
17
+ pt: 'Redefinir senha',
18
+ ca: 'Restablir contrasenya',
19
+ it: 'Reimposta password',
20
+ fr: 'Réinitialiser le mot de passe'
21
+ },
22
+
13
23
  'Check your email to reset your password': {
14
24
  en: 'Check your email to reset your password',
15
25
  es: 'Revise su correo electrónico para restablecer su contraseña',