@ozdao/martyrs 0.2.522 → 0.2.524
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/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/auth.server.cjs +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/chats.server.cjs +22 -4
- package/dist/chats.server.js +22 -4
- package/dist/events.server.cjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/globals.server.cjs +40 -0
- package/dist/globals.server.js +40 -0
- package/dist/{mailing-Bs9ThyVZ.cjs → mailing-DCvDBHVh.cjs} +0 -3
- package/dist/{mailing-DzlhsxCC.js → mailing-DuEFRsa3.js} +0 -3
- package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue.cjs → Select.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
- package/dist/martyrs/src/components/Select/{Select.vue.cjs.map → Select.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +4 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +4 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +5 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +5 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs +38 -11
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js +38 -11
- package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -4
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/martyrs/src/modules/globals/globals.client.cjs +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +29 -4
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +29 -4
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs → Filters.vue2.cjs} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.js → Filters.vue2.js} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs.map → Filters.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +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.cjs +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.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +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.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +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.cjs +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.cjs +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.cjs +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.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +2 -2
- package/dist/martyrs/src/modules/music/router/music.js +2 -2
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs +14 -3
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +14 -3
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +2 -0
- package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js +2 -0
- package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +40 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +40 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +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.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +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.cjs +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.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/products/store/categories.cjs +2 -4
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +2 -4
- package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/notifications.server.cjs +21 -33
- package/dist/notifications.server.js +21 -33
- package/dist/orders.server.cjs +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +98 -34
- package/dist/products.server.js +98 -34
- package/dist/{tickets.controller-DdnndM6c.cjs → tickets.controller-9zoaVPcx.cjs} +1 -1
- package/dist/{tickets.controller-C56OvH6v.js → tickets.controller-C8sWVqbB.js} +1 -1
- package/dist/wallet.server.cjs +1 -1
- package/dist/wallet.server.js +1 -1
- package/package.json +1 -1
- package/src/modules/auth/views/store/auth.js +6 -10
- package/src/modules/chats/components/sections/ChatWindow.vue +10 -1
- package/src/modules/chats/models/chat.model.js +5 -1
- package/src/modules/chats/routes/chats.routes.js +17 -2
- package/src/modules/chats/store/chat.store.js +49 -11
- package/src/modules/globals/controllers/classes/globals.websocket.js +56 -2
- package/src/modules/globals/controllers/utils/mailing.js +0 -4
- package/src/modules/globals/globals.client.js +3 -4
- package/src/modules/globals/views/classes/globals.websocket.js +40 -4
- package/src/modules/notifications/controllers/notifications.controller.js +27 -36
- package/src/modules/notifications/notifications.client.js +17 -4
- package/src/modules/notifications/store/notifications.store.js +2 -0
- package/src/modules/products/components/pages/Categories.vue +46 -23
- package/src/modules/products/controllers/categories.controller.js +117 -40
- package/src/modules/products/middlewares/categories.verifier.js +8 -1
- package/src/modules/products/store/categories.js +2 -4
- package/src/modules/spots/components/pages/Spots.vue +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue.js.map +0 -1
- package/src/modules/chats/CLAUDE.md +0 -137
- package/src/modules/globals/views/classes/globals.websocket.ws.js +0 -212
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Filters.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/sections/Filters.vue"],"sourcesContent":["<template>\n <div class=\"flex t-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-medium\" />\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-medium\" />\n <span class=\"t-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=\"showAllFilters = false\"\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 <div class=\"flex-v-center flex-nowrap flex mn-b-medium\">\n <h3 class=\"flex-child-full\">Filters</h3>\n </div>\n\n <div class=\"filters-content\">\n <div \n v-for=\"filter in filters\" \n :key=\"filter.value\"\n class=\"mn-b-medium\"\n >\n <h4 class=\"mn-b-small\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\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 </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"applyAllFilters\" \n class=\"button bg-main flex-child-full\"\n >\n Apply\n </button>\n <button \n @click=\"resetFilters\" \n class=\"button bg-light\"\n >\n Reset Filters\n </button>\n </div>\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=\"individualPopups[filter.value] = false\"\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 <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\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 <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 \n \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/globals/views/mixins/mixins.js'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.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 } = 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 = () => {\n Object.entries(tempSelected).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 resetFilters = () => {\n filters.value.forEach(filter => {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = []\n selected.value[filter.value] = []\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { min: '', max: '' }\n selected.value[filter.value] = { min: '', max: '' }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n } else {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n }\n emit('select', { filter: filter.value, value: null })\n })\n}\n</script>\n\n<style scoped>\n.filters-content {\n max-height: 60vh;\n overflow-y: auto;\n}\n</style>"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+NA,UAAM,UAAUA,SAAW,SAAC,SAG3B;AAED,UAAM,WAAWA,SAAW,SAAC,UAG5B;AAED,UAAM,OAAO;AAEb,UAAM,EAAE,WAAU,IAAK,gBAAe;AAGtC,UAAM,iBAAiB,IAAI,KAAK;AAChC,UAAM,mBAAmB,SAAS,CAAA,CAAE;AACpC,UAAM,eAAe,SAAS,CAAA,CAAE;AACV,QAAI,IAAI;AAG9B,UAAM,SAAS,CAAC,eAAe;AAC7B,iBAAW,QAAQ,YAAU;AAC3B,yBAAiB,OAAO,KAAK,IAAI;AAEjC,YAAI,CAAC,aAAa,OAAO,KAAK,GAAG;AAC/B,cAAI,OAAO,SAAS,YAAY;AAC9B,yBAAa,OAAO,KAAK,IAAI,CAAC,GAAI,SAAS,MAAM,OAAO,KAAK,KAAK,EAAG;AAAA,UACvE,WAAW,OAAO,SAAS,SAAS;AAClC,yBAAa,OAAO,KAAK,IAAI,EAAE,GAAI,SAAS,MAAM,OAAO,KAAK,KAAK,EAAE,KAAK,IAAI,KAAK,GAAE,EAAG;AAAA,UAC1F,WAAW,OAAO,SAAS,QAAQ;AACjC,yBAAa,OAAO,KAAK,IAAI,SAAS,MAAM,OAAO,KAAK,KAAK;AAAA,UAC/D,OAAO;AACL,yBAAa,OAAO,KAAK,IAAI,SAAS,MAAM,OAAO,KAAK,KAAK;AAAA,UAC/D;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,GAAG,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SAAS,QAAQ;AACjC,uBAAa,OAAO,KAAK,IAAI;AAC7B,mBAAS,MAAM,OAAO,KAAK,IAAI;AAAA,QACjC,OAAO;AACL,uBAAa,OAAO,KAAK,IAAI;AAC7B,mBAAS,MAAM,OAAO,KAAK,IAAI;AAAA,QACjC;AACA,aAAK,UAAU,EAAE,QAAQ,OAAO,OAAO,OAAO,KAAI,CAAE;AAAA,MACtD,CAAC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Модуль чатов
|
|
2
|
-
|
|
3
|
-
## Обзор архитектуры
|
|
4
|
-
|
|
5
|
-
Модуль реализует real-time чат с использованием WebSocket и MongoDB для хранения истории сообщений.
|
|
6
|
-
|
|
7
|
-
### Структура файлов
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
chats/
|
|
11
|
-
├── chats.client.js # Точка входа клиентской части
|
|
12
|
-
├── chats.server.js # Точка входа серверной части
|
|
13
|
-
├── components/
|
|
14
|
-
│ ├── pages/
|
|
15
|
-
│ │ └── ChatPage.vue # Главная страница чата
|
|
16
|
-
│ ├── sections/
|
|
17
|
-
│ │ └── ChatWindow.vue # Окно чата с сообщениями
|
|
18
|
-
│ └── blocks/
|
|
19
|
-
│ └── ChatMessage.vue # Компонент отдельного сообщения
|
|
20
|
-
├── controllers/
|
|
21
|
-
│ └── chats.controller.js # Бизнес-логика (сохранение/получение сообщений)
|
|
22
|
-
├── models/
|
|
23
|
-
│ └── chat.model.js # MongoDB модель сообщения
|
|
24
|
-
├── routes/
|
|
25
|
-
│ └── chats.routes.js # HTTP маршруты и WebSocket обработчики
|
|
26
|
-
└── store/
|
|
27
|
-
└── chat.store.js # Управление состоянием на клиенте
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Ключевые компоненты
|
|
31
|
-
|
|
32
|
-
### WebSocket интеграция
|
|
33
|
-
|
|
34
|
-
Модуль использует глобальный WebSocket класс из `@martyrs/src/modules/globals/views/classes/globals.websocket.js`:
|
|
35
|
-
|
|
36
|
-
- Подключение: `globalWebSocket.connect(userId)`
|
|
37
|
-
- Подписка на модуль: `globalWebSocket.subscribeModule('chat')`
|
|
38
|
-
- Отправка сообщений: `globalWebSocket.send({ type: 'message', module: 'chat', ... })`
|
|
39
|
-
|
|
40
|
-
### Store (chat.store.js)
|
|
41
|
-
|
|
42
|
-
Управляет состоянием чата на клиенте:
|
|
43
|
-
- `state.messages` - массив сообщений текущего чата
|
|
44
|
-
- `state.currentChatId` - ID активного чата
|
|
45
|
-
- `state.username` - имя текущего пользователя
|
|
46
|
-
|
|
47
|
-
Основные методы:
|
|
48
|
-
- `connectWebSocket(userId)` - подключение к WebSocket
|
|
49
|
-
- `setCurrentChat(chatId)` - переключение чата и загрузка истории
|
|
50
|
-
- `addMessage(message)` - отправка нового сообщения
|
|
51
|
-
|
|
52
|
-
### Серверные обработчики
|
|
53
|
-
|
|
54
|
-
WebSocket обработчики регистрируются через `wss.registerModule('chat', handler)`:
|
|
55
|
-
|
|
56
|
-
1. `joinChat` - присоединение к чату (добавление chatId в ws.activeChats)
|
|
57
|
-
2. `message` - обработка входящего сообщения:
|
|
58
|
-
- Сохранение в БД
|
|
59
|
-
- Рассылка всем участникам чата через `broadcastToModuleWithFilter`
|
|
60
|
-
|
|
61
|
-
REST API:
|
|
62
|
-
- `GET /messages/:chatId` - получение истории сообщений
|
|
63
|
-
|
|
64
|
-
## Модель данных
|
|
65
|
-
|
|
66
|
-
```javascript
|
|
67
|
-
ChatMessageSchema = {
|
|
68
|
-
username: String, // Имя отправителя
|
|
69
|
-
chatId: String, // ID чата
|
|
70
|
-
text: String, // Текст сообщения
|
|
71
|
-
createdAt: Date // Время создания (автоматически)
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Проблемы и TODO
|
|
76
|
-
|
|
77
|
-
### Критические проблемы
|
|
78
|
-
|
|
79
|
-
1. **Нет авторизации** в WebSocket обработчиках
|
|
80
|
-
- Любой может отправлять сообщения от имени любого пользователя
|
|
81
|
-
- Нет проверки прав доступа к чату
|
|
82
|
-
|
|
83
|
-
3. **Отсутствует валидация данных**
|
|
84
|
-
- Нет проверки обязательных полей
|
|
85
|
-
- Нет санитизации входящих данных
|
|
86
|
-
|
|
87
|
-
### Улучшения
|
|
88
|
-
|
|
89
|
-
1. **Обработка ошибок**
|
|
90
|
-
- Добавить try/catch в компоненты
|
|
91
|
-
- Показывать уведомления об ошибках пользователю
|
|
92
|
-
|
|
93
|
-
2. **Оптимизация**
|
|
94
|
-
- Пагинация для истории сообщений
|
|
95
|
-
- Виртуальный скроллинг для больших чатов
|
|
96
|
-
|
|
97
|
-
3. **Функциональность**
|
|
98
|
-
- Индикатор набора текста
|
|
99
|
-
- Статусы доставки сообщений
|
|
100
|
-
- Поддержка файлов/изображений
|
|
101
|
-
- Уведомления о новых сообщениях
|
|
102
|
-
|
|
103
|
-
## Использование
|
|
104
|
-
|
|
105
|
-
### Инициализация на клиенте
|
|
106
|
-
|
|
107
|
-
```javascript
|
|
108
|
-
import ModuleChats from '@martyrs/src/modules/chats/chats.client.js';
|
|
109
|
-
|
|
110
|
-
// В главном приложении
|
|
111
|
-
ModuleChats.initialize(app, store, router);
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Использование в компоненте
|
|
115
|
-
|
|
116
|
-
```vue
|
|
117
|
-
<ChatPage
|
|
118
|
-
:username="currentUser.name"
|
|
119
|
-
:user="currentUser.id"
|
|
120
|
-
:chatID="selectedChatId"
|
|
121
|
-
/>
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Инициализация на сервере
|
|
125
|
-
|
|
126
|
-
```javascript
|
|
127
|
-
import { initialize } from '@martyrs/src/modules/chats/chats.server.js';
|
|
128
|
-
|
|
129
|
-
// При старте сервера
|
|
130
|
-
initialize(app, db, wss, origins, publicPath);
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Зависимости
|
|
134
|
-
|
|
135
|
-
- `globals.websocket.js` - глобальный WebSocket класс
|
|
136
|
-
- `auth/controllers/middlewares` - middleware для авторизации (не используется)
|
|
137
|
-
- `globals/controllers/utils/mailing.js` - отправка уведомлений (импортирован, но не используется)
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
class GlobalWebSocket {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.socket = null;
|
|
4
|
-
this.isConnected = false;
|
|
5
|
-
this.reconnectAttempts = 0;
|
|
6
|
-
this.maxReconnectAttempts = 5;
|
|
7
|
-
this.reconnectDelay = 3000;
|
|
8
|
-
this.baseUrl = null;
|
|
9
|
-
this.pingInterval = null;
|
|
10
|
-
this.pingIntervalTime = 30000;
|
|
11
|
-
this.listeners = {};
|
|
12
|
-
this.userId = null;
|
|
13
|
-
this.connectPromise = null;
|
|
14
|
-
this.subscribedModules = new Set(); // <--- ключевое изменение
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
initialize(options = {}) {
|
|
18
|
-
this.maxReconnectAttempts = options.maxReconnectAttempts || this.maxReconnectAttempts;
|
|
19
|
-
this.reconnectDelay = options.reconnectDelay || this.reconnectDelay;
|
|
20
|
-
this.baseUrl = options.wsUrl || this._getDefaultWsUrl();
|
|
21
|
-
this.pingIntervalTime = options.pingInterval || this.pingIntervalTime;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_getDefaultWsUrl() {
|
|
25
|
-
if (typeof window === 'undefined') return '/api/ws';
|
|
26
|
-
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
27
|
-
const host = window.location.host;
|
|
28
|
-
return `${protocol}//${host}/api/ws`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
connect(userId) {
|
|
32
|
-
if (typeof window === 'undefined') return Promise.resolve(false);
|
|
33
|
-
this.userId = userId;
|
|
34
|
-
|
|
35
|
-
if (this.isConnected && this.socket?.readyState === WebSocket.OPEN) {
|
|
36
|
-
return Promise.resolve(this.socket);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
this.connectPromise = new Promise((resolve, reject) => {
|
|
40
|
-
this.disconnect();
|
|
41
|
-
|
|
42
|
-
const wsUrl = userId ? `${this.baseUrl}?userId=${encodeURIComponent(userId)}` : this.baseUrl;
|
|
43
|
-
this.socket = new WebSocket(wsUrl);
|
|
44
|
-
|
|
45
|
-
this.socket.onopen = () => {
|
|
46
|
-
this._handleOpen();
|
|
47
|
-
resolve(this.socket);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
this.socket.onmessage = this._handleMessage.bind(this);
|
|
51
|
-
this.socket.onerror = err => {
|
|
52
|
-
this._handleError(err);
|
|
53
|
-
reject(err);
|
|
54
|
-
};
|
|
55
|
-
this.socket.onclose = this._handleClose.bind(this);
|
|
56
|
-
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
if (!this.isConnected) {
|
|
59
|
-
reject(new Error('WebSocket connection timeout'));
|
|
60
|
-
}
|
|
61
|
-
}, 10000);
|
|
62
|
-
}).finally(() => {
|
|
63
|
-
this.connectPromise = null;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
return this.connectPromise;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
disconnect() {
|
|
70
|
-
if (typeof window === 'undefined') return;
|
|
71
|
-
|
|
72
|
-
if (this.socket) {
|
|
73
|
-
this.socket.onopen = null;
|
|
74
|
-
this.socket.onmessage = null;
|
|
75
|
-
this.socket.onerror = null;
|
|
76
|
-
this.socket.onclose = null;
|
|
77
|
-
if (this.socket.readyState === WebSocket.OPEN || this.socket.readyState === WebSocket.CONNECTING) {
|
|
78
|
-
this.socket.close();
|
|
79
|
-
}
|
|
80
|
-
this.socket = null;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (this.pingInterval) {
|
|
84
|
-
clearInterval(this.pingInterval);
|
|
85
|
-
this.pingInterval = null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
this.isConnected = false;
|
|
89
|
-
this.userId = null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async send(data) {
|
|
93
|
-
if (!this.socket || this.socket.readyState !== WebSocket.OPEN) {
|
|
94
|
-
console.error('Cannot send message: WebSocket is not connected');
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
try {
|
|
99
|
-
const msg = typeof data === 'string' ? data : JSON.stringify(data);
|
|
100
|
-
this.socket.send(msg);
|
|
101
|
-
return true;
|
|
102
|
-
} catch (err) {
|
|
103
|
-
console.error('Error sending message:', err);
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
addEventListener(eventType, callback, options = {}) {
|
|
109
|
-
const listenerId = `${options.module || 'global'}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
110
|
-
if (!this.listeners[eventType]) this.listeners[eventType] = {};
|
|
111
|
-
this.listeners[eventType][listenerId] = callback;
|
|
112
|
-
return listenerId;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
removeEventListener(eventType, listenerId) {
|
|
116
|
-
if (this.listeners[eventType]?.[listenerId]) {
|
|
117
|
-
delete this.listeners[eventType][listenerId];
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
removeModuleListeners(moduleName) {
|
|
122
|
-
Object.keys(this.listeners).forEach(eventType => {
|
|
123
|
-
Object.keys(this.listeners[eventType]).forEach(listenerId => {
|
|
124
|
-
if (listenerId.startsWith(`${moduleName}_`)) {
|
|
125
|
-
delete this.listeners[eventType][listenerId];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
async subscribeModule(moduleName) {
|
|
132
|
-
if (!moduleName || this.subscribedModules.has(moduleName)) return;
|
|
133
|
-
const success = await this.send({ type: 'subscribe', module: moduleName });
|
|
134
|
-
if (success) {
|
|
135
|
-
this.subscribedModules.add(moduleName);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
_resubscribeAllModules() {
|
|
140
|
-
for (const moduleName of this.subscribedModules) {
|
|
141
|
-
this.send({ type: 'subscribe', module: moduleName });
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
_handleOpen() {
|
|
146
|
-
this.isConnected = true;
|
|
147
|
-
this.reconnectAttempts = 0;
|
|
148
|
-
|
|
149
|
-
this.pingInterval = setInterval(() => {
|
|
150
|
-
if (this.socket?.readyState === WebSocket.OPEN) {
|
|
151
|
-
this.socket.send(JSON.stringify({ type: 'ping' }));
|
|
152
|
-
}
|
|
153
|
-
}, this.pingIntervalTime);
|
|
154
|
-
|
|
155
|
-
this._resubscribeAllModules(); // <--- ВАЖНО
|
|
156
|
-
this._notifyListeners('open', { isConnected: true });
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
_handleMessage(event) {
|
|
160
|
-
try {
|
|
161
|
-
const data = JSON.parse(event.data);
|
|
162
|
-
this._notifyListeners('message', data);
|
|
163
|
-
if (data.type) {
|
|
164
|
-
this._notifyListeners(data.type, data);
|
|
165
|
-
}
|
|
166
|
-
} catch (err) {
|
|
167
|
-
console.error('WebSocket message error:', err);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
_handleError(error) {
|
|
172
|
-
console.error('WebSocket error:', error);
|
|
173
|
-
this._notifyListeners('error', { error });
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
_handleClose(event) {
|
|
177
|
-
this.isConnected = false;
|
|
178
|
-
if (this.pingInterval) {
|
|
179
|
-
clearInterval(this.pingInterval);
|
|
180
|
-
this.pingInterval = null;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
this._notifyListeners('close', { code: event.code, reason: event.reason });
|
|
184
|
-
|
|
185
|
-
if (event.code !== 1000 && this.userId && this.reconnectAttempts < this.maxReconnectAttempts) {
|
|
186
|
-
this.reconnectAttempts++;
|
|
187
|
-
const delay = this.reconnectDelay * this.reconnectAttempts;
|
|
188
|
-
setTimeout(() => {
|
|
189
|
-
this.connect(this.userId).catch(err => {
|
|
190
|
-
console.error('Reconnection failed:', err);
|
|
191
|
-
});
|
|
192
|
-
}, delay);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
_notifyListeners(eventType, data) {
|
|
197
|
-
Object.values(this.listeners[eventType] || {}).forEach(fn => {
|
|
198
|
-
try {
|
|
199
|
-
fn(data);
|
|
200
|
-
} catch (err) {
|
|
201
|
-
console.error(`Listener for ${eventType} failed:`, err);
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
isSocketConnected() {
|
|
207
|
-
return this.isConnected && this.socket?.readyState === WebSocket.OPEN;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const globalWebSocket = new GlobalWebSocket();
|
|
212
|
-
export default globalWebSocket;
|