@ozdao/martyrs 0.2.584 → 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.
- package/dist/auth.server.js +161 -96
- package/dist/{authJwt-J1csaMWA.js → authJwt-DKbMMjw0.js} +33 -0
- package/dist/builder.js +2 -0
- package/dist/chats.server.js +2 -2
- package/dist/community.server.js +1 -1
- package/dist/core.server.js +191 -2
- package/dist/{core.websocket-C2FxNmZ1.js → core.websocket-Cl76z2wT.js} +41 -5
- package/dist/{crud-q1ye5IhV.js → crud-DpOXTZep.js} +1 -1
- package/dist/events.server.js +2 -2
- package/dist/files.server.js +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/index-kvBwwb0w.js +427 -0
- package/dist/inventory.server.js +2 -2
- package/dist/{mailing-DuEFRsa3.js → mailing-DT7nbNjZ.js} +16 -3
- package/dist/{main-fmp55tJF.js → main-BIf-WirR.js} +864 -865
- package/dist/marketplace.server.js +1 -1
- package/dist/martyrs/dist/{main-fmp55tJF.js → main-BIf-WirR.js} +193 -38
- package/dist/martyrs/dist/main-BIf-WirR.js.map +1 -0
- package/dist/martyrs/dist/{web-BDuQSQKS.js → web-O7lXcjg0.js} +2 -2
- package/dist/martyrs/dist/{web-BDuQSQKS.js.map → web-O7lXcjg0.js.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +8 -7
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue.js +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -1
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +17 -22
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/auth/auth.client.js +18 -24
- package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +178 -0
- package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +104 -77
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +198 -14
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +71 -30
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +87 -31
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js +100 -0
- package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js +2 -31
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.router.js +0 -14
- package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -56
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/users.js +5 -1
- package/dist/martyrs/src/modules/auth/views/store/users.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/backoffice.client.js +3 -15
- package/dist/martyrs/src/modules/backoffice/backoffice.client.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +99 -0
- package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -0
- package/dist/martyrs/src/modules/backoffice/{backoffice.router.js → router/backoffice.router.js} +9 -7
- package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -0
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +7 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js +5 -1
- package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +0 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +74 -0
- package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +77 -67
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +76 -7
- package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/store/core.store.js +1 -0
- package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +2 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +0 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -3
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/pages.router.js +7 -5
- package/dist/martyrs/src/modules/pages/pages.router.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +0 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +0 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.js +1 -1
- package/dist/notifications.server.js +1 -1
- package/dist/orders.server.js +7 -6
- package/dist/organizations.server.js +2 -2
- package/dist/products.server.js +2 -2
- package/dist/profile.schema-C31Lynn3.js +21 -0
- package/dist/rents.server.js +1 -1
- package/dist/sessions.service-COcwjd0f.js +86 -0
- package/dist/style.css +183 -108
- package/dist/{tickets.controller-B7r0mK-5.js → tickets.controller-DdF85W-i.js} +1 -1
- package/dist/visitors.service-B1dhhuSo.js +83 -0
- package/dist/wallet.server.js +2 -2
- package/dist/{web-BDuQSQKS.js → web-O7lXcjg0.js} +1 -1
- package/package.json +5 -1
- package/src/builder/modes/ssr.rspack.dev.js +2 -0
- package/src/cli/commands/create.js +106 -0
- package/src/cli/index.js +25 -0
- package/src/cli/templates/app/.env.development.mustache +14 -0
- package/src/cli/templates/app/.env.production.mustache +14 -0
- package/src/cli/templates/app/Dockerfile +36 -0
- package/src/cli/templates/app/babel.config.js +14 -0
- package/src/cli/templates/app/env.js +3 -0
- package/src/cli/templates/app/index.js +46 -0
- package/src/cli/templates/app/mongodb.config.js +18 -0
- package/src/cli/templates/app/package.json.mustache +65 -0
- package/src/cli/templates/app/src/client.js +22 -0
- package/src/cli/templates/app/src/components/pages/Index.vue +11 -0
- package/src/cli/templates/app/src/configs/global.config.js.mustache +40 -0
- package/src/cli/templates/app/src/localization/extensions.js +2 -0
- package/src/cli/templates/app/src/localization/index.js +44 -0
- package/src/cli/templates/app/src/localization/overrides.js +2 -0
- package/src/cli/templates/app/src/localization/translations.js +10 -0
- package/src/cli/templates/app/src/models/index.js +9 -0
- package/src/cli/templates/app/src/router/index.js +48 -0
- package/src/cli/templates/app/src/scss/theme.scss +18 -0
- package/src/cli/templates/app/src/server.js +68 -0
- package/src/cli/templates/app/src/store/index.js +9 -0
- package/src/cli/templates/docker-compose.yaml.mustache +47 -0
- package/src/cli/templates/nginx/Dockerfile +5 -0
- package/src/cli/templates/nginx/default.conf.mustache +55 -0
- package/src/cli/templates/public/favicon/.gitkeep +0 -0
- package/src/cli/templates/start-dev.sh.mustache +131 -0
- package/src/cli/templates/start-prod.sh.mustache +12 -0
- package/src/components/Button/Button.vue +61 -15
- package/src/components/Loader/Loader.vue +1 -1
- package/src/components/Tooltip/Tooltip.vue +31 -23
- package/src/modules/TASKS.MD +30 -1
- package/src/modules/auth/CLAUDE.md +381 -0
- package/src/modules/auth/FIXES.md +0 -38
- package/src/modules/auth/auth.client.js +4 -6
- package/src/modules/auth/auth.server.js +4 -15
- package/src/modules/auth/controllers/middlewares/authJwt.js +59 -17
- package/src/modules/auth/controllers/middlewares/index.js +4 -1
- package/src/modules/auth/controllers/middlewares/otp.middleware.js +166 -0
- package/src/modules/auth/controllers/middlewares/verifySignUp.js +0 -1
- package/src/modules/auth/controllers/middlewares/verifyUser.js +58 -11
- package/src/modules/auth/controllers/routes/auth.routes.js +48 -6
- package/src/modules/auth/controllers/routes/users.routes.js +29 -8
- package/src/modules/auth/controllers/services/auth.service.js +62 -12
- package/src/modules/auth/controllers/services/otp.service.js +109 -0
- package/src/modules/auth/controllers/services/users.service.js +46 -6
- package/src/modules/auth/models/otp.model.js +20 -0
- package/src/modules/auth/views/components/blocks/OtpDialog.vue +168 -0
- package/src/modules/auth/views/components/pages/Profile.vue +51 -18
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +199 -45
- package/src/modules/auth/views/components/pages/ResetPassword.vue +170 -132
- package/src/modules/auth/views/components/pages/SignIn.vue +2 -1
- package/src/modules/auth/views/components/pages/SignUp.vue +203 -147
- package/src/modules/auth/views/plugins/otp.plugin.js +104 -0
- package/src/modules/auth/views/router/auth.router.js +1 -24
- package/src/modules/auth/views/router/users.router.js +1 -12
- package/src/modules/auth/views/store/auth.js +0 -68
- package/src/modules/auth/views/store/users.js +6 -2
- package/src/modules/backoffice/backoffice.client.js +1 -25
- package/src/modules/backoffice/configs/navigation.backoffice.config.js +99 -0
- package/src/modules/backoffice/router/backoffice.router.js +8 -7
- package/src/modules/community/components/pages/BlogPost.vue +9 -1
- package/src/modules/core/controllers/classes/core.websocket.js +57 -6
- package/src/modules/core/controllers/middlewares/visitor.logger.js +49 -0
- package/src/modules/core/controllers/services/requests.service.js +53 -0
- package/src/modules/core/controllers/services/sessions.service.js +98 -0
- package/src/modules/core/controllers/services/visitors.service.js +102 -0
- package/src/modules/core/controllers/utils/mailing.js +16 -3
- package/src/modules/core/core.client.js +1 -0
- package/src/modules/core/core.server.js +45 -3
- package/src/modules/core/models/request.model.js +30 -0
- package/src/modules/core/models/session.model.js +43 -0
- package/src/modules/core/models/visitor.model.js +28 -0
- package/src/modules/core/views/classes/core.app.js +8 -3
- package/src/modules/core/views/components/elements/OnlineIndicator.vue +115 -0
- package/src/modules/core/views/components/layouts/App.vue +2 -2
- package/src/modules/core/views/components/layouts/Client.vue +444 -479
- package/src/modules/core/views/components/pages/404.vue +55 -3
- package/src/modules/core/views/store/core.store.js +1 -0
- package/src/modules/core/views/utils/vue-app-renderer.js +9 -1
- package/src/modules/orders/controllers/orders.controller.js +3 -3
- package/src/modules/pages/pages.router.js +4 -2
- package/src/modules/pages/views/router/pages.backoffice.router.js +4 -3
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/dist/_virtual/alignment-pattern.js +0 -5
- package/dist/_virtual/alignment-pattern.js.map +0 -1
- package/dist/_virtual/browser.js +0 -8
- package/dist/_virtual/browser.js.map +0 -1
- package/dist/_virtual/browser2.js +0 -5
- package/dist/_virtual/browser2.js.map +0 -1
- package/dist/_virtual/canvas.js +0 -5
- package/dist/_virtual/canvas.js.map +0 -1
- package/dist/_virtual/dijkstra.js +0 -5
- package/dist/_virtual/dijkstra.js.map +0 -1
- package/dist/_virtual/error-correction-code.js +0 -5
- package/dist/_virtual/error-correction-code.js.map +0 -1
- package/dist/_virtual/error-correction-level.js +0 -5
- package/dist/_virtual/error-correction-level.js.map +0 -1
- package/dist/_virtual/finder-pattern.js +0 -5
- package/dist/_virtual/finder-pattern.js.map +0 -1
- package/dist/_virtual/format-info.js +0 -5
- package/dist/_virtual/format-info.js.map +0 -1
- package/dist/_virtual/galois-field.js +0 -5
- package/dist/_virtual/galois-field.js.map +0 -1
- package/dist/_virtual/mask-pattern.js +0 -5
- package/dist/_virtual/mask-pattern.js.map +0 -1
- package/dist/_virtual/mode.js +0 -5
- package/dist/_virtual/mode.js.map +0 -1
- package/dist/_virtual/polynomial.js +0 -5
- package/dist/_virtual/polynomial.js.map +0 -1
- package/dist/_virtual/qrcode.js +0 -5
- package/dist/_virtual/qrcode.js.map +0 -1
- package/dist/_virtual/regex.js +0 -5
- package/dist/_virtual/regex.js.map +0 -1
- package/dist/_virtual/segments.js +0 -5
- package/dist/_virtual/segments.js.map +0 -1
- package/dist/_virtual/svg-tag.js +0 -5
- package/dist/_virtual/svg-tag.js.map +0 -1
- package/dist/_virtual/utils.js +0 -5
- package/dist/_virtual/utils.js.map +0 -1
- package/dist/_virtual/utils2.js +0 -5
- package/dist/_virtual/utils2.js.map +0 -1
- package/dist/_virtual/version-check.js +0 -5
- package/dist/_virtual/version-check.js.map +0 -1
- package/dist/_virtual/version.js +0 -5
- package/dist/_virtual/version.js.map +0 -1
- package/dist/index-_Edcmck_.js +0 -170
- package/dist/martyrs/dist/main-fmp55tJF.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +0 -1336
- package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +0 -166
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +0 -118
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +0 -360
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/store/twofa.js +0 -40
- package/dist/martyrs/src/modules/auth/views/store/twofa.js.map +0 -1
- package/dist/martyrs/src/modules/backoffice/backoffice.router.js.map +0 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +0 -150
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +0 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +0 -43
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +0 -47
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +0 -29
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +0 -89
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +0 -136
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +0 -238
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js +0 -9
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js.map +0 -1
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js +0 -134
- package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js.map +0 -1
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -106
- package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -79
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -14
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -43
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -85
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -40
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -34
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -36
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -367
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -52
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -25
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -24
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -38
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -46
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -149
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -90
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -41
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -44
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -279
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -38
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -33
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -201
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -84
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -14
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -107
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -61
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -64
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js.map +0 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -87
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js.map +0 -1
- package/dist/profile.schema-CjLOfG7b.js +0 -92
- package/src/modules/auth/controllers/middlewares/visitor.logger.js +0 -75
- package/src/modules/auth/controllers/routes/twofa.routes.js +0 -8
- package/src/modules/auth/controllers/services/twofa.service.js +0 -30
- package/src/modules/auth/models/request.model.js +0 -14
- package/src/modules/auth/models/visitor.model.js +0 -11
- package/src/modules/auth/views/components/pages/EnterCode.vue +0 -204
- package/src/modules/auth/views/components/pages/EnterPassword.vue +0 -123
- package/src/modules/auth/views/components/sections/ProfileEditCredentials.vue +0 -329
- package/src/modules/auth/views/store/twofa.js +0 -70
- 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
- package/src/modules/backoffice/backoffice.router.js +0 -69
- package/src/modules/backoffice/components/partials/Sidebar.vue +0 -165
|
@@ -1,152 +1,190 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
2
|
+
<section class="t-left pd-medium">
|
|
3
|
+
<h3 class="mn-b-small">{{ t('auth.resetPassword.forgotPasswordTitle') }}</h3>
|
|
4
|
+
<p class="mn-b-small t-transp">{{ t('auth.resetPassword.instructions') }}</p>
|
|
5
|
+
|
|
6
|
+
<!-- Tab selector -->
|
|
7
|
+
<div
|
|
8
|
+
v-if="availableTabs.length > 1"
|
|
9
|
+
class="mn-b-small p-small uppercase fw-semi bg-light radius-small o-hidden"
|
|
10
|
+
>
|
|
11
|
+
<Tab
|
|
12
|
+
v-model:selected="tabAuth"
|
|
13
|
+
:tabs="availableTabs"
|
|
14
|
+
classTab="pd-small pd-r-medium pd-l-medium w-100 pd-small radius-small"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- Form -->
|
|
19
|
+
<div class="pos-relative">
|
|
20
|
+
<!-- Phone -->
|
|
21
|
+
<transition name="slide-fade">
|
|
22
|
+
<div v-if="tabAuth === 'phone'" class="mn-b-semi radius-small">
|
|
23
|
+
<p class="mn-b-small t-transp">{{ t('auth.resetPassword.smsInfo') }}</p>
|
|
24
|
+
<FieldPhone
|
|
25
|
+
@change="(event) => identifier = event"
|
|
26
|
+
:dropdownOptions="{
|
|
27
|
+
showDialCodeInSelection: true,
|
|
28
|
+
showFlags: true,
|
|
29
|
+
showDialCodeInList: true
|
|
30
|
+
}"
|
|
31
|
+
:validation="phoneValidation"
|
|
32
|
+
mode="national"
|
|
33
|
+
:inputOptions="{ placeholder: t('auth.resetPassword.phonePlaceholder') }"
|
|
34
|
+
class="bg-light h-4r pd-small radius-small mn-b-thin"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</transition>
|
|
38
|
+
<!-- Email -->
|
|
39
|
+
<transition name="slide-fade">
|
|
40
|
+
<div v-if="tabAuth === 'email'" class="mn-b-semi radius-small o-hidden">
|
|
41
|
+
<p class="mn-b-small t-transp">{{ t('auth.resetPassword.emailInfo') }}</p>
|
|
42
|
+
<Field
|
|
43
|
+
v-model:field="identifier"
|
|
44
|
+
:placeholder="t('auth.resetPassword.emailPlaceholder')"
|
|
45
|
+
:validation="emailValidation"
|
|
46
|
+
class="bg-light h-4r pd-medium radius-small"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</transition>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Password fields -->
|
|
53
|
+
<div class="mn-b-semi">
|
|
54
|
+
<Field
|
|
55
|
+
v-model:field="password"
|
|
56
|
+
type="password"
|
|
57
|
+
:placeholder="t('auth.enterPassword.passwordPlaceholder')"
|
|
58
|
+
:validation="passwordValidation"
|
|
59
|
+
class="bg-light pd-small radius-small mn-b-thin"
|
|
60
|
+
/>
|
|
61
|
+
<Field
|
|
62
|
+
v-model:field="passwordRepeat"
|
|
63
|
+
type="password"
|
|
64
|
+
:placeholder="t('auth.enterPassword.repeatPasswordPlaceholder')"
|
|
65
|
+
class="bg-light pd-small radius-small"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<Button :submit="onSubmit" class="w-100 bg-main">
|
|
70
|
+
{{ t('auth.enterPassword.changePasswordBtn') }}
|
|
71
|
+
</Button>
|
|
72
|
+
</section>
|
|
56
73
|
</template>
|
|
57
74
|
|
|
58
75
|
<script setup>
|
|
59
|
-
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
import {
|
|
66
|
-
import { useRoute, useRouter } from 'vue-router'
|
|
76
|
+
import Tab from '@martyrs/src/components/Tab/Tab.vue'
|
|
77
|
+
import Field from '@martyrs/src/components/Field/Field.vue'
|
|
78
|
+
import FieldPhone from '@martyrs/src/components/FieldPhone/FieldPhone.vue'
|
|
79
|
+
import Button from '@martyrs/src/components/Button/Button.vue'
|
|
80
|
+
|
|
81
|
+
import { computed, ref } from 'vue'
|
|
82
|
+
import { useRouter } from 'vue-router'
|
|
67
83
|
import { useI18n } from 'vue-i18n'
|
|
68
|
-
|
|
84
|
+
|
|
69
85
|
import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'
|
|
70
|
-
|
|
86
|
+
import { setError } from '@martyrs/src/modules/core/views/store/core.store.js'
|
|
87
|
+
import { withOtp } from '@martyrs/src/modules/auth/views/plugins/otp.plugin.js'
|
|
88
|
+
import $axios from '@martyrs/src/modules/core/views/utils/axios-instance.js'
|
|
71
89
|
import * as inputsValidation from '@martyrs/src/modules/auth/views/validations/inputs.validation'
|
|
72
90
|
|
|
73
|
-
// Get store
|
|
74
91
|
const store = useStore()
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const { t } = useI18n({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
const core = store.core || { state: {} }
|
|
93
|
+
const auth = store.auth
|
|
94
|
+
|
|
95
|
+
const router = useRouter()
|
|
96
|
+
const { t } = useI18n({ useScope: 'global' })
|
|
97
|
+
|
|
98
|
+
const identifier = ref('')
|
|
99
|
+
const password = ref('')
|
|
100
|
+
const passwordRepeat = ref('')
|
|
101
|
+
|
|
83
102
|
const phoneValidation = ref(null)
|
|
84
103
|
const emailValidation = ref(null)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const router = useRouter()
|
|
88
|
-
// Accessing state
|
|
104
|
+
const passwordValidation = ref(null)
|
|
105
|
+
|
|
89
106
|
const availableTabs = computed(() => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
const tabAuth = ref(availableTabs.value.length ? availableTabs.value[0].value : '');
|
|
99
|
-
// Methods
|
|
100
|
-
async function onSubmit() {
|
|
101
|
-
try {
|
|
102
|
-
if (tabAuth.value === 'phone') await inputsValidation.validateInputs(
|
|
103
|
-
phoneValidation,
|
|
104
|
-
inputsValidation.validatePhone,
|
|
105
|
-
auth.state.user.phone,
|
|
106
|
-
'Некорректный телефон'
|
|
107
|
-
)
|
|
108
|
-
if (tabAuth.value === 'email') await inputsValidation.validateInputs(
|
|
109
|
-
emailValidation,
|
|
110
|
-
inputsValidation.validateEmail,
|
|
111
|
-
auth.state.user.email,
|
|
112
|
-
'Некорректный email'
|
|
113
|
-
)
|
|
114
|
-
} catch (error) {
|
|
115
|
-
throw new Error
|
|
116
|
-
}
|
|
117
|
-
try {
|
|
118
|
-
await auth.actions.resetPassword(auth.state.user, tabAuth.value, 'reset-password')
|
|
119
|
-
} catch (error) {
|
|
120
|
-
console.log(error)
|
|
121
|
-
throw new Error
|
|
122
|
-
}
|
|
123
|
-
}
|
|
107
|
+
const tabs = [
|
|
108
|
+
{ name: t('auth.resetPassword.phone'), value: 'phone' },
|
|
109
|
+
{ name: t('auth.resetPassword.email'), value: 'email' }
|
|
110
|
+
]
|
|
111
|
+
const excludeMethods = core.state?.options?.auth?.authMethodsExclude || []
|
|
112
|
+
return tabs.filter(tab => !excludeMethods.includes(tab.value))
|
|
113
|
+
})
|
|
124
114
|
|
|
125
|
-
|
|
126
|
-
router.push({ name: 'Enter Code', query: {type: tabAuth.value, method: 'reset-password'} })
|
|
127
|
-
}
|
|
128
|
-
</script>
|
|
115
|
+
const tabAuth = ref(availableTabs.value.length ? availableTabs.value[0].value : '')
|
|
129
116
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
117
|
+
async function onSubmit() {
|
|
118
|
+
// Validate identifier
|
|
119
|
+
if (tabAuth.value === 'phone') {
|
|
120
|
+
await inputsValidation.validateInputs(
|
|
121
|
+
phoneValidation,
|
|
122
|
+
inputsValidation.validatePhone,
|
|
123
|
+
identifier.value,
|
|
124
|
+
'Некорректный телефон'
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
if (tabAuth.value === 'email') {
|
|
128
|
+
await inputsValidation.validateInputs(
|
|
129
|
+
emailValidation,
|
|
130
|
+
inputsValidation.validateEmail,
|
|
131
|
+
identifier.value,
|
|
132
|
+
'Некорректный email'
|
|
133
|
+
)
|
|
134
|
+
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
// Validate password
|
|
137
|
+
await inputsValidation.validateInputs(
|
|
138
|
+
passwordValidation,
|
|
139
|
+
inputsValidation.validatePassword,
|
|
140
|
+
password.value,
|
|
141
|
+
'Некорректный пароль'
|
|
142
|
+
)
|
|
137
143
|
|
|
138
|
-
|
|
144
|
+
if (password.value !== passwordRepeat.value) {
|
|
145
|
+
setError({ response: { data: { errorCode: 'PASSWORDS_DO_NOT_MATCH' } } })
|
|
146
|
+
throw new Error('PASSWORDS_DO_NOT_MATCH')
|
|
147
|
+
}
|
|
139
148
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
149
|
+
// Reset password with OTP verification
|
|
150
|
+
try {
|
|
151
|
+
const result = await withOtp(
|
|
152
|
+
(data) => $axios.post('/api/auth/reset-password', data),
|
|
153
|
+
{
|
|
154
|
+
identifier: identifier.value,
|
|
155
|
+
type: tabAuth.value,
|
|
156
|
+
password: password.value
|
|
157
|
+
}
|
|
158
|
+
)
|
|
148
159
|
|
|
149
|
-
|
|
160
|
+
// Success - save token and redirect
|
|
161
|
+
if (result.data?.accessToken) {
|
|
162
|
+
const Cookies = (await import('js-cookie')).default
|
|
163
|
+
Cookies.set('user', JSON.stringify(result.data), { path: '/', expires: 7 })
|
|
164
|
+
await auth.actions.initialize()
|
|
165
|
+
router.push({ name: 'User Profile', params: { _id: result.data._id } })
|
|
166
|
+
} else {
|
|
167
|
+
router.push({ name: 'Sign In' })
|
|
168
|
+
}
|
|
169
|
+
} catch (error) {
|
|
170
|
+
setError(error)
|
|
171
|
+
throw error
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
</script>
|
|
150
175
|
|
|
151
|
-
|
|
176
|
+
<style lang="scss">
|
|
177
|
+
.slide-fade-enter-active,
|
|
178
|
+
.slide-fade-leave-active {
|
|
179
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.slide-fade-enter-from,
|
|
183
|
+
.slide-fade-leave-to {
|
|
184
|
+
position: absolute;
|
|
185
|
+
transform: translateX(20px);
|
|
186
|
+
opacity: 0;
|
|
187
|
+
left: 0;
|
|
188
|
+
top: 0;
|
|
189
|
+
}
|
|
152
190
|
</style>
|
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
<!-- Button -->
|
|
86
86
|
<Button
|
|
87
87
|
:submit="onSubmit"
|
|
88
|
-
:callback="redirectTo"
|
|
89
88
|
class="w-100 bg-main"
|
|
90
89
|
>
|
|
91
90
|
{{ t('auth.signIn.signin') }}
|
|
@@ -183,6 +182,8 @@ async function onSubmit() {
|
|
|
183
182
|
// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER
|
|
184
183
|
|
|
185
184
|
await auth.actions.login(userCopy, tabAuth.value)
|
|
185
|
+
|
|
186
|
+
redirectTo()
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
async function onSubmitApple() {
|