@ozdao/martyrs 0.2.585 → 0.2.586

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.
Files changed (386) hide show
  1. package/dist/auth.server.js +161 -96
  2. package/dist/{authJwt-J1csaMWA.js → authJwt-DKbMMjw0.js} +33 -0
  3. package/dist/chats.server.js +2 -2
  4. package/dist/community.server.js +1 -1
  5. package/dist/core.server.js +191 -2
  6. package/dist/{core.websocket-C2FxNmZ1.js → core.websocket-Cl76z2wT.js} +41 -5
  7. package/dist/{crud-q1ye5IhV.js → crud-DpOXTZep.js} +1 -1
  8. package/dist/events.server.js +2 -2
  9. package/dist/files.server.js +1 -1
  10. package/dist/gallery.server.js +1 -1
  11. package/dist/index-kvBwwb0w.js +427 -0
  12. package/dist/inventory.server.js +2 -2
  13. package/dist/{mailing-DuEFRsa3.js → mailing-DT7nbNjZ.js} +16 -3
  14. package/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +863 -865
  15. package/dist/marketplace.server.js +1 -1
  16. package/dist/martyrs/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +192 -38
  17. package/dist/martyrs/dist/main-BIf-WirR.js.map +1 -0
  18. package/dist/martyrs/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +2 -2
  19. package/dist/martyrs/dist/{web-BA6h6Z8P.js.map → web-O7lXcjg0.js.map} +1 -1
  20. package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +8 -7
  21. package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
  22. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  23. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  24. package/dist/martyrs/src/components/Loader/Loader.vue.js +1 -1
  25. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -1
  26. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
  27. package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
  28. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +17 -22
  29. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
  30. package/dist/martyrs/src/modules/auth/auth.client.js +18 -24
  31. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +178 -0
  33. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -0
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  35. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +53 -45
  36. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +198 -14
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +70 -29
  41. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  43. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +86 -30
  45. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  46. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js +100 -0
  47. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js.map +1 -0
  48. package/dist/martyrs/src/modules/auth/views/router/auth.router.js +2 -31
  49. package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -1
  50. package/dist/martyrs/src/modules/auth/views/router/users.router.js +0 -14
  51. package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -1
  52. package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -56
  53. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  54. package/dist/martyrs/src/modules/auth/views/store/users.js +5 -1
  55. package/dist/martyrs/src/modules/auth/views/store/users.js.map +1 -1
  56. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  57. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  58. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +0 -1
  59. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
  60. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  61. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
  62. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +74 -0
  63. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js.map +1 -0
  64. package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js.map +1 -1
  65. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +63 -47
  66. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +1 -1
  68. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
  69. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  70. package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
  71. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
  72. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  73. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  74. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  75. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  76. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  77. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  78. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  79. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  80. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  81. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  82. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  83. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  84. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  85. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
  86. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
  87. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  88. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  89. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  90. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  91. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  92. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  93. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  94. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  96. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  97. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  98. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  99. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  100. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  101. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  102. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +0 -1
  103. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
  105. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  106. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
  107. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
  108. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +1 -1
  109. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  110. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
  111. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -2
  112. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
  113. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  114. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  115. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  116. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  117. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  118. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  119. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  120. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  121. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  122. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
  123. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  124. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
  125. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  126. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -2
  127. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  128. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  129. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +0 -1
  130. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +0 -1
  132. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  134. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  135. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +0 -1
  136. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  138. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +0 -1
  139. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  140. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  141. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +3 -3
  142. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  144. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  145. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  146. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  147. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  148. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  149. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  150. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  151. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  152. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  153. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  154. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  155. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
  156. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  157. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  158. package/dist/martyrs.css +1 -1
  159. package/dist/martyrs.es.js +1 -1
  160. package/dist/music.server.js +1 -1
  161. package/dist/notifications.server.js +1 -1
  162. package/dist/orders.server.js +7 -6
  163. package/dist/organizations.server.js +2 -2
  164. package/dist/products.server.js +2 -2
  165. package/dist/profile.schema-C31Lynn3.js +21 -0
  166. package/dist/rents.server.js +1 -1
  167. package/dist/sessions.service-COcwjd0f.js +86 -0
  168. package/dist/style.css +178 -108
  169. package/dist/{tickets.controller-B7r0mK-5.js → tickets.controller-DdF85W-i.js} +1 -1
  170. package/dist/visitors.service-B1dhhuSo.js +83 -0
  171. package/dist/wallet.server.js +2 -2
  172. package/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +1 -1
  173. package/package.json +5 -1
  174. package/src/cli/commands/create.js +106 -0
  175. package/src/cli/index.js +25 -0
  176. package/src/cli/templates/app/.env.development.mustache +14 -0
  177. package/src/cli/templates/app/.env.production.mustache +14 -0
  178. package/src/cli/templates/app/Dockerfile +36 -0
  179. package/src/cli/templates/app/babel.config.js +14 -0
  180. package/src/cli/templates/app/env.js +3 -0
  181. package/src/cli/templates/app/index.js +46 -0
  182. package/src/cli/templates/app/mongodb.config.js +18 -0
  183. package/src/cli/templates/app/package.json.mustache +65 -0
  184. package/src/cli/templates/app/src/client.js +22 -0
  185. package/src/cli/templates/app/src/components/pages/Index.vue +11 -0
  186. package/src/cli/templates/app/src/configs/global.config.js.mustache +40 -0
  187. package/src/cli/templates/app/src/localization/extensions.js +2 -0
  188. package/src/cli/templates/app/src/localization/index.js +44 -0
  189. package/src/cli/templates/app/src/localization/overrides.js +2 -0
  190. package/src/cli/templates/app/src/localization/translations.js +10 -0
  191. package/src/cli/templates/app/src/models/index.js +9 -0
  192. package/src/cli/templates/app/src/router/index.js +48 -0
  193. package/src/cli/templates/app/src/scss/theme.scss +18 -0
  194. package/src/cli/templates/app/src/server.js +68 -0
  195. package/src/cli/templates/app/src/store/index.js +9 -0
  196. package/src/cli/templates/docker-compose.yaml.mustache +47 -0
  197. package/src/cli/templates/nginx/Dockerfile +5 -0
  198. package/src/cli/templates/nginx/default.conf.mustache +55 -0
  199. package/src/cli/templates/public/favicon/.gitkeep +0 -0
  200. package/src/cli/templates/start-dev.sh.mustache +131 -0
  201. package/src/cli/templates/start-prod.sh.mustache +12 -0
  202. package/src/components/Button/Button.vue +61 -15
  203. package/src/components/Loader/Loader.vue +1 -1
  204. package/src/components/Tooltip/Tooltip.vue +31 -23
  205. package/src/modules/TASKS.MD +30 -1
  206. package/src/modules/auth/CLAUDE.md +381 -0
  207. package/src/modules/auth/FIXES.md +0 -38
  208. package/src/modules/auth/auth.client.js +4 -6
  209. package/src/modules/auth/auth.server.js +4 -15
  210. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -17
  211. package/src/modules/auth/controllers/middlewares/index.js +4 -1
  212. package/src/modules/auth/controllers/middlewares/otp.middleware.js +166 -0
  213. package/src/modules/auth/controllers/middlewares/verifySignUp.js +0 -1
  214. package/src/modules/auth/controllers/middlewares/verifyUser.js +58 -11
  215. package/src/modules/auth/controllers/routes/auth.routes.js +48 -6
  216. package/src/modules/auth/controllers/routes/users.routes.js +29 -8
  217. package/src/modules/auth/controllers/services/auth.service.js +62 -12
  218. package/src/modules/auth/controllers/services/otp.service.js +109 -0
  219. package/src/modules/auth/controllers/services/users.service.js +46 -6
  220. package/src/modules/auth/models/otp.model.js +20 -0
  221. package/src/modules/auth/views/components/blocks/OtpDialog.vue +168 -0
  222. package/src/modules/auth/views/components/pages/Profile.vue +18 -13
  223. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +199 -45
  224. package/src/modules/auth/views/components/pages/ResetPassword.vue +170 -132
  225. package/src/modules/auth/views/components/pages/SignIn.vue +2 -1
  226. package/src/modules/auth/views/components/pages/SignUp.vue +203 -147
  227. package/src/modules/auth/views/plugins/otp.plugin.js +104 -0
  228. package/src/modules/auth/views/router/auth.router.js +1 -24
  229. package/src/modules/auth/views/router/users.router.js +1 -12
  230. package/src/modules/auth/views/store/auth.js +0 -68
  231. package/src/modules/auth/views/store/users.js +6 -2
  232. package/src/modules/core/controllers/classes/core.websocket.js +57 -6
  233. package/src/modules/core/controllers/middlewares/visitor.logger.js +49 -0
  234. package/src/modules/core/controllers/services/requests.service.js +53 -0
  235. package/src/modules/core/controllers/services/sessions.service.js +98 -0
  236. package/src/modules/core/controllers/services/visitors.service.js +102 -0
  237. package/src/modules/core/controllers/utils/mailing.js +16 -3
  238. package/src/modules/core/core.server.js +45 -3
  239. package/src/modules/core/models/request.model.js +30 -0
  240. package/src/modules/core/models/session.model.js +43 -0
  241. package/src/modules/core/models/visitor.model.js +28 -0
  242. package/src/modules/core/views/components/elements/OnlineIndicator.vue +115 -0
  243. package/src/modules/core/views/components/layouts/App.vue +2 -2
  244. package/src/modules/core/views/components/layouts/Client.vue +443 -477
  245. package/src/modules/orders/controllers/orders.controller.js +3 -3
  246. package/src/modules/products/components/pages/Products.vue +1 -1
  247. package/dist/_virtual/alignment-pattern.js +0 -5
  248. package/dist/_virtual/alignment-pattern.js.map +0 -1
  249. package/dist/_virtual/browser.js +0 -8
  250. package/dist/_virtual/browser.js.map +0 -1
  251. package/dist/_virtual/browser2.js +0 -5
  252. package/dist/_virtual/browser2.js.map +0 -1
  253. package/dist/_virtual/canvas.js +0 -5
  254. package/dist/_virtual/canvas.js.map +0 -1
  255. package/dist/_virtual/dijkstra.js +0 -5
  256. package/dist/_virtual/dijkstra.js.map +0 -1
  257. package/dist/_virtual/error-correction-code.js +0 -5
  258. package/dist/_virtual/error-correction-code.js.map +0 -1
  259. package/dist/_virtual/error-correction-level.js +0 -5
  260. package/dist/_virtual/error-correction-level.js.map +0 -1
  261. package/dist/_virtual/finder-pattern.js +0 -5
  262. package/dist/_virtual/finder-pattern.js.map +0 -1
  263. package/dist/_virtual/format-info.js +0 -5
  264. package/dist/_virtual/format-info.js.map +0 -1
  265. package/dist/_virtual/galois-field.js +0 -5
  266. package/dist/_virtual/galois-field.js.map +0 -1
  267. package/dist/_virtual/mask-pattern.js +0 -5
  268. package/dist/_virtual/mask-pattern.js.map +0 -1
  269. package/dist/_virtual/mode.js +0 -5
  270. package/dist/_virtual/mode.js.map +0 -1
  271. package/dist/_virtual/polynomial.js +0 -5
  272. package/dist/_virtual/polynomial.js.map +0 -1
  273. package/dist/_virtual/qrcode.js +0 -5
  274. package/dist/_virtual/qrcode.js.map +0 -1
  275. package/dist/_virtual/regex.js +0 -5
  276. package/dist/_virtual/regex.js.map +0 -1
  277. package/dist/_virtual/segments.js +0 -5
  278. package/dist/_virtual/segments.js.map +0 -1
  279. package/dist/_virtual/svg-tag.js +0 -5
  280. package/dist/_virtual/svg-tag.js.map +0 -1
  281. package/dist/_virtual/utils.js +0 -5
  282. package/dist/_virtual/utils.js.map +0 -1
  283. package/dist/_virtual/utils2.js +0 -5
  284. package/dist/_virtual/utils2.js.map +0 -1
  285. package/dist/_virtual/version-check.js +0 -5
  286. package/dist/_virtual/version-check.js.map +0 -1
  287. package/dist/_virtual/version.js +0 -5
  288. package/dist/_virtual/version.js.map +0 -1
  289. package/dist/index-_Edcmck_.js +0 -170
  290. package/dist/martyrs/dist/main-xL-jtBkT.js.map +0 -1
  291. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +0 -1336
  292. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js.map +0 -1
  293. package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
  294. package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +0 -1
  295. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +0 -166
  296. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +0 -1
  297. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +0 -118
  298. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js.map +0 -1
  299. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +0 -360
  300. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js.map +0 -1
  301. package/dist/martyrs/src/modules/auth/views/store/twofa.js +0 -40
  302. package/dist/martyrs/src/modules/auth/views/store/twofa.js.map +0 -1
  303. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
  304. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +0 -43
  305. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js.map +0 -1
  306. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +0 -47
  307. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js.map +0 -1
  308. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +0 -29
  309. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js.map +0 -1
  310. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +0 -89
  311. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +0 -1
  312. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +0 -136
  313. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js.map +0 -1
  314. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +0 -238
  315. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +0 -1
  316. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js +0 -9
  317. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js.map +0 -1
  318. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js +0 -134
  319. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js.map +0 -1
  320. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -106
  321. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js.map +0 -1
  322. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -79
  323. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js.map +0 -1
  324. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -14
  325. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js.map +0 -1
  326. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -43
  327. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js.map +0 -1
  328. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -85
  329. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js.map +0 -1
  330. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -40
  331. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js.map +0 -1
  332. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -34
  333. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js.map +0 -1
  334. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -36
  335. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js.map +0 -1
  336. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -367
  337. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js.map +0 -1
  338. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -52
  339. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js.map +0 -1
  340. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -25
  341. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js.map +0 -1
  342. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -24
  343. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js.map +0 -1
  344. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -38
  345. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js.map +0 -1
  346. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -46
  347. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js.map +0 -1
  348. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -149
  349. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js.map +0 -1
  350. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -90
  351. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js.map +0 -1
  352. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -41
  353. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js.map +0 -1
  354. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -44
  355. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js.map +0 -1
  356. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -279
  357. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js.map +0 -1
  358. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -38
  359. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js.map +0 -1
  360. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -33
  361. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js.map +0 -1
  362. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -201
  363. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js.map +0 -1
  364. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -84
  365. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js.map +0 -1
  366. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -14
  367. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js.map +0 -1
  368. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -107
  369. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js.map +0 -1
  370. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -61
  371. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js.map +0 -1
  372. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -64
  373. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js.map +0 -1
  374. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -87
  375. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js.map +0 -1
  376. package/dist/profile.schema-CjLOfG7b.js +0 -92
  377. package/src/modules/auth/controllers/middlewares/visitor.logger.js +0 -75
  378. package/src/modules/auth/controllers/routes/twofa.routes.js +0 -8
  379. package/src/modules/auth/controllers/services/twofa.service.js +0 -30
  380. package/src/modules/auth/models/request.model.js +0 -14
  381. package/src/modules/auth/models/visitor.model.js +0 -11
  382. package/src/modules/auth/views/components/pages/EnterCode.vue +0 -204
  383. package/src/modules/auth/views/components/pages/EnterPassword.vue +0 -123
  384. package/src/modules/auth/views/components/sections/ProfileEditCredentials.vue +0 -329
  385. package/src/modules/auth/views/store/twofa.js +0 -70
  386. package/src/modules/auth//320/220/320/240/320/245/320/230/320/242/320/225/320/232/320/242/320/243/320/240/320/220.md +0 -445
@@ -1,118 +0,0 @@
1
- import { ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, toDisplayString, unref, createTextVNode, withCtx } from "vue";
2
- /* empty css */
3
- import Field from "../../../../../components/Field/Field.vue.js";
4
- import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
5
- import { useRoute, useRouter } from "vue-router";
6
- import { useI18n } from "vue-i18n";
7
- import { state, actions } from "../../store/auth.js";
8
- import { validateInputs, validatePassword } from "../../validations/inputs.validation.js";
9
- /* empty css */
10
- const _hoisted_1 = { class: "t-left pd-medium" };
11
- const _hoisted_2 = { class: "mn-b-small" };
12
- const _hoisted_3 = {
13
- key: 0,
14
- class: "mn-b-semi t-transp"
15
- };
16
- const _hoisted_4 = {
17
- key: 1,
18
- class: "mn-b-semi t-transp"
19
- };
20
- const _hoisted_5 = { class: "mn-b-semi radius-small o-hidden" };
21
- const _hoisted_6 = {
22
- key: 2,
23
- class: "p-regular fw-semi mn-b-semi"
24
- };
25
- const _hoisted_7 = { key: 0 };
26
- const _hoisted_8 = { key: 1 };
27
- const _sfc_main = {
28
- __name: "EnterPassword",
29
- setup(__props) {
30
- const passswordValidation = ref(null);
31
- const { t } = useI18n({
32
- useScope: "global"
33
- });
34
- const route = useRoute();
35
- const router = useRouter();
36
- ref("phone");
37
- async function onSubmit() {
38
- try {
39
- await validateInputs(
40
- passswordValidation,
41
- validatePassword,
42
- state.user.password,
43
- "Некорректный пароль"
44
- );
45
- } catch (error) {
46
- throw new Error();
47
- }
48
- if (route.query.method === "reset-password") await actions.updatePassword(state.user, route.query.type);
49
- if (route.query.method !== "reset-password") await actions.signup(state.user, route.query.type);
50
- }
51
- function redirectTo() {
52
- if (route.query.returnUrl) {
53
- router.push({
54
- path: route.query.returnUrl,
55
- query: {
56
- afterAuth: "true"
57
- }
58
- });
59
- } else {
60
- router.push({
61
- name: "User Profile",
62
- params: {
63
- _id: state.user._id
64
- },
65
- query: {
66
- afterAuth: "true"
67
- }
68
- });
69
- }
70
- }
71
- return (_ctx, _cache) => {
72
- return openBlock(), createElementBlock("section", _hoisted_1, [
73
- createElementVNode("h3", _hoisted_2, toDisplayString(unref(t)("auth.enterPassword.almostDone")), 1),
74
- unref(route).query.method === "reset-password" ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(unref(t)("auth.enterPassword.newPasswordPrompt")), 1)) : (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(unref(t)("auth.enterPassword.registrationPasswordPrompt")), 1)),
75
- createElementVNode("div", _hoisted_5, [
76
- createVNode(Field, {
77
- field: state.user.password,
78
- "onUpdate:field": _cache[0] || (_cache[0] = ($event) => state.user.password = $event),
79
- type: "password",
80
- validation: passswordValidation.value,
81
- placeholder: unref(t)("auth.enterPassword.passwordPlaceholder"),
82
- class: "bg-light pd-small radius-small mn-b-thin"
83
- }, null, 8, ["field", "validation", "placeholder"]),
84
- createVNode(Field, {
85
- field: state.user.passwordRepeat,
86
- "onUpdate:field": _cache[1] || (_cache[1] = ($event) => state.user.passwordRepeat = $event),
87
- type: "password",
88
- placeholder: unref(t)("auth.enterPassword.repeatPasswordPlaceholder"),
89
- class: "bg-light pd-small radius-small mn-b-thin"
90
- }, null, 8, ["field", "placeholder"])
91
- ]),
92
- unref(route).query.method !== "reset-password" ? (openBlock(), createElementBlock("div", _hoisted_6, _cache[2] || (_cache[2] = [
93
- createTextVNode(" By registering, you agree to our "),
94
- createElementVNode("a", {
95
- class: "t-grey",
96
- href: "/legal/eula",
97
- target: "_blank",
98
- rel: "noopener noreferrer"
99
- }, "End User License Agreement (EULA)", -1)
100
- ]))) : createCommentVNode("", true),
101
- createVNode(_sfc_main$1, {
102
- submit: onSubmit,
103
- callback: redirectTo,
104
- class: "w-100 bg-main mn-b-big"
105
- }, {
106
- default: withCtx(() => [
107
- unref(route).query.method === "reset-password" ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(unref(t)("auth.enterPassword.changePasswordBtn")), 1)) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(unref(t)("auth.enterPassword.registerBtn")), 1))
108
- ]),
109
- _: 1
110
- })
111
- ]);
112
- };
113
- }
114
- };
115
- export {
116
- _sfc_main as default
117
- };
118
- //# sourceMappingURL=EnterPassword.vue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnterPassword.vue.js","sources":["../../../../../../../../src/modules/auth/views/components/pages/EnterPassword.vue"],"sourcesContent":["<template>\n\t<section class=\"t-left pd-medium\">\n\t\t<!-- Header -->\n\t\t<!-- <img loading=\"lazy\" src=\"@/assets/icons/password.png\" class=\"i-extra mn-b-small\"> -->\n\t\t<h3 class=\"mn-b-small\">{{ t('auth.enterPassword.almostDone') }}</h3>\n\t\t<p v-if=\"route.query.method === 'reset-password'\" class=\"mn-b-semi t-transp\">{{ t('auth.enterPassword.newPasswordPrompt') }}</p>\n\t\t<p v-else class=\"mn-b-semi t-transp\">{{ t('auth.enterPassword.registrationPasswordPrompt') }}</p>\n\t\n\t\t<!-- Form -->\n\t\t<div class=\"mn-b-semi radius-small o-hidden\">\n\t\t\t<Field \n\t\t\t\tv-model:field=\"auth.state.user.password\"\n\t\t\t\ttype=\"password\" \t\n\t\t\t\t:validation=\"passswordValidation\" \n\t\t\t\t:placeholder=\"t('auth.enterPassword.passwordPlaceholder')\"\t\t\n\t\t\t\tclass=\"bg-light pd-small radius-small mn-b-thin\"\n\t\t\t/>\n\t\t\t<Field \n\t\t\t\tv-model:field=\"auth.state.user.passwordRepeat\"\n\t\t\t\ttype=\"password\" \t\n\t\t\t\t:placeholder=\"t('auth.enterPassword.repeatPasswordPlaceholder')\"\n\t\t\t\tclass=\"bg-light pd-small radius-small mn-b-thin\"\n\t\t\t/>\n\t\t</div>\n\t\t<div\n\t\t\t v-if=\"route.query.method !== 'reset-password'\" \n\t\t\t class=\"p-regular fw-semi mn-b-semi \"\n\t\t>\n\t\t\t By registering, you agree to our <a class=\"t-grey\" href=\"/legal/eula\" target=\"_blank\" rel=\"noopener noreferrer\">End User License Agreement (EULA)</a>\n\t\t</div>\n\t\t<!-- Button -->\n\t\t<Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"w-100 bg-main mn-b-big\">\n\t\t\t<span v-if=\"route.query.method === 'reset-password'\">{{ t('auth.enterPassword.changePasswordBtn') }}</span>\n\t\t\t<span v-else>{{ t('auth.enterPassword.registerBtn') }}</span>\n\t\t</Button>\n\t</section> \n</template>\n\n<script setup>\n// Import components\nimport Tab from '@martyrs/src/components/Tab/Tab.vue'\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport Button from '@martyrs/src/components/Button/Button.vue'\n// Import libs\nimport { computed, onMounted, ref, onBeforeMount } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Import state\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth.js'\n// Import validation\nimport * as inputsValidation from '@martyrs/src/modules/auth/views/validations/inputs.validation'\nconst passswordValidation = ref(null)\n// Localization\nconst { t } = useI18n({\n\tuseScope: 'global', \n})\n// Accessing router\nconst route = useRoute()\nconst router = useRouter()\n// Accessing state\nconst tabAuth = ref('phone')\n// Methods\nasync function onSubmit() {\n\ttry {\n\t\tawait inputsValidation.validateInputs(\n\t\t\tpassswordValidation, \n\t\t\tinputsValidation.validatePassword, \n\t\t\tauth.state.user.password, \n\t\t\t'Некорректный пароль'\n\t\t)\n\t} catch (error) {\n\t\tthrow new Error\n\t}\n\n\tif (route.query.method === 'reset-password') await auth.actions.updatePassword(auth.state.user, route.query.type)\n\tif (route.query.method !== 'reset-password') await auth.actions.signup(auth.state.user, route.query.type)\n}\n\nfunction redirectTo () {\n\tif (route.query.returnUrl) {\n\t\trouter.push({ \n\t\t\tpath: route.query.returnUrl,\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t} else { \n\t\trouter.push({ \n\t\t\tname: 'User Profile', \n\t\t\tparams: { \n\t\t\t\t_id: auth.state.user._id \n\t\t\t},\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t}\n}\n</script>\n\n<style lang=\"scss\">\n\t.slide-fade-enter-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.slide-fade-leave-to {\n\n\t}\n</style>\n"],"names":["inputsValidation.validateInputs","inputsValidation.validatePassword","auth.state","auth.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,UAAM,sBAAsB,IAAI,IAAI;AAEpC,UAAM,EAAE,EAAC,IAAK,QAAQ;AAAA,MACrB,UAAU;AAAA,IACX,CAAC;AAED,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AAER,QAAI,OAAO;AAE3B,mBAAe,WAAW;AACzB,UAAI;AACH,cAAMA;AAAAA,UACL;AAAA,UACAC;AAAAA,UACAC,MAAW,KAAK;AAAA,UAChB;AAAA,QACH;AAAA,MACC,SAAS,OAAO;AACf,cAAM,IAAI;AAAA,MACX;AAEA,UAAI,MAAM,MAAM,WAAW,iBAAkB,OAAMC,QAAa,eAAeD,MAAW,MAAM,MAAM,MAAM,IAAI;AAChH,UAAI,MAAM,MAAM,WAAW,iBAAkB,OAAMC,QAAa,OAAOD,MAAW,MAAM,MAAM,MAAM,IAAI;AAAA,IACzG;AAEA,aAAS,aAAc;AACtB,UAAI,MAAM,MAAM,WAAW;AAC1B,eAAO,KAAK;AAAA,UACX,MAAM,MAAM,MAAM;AAAA,UAClB,OAAO;AAAA,YACN,WAAW;AAAA,UACf;AAAA,QACA,CAAG;AAAA,MACF,OAAO;AACN,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,KAAKA,MAAW,KAAK;AAAA,UACzB;AAAA,UACG,OAAO;AAAA,YACN,WAAW;AAAA,UACf;AAAA,QACA,CAAG;AAAA,MACF;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,360 +0,0 @@
1
- import { ref, onMounted, createElementBlock, createCommentVNode, openBlock, createElementVNode, createBlock, createVNode, withCtx, createTextVNode } from "vue";
2
- import Field from "../../../../../components/Field/Field.vue.js";
3
- import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
4
- import { useRoute, useRouter } from "vue-router";
5
- import { actions, state } from "../../store/users.js";
6
- import { sendCode, state as state$1 } from "../../store/twofa.js";
7
- import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
8
- const _hoisted_1 = {
9
- key: 0,
10
- class: ""
11
- };
12
- const _hoisted_2 = {
13
- key: 0,
14
- class: "mn-b-semi"
15
- };
16
- const _hoisted_3 = { key: 0 };
17
- const _hoisted_4 = { class: "flex gap-2" };
18
- const _hoisted_5 = {
19
- key: 1,
20
- class: "mn-b-semi"
21
- };
22
- const _hoisted_6 = { key: 0 };
23
- const _hoisted_7 = { class: "flex gap-2" };
24
- const _hoisted_8 = { class: "mn-b-semi" };
25
- const _hoisted_9 = {
26
- key: 0,
27
- class: "mn-b-thin"
28
- };
29
- const _hoisted_10 = { key: 1 };
30
- const _hoisted_11 = {
31
- key: 2,
32
- class: "mn-b-semi"
33
- };
34
- const _hoisted_12 = { class: "flex gap-2" };
35
- const _sfc_main = {
36
- __name: "ProfileEditCredentials",
37
- setup(__props) {
38
- const show = ref(false);
39
- const newEmail = ref("");
40
- const newPhone = ref("");
41
- const verificationCode = ref("");
42
- const isVerificationSent = ref(false);
43
- const currentVerificationType = ref(null);
44
- const currentAction = ref(null);
45
- const isEditingEmail = ref(false);
46
- const isEditingPhone = ref(false);
47
- const isAddingEmail = ref(false);
48
- const isAddingPhone = ref(false);
49
- const route = useRoute();
50
- useRouter();
51
- onMounted(async () => {
52
- await actions.read({ _id: route.params._id });
53
- show.value = true;
54
- });
55
- function startEditing(type) {
56
- if (type === "email") {
57
- isEditingEmail.value = true;
58
- newEmail.value = "";
59
- } else {
60
- isEditingPhone.value = true;
61
- newPhone.value = "";
62
- }
63
- }
64
- function startAdding(type) {
65
- if (type === "email") {
66
- isAddingEmail.value = true;
67
- newEmail.value = "";
68
- } else {
69
- isAddingPhone.value = true;
70
- newPhone.value = "";
71
- }
72
- }
73
- function cancelAdding(type) {
74
- if (type === "email") {
75
- isAddingEmail.value = false;
76
- newEmail.value = "";
77
- } else {
78
- isAddingPhone.value = false;
79
- newPhone.value = "";
80
- }
81
- }
82
- function cancelEdit() {
83
- isEditingEmail.value = false;
84
- isEditingPhone.value = false;
85
- isAddingEmail.value = false;
86
- isAddingPhone.value = false;
87
- isVerificationSent.value = false;
88
- verificationCode.value = "";
89
- newEmail.value = "";
90
- newPhone.value = "";
91
- currentVerificationType.value = null;
92
- currentAction.value = null;
93
- }
94
- async function sendVerification(type, action) {
95
- try {
96
- if (action === "edit") {
97
- if (type === "email" && (!newEmail.value || newEmail.value === state.current.email)) {
98
- throw new Error("Please enter a different email address");
99
- }
100
- if (type === "phone" && (!newPhone.value || newPhone.value === state.current.phone)) {
101
- throw new Error("Please enter a different phone number");
102
- }
103
- }
104
- const userData = {
105
- phone: type === "phone" ? newPhone.value : state.current.phone,
106
- email: type === "email" ? newEmail.value : state.current.email
107
- };
108
- await sendCode(userData, "update", type);
109
- isVerificationSent.value = true;
110
- currentVerificationType.value = type;
111
- currentAction.value = action;
112
- } catch (error) {
113
- console.error("Failed to send verification code:", error);
114
- }
115
- }
116
- async function verifyCode() {
117
- try {
118
- if (!state$1.code || !state$1.code.code) {
119
- throw new Error("Verification code not found");
120
- }
121
- if (String(state$1.code.code) === String(verificationCode.value)) {
122
- const updateData = { ...state.current };
123
- if (currentVerificationType.value === "email") {
124
- updateData.email = newEmail.value;
125
- } else {
126
- updateData.phone = newPhone.value;
127
- }
128
- await actions.update(updateData);
129
- cancelEdit();
130
- await actions.read({ _id: route.params._id });
131
- } else {
132
- throw new Error("Invalid verification code");
133
- }
134
- } catch (error) {
135
- console.error("Verification failed:", error);
136
- }
137
- }
138
- async function resendCode() {
139
- verificationCode.value = "";
140
- await sendVerification(currentVerificationType.value, currentAction.value);
141
- }
142
- return (_ctx, _cache) => {
143
- return show.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
144
- _cache[20] || (_cache[20] = createElementVNode("h3", { class: "mn-b-small" }, "Phone and Email", -1)),
145
- !state.current.email ? (openBlock(), createElementBlock("div", _hoisted_2, [
146
- isAddingEmail.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
147
- createVNode(Field, {
148
- field: newEmail.value,
149
- "onUpdate:field": _cache[0] || (_cache[0] = ($event) => newEmail.value = $event),
150
- label: "Email",
151
- placeholder: "Enter your email",
152
- class: "mn-b-thin bg-light pd-medium radius-small",
153
- disabled: isVerificationSent.value
154
- }, null, 8, ["field", "disabled"]),
155
- createElementVNode("div", _hoisted_4, [
156
- !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
157
- key: 0,
158
- submit: () => sendVerification("email", "add"),
159
- class: "mn-b-thin t-white bg-second flex-child-1"
160
- }, {
161
- default: withCtx(() => _cache[7] || (_cache[7] = [
162
- createTextVNode(" Add Email ")
163
- ])),
164
- _: 1
165
- }, 8, ["submit"])) : createCommentVNode("", true),
166
- !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
167
- key: 1,
168
- submit: () => cancelAdding("email"),
169
- class: "mn-b-thin bg-red t-white flex-child-1"
170
- }, {
171
- default: withCtx(() => _cache[8] || (_cache[8] = [
172
- createTextVNode(" Cancel ")
173
- ])),
174
- _: 1
175
- }, 8, ["submit"])) : createCommentVNode("", true)
176
- ])
177
- ])) : createCommentVNode("", true),
178
- !isAddingEmail.value ? (openBlock(), createBlock(_sfc_main$1, {
179
- key: 1,
180
- submit: () => startAdding("email"),
181
- class: "mn-b-thin t-white bg-second w-100"
182
- }, {
183
- default: withCtx(() => _cache[9] || (_cache[9] = [
184
- createTextVNode(" Add Email ")
185
- ])),
186
- _: 1
187
- }, 8, ["submit"])) : createCommentVNode("", true)
188
- ])) : createCommentVNode("", true),
189
- !state.current.phone ? (openBlock(), createElementBlock("div", _hoisted_5, [
190
- isAddingPhone.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
191
- createVNode(_sfc_main$2, {
192
- onChange: _cache[1] || (_cache[1] = (event) => newPhone.value = event),
193
- dropdownOptions: {
194
- showDialCodeInSelection: true,
195
- showFlags: true,
196
- showDialCodeInList: true
197
- },
198
- validCharactersOnly: true,
199
- mode: "national",
200
- inputOptions: { placeholder: "Enter your phone number", type: "tel" },
201
- class: "bg-light h-4r pd-small radius-small mn-b-thin"
202
- }),
203
- createElementVNode("div", _hoisted_7, [
204
- !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
205
- key: 0,
206
- submit: () => sendVerification("phone", "add"),
207
- class: "mn-b-thin t-white bg-second flex-child-1"
208
- }, {
209
- default: withCtx(() => _cache[10] || (_cache[10] = [
210
- createTextVNode(" Add Phone ")
211
- ])),
212
- _: 1
213
- }, 8, ["submit"])) : createCommentVNode("", true),
214
- !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
215
- key: 1,
216
- submit: () => cancelAdding("phone"),
217
- class: "mn-b-thin t-white bg-second t-white flex-child-1"
218
- }, {
219
- default: withCtx(() => _cache[11] || (_cache[11] = [
220
- createTextVNode(" Cancel ")
221
- ])),
222
- _: 1
223
- }, 8, ["submit"])) : createCommentVNode("", true)
224
- ])
225
- ])) : createCommentVNode("", true),
226
- !isAddingPhone.value ? (openBlock(), createBlock(_sfc_main$1, {
227
- key: 1,
228
- submit: () => startAdding("phone"),
229
- class: "mn-b-thin bg-main w-100"
230
- }, {
231
- default: withCtx(() => _cache[12] || (_cache[12] = [
232
- createTextVNode(" Add Phone ")
233
- ])),
234
- _: 1
235
- }, 8, ["submit"])) : createCommentVNode("", true)
236
- ])) : createCommentVNode("", true),
237
- createElementVNode("div", _hoisted_8, [
238
- state.current.phone ? (openBlock(), createElementBlock("div", _hoisted_9, [
239
- !isEditingPhone.value ? (openBlock(), createBlock(Field, {
240
- key: 0,
241
- field: state.current.phone,
242
- "onUpdate:field": _cache[2] || (_cache[2] = ($event) => state.current.phone = $event),
243
- label: "Phone",
244
- class: "mn-b-thin bg-light pd-medium radius-small",
245
- disabled: "true"
246
- }, null, 8, ["field"])) : (openBlock(), createBlock(Field, {
247
- key: 1,
248
- field: newPhone.value,
249
- "onUpdate:field": _cache[3] || (_cache[3] = ($event) => newPhone.value = $event),
250
- label: "New Phone",
251
- placeholder: "Enter new phone number",
252
- class: "mn-b-thin t-black bg-light pd-medium radius-small",
253
- disabled: isVerificationSent.value
254
- }, null, 8, ["field", "disabled"])),
255
- !isEditingPhone.value && !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
256
- key: 2,
257
- submit: () => startEditing("phone"),
258
- class: "mn-b-thin t-black bg-light w-100"
259
- }, {
260
- default: withCtx(() => _cache[13] || (_cache[13] = [
261
- createTextVNode(" Change Phone ")
262
- ])),
263
- _: 1
264
- }, 8, ["submit"])) : createCommentVNode("", true),
265
- isEditingPhone.value && !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
266
- key: 3,
267
- submit: () => sendVerification("phone", "edit"),
268
- class: "mn-b-thin bg-main w-100"
269
- }, {
270
- default: withCtx(() => _cache[14] || (_cache[14] = [
271
- createTextVNode(" Verify New Phone ")
272
- ])),
273
- _: 1
274
- }, 8, ["submit"])) : createCommentVNode("", true)
275
- ])) : createCommentVNode("", true),
276
- state.current.email ? (openBlock(), createElementBlock("div", _hoisted_10, [
277
- !isEditingEmail.value ? (openBlock(), createBlock(Field, {
278
- key: 0,
279
- field: state.current.email,
280
- "onUpdate:field": _cache[4] || (_cache[4] = ($event) => state.current.email = $event),
281
- label: "Email",
282
- class: "mn-b-thin bg-light pd-medium radius-small",
283
- disabled: "true"
284
- }, null, 8, ["field"])) : (openBlock(), createBlock(Field, {
285
- key: 1,
286
- field: newEmail.value,
287
- "onUpdate:field": _cache[5] || (_cache[5] = ($event) => newEmail.value = $event),
288
- label: "New Email",
289
- placeholder: "Enter new email",
290
- class: "mn-b-thin bg-light pd-medium radius-small",
291
- disabled: isVerificationSent.value
292
- }, null, 8, ["field", "disabled"])),
293
- !isEditingEmail.value && !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
294
- key: 2,
295
- submit: () => startEditing("email"),
296
- class: "mn-b-thin t-black bg-light w-100"
297
- }, {
298
- default: withCtx(() => _cache[15] || (_cache[15] = [
299
- createTextVNode(" Change Email ")
300
- ])),
301
- _: 1
302
- }, 8, ["submit"])) : createCommentVNode("", true),
303
- isEditingEmail.value && !isVerificationSent.value ? (openBlock(), createBlock(_sfc_main$1, {
304
- key: 3,
305
- submit: () => sendVerification("email", "edit"),
306
- class: "mn-b-thin bg-main w-100"
307
- }, {
308
- default: withCtx(() => _cache[16] || (_cache[16] = [
309
- createTextVNode(" Verify New Email ")
310
- ])),
311
- _: 1
312
- }, 8, ["submit"])) : createCommentVNode("", true)
313
- ])) : createCommentVNode("", true)
314
- ]),
315
- isVerificationSent.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
316
- createVNode(Field, {
317
- field: verificationCode.value,
318
- "onUpdate:field": _cache[6] || (_cache[6] = ($event) => verificationCode.value = $event),
319
- label: "Verification Code",
320
- placeholder: "Enter the code",
321
- class: "mn-b-thin bg-light pd-medium radius-small"
322
- }, null, 8, ["field"]),
323
- createElementVNode("div", _hoisted_12, [
324
- createVNode(_sfc_main$1, {
325
- submit: verifyCode,
326
- class: "mn-b-thin bg-main flex-child-1"
327
- }, {
328
- default: withCtx(() => _cache[17] || (_cache[17] = [
329
- createTextVNode(" Verify ")
330
- ])),
331
- _: 1
332
- }),
333
- createVNode(_sfc_main$1, {
334
- submit: resendCode,
335
- class: "mn-b-thin bg-light flex-child-1"
336
- }, {
337
- default: withCtx(() => _cache[18] || (_cache[18] = [
338
- createTextVNode(" Resend Code ")
339
- ])),
340
- _: 1
341
- }),
342
- createVNode(_sfc_main$1, {
343
- submit: cancelEdit,
344
- class: "mn-b-thin bg-red t-white flex-child-1"
345
- }, {
346
- default: withCtx(() => _cache[19] || (_cache[19] = [
347
- createTextVNode(" Cancel ")
348
- ])),
349
- _: 1
350
- })
351
- ])
352
- ])) : createCommentVNode("", true)
353
- ])) : createCommentVNode("", true);
354
- };
355
- }
356
- };
357
- export {
358
- _sfc_main as default
359
- };
360
- //# sourceMappingURL=ProfileEditCredentials.vue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileEditCredentials.vue.js","sources":["../../../../../../../../src/modules/auth/views/components/sections/ProfileEditCredentials.vue"],"sourcesContent":["<template>\n <div v-if=\"show\" class=\"\">\n <h3 class=\"mn-b-small\">Phone and Email</h3>\n\n <!-- Email section -->\n <div v-if=\"!users.state.current.email\" class=\"mn-b-semi\">\n <div v-if=\"isAddingEmail\">\n <Field \n v-model:field=\"newEmail\" \n label=\"Email\" \n placeholder=\"Enter your email\" \n class=\"mn-b-thin bg-light pd-medium radius-small\"\n :disabled=\"isVerificationSent\"\n />\n <div class=\"flex gap-2\">\n <Button \n v-if=\"!isVerificationSent\"\n :submit=\"() => sendVerification('email', 'add')\" \n class=\"mn-b-thin t-white bg-second flex-child-1\"\n >\n Add Email\n </Button>\n <Button \n v-if=\"!isVerificationSent\"\n :submit=\"() => cancelAdding('email')\" \n class=\"mn-b-thin bg-red t-white flex-child-1\"\n >\n Cancel\n </Button>\n </div>\n </div>\n <Button \n v-if=\"!isAddingEmail\"\n :submit=\"() => startAdding('email')\" \n class=\"mn-b-thin t-white bg-second w-100\"\n >\n Add Email\n </Button>\n </div>\n\n <!-- Phone section -->\n <div v-if=\"!users.state.current.phone\" class=\"mn-b-semi\">\n <div v-if=\"isAddingPhone\">\n <FieldPhone\n @change=\"(event) => newPhone = event\" \n :dropdownOptions=\"{\n showDialCodeInSelection: true,\n showFlags: true,\n showDialCodeInList: true\n }\"\n :validCharactersOnly=\"true\"\n mode=\"national\"\n :inputOptions=\"{placeholder: 'Enter your phone number', type: 'tel'}\"\n class=\"bg-light h-4r pd-small radius-small mn-b-thin\" \n />\n\n <div class=\"flex gap-2\">\n <Button \n v-if=\"!isVerificationSent\"\n :submit=\"() => sendVerification('phone', 'add')\" \n class=\"mn-b-thin t-white bg-second flex-child-1\"\n >\n Add Phone\n </Button>\n <Button \n v-if=\"!isVerificationSent\"\n :submit=\"() => cancelAdding('phone')\" \n class=\"mn-b-thin t-white bg-second t-white flex-child-1\"\n >\n Cancel\n </Button>\n </div>\n </div>\n <Button \n v-if=\"!isAddingPhone\"\n :submit=\"() => startAdding('phone')\" \n class=\"mn-b-thin bg-main w-100\"\n >\n Add Phone\n </Button>\n </div>\n\n <!-- Current contact info with edit options -->\n <div class=\"mn-b-semi\">\n <!-- Current/Edit Phone -->\n <div v-if=\"users.state.current.phone\" class=\"mn-b-thin\">\n <Field \n v-if=\"!isEditingPhone\"\n v-model:field=\"users.state.current.phone\" \n label=\"Phone\" \n class=\"mn-b-thin bg-light pd-medium radius-small\" \n disabled=\"true\"\n />\n <Field \n v-else\n v-model:field=\"newPhone\" \n label=\"New Phone\" \n placeholder=\"Enter new phone number\" \n class=\"mn-b-thin t-black bg-light pd-medium radius-small\"\n :disabled=\"isVerificationSent\"\n />\n <Button \n v-if=\"!isEditingPhone && !isVerificationSent\"\n :submit=\"() => startEditing('phone')\" \n class=\"mn-b-thin t-black bg-light w-100\"\n >\n Change Phone\n </Button>\n <Button \n v-if=\"isEditingPhone && !isVerificationSent\"\n :submit=\"() => sendVerification('phone', 'edit')\" \n class=\"mn-b-thin bg-main w-100\"\n >\n Verify New Phone\n </Button>\n </div>\n\n <!-- Current/Edit Email -->\n <div v-if=\"users.state.current.email\">\n <Field \n v-if=\"!isEditingEmail\"\n v-model:field=\"users.state.current.email\" \n label=\"Email\" \n class=\"mn-b-thin bg-light pd-medium radius-small\" \n disabled=\"true\"\n />\n <Field \n v-else\n v-model:field=\"newEmail\" \n label=\"New Email\" \n placeholder=\"Enter new email\" \n class=\"mn-b-thin bg-light pd-medium radius-small\"\n :disabled=\"isVerificationSent\"\n />\n <Button \n v-if=\"!isEditingEmail && !isVerificationSent\"\n :submit=\"() => startEditing('email')\" \n class=\"mn-b-thin t-black bg-light w-100\"\n >\n Change Email\n </Button>\n <Button \n v-if=\"isEditingEmail && !isVerificationSent\"\n :submit=\"() => sendVerification('email', 'edit')\" \n class=\"mn-b-thin bg-main w-100\"\n >\n Verify New Email\n </Button>\n </div>\n </div>\n\n <!-- Verification code section -->\n <div v-if=\"isVerificationSent\" class=\"mn-b-semi\">\n <Field \n v-model:field=\"verificationCode\" \n label=\"Verification Code\" \n placeholder=\"Enter the code\" \n class=\"mn-b-thin bg-light pd-medium radius-small\"\n />\n <div class=\"flex gap-2\">\n <Button \n :submit=\"verifyCode\" \n class=\"mn-b-thin bg-main flex-child-1\"\n >\n Verify\n </Button>\n <Button \n :submit=\"resendCode\" \n class=\"mn-b-thin bg-light flex-child-1\"\n >\n Resend Code\n </Button>\n <Button \n :submit=\"cancelEdit\" \n class=\"mn-b-thin bg-red t-white flex-child-1\"\n >\n Cancel\n </Button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\n// Import components\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport Button from '@martyrs/src/components/Button/Button.vue'\n\n// Import libs\nimport { ref, onMounted } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\n\n// Import state\nimport * as users from '@martyrs/src/modules/auth/views/store/users.js'\nimport * as twofa from '@martyrs/src/modules/auth/views/store/twofa.js'\n\n// Component state\nconst show = ref(false)\nconst newEmail = ref('')\nconst newPhone = ref('')\nconst verificationCode = ref('')\nconst isVerificationSent = ref(false)\nconst currentVerificationType = ref(null)\nconst currentAction = ref(null) // 'add' or 'edit'\nconst isEditingEmail = ref(false)\nconst isEditingPhone = ref(false)\nconst isAddingEmail = ref(false)\nconst isAddingPhone = ref(false)\n\n// Router\nconst route = useRoute()\nconst router = useRouter()\n\nimport FieldPhone from '@martyrs/src/components/FieldPhone/FieldPhone.vue'\n\n// Lifecycle hooks\nonMounted(async () => {\n await users.actions.read({ _id: route.params._id })\n show.value = true\n})\n\n// Methods\nfunction startEditing(type) {\n if (type === 'email') {\n isEditingEmail.value = true\n newEmail.value = ''\n } else {\n isEditingPhone.value = true\n newPhone.value = ''\n }\n}\n\n// Methods for adding new contact info\nfunction startAdding(type) {\n if (type === 'email') {\n isAddingEmail.value = true\n newEmail.value = ''\n } else {\n isAddingPhone.value = true\n newPhone.value = ''\n }\n}\n\nfunction cancelAdding(type) {\n if (type === 'email') {\n isAddingEmail.value = false\n newEmail.value = ''\n } else {\n isAddingPhone.value = false\n newPhone.value = ''\n }\n}\n\nfunction cancelEdit() {\n isEditingEmail.value = false\n isEditingPhone.value = false\n isAddingEmail.value = false\n isAddingPhone.value = false\n isVerificationSent.value = false\n verificationCode.value = ''\n newEmail.value = ''\n newPhone.value = ''\n currentVerificationType.value = null\n currentAction.value = null\n}\n\nasync function sendVerification(type, action) {\n try {\n // Validate input before sending verification\n if (action === 'edit') {\n if (type === 'email' && (!newEmail.value || newEmail.value === users.state.current.email)) {\n throw new Error('Please enter a different email address')\n }\n if (type === 'phone' && (!newPhone.value || newPhone.value === users.state.current.phone)) {\n throw new Error('Please enter a different phone number')\n }\n }\n\n const userData = {\n phone: type === 'phone' ? newPhone.value : users.state.current.phone,\n email: type === 'email' ? newEmail.value : users.state.current.email\n }\n\n await twofa.sendCode(userData, 'update', type)\n isVerificationSent.value = true\n currentVerificationType.value = type\n currentAction.value = action\n } catch (error) {\n console.error('Failed to send verification code:', error)\n }\n}\n\nasync function verifyCode() {\n try {\n // Проверяем, что код существует в state\n if (!twofa.state.code || !twofa.state.code.code) {\n throw new Error('Verification code not found')\n }\n\n // Сравниваем введенный код с кодом из state\n if (String(twofa.state.code.code) === String(verificationCode.value)) {\n const updateData = { ...users.state.current }\n \n if (currentVerificationType.value === 'email') {\n updateData.email = newEmail.value\n } else {\n updateData.phone = newPhone.value\n }\n\n await users.actions.update(updateData)\n \n // Reset state\n cancelEdit()\n \n // Refresh user data\n await users.actions.read({ _id: route.params._id })\n } else {\n throw new Error('Invalid verification code')\n }\n } catch (error) {\n console.error('Verification failed:', error)\n }\n}\n\nasync function resendCode() {\n verificationCode.value = ''\n await sendVerification(currentVerificationType.value, currentAction.value)\n}\n</script>"],"names":["users.actions","users.state","twofa.sendCode","twofa.state"],"mappings":"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"}
@@ -1,40 +0,0 @@
1
- import { reactive, watch } from "vue";
2
- import { setError } from "../../../core/views/store/core.store.js";
3
- import $axios from "../../../core/views/utils/axios-instance.js";
4
- const state = reactive({
5
- code: {
6
- value: "",
7
- type: "",
8
- method: "",
9
- isSended: false,
10
- isValid: false
11
- }
12
- });
13
- async function sendCode(user, method, type) {
14
- let api = "/api/twofa/sendcode";
15
- if (method === "reset-password") api = "/api/twofa/sendcodereset";
16
- return await $axios.post(api, {
17
- phone: user.phone,
18
- email: user.email,
19
- method,
20
- type
21
- }).then(
22
- (response) => {
23
- state.code = response.data;
24
- state.code.isSended = true;
25
- return Promise.resolve(response.data);
26
- },
27
- (error) => {
28
- console.log("error is", error);
29
- setError(error);
30
- return Promise.reject(error);
31
- }
32
- );
33
- }
34
- watch(state, (newState, oldState) => {
35
- });
36
- export {
37
- sendCode,
38
- state
39
- };
40
- //# sourceMappingURL=twofa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"twofa.js","sources":["../../../../../../../src/modules/auth/views/store/twofa.js"],"sourcesContent":["// Vue modules\nimport { reactive, watch } from 'vue';\n// Globals\nimport { setError } from '@martyrs/src/modules/core/views/store/core.store.js';\n// Setup Axios\nimport $axios from '@martyrs/src/modules/core/views/utils/axios-instance.js';\n// State\nconst state = reactive({\n code: {\n value: '',\n type: '',\n method: '',\n isSended: false,\n isValid: false,\n },\n});\n\nasync function sendCode(user, method, type) {\n let api = '/api/twofa/sendcode';\n\n if (method === 'reset-password') api = '/api/twofa/sendcodereset';\n\n return await $axios\n .post(api, {\n phone: user.phone,\n email: user.email,\n method: method,\n type: type,\n })\n .then(\n response => {\n state.code = response.data;\n state.code.isSended = true;\n return Promise.resolve(response.data);\n },\n error => {\n console.log('error is', error);\n setError(error);\n return Promise.reject(error);\n }\n );\n}\n\nfunction validCode() {\n const rightcode = state.status.signup.code.value.code;\n const usercode = state.user.code;\n\n if (rightcode == usercode) {\n state.status.signup.code.isValid = true;\n } else {\n setError({\n response: {\n status: 'Неверный код',\n data: { message: 'Вы ввели неверный код. Попробуйте еще раз.' },\n },\n });\n }\n}\n\n// // History\nconst history = [];\nhistory.push(state);\n\n// // Watch\nwatch(state, (newState, oldState) => {\n history.push(newState);\n});\n\n// Module Export\nexport { sendCode, state };\n"],"names":[],"mappings":";;;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,EACb;AACA,CAAC;AAED,eAAe,SAAS,MAAM,QAAQ,MAAM;AAC1C,MAAI,MAAM;AAEV,MAAI,WAAW,iBAAkB,OAAM;AAEvC,SAAO,MAAM,OACV,KAAK,KAAK;AAAA,IACT,OAAO,KAAK;AAAA,IACZ,OAAO,KAAK;AAAA,IACZ;AAAA,IACA;AAAA,EACN,CAAK,EACA;AAAA,IACC,cAAY;AACV,YAAM,OAAO,SAAS;AACtB,YAAM,KAAK,WAAW;AACtB,aAAO,QAAQ,QAAQ,SAAS,IAAI;AAAA,IACtC;AAAA,IACA,WAAS;AACP,cAAQ,IAAI,YAAY,KAAK;AAC7B,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC7B;AAAA,EACN;AACA;AAuBA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Filters.vue2.js","sources":["../../../../../../../../src/modules/core/views/components/sections/Filters.vue"],"sourcesContent":["<template>\n <div class=\"flex o-x-scroll scroll-hide ws-nowrap gap-thin\">\n <!-- All Filters Button -->\n <button\n @click=\"showAllFilters = true\"\n class=\"pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer\"\n :class=\"{ 'bg-main': activeFiltersCount > 0 }\"\n >\n <IconFilter class=\"i-regular\" />\n <span class=\"h-1r\"></span>\n <span v-if=\"activeFiltersCount\">{{ activeFiltersCount }}</span>\n </button>\n\n <!-- Individual Filter Buttons -->\n <button\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n @click=\"openFilter(filter.value)\"\n class=\"pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro\"\n :class=\"{ 'selected bg-main': isFilterActive(filter) }\"\n >\n <IconCalendar v-if=\"filter.type === 'date'\" class=\"mn-r-micro i-regular\" />\n <span class=\"ws-nowrap\">{{ filter.type === 'date' && getFilterValue(filter) ? formatFilterValue(filter) : filter.title }}</span>\n <span v-if=\"getFilterValue(filter) && filter.type !== 'date'\" class=\"mn-l-micro\">\n {{ formatFilterValue(filter) }}\n </span>\n </button>\n\n <!-- All Filters Popup -->\n <Popup\n :isPopupOpen=\"showAllFilters\"\n @close-popup=\"closeAllFilters\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <FiltersGroup\n :filters=\"filters\"\n v-model:selected=\"tempSelected\"\n :immediate=\"false\"\n :showHeader=\"true\"\n :showApplyButton=\"true\"\n :showResetButton=\"true\"\n @update:selected=\"applyAllFilters\"\n />\n </Popup>\n\n <!-- Individual Filter Popups -->\n <Popup\n v-for=\"filter in filters\"\n :key=\"`popup-${filter.value}`\"\n :isPopupOpen=\"individualPopups[filter.value]\"\n @close-popup=\"cancelFilter(filter.value)\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <h4 class=\"mn-b-medium\">{{ filter.title }}</h4>\n\n <!-- Checkbox Filter -->\n <FilterCheckbox\n v-if=\"filter.type === 'checkbox'\"\n v-model=\"tempSelected[filter.value]\"\n :options=\"filter.options\"\n />\n\n <!-- Range Filter -->\n <FilterRange\n v-else-if=\"filter.type === 'range'\"\n v-model=\"tempSelected[filter.value]\"\n :minPlaceholder=\"filter.minPlaceholder || 'Min'\"\n :maxPlaceholder=\"filter.maxPlaceholder || 'Max'\"\n :label=\"filter.label\"\n />\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\n <div class=\"mn-t-small\">\n <Calendar\n v-model:date=\"tempSelected[filter.value]\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"bg-light radius-small\"\n />\n </div>\n </div>\n\n <!-- Radio/Options Filter -->\n <FilterOptions\n v-else-if=\"filter.type === 'radio'\"\n v-model=\"tempSelected[filter.value]\"\n :options=\"filter.options\"\n />\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button\n @click=\"cancelFilter(filter.value)\"\n class=\"bg-light button flex-child-full\"\n >\n Cancel\n </button>\n <button\n @click=\"applyFilter(filter.value)\"\n class=\"bg-main w-100 button flex-child-full\"\n >\n Apply\n </button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, reactive, watch } from 'vue'\nimport { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport FiltersGroup from './filters/FiltersGroup.vue'\nimport FilterCheckbox from './filters/FilterCheckbox.vue'\nimport FilterRange from './filters/FilterRange.vue'\nimport FilterDateRange from './filters/FilterDateRange.vue'\nimport FilterOptions from './filters/FilterOptions.vue'\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'\nimport IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'\n\nconst filters = defineModel('filters', {\n type: Array,\n required: true\n})\n\nconst selected = defineModel('selected', {\n type: Object,\n default: () => ({})\n})\n\nconst emit = defineEmits(['select'])\n\nconst { formatDate, returnCurrency } = useGlobalMixins()\n\n// State\nconst showAllFilters = ref(false)\nconst individualPopups = reactive({})\nconst tempSelected = reactive({})\nconst tempDateRange = ref(null)\n\n// Initialize popups and temp values\nwatch(filters, (newFilters) => {\n newFilters.forEach(filter => {\n individualPopups[filter.value] = false\n \n if (!tempSelected[filter.value]) {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = [...(selected.value[filter.value] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { ...(selected.value[filter.value] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = selected.value[filter.value] || null\n } else {\n tempSelected[filter.value] = selected.value[filter.value] || null\n }\n }\n })\n}, { immediate: true, deep: true })\n\n// Sync selected to tempSelected\nwatch(selected, (newSelected) => {\n Object.keys(newSelected).forEach(key => {\n const filter = filters.value.find(f => f.value === key)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[key] = [...(newSelected[key] || [])]\n } else if (filter.type === 'range') {\n tempSelected[key] = { ...(newSelected[key] || { min: '', max: '' }) }\n } else {\n tempSelected[key] = newSelected[key]\n }\n }\n })\n}, { deep: true })\n\n// Computed\nconst activeFiltersCount = computed(() => {\n return Object.entries(selected.value).filter(([key, value]) => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'object' && value !== null) {\n return value.min || value.max\n }\n return value !== null && value !== undefined\n }).length\n})\n\n// Methods\nconst openFilter = (filterValue) => {\n individualPopups[filterValue] = true\n}\n\nconst isFilterActive = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n if (Array.isArray(value)) return value.length > 0\n if (filter.type === 'range') return value.min || value.max\n return true\n}\n\nconst getFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n \n if (filter.type === 'range') {\n return value.min || value.max\n }\n \n if (filter.type === 'date') {\n return value && value.start && value.end\n }\n \n if (Array.isArray(value)) {\n return value.length > 0\n }\n \n return value\n}\n\nconst formatFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return ''\n \n if (Array.isArray(value)) {\n return `(${value.length})`\n }\n \n if (filter.type === 'range') {\n if (!value.min && !value.max) return ''\n return `${value.min || '0'}-${value.max || '∞'}`\n }\n \n if (filter.type === 'date') {\n if (!value || !value.start || !value.end) return ''\n return `${formatDate(value.start, { dayMonth: true, language: 'en' })} - ${formatDate(value.end, { dayMonth: true, language: 'en' })}`\n }\n \n if (filter.type === 'radio') {\n const option = filter.options.find(o => o.value === value)\n return option ? `(${option.label})` : ''\n }\n \n return ''\n}\n\nconst applyFilter = (filterValue) => {\n selected.value[filterValue] = tempSelected[filterValue]\n individualPopups[filterValue] = false\n emit('select', { filter: filterValue, value: tempSelected[filterValue] })\n}\n\nconst cancelFilter = (filterValue) => {\n const filter = filters.value.find(f => f.value === filterValue)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[filterValue] = [...(selected.value[filterValue] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filterValue] = { ...(selected.value[filterValue] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filterValue] = selected.value[filterValue] || null\n } else {\n tempSelected[filterValue] = selected.value[filterValue] || null\n }\n }\n individualPopups[filterValue] = false\n}\n\nconst applyAllFilters = (newValues) => {\n Object.entries(newValues).forEach(([key, value]) => {\n if (selected.value[key] !== value) {\n selected.value[key] = value\n emit('select', { filter: key, value })\n }\n })\n showAllFilters.value = false\n}\n\nconst closeAllFilters = () => {\n showAllFilters.value = false\n}\n</script>\n\n<style scoped>\n.filters-content {\n max-height: 60vh;\n overflow-y: auto;\n}\n</style>"],"names":["_useModel"],"mappings":"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"}
@@ -1,43 +0,0 @@
1
- import { computed, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, unref } from "vue";
2
- import { useI18n } from "vue-i18n";
3
- import { BigNumber } from "../../../../../../node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js";
4
- import text from "../../localization/wallet.json.js";
5
- import { state } from "../../store/wallet.store.js";
6
- const _hoisted_1 = { class: "mn-b-small t-center fw-bold" };
7
- const _hoisted_2 = { class: "radius-medium br-1px br-black pd-big flex flex-column flex-justify-center flex-items-center" };
8
- const _hoisted_3 = { class: "fw-semi" };
9
- const _hoisted_4 = { class: "fw-semi" };
10
- const _sfc_main = {
11
- __name: "CardBalanceReplenished",
12
- emits: ["close"],
13
- setup(__props, { emit: __emit }) {
14
- const emits = __emit;
15
- const { t } = useI18n({
16
- useScope: "global",
17
- ...text
18
- });
19
- const receiveAmount = computed(
20
- () => new BigNumber(state.depositInfo.amount).shiftedBy(-8).dividedBy(process.env.TOKEN_EXCHANGE_RATE).toString()
21
- );
22
- function close() {
23
- emits("close");
24
- }
25
- return (_ctx, _cache) => {
26
- return openBlock(), createElementBlock(Fragment, null, [
27
- createElementVNode("h2", _hoisted_1, toDisplayString(unref(t)("wallet.balanceReplenished")), 1),
28
- createElementVNode("div", _hoisted_2, [
29
- createElementVNode("h3", _hoisted_3, toDisplayString(unref(t)("wallet.youReceived")), 1),
30
- createElementVNode("h3", _hoisted_4, toDisplayString(receiveAmount.value) + " WDT ", 1)
31
- ]),
32
- createElementVNode("button", {
33
- class: "uppercase w-100 bg-main t-black pd-thin radius-medium t-center br-2px br-black-transp-10 mn-t-small",
34
- onClick: close
35
- }, toDisplayString(unref(t)("wallet.backToWallet")), 1)
36
- ], 64);
37
- };
38
- }
39
- };
40
- export {
41
- _sfc_main as default
42
- };
43
- //# sourceMappingURL=CardBalanceReplenished.vue.js.map