@adminforth/two-factors-auth 1.8.5 → 1.8.6

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/build.log CHANGED
@@ -4,12 +4,12 @@
4
4
 
5
5
  sending incremental file list
6
6
  custom/
7
- custom/TwoFaModal.vue
7
+ custom/TwoFAModal.vue
8
8
  custom/TwoFactorsConfirmation.vue
9
9
  custom/TwoFactorsSetup.vue
10
10
  custom/package-lock.json
11
11
  custom/package.json
12
12
  custom/tsconfig.json
13
13
 
14
- sent 31,241 bytes received 134 bytes 62,750.00 bytes/sec
15
- total size is 30,755 speedup is 0.98
14
+ sent 31,417 bytes received 134 bytes 63,102.00 bytes/sec
15
+ total size is 30,919 speedup is 0.98
@@ -97,11 +97,6 @@
97
97
  }
98
98
  }
99
99
 
100
- async function submit() {
101
- if (bindValue.value.length !== 6) return;
102
- await sendCode(bindValue.value);
103
- }
104
-
105
100
  async function handleOnComplete(value: string) {
106
101
  await sendCode(value);
107
102
  }
@@ -128,6 +123,7 @@
128
123
 
129
124
  function onCancel() {
130
125
  modelShow.value = false;
126
+ bindValue.value = '';
131
127
  emit('rejected', new Error('cancelled'));
132
128
  emit('closed');
133
129
  }
@@ -135,10 +131,19 @@
135
131
  watch(modelShow, async (open) => {
136
132
  if (open) {
137
133
  await nextTick();
134
+ const htmlRef = document.querySelector('html');
135
+ if (htmlRef) {
136
+ htmlRef.style.overflow = 'hidden';
137
+ }
138
138
  tagOtpInputs();
139
139
  window.addEventListener('paste', handlePaste);
140
140
  } else {
141
141
  window.removeEventListener('paste', handlePaste);
142
+ const htmlRef = document.querySelector('html');
143
+ if (htmlRef) {
144
+ htmlRef.style.overflow = '';
145
+ }
146
+ bindValue.value = '';
142
147
  }
143
148
  });
144
149
 
@@ -97,11 +97,6 @@
97
97
  }
98
98
  }
99
99
 
100
- async function submit() {
101
- if (bindValue.value.length !== 6) return;
102
- await sendCode(bindValue.value);
103
- }
104
-
105
100
  async function handleOnComplete(value: string) {
106
101
  await sendCode(value);
107
102
  }
@@ -128,6 +123,7 @@
128
123
 
129
124
  function onCancel() {
130
125
  modelShow.value = false;
126
+ bindValue.value = '';
131
127
  emit('rejected', new Error('cancelled'));
132
128
  emit('closed');
133
129
  }
@@ -135,10 +131,19 @@
135
131
  watch(modelShow, async (open) => {
136
132
  if (open) {
137
133
  await nextTick();
134
+ const htmlRef = document.querySelector('html');
135
+ if (htmlRef) {
136
+ htmlRef.style.overflow = 'hidden';
137
+ }
138
138
  tagOtpInputs();
139
139
  window.addEventListener('paste', handlePaste);
140
140
  } else {
141
141
  window.removeEventListener('paste', handlePaste);
142
+ const htmlRef = document.querySelector('html');
143
+ if (htmlRef) {
144
+ htmlRef.style.overflow = '';
145
+ }
146
+ bindValue.value = '';
142
147
  }
143
148
  });
144
149
 
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
57
57
  component: { file: this.componentPath('TwoFactorsSetup.vue'), meta: { title: 'Setup 2FA', customLayout: true } }
58
58
  });
59
59
  const everyPageBottomInjections = this.adminforth.config.customization.globalInjections.everyPageBottom || [];
60
- everyPageBottomInjections.push({ file: this.componentPath('TwoFaModal.vue'), meta: {} });
60
+ everyPageBottomInjections.push({ file: this.componentPath('TwoFAModal.vue'), meta: {} });
61
61
  this.activate(resourceConfig, adminforth);
62
62
  }
63
63
  activate(resourceConfig, adminforth) {
package/index.ts CHANGED
@@ -62,7 +62,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
62
62
  component: { file: this.componentPath('TwoFactorsSetup.vue'), meta: { title: 'Setup 2FA', customLayout: true }}
63
63
  })
64
64
  const everyPageBottomInjections = this.adminforth.config.customization.globalInjections.everyPageBottom || []
65
- everyPageBottomInjections.push({ file: this.componentPath('TwoFaModal.vue'), meta: {} })
65
+ everyPageBottomInjections.push({ file: this.componentPath('TwoFAModal.vue'), meta: {} })
66
66
  this.activate( resourceConfig, adminforth )
67
67
  }
68
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",