@adminforth/two-factors-auth 4.4.6 → 4.4.7

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
@@ -17,5 +17,5 @@ custom/tsconfig.json
17
17
  custom/use2faApi.ts
18
18
  custom/utils.js
19
19
 
20
- sent 312,284 bytes received 248 bytes 625,064.00 bytes/sec
21
- total size is 311,311 speedup is 1.00
20
+ sent 311,882 bytes received 248 bytes 624,260.00 bytes/sec
21
+ total size is 310,909 speedup is 1.00
@@ -123,21 +123,16 @@
123
123
  </template>
124
124
 
125
125
  <script setup lang="ts">
126
- import { callAdminForthApi } from '@/utils';
126
+ import { callAdminForthApi, formatDateTime } from '@/utils';
127
127
  import adminforth, { useAdminforth } from '@/adminforth';
128
128
  import { onMounted, ref, Ref } from 'vue';
129
129
  import { useI18n } from 'vue-i18n';
130
130
  import { Dialog, Tooltip, Spinner, Input } from '@/afcl';
131
131
  import { IconTrashBinSolid, IconPenSolid, IconPlusOutline, IconInfoCircleOutline } from '@iconify-prerendered/vue-flowbite';
132
- import dayjs from 'dayjs';
133
- import utc from 'dayjs/plugin/utc';
134
- import timezone from 'dayjs/plugin/timezone';
135
132
  import { useCoreStore } from '@/stores/core';
136
133
  import { useTwoFactorsAuth } from './use2faApi';
137
134
 
138
135
  const { t } = useI18n();
139
- dayjs.extend(utc);
140
- dayjs.extend(timezone);
141
136
  const coreStore = useCoreStore();
142
137
  const twoFactorsAuth = useTwoFactorsAuth();
143
138
 
@@ -353,12 +348,6 @@
353
348
  addPasskeyMode.value = 'cross-platform';
354
349
  }
355
350
  }
356
-
357
- function formatDateTime(date: string) {
358
- if (!date) return '';
359
- const fmt = `${coreStore.config?.datesFormat} ${coreStore.config?.timeFormat}` || 'YYYY-MM-DD HH:mm:ss';
360
- return dayjs.utc(date).local().format(fmt);
361
- }
362
351
  </script>
363
352
 
364
353
  <style>
@@ -123,21 +123,16 @@
123
123
  </template>
124
124
 
125
125
  <script setup lang="ts">
126
- import { callAdminForthApi } from '@/utils';
126
+ import { callAdminForthApi, formatDateTime } from '@/utils';
127
127
  import adminforth, { useAdminforth } from '@/adminforth';
128
128
  import { onMounted, ref, Ref } from 'vue';
129
129
  import { useI18n } from 'vue-i18n';
130
130
  import { Dialog, Tooltip, Spinner, Input } from '@/afcl';
131
131
  import { IconTrashBinSolid, IconPenSolid, IconPlusOutline, IconInfoCircleOutline } from '@iconify-prerendered/vue-flowbite';
132
- import dayjs from 'dayjs';
133
- import utc from 'dayjs/plugin/utc';
134
- import timezone from 'dayjs/plugin/timezone';
135
132
  import { useCoreStore } from '@/stores/core';
136
133
  import { useTwoFactorsAuth } from './use2faApi';
137
134
 
138
135
  const { t } = useI18n();
139
- dayjs.extend(utc);
140
- dayjs.extend(timezone);
141
136
  const coreStore = useCoreStore();
142
137
  const twoFactorsAuth = useTwoFactorsAuth();
143
138
 
@@ -353,12 +348,6 @@
353
348
  addPasskeyMode.value = 'cross-platform';
354
349
  }
355
350
  }
356
-
357
- function formatDateTime(date: string) {
358
- if (!date) return '';
359
- const fmt = `${coreStore.config?.datesFormat} ${coreStore.config?.timeFormat}` || 'YYYY-MM-DD HH:mm:ss';
360
- return dayjs.utc(date).local().format(fmt);
361
- }
362
351
  </script>
363
352
 
364
353
  <style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "4.4.6",
3
+ "version": "4.4.7",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "zod": "^4.3.6"
30
30
  },
31
31
  "peerDependencies": {
32
- "adminforth": "^3.8.2"
32
+ "adminforth": "^3.22.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^22.10.7",