@fy-/fws-vue 2.1.8 → 2.1.9

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.
@@ -62,6 +62,24 @@ const formData = ref<Record<string, any>>({
62
62
  })
63
63
  const completed = ref(false)
64
64
 
65
+ function autocompleteValue(fieldName: string): string | undefined {
66
+ switch (fieldName) {
67
+ case 'username':
68
+ return 'username'
69
+ case 'password':
70
+ return 'current-password'
71
+ case 'password2':
72
+ case 'confirm':
73
+ return 'new-password'
74
+ case 'email':
75
+ return 'email'
76
+ case 'phone_number':
77
+ return 'tel'
78
+ default:
79
+ return undefined
80
+ }
81
+ }
82
+
65
83
  async function doTrigger(field: any) {
66
84
  // eslint-disable-next-line no-eval
67
85
  const _res = await eval(
@@ -158,6 +176,7 @@ async function userFlow(params: paramsType = { initial: false }) {
158
176
  return
159
177
  }
160
178
  formData.value = {
179
+ ...formData.value,
161
180
  session: response.value.data.session,
162
181
  }
163
182
  session.value = response.value.data.session
@@ -310,6 +329,7 @@ onMounted(async () => {
310
329
  :error="fieldsError[field.name]"
311
330
  :type="field.type"
312
331
  :req="responseReq.includes(field.name)"
332
+ :autocomplete="autocompleteValue(field.name)"
313
333
  />
314
334
  </template>
315
335
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",