@ozdao/prometheus-framework 0.2.235 → 0.2.237

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +2 -2
  2. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +2 -2
  3. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  5. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
  7. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +3 -3
  12. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +3 -3
  13. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  16. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  17. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  18. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  19. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  20. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  22. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  23. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  24. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +3 -3
  28. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +3 -3
  29. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
  30. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  32. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +3 -3
  34. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +3 -3
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +52 -7
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +53 -8
  42. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +17 -17
  49. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  56. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  57. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  60. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  61. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
  68. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  69. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  70. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  72. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +3 -3
  82. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  83. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  84. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  86. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
  88. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  92. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +600 -571
  96. package/dist/prometheus-framework/src/modules/pages/pages.client.js +600 -571
  97. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +3 -3
  98. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +3 -3
  99. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  100. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  114. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  118. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  127. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
  138. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  139. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  142. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  143. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
  144. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  145. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
  146. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  147. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  151. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  152. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  153. package/package.json +1 -1
  154. package/src/modules/events/components/elements/ButtonCheck.vue +69 -9
@@ -1,6 +1,6 @@
1
1
  import { openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, toDisplayString } from "vue";
2
2
  import text from "../../localization/wallet.json.js";
3
- import Field from "../../../../../components/Field/Field.vue2.js";
3
+ import Field from "../../../../../components/Field/Field.vue.js";
4
4
  import { useI18n } from "vue-i18n";
5
5
  const _hoisted_1 = /* @__PURE__ */ createElementVNode("h2", { class: "mn-b-small t-center t-bold" }, "Deposit with card", -1);
6
6
  const _hoisted_2 = { class: "bg-grey radius-big mn-t-semi mn-b-semi flex flex-justify-between" };
@@ -5,7 +5,7 @@ const vueI18n = require("vue-i18n");
5
5
  const bignumber = require("../../../../../../node_modules/bignumber.js/bignumber.cjs");
6
6
  const wallet_store = require("../../store/wallet.store.cjs");
7
7
  const wallet = require("../../localization/wallet.json.cjs");
8
- const Field = require("../../../../../components/Field/Field.vue2.cjs");
8
+ const Field = require("../../../../../components/Field/Field.vue.cjs");
9
9
  const Select = require("../../../../../components/Select/Select.vue.cjs");
10
10
  const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
11
11
  const _hoisted_2 = { class: "t-semi" };
@@ -3,7 +3,7 @@ import { useI18n } from "vue-i18n";
3
3
  import { BigNumber } from "../../../../../../node_modules/bignumber.js/bignumber.js";
4
4
  import { state, actions } from "../../store/wallet.store.js";
5
5
  import text from "../../localization/wallet.json.js";
6
- import Field from "../../../../../components/Field/Field.vue2.js";
6
+ import Field from "../../../../../components/Field/Field.vue.js";
7
7
  import Select from "../../../../../components/Select/Select.vue.js";
8
8
  const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
9
9
  const _hoisted_2 = { class: "t-semi" };
@@ -6,16 +6,16 @@ const Web3 = require("web3");
6
6
  const wallet_store = require("../../store/wallet.store.cjs");
7
7
  const wallet = require("../../localization/wallet.json.cjs");
8
8
  const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
9
- const Button = require("../../../../../components/Button/Button.vue2.cjs");
9
+ const Button = require("../../../../../components/Button/Button.vue.cjs");
10
10
  require("vue-router");
11
11
  ;/* empty css */
12
12
  require("../../../../reports/store/reports.cjs");
13
13
  ;/* empty css */
14
- ;/* empty css */
14
+ ;/* empty css */
15
15
  require("../../../../auth/views/store/auth.cjs");
16
16
  require("../../../../organizations/store/memberships.cjs");
17
17
  require("../../../../community/store/reactions.cjs");
18
- ;/* empty css */
18
+ ;/* empty css */
19
19
  const ConnectMetamask = require("../elements/ConnectMetamask.vue.cjs");
20
20
  const CashDeposit = require("../blocks/CashDeposit.vue.cjs");
21
21
  const CardDeposit = require("../blocks/CardDeposit.vue.cjs");
@@ -4,16 +4,16 @@ import Web3 from "web3";
4
4
  import { state, actions } from "../../store/wallet.store.js";
5
5
  import text from "../../localization/wallet.json.js";
6
6
  import _sfc_main$3 from "../../../../../components/Popup/Popup.vue.js";
7
- import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
7
+ import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
8
8
  import "vue-router";
9
9
  /* empty css */
10
10
  import "../../../../reports/store/reports.js";
11
11
  /* empty css */
12
- /* empty css */
12
+ /* empty css */
13
13
  import "../../../../auth/views/store/auth.js";
14
14
  import "../../../../organizations/store/memberships.js";
15
15
  import "../../../../community/store/reactions.js";
16
- /* empty css */
16
+ /* empty css */
17
17
  import _sfc_main$2 from "../elements/ConnectMetamask.vue.js";
18
18
  import _sfc_main$4 from "../blocks/CashDeposit.vue.js";
19
19
  import _sfc_main$5 from "../blocks/CardDeposit.vue.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.2.235",
3
+ "version": "0.2.237",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -4,8 +4,14 @@
4
4
  Check Tickets
5
5
  </Button>
6
6
  <div v-if="isScanning" class="barcode-scanner-modal">
7
- <!-- Add any UI elements for the scanner here -->
7
+ <div class="square"></div>
8
+ <div class="zoom-ratio-wrapper" v-if="minZoomRatio !== undefined && maxZoomRatio !== undefined">
9
+ <input type="range" :min="minZoomRatio" :max="maxZoomRatio" @input="setZoomRatio" />
10
+ </div>
8
11
  <Button @click="stopScan" class="stop-scan-button">Stop Scan</Button>
12
+ <Button v-if="isTorchAvailable" @click="toggleTorch" class="torch-button">
13
+ Toggle Torch
14
+ </Button>
9
15
  </div>
10
16
  </div>
11
17
  </template>
@@ -19,23 +25,27 @@ import * as tickets from '@pf/src/modules/events/store/tickets'
19
25
  const emits = defineEmits(['qrcodecheck'])
20
26
  const error = ref('')
21
27
  const isScanning = ref(false)
28
+ const isTorchAvailable = ref(false)
29
+ const minZoomRatio = ref(undefined)
30
+ const maxZoomRatio = ref(undefined)
22
31
 
23
32
  onMounted(async () => {
24
33
  const { supported } = await BarcodeScanner.isSupported()
25
34
  if (!supported) {
26
35
  error.value = 'Barcode scanning is not supported on this device'
27
36
  }
37
+ const { available } = await BarcodeScanner.isTorchAvailable()
38
+ isTorchAvailable.value = available
28
39
  })
29
40
 
30
41
  onUnmounted(async () => {
31
- await BarcodeScanner.removeAllListeners()
42
+ await stopScan()
32
43
  })
33
44
 
34
45
  async function startScan() {
35
- document.querySelector('body')?.classList.add('barcode-scanner-active');
36
-
37
46
  try {
38
47
  const { camera } = await BarcodeScanner.checkPermissions()
48
+
39
49
  if (camera !== 'granted') {
40
50
  const { camera: newStatus } = await BarcodeScanner.requestPermissions()
41
51
  if (newStatus !== 'granted') {
@@ -44,6 +54,8 @@ async function startScan() {
44
54
  }
45
55
 
46
56
  document.querySelector('body')?.classList.add('barcode-scanner-active')
57
+ document.querySelector('html')?.classList.add('barcode-scanner-active-html')
58
+
47
59
  isScanning.value = true
48
60
 
49
61
  await BarcodeScanner.addListener('barcodeScanned', async (result) => {
@@ -51,6 +63,11 @@ async function startScan() {
51
63
  })
52
64
 
53
65
  await BarcodeScanner.startScan()
66
+
67
+ const { zoomRatio: min } = await BarcodeScanner.getMinZoomRatio()
68
+ const { zoomRatio: max } = await BarcodeScanner.getMaxZoomRatio()
69
+ minZoomRatio.value = min
70
+ maxZoomRatio.value = max
54
71
  } catch (e) {
55
72
  error.value = e.message
56
73
  alert(`Error: ${error.value}`)
@@ -59,7 +76,8 @@ async function startScan() {
59
76
 
60
77
  async function stopScan() {
61
78
  try {
62
- document.querySelector('body')?.classList.remove('barcode-scanner-active');
79
+ document.querySelector('body')?.classList.remove('barcode-scanner-active')
80
+ document.querySelector('html')?.classList.remove('barcode-scanner-active-html')
63
81
  isScanning.value = false
64
82
  await BarcodeScanner.stopScan()
65
83
  await BarcodeScanner.removeAllListeners()
@@ -83,16 +101,58 @@ async function processBarcode(barcode) {
83
101
  await stopScan()
84
102
  }
85
103
  }
104
+
105
+ async function setZoomRatio(event) {
106
+ const zoomRatio = parseFloat(event.target.value)
107
+ await BarcodeScanner.setZoomRatio({ zoomRatio })
108
+ }
109
+
110
+ async function toggleTorch() {
111
+ await BarcodeScanner.toggleTorch()
112
+ }
86
113
  </script>
87
114
 
88
- <style>
115
+ <style scoped>
116
+ .barcode-scanner-modal {
117
+ visibility: visible;
118
+ position: fixed;
119
+ top: 0;
120
+ left: 0;
121
+ width: 100%;
122
+ height: 100%;
123
+ background-color: rgba(0, 0, 0, 0.8);
124
+ display: flex;
125
+ flex-direction: column;
126
+ justify-content: center;
127
+ align-items: center;
128
+ }
129
+
130
+ .square {
131
+ width: 200px;
132
+ height: 200px;
133
+ border: 2px solid white;
134
+ border-radius: 10px;
135
+ }
136
+
137
+ .zoom-ratio-wrapper {
138
+ width: 80%;
139
+ margin-top: 20px;
140
+ }
141
+
142
+ .stop-scan-button,
143
+ .torch-button {
144
+ margin-top: 20px;
145
+ }
146
+
147
+ /* Existing styles */
89
148
  body.barcode-scanner-active {
90
149
  visibility: hidden;
91
150
  --background: transparent;
92
151
  --ion-background-color: transparent;
93
152
  }
94
- .barcode-scanner-modal {
95
- visibility: visible;
153
+
154
+ html.barcode-scanner-active-html {
155
+ background: transparent !important;
96
156
  }
97
157
 
98
158
  @media (prefers-color-scheme: dark) {
@@ -101,4 +161,4 @@ body.barcode-scanner-active {
101
161
  --ion-background-color: transparent;
102
162
  }
103
163
  }
104
- </style>
164
+ </style>