@live-change/user-frontend 0.9.111 → 0.9.112

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.
@@ -5,7 +5,9 @@
5
5
  "codeNotFound": "Secret code not recognized.",
6
6
  "codeExpired": "Secret code expired.",
7
7
  "wrongPassword": "Wrong password.",
8
- "emailNotFound": "Email not found."
8
+ "emailNotFound": "Email not found.",
9
+ "unsafePassword": "Password is unsafe, try to use a stronger one.",
10
+ "passwordNotMatch": "Passwords do not match."
9
11
  },
10
12
  "app": {
11
13
  "updateAvailable": "Update available!",
@@ -15,14 +15,15 @@
15
15
  <p class="mt-0 mb-6 p-0 leading-normal">Your password reset authentication already expired.</p>
16
16
  </div>
17
17
 
18
- <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border" v-if="isReady">
18
+ <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border" v-if="isReady || working">
19
19
  <div class="text-center mb-8">
20
20
  <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">Reset password</div>
21
21
  </div>
22
22
 
23
23
  <command-form service="passwordAuthentication" action="finishResetPassword" v-slot="{ data }"
24
24
  :parameters="{ key: resetKey }" ref="form"
25
- @done="handleDone" keepOnDone>
25
+ @done="handleDone" keepOnDone
26
+ @submit="handleSubmit" @error="handleError">
26
27
 
27
28
  <template v-if="isMounted">
28
29
  <div class="p-field mb-4">
@@ -59,6 +60,10 @@
59
60
 
60
61
  </command-form>
61
62
  </div>
63
+ <div v-if="redirecting"
64
+ class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6 flex justify-center">
65
+ <ProgressSpinner class="m-4" />
66
+ </div>
62
67
  </div>
63
68
  </template>
64
69
 
@@ -77,6 +82,9 @@
77
82
  }
78
83
  })
79
84
 
85
+ import { useI18n } from 'vue-i18n'
86
+ const { t } = useI18n()
87
+
80
88
  import { useNow } from '@vueuse/core'
81
89
  const now = useNow({ interval: 1000 })
82
90
 
@@ -102,14 +110,27 @@
102
110
  live( path().passwordAuthentication.resetPasswordAuthenticationByKey({ key: resetKey }) )
103
111
  ])
104
112
 
113
+ const working = ref(false)
114
+ const redirecting = ref(false)
115
+
105
116
  const isUnknown = computed(() => authentication.value === null)
106
117
  const isExpired = computed(() =>
107
118
  authentication.value ? (now.value.toISOString() > authentication.value.expire) : false )
108
- const isUsed = computed(() => authentication.value && authentication.value.state === 'used')
109
- const isReady = computed(() => !(isUnknown.value || isExpired.value || isUsed.value))
119
+ const isUsed = computed(() => !working.value && !redirecting.value && authentication.value && authentication.value.state === 'used')
120
+ const isReady = computed(() => !(isUnknown.value || isExpired.value || isUsed.value))
121
+
122
+ function handleSubmit() {
123
+ working.value = true
124
+ }
125
+
126
+ function handleError() {
127
+ working.value = false
128
+ }
110
129
 
111
130
  function handleDone({ parameters, result }) {
112
131
  console.log("DONE RESULT", result)
132
+ redirecting.value = true
133
+ working.value = false
113
134
  router.push({
114
135
  name: 'user:resetPasswordFinished'
115
136
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.9.111",
3
+ "version": "0.9.112",
4
4
  "scripts": {
5
5
  "memDev": "node --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
@@ -22,29 +22,29 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/cli": "^0.9.111",
26
- "@live-change/dao": "^0.9.111",
27
- "@live-change/dao-vue3": "^0.9.111",
28
- "@live-change/dao-websocket": "^0.9.111",
29
- "@live-change/email-service": "^0.9.111",
30
- "@live-change/framework": "^0.9.111",
31
- "@live-change/identicon-service": "^0.9.111",
32
- "@live-change/image-frontend": "^0.9.111",
33
- "@live-change/message-authentication-service": "^0.9.111",
34
- "@live-change/notification-service": "^0.9.111",
35
- "@live-change/password-authentication-service": "^0.9.111",
36
- "@live-change/pattern": "^0.9.111",
37
- "@live-change/secret-code-service": "^0.9.111",
38
- "@live-change/secret-link-service": "^0.9.111",
39
- "@live-change/security-frontend": "^0.9.111",
40
- "@live-change/security-service": "^0.9.111",
41
- "@live-change/session-service": "^0.9.111",
42
- "@live-change/timer-service": "^0.9.111",
43
- "@live-change/upload-service": "^0.9.111",
44
- "@live-change/user-identification-service": "^0.9.111",
45
- "@live-change/user-service": "^0.9.111",
46
- "@live-change/vue3-components": "^0.9.111",
47
- "@live-change/vue3-ssr": "^0.9.111",
25
+ "@live-change/cli": "^0.9.112",
26
+ "@live-change/dao": "^0.9.112",
27
+ "@live-change/dao-vue3": "^0.9.112",
28
+ "@live-change/dao-websocket": "^0.9.112",
29
+ "@live-change/email-service": "^0.9.112",
30
+ "@live-change/framework": "^0.9.112",
31
+ "@live-change/identicon-service": "^0.9.112",
32
+ "@live-change/image-frontend": "^0.9.112",
33
+ "@live-change/message-authentication-service": "^0.9.112",
34
+ "@live-change/notification-service": "^0.9.112",
35
+ "@live-change/password-authentication-service": "^0.9.112",
36
+ "@live-change/pattern": "^0.9.112",
37
+ "@live-change/secret-code-service": "^0.9.112",
38
+ "@live-change/secret-link-service": "^0.9.112",
39
+ "@live-change/security-frontend": "^0.9.112",
40
+ "@live-change/security-service": "^0.9.112",
41
+ "@live-change/session-service": "^0.9.112",
42
+ "@live-change/timer-service": "^0.9.112",
43
+ "@live-change/upload-service": "^0.9.112",
44
+ "@live-change/user-identification-service": "^0.9.112",
45
+ "@live-change/user-service": "^0.9.112",
46
+ "@live-change/vue3-components": "^0.9.112",
47
+ "@live-change/vue3-ssr": "^0.9.112",
48
48
  "@vueuse/core": "^12.3.0",
49
49
  "codeceptjs-assert": "^0.0.5",
50
50
  "codeceptjs-video-helper": "0.1.3",
@@ -65,7 +65,7 @@
65
65
  "wtfnode": "^0.9.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@live-change/codeceptjs-helper": "^0.9.111",
68
+ "@live-change/codeceptjs-helper": "^0.9.112",
69
69
  "codeceptjs": "^3.6.10",
70
70
  "generate-password": "1.7.1",
71
71
  "playwright": "1.49.1",
@@ -76,5 +76,5 @@
76
76
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
77
77
  "license": "BSD-3-Clause",
78
78
  "description": "",
79
- "gitHead": "ab89b1aad3a6c7b88151b9b2e2b56bf749ea3584"
79
+ "gitHead": "168448832a1c3b4fb17602293e3ed48425b697a9"
80
80
  }