@hostlink/nuxt-light 1.21.2 → 1.21.3

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.
@@ -1,12 +1,20 @@
1
1
  <script setup>
2
2
  import { ref, reactive } from "vue"
3
3
  import { useQuasar } from "quasar"
4
- import { q, m, notify } from '#imports'
4
+ import { q, m } from '#imports'
5
5
  const $q = useQuasar()
6
6
 
7
- const my = await q("my", ["twoFactorEnabled"])
8
- const my2FA = await m("my2FA", [])
9
- const obj = reactive({});
7
+ const { my } = await q({
8
+ my: {
9
+ twoFactorEnabled: true,
10
+ my2FA: true
11
+ }
12
+ });
13
+
14
+ const obj = reactive({
15
+ code: ""
16
+ });
17
+
10
18
  const save = async () => {
11
19
 
12
20
  try {
@@ -14,10 +22,15 @@ const save = async () => {
14
22
  code: obj.code,
15
23
  secret: my2FA.secret
16
24
  });
17
- notify("Your 2FA has been updated")
18
-
25
+ $q.notify({
26
+ message: "Your 2FA is updated",
27
+ color: "positive"
28
+ })
19
29
  } catch (e) {
20
- notify(e.message, "red")
30
+ $q.notify({
31
+ message: e.message,
32
+ color: "negative"
33
+ })
21
34
  }
22
35
  }
23
36
 
@@ -31,12 +44,12 @@ const onCopy = () => {
31
44
  navigator.clipboard.writeText(my2FA.secret).then(() => {
32
45
  $q.notify({
33
46
  message: "Secret copied",
34
- color: "green",
47
+ color: "positive",
35
48
  })
36
49
  }, () => {
37
50
  $q.notify({
38
51
  message: "Failed to copy",
39
- color: "red",
52
+ color: "negative",
40
53
  })
41
54
 
42
55
  })
@@ -75,9 +88,9 @@ const onCopy = () => {
75
88
 
76
89
  </p>
77
90
  </div>
78
- <q-img :src="my2FA.image" width="250px" />
91
+ <q-img :src="my.my2FA.image" width="250px" />
79
92
  <p>
80
- Secret : <strong>{{ my2FA.secret }}</strong>
93
+ Secret : <strong>{{ my.my2FA.secret }}</strong>
81
94
 
82
95
  <q-btn flat round dense icon="sym_o_content_copy" @click="onCopy" />
83
96
  </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.21.2",
3
+ "version": "1.21.3",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,10 +45,9 @@
45
45
  "json-to-graphql-query": "^2.2.5",
46
46
  "quasar": "^2.17.0",
47
47
  "vue-i18n": "^9.2.2",
48
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
48
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
49
49
  },
50
50
  "devDependencies": {
51
- "@azure/identity": "^4.5.0",
52
51
  "@nuxt/devtools": "latest",
53
52
  "@nuxt/eslint-config": "^0.2.0",
54
53
  "@nuxt/schema": "^3.7.4",