@ozdao/martyrs 0.2.564 → 0.2.565
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/abac-BPl9Bmf9.js +1527 -0
- package/dist/builder.js +51 -39
- package/dist/{common.schema-GFSlNJo7.js → common.schema-DswiUXKB.js} +1 -1
- package/dist/community.server.js +48 -9
- package/dist/core.server.js +6 -4
- package/dist/{crud-C7FSTUes.js → crud-q1ye5IhV.js} +7 -7
- package/dist/events.server.js +3 -3
- package/dist/gallery.server.js +2 -2
- package/dist/inventory.server.js +4 -6
- package/dist/{main-CmjWiDVF.js → main-B9o1iBAZ.js} +1279 -1287
- package/dist/marketplace.server.js +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +36 -45
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +3 -4
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.js → SelectMulti.vue2.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.js +6 -3
- package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/auth.client.js +10 -7
- package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- 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 +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +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.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +13 -13
- 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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js +116 -0
- package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/router/users.router.js +180 -0
- package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -0
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +4 -4
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +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.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/martyrs/src/modules/core/locales/en.js +45 -0
- package/dist/martyrs/src/modules/core/locales/en.js.map +1 -1
- package/dist/martyrs/src/modules/core/locales/ru.js +45 -0
- package/dist/martyrs/src/modules/core/locales/ru.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/classes/i18n.manager.js +9 -0
- package/dist/martyrs/src/modules/core/views/classes/i18n.manager.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +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 +2 -2
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js +1 -2
- package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/router/addRoutes.js +6 -1
- package/dist/martyrs/src/modules/core/views/router/addRoutes.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 +4 -4
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
- 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 +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.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 +3 -3
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +4 -4
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +3 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +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.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +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 +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +15 -2
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +10 -7
- 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 +7 -6
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +11 -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 +4 -4
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +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.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +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.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 +11 -8
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +211 -61
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +4 -4
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.js +11 -12
- package/dist/notifications.server.js +0 -3
- package/dist/orders.server.js +5 -6
- package/dist/organizations.server.js +9 -10
- package/dist/products.server.js +27 -26
- package/dist/{queryProcessor-CBQgZycY.js → queryProcessor-C_5Iipam.js} +4 -1
- package/dist/rents.server.js +2 -3
- package/dist/spots.server.js +1 -1
- package/dist/style.css +38 -23
- package/dist/{web-cNKIl_cL.js → web-BF3ijvEr.js} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.rspack.dev.js +4 -3
- package/src/builder/rspack/rspack.config.api.js +15 -4
- package/src/builder/rspack/rspack.config.base.js +3 -3
- package/src/builder/rspack/rspack.config.ssr.client.js +28 -28
- package/src/builder/templates/page.js +2 -2
- package/src/components/Button/Button.vue +50 -37
- package/src/components/FieldPhone/FieldPhone.vue +1 -1
- package/src/components/Loader/Loader.vue +1 -1
- package/src/components/Tree/Tree.vue +6 -3
- package/src/modules/PROCESS.md +0 -0
- package/src/modules/TASKS.MD +17 -0
- package/src/modules/auth/auth.client.js +11 -7
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -1
- package/src/modules/auth/views/router/auth.router.js +94 -0
- package/src/modules/auth/views/router/users.router.js +153 -0
- package/src/modules/backoffice/components/partials/Sidebar.vue +7 -7
- package/src/modules/community/community.server.js +8 -0
- package/src/modules/community/policies/blog.policies.js +55 -0
- package/src/modules/community/routes/blog.routes.js +1 -1
- package/src/modules/community/routes/comments.routes.js +1 -1
- package/src/modules/community/routes/reactions.routes.js +1 -4
- package/src/modules/core/controllers/classes/abac/abac.adapter.express.js +206 -124
- package/src/modules/core/controllers/classes/abac/abac.adapter.ws.js +203 -50
- package/src/modules/core/controllers/classes/abac/abac.core.js +127 -36
- package/src/modules/core/controllers/classes/abac/abac.fields.js +144 -179
- package/src/modules/core/controllers/classes/abac/abac.js +201 -10
- package/src/modules/core/controllers/classes/abac/abac.policies.js +147 -57
- package/src/modules/core/controllers/classes/crud/crud.policies.js +5 -5
- package/src/modules/core/controllers/policies/core.policies.js +5 -2
- package/src/modules/core/controllers/utils/queryProcessor.js +4 -1
- package/src/modules/core/core.server.js +1 -0
- package/src/modules/core/locales/en.js +45 -0
- package/src/modules/core/locales/ru.js +45 -0
- package/src/modules/core/models/schemas/common.schema.js +1 -1
- package/src/modules/core/views/classes/i18n.manager.js +13 -0
- package/src/modules/core/views/components/sections/filters/FilterPrice.vue +81 -0
- package/src/modules/core/views/mixins/mixins.js +1 -2
- package/src/modules/core/views/router/addRoutes.js +6 -1
- package/src/modules/events/routes/events.routes.js +1 -1
- package/src/modules/inventory/components/pages/InventoryEdit.vue +3 -3
- package/src/modules/inventory/policies/inventory.policies.js +1 -1
- package/src/modules/inventory/routes/inventory.routes.js +1 -1
- package/src/modules/marketplace/marketplace.router.js +66 -0
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +363 -0
- package/src/modules/marketplace/views/components/pages/Catalog.vue +73 -0
- package/src/modules/music/controllers/stream.controller.js +1 -1
- package/src/modules/music/music.server.js +1 -1
- package/src/modules/music/policies/music.policies.js +3 -2
- package/src/modules/music/router/library.router.js +26 -0
- package/src/modules/music/router/music.router.js +176 -0
- package/src/modules/notifications/components/elements/NotificationBadge.vue +5 -6
- package/src/modules/notifications/notifications.server.js +1 -3
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +5 -0
- package/src/modules/orders/orders.server.js +0 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +2 -2
- package/src/modules/organizations/policies/organizations.policies.js +12 -6
- package/src/modules/organizations/routes/organizations.routes.js +1 -3
- package/src/modules/products/components/blocks/CardCategory.vue +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +16 -2
- package/src/modules/products/components/pages/Categories.vue +9 -6
- package/src/modules/products/components/pages/CategoryEdit.vue +8 -4
- package/src/modules/products/components/pages/Product.vue +11 -5
- package/src/modules/products/components/sections/SectionProduct.vue +11 -7
- package/src/modules/products/controllers/categories.controller.js +32 -27
- package/src/modules/products/routes/categories.routes.js +1 -1
- package/src/modules/rents/controllers/routes/rents.routes.js +1 -1
- package/src/modules/rents/views/components/pages/RentsEdit.vue +208 -49
- package/src/modules/spots/components/pages/Map.vue +2 -2
- package/dist/abac-DYoheWuc.js +0 -1031
- package/dist/core.abac-DUPBnlk6.js +0 -298
- package/dist/core.logger-C3q8A9dl.js +0 -51
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Field/Field.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/auth.router.js +0 -342
- package/dist/martyrs/src/modules/auth/auth.router.js.map +0 -1
- package/src/modules/auth/auth.router.js +0 -262
- package/src/modules/core/controllers/classes/abac/v2/abac-core-fixed.js +0 -313
- package/src/modules/core/controllers/classes/abac/v2/abac-express-fixed.js +0 -276
- package/src/modules/core/controllers/classes/abac/v2/abac-fields-fixed.js +0 -425
- package/src/modules/core/controllers/classes/abac/v2/abac-main-fixed.js +0 -295
- package/src/modules/core/controllers/classes/abac/v2/abac-policies-fixed.js +0 -316
- package/src/modules/core/controllers/classes/abac/v2/abac-ws-fixed.js +0 -237
- package/src/modules/core/controllers/classes/core.abac.js +0 -310
- package/src/modules/core/controllers/classes/core.crud.js +0 -89
- package/src/modules/governance/reactcode/eslint.config.js +0 -28
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cols-2-1_3 z-index-3 pos-relative radius-big">
|
|
3
|
+
|
|
4
|
+
<div class="o-y-scroll br-r br-solid br-light pd-medium z-index-2 desktop-only h-100 pos-relative">
|
|
5
|
+
<div class="w-100 o-y-scroll h-100">
|
|
6
|
+
<!-- Categories -->
|
|
7
|
+
<div class="mn-b-medium" v-if="currentCategories.length > 0">
|
|
8
|
+
<h4 class="mn-b-small">
|
|
9
|
+
{{ route.params.categoryPath ? 'Subcategories' : 'Categories' }}
|
|
10
|
+
</h4>
|
|
11
|
+
<div class="gap-micro">
|
|
12
|
+
<div
|
|
13
|
+
v-for="category in currentCategories"
|
|
14
|
+
:key="category._id"
|
|
15
|
+
@click="selectCategory(category)"
|
|
16
|
+
class="pd-small radius-small cursor-pointer hover-bg-light transition-all"
|
|
17
|
+
>
|
|
18
|
+
{{ category.name }}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- Location Filter -->
|
|
24
|
+
<Spoiler
|
|
25
|
+
class="o-hidden mn-b-medium"
|
|
26
|
+
:status="true"
|
|
27
|
+
>
|
|
28
|
+
<template #header="{ isOpen }">
|
|
29
|
+
<div class="cursor-pointer w-100 flex-v-center flex-nowrap flex">
|
|
30
|
+
<h4 class="w-100">Location</h4>
|
|
31
|
+
<div class="h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra">
|
|
32
|
+
<IconChevronBottom :class="{ 'rotate-180 mn-t-micro-negative': isOpen }" fill="rgb(var(--black))" class="i-medium"/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<template #content>
|
|
38
|
+
<div class="mn-t-small">
|
|
39
|
+
<Field
|
|
40
|
+
v-model="searchLocation"
|
|
41
|
+
placeholder="Search location..."
|
|
42
|
+
type="text"
|
|
43
|
+
class="w-100 bg-light pd-small radius-small mn-b-small"
|
|
44
|
+
/>
|
|
45
|
+
<Checkbox
|
|
46
|
+
v-for="location in locationOptions"
|
|
47
|
+
:key="location"
|
|
48
|
+
v-model:radio="selectedLocation"
|
|
49
|
+
:label="location"
|
|
50
|
+
:value="location"
|
|
51
|
+
mode="radio"
|
|
52
|
+
class="mn-b-micro"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
</Spoiler>
|
|
57
|
+
|
|
58
|
+
<!-- Delivery Options -->
|
|
59
|
+
<Spoiler
|
|
60
|
+
class="o-hidden mn-b-medium"
|
|
61
|
+
:status="true"
|
|
62
|
+
>
|
|
63
|
+
<template #header="{ isOpen }">
|
|
64
|
+
<div class="cursor-pointer w-100 flex-v-center flex-nowrap flex">
|
|
65
|
+
<h4 class="w-100">Delivery Options</h4>
|
|
66
|
+
<div class="h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra">
|
|
67
|
+
<IconChevronBottom :class="{ 'rotate-180 mn-t-micro-negative': isOpen }" fill="rgb(var(--black))" class="i-medium"/>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<template #content>
|
|
73
|
+
<div class="mn-t-small">
|
|
74
|
+
<Checkbox
|
|
75
|
+
v-for="option in deliveryOptions"
|
|
76
|
+
:key="option.value"
|
|
77
|
+
v-model:checkbox="selectedDeliveryOptions"
|
|
78
|
+
:label="option.label"
|
|
79
|
+
:value="option.value"
|
|
80
|
+
mode="checkbox"
|
|
81
|
+
class="mn-b-micro"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
</Spoiler>
|
|
86
|
+
|
|
87
|
+
<!-- Payment Options -->
|
|
88
|
+
<Spoiler
|
|
89
|
+
class="o-hidden mn-b-medium"
|
|
90
|
+
:status="true"
|
|
91
|
+
>
|
|
92
|
+
<template #header="{ isOpen }">
|
|
93
|
+
<div class="cursor-pointer w-100 flex-v-center flex-nowrap flex">
|
|
94
|
+
<h4 class="w-100">Payment Options</h4>
|
|
95
|
+
<div class="h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra">
|
|
96
|
+
<IconChevronBottom :class="{ 'rotate-180 mn-t-micro-negative': isOpen }" fill="rgb(var(--black))" class="i-medium"/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<template #content>
|
|
102
|
+
<div class="mn-t-small">
|
|
103
|
+
<Checkbox
|
|
104
|
+
v-for="option in paymentOptions"
|
|
105
|
+
:key="option.value"
|
|
106
|
+
v-model:checkbox="selectedPaymentOptions"
|
|
107
|
+
:label="option.label"
|
|
108
|
+
:value="option.value"
|
|
109
|
+
mode="checkbox"
|
|
110
|
+
class="mn-b-micro"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
</Spoiler>
|
|
115
|
+
|
|
116
|
+
<!-- Clear Filters Button -->
|
|
117
|
+
<button
|
|
118
|
+
@click="clearFilters"
|
|
119
|
+
class="bg-main w-100 button mn-t-medium"
|
|
120
|
+
>
|
|
121
|
+
Clear Filters
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<!-- Catalog wrapper -->
|
|
127
|
+
<div class="pd-thin">
|
|
128
|
+
<header class="pd-medium radius-medium bg-light mn-b-thin">
|
|
129
|
+
<h2 class="">
|
|
130
|
+
<span class="">Weed Deliveries in </span>
|
|
131
|
+
|
|
132
|
+
<span
|
|
133
|
+
v-if="localPosition.city || localPosition.state || localPosition.country"
|
|
134
|
+
@click="a => { core.state.isOpenLocationPopup = true }"
|
|
135
|
+
class="t-main t-semi cursor-pointer "
|
|
136
|
+
>
|
|
137
|
+
<template v-if="localPosition.city">{{localPosition.city}}, </template>
|
|
138
|
+
<template v-if="localPosition.state">{{localPosition.state}}, </template>
|
|
139
|
+
<template v-if="localPosition.country">{{localPosition.country}}</template>
|
|
140
|
+
</span>
|
|
141
|
+
|
|
142
|
+
<span v-else @click="a => { core.state.isOpenLocationPopup = true }" class="t-main t-semi cursor-pointer">The World</span>
|
|
143
|
+
</h2>
|
|
144
|
+
</header>
|
|
145
|
+
|
|
146
|
+
<div class="rows-1">
|
|
147
|
+
<router-view v-slot="{ Component, route }">
|
|
148
|
+
<component ref="page" :key="route" :localPosition="localPosition" :is="Component" />
|
|
149
|
+
</router-view>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</template>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<script setup="props">
|
|
157
|
+
// Import libs
|
|
158
|
+
import { computed, onMounted, watch, ref } from 'vue'
|
|
159
|
+
import { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'
|
|
160
|
+
import { useI18n } from 'vue-i18n'
|
|
161
|
+
|
|
162
|
+
import Spoiler from "@martyrs/src/components/Spoiler/Spoiler.vue"
|
|
163
|
+
import Field from "@martyrs/src/components/Field/Field.vue"
|
|
164
|
+
import Checkbox from "@martyrs/src/components/Checkbox/Checkbox.vue"
|
|
165
|
+
import IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'
|
|
166
|
+
|
|
167
|
+
import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'
|
|
168
|
+
import * as categories from '@martyrs/src/modules/products/store/categories.js';
|
|
169
|
+
const core = useStore()
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
import * as marketplace from '../../store/marketplace';
|
|
173
|
+
|
|
174
|
+
// Accessing router and store
|
|
175
|
+
const route = useRoute()
|
|
176
|
+
const router = useRouter()
|
|
177
|
+
|
|
178
|
+
const localPosition = ref({
|
|
179
|
+
city: null,
|
|
180
|
+
state: null,
|
|
181
|
+
country: null
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const desktopFilters = ref(null)
|
|
185
|
+
|
|
186
|
+
// Categories
|
|
187
|
+
const currentCategories = ref([]);
|
|
188
|
+
const searchLocation = ref('');
|
|
189
|
+
const selectedLocation = ref('All');
|
|
190
|
+
const locationOptions = ref(['All', 'Phuket', 'Bangkok', 'Chiang Mai', 'Pattaya']);
|
|
191
|
+
|
|
192
|
+
// Delivery options
|
|
193
|
+
const deliveryOptions = ref([
|
|
194
|
+
{ label: 'Pickup', value: 'pickup' },
|
|
195
|
+
{ label: 'Delivery', value: 'delivery' },
|
|
196
|
+
{ label: 'Dine-in', value: 'dinein' }
|
|
197
|
+
]);
|
|
198
|
+
const selectedDeliveryOptions = ref([]);
|
|
199
|
+
|
|
200
|
+
// Payment options
|
|
201
|
+
const paymentOptions = ref([
|
|
202
|
+
{ label: 'Cash', value: 'cash' },
|
|
203
|
+
{ label: 'Card', value: 'card' },
|
|
204
|
+
{ label: 'Crypto', value: 'crypto' },
|
|
205
|
+
{ label: 'Bank Transfer', value: 'transfer' }
|
|
206
|
+
]);
|
|
207
|
+
const selectedPaymentOptions = ref([]);
|
|
208
|
+
|
|
209
|
+
const selectCategory = (category) => {
|
|
210
|
+
// Implementation for category selection
|
|
211
|
+
console.log('Category selected:', category);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const clearFilters = () => {
|
|
215
|
+
selectedLocation.value = 'All';
|
|
216
|
+
selectedDeliveryOptions.value = [];
|
|
217
|
+
selectedPaymentOptions.value = [];
|
|
218
|
+
searchLocation.value = '';
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
function denormalizeUrlParam(param) {
|
|
222
|
+
return param
|
|
223
|
+
.replace(/-/g, ' ') // Замена дефисов на пробелы
|
|
224
|
+
.replace(/\b\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function normalizeUrlParam(param) {
|
|
228
|
+
return param
|
|
229
|
+
.toLowerCase()
|
|
230
|
+
.replace(/ /g, '-')
|
|
231
|
+
.replace(/[^a-z0-9-]/g, '');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (route.params) {
|
|
235
|
+
// Загружаем новые значения из параметров маршрута в состояние
|
|
236
|
+
let newState = {
|
|
237
|
+
country: denormalizeUrlParam(route.params.country),
|
|
238
|
+
state: denormalizeUrlParam(route.params.state),
|
|
239
|
+
city: denormalizeUrlParam(route.params.city),
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
// Обновляем глобальное состояние
|
|
243
|
+
localPosition.value = newState;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (route.query) {
|
|
247
|
+
const query = route.query;
|
|
248
|
+
|
|
249
|
+
marketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];
|
|
250
|
+
marketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];
|
|
251
|
+
marketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam
|
|
255
|
+
if (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder
|
|
256
|
+
|
|
257
|
+
onMounted(async () => {
|
|
258
|
+
let options = {
|
|
259
|
+
status: 'published',
|
|
260
|
+
rootOnly: true
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
let categoriesFilter = await categories.actions.read(options);
|
|
264
|
+
|
|
265
|
+
categoriesFilter = categoriesFilter.map(category => ({
|
|
266
|
+
value: category._id,
|
|
267
|
+
label: category.name
|
|
268
|
+
}));
|
|
269
|
+
|
|
270
|
+
const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');
|
|
271
|
+
|
|
272
|
+
const categoryOption = {
|
|
273
|
+
title: 'Categories',
|
|
274
|
+
value: 'categories',
|
|
275
|
+
options: categoriesFilter
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
if (index !== -1) {
|
|
279
|
+
marketplace.state.filter.options[index] = categoryOption;
|
|
280
|
+
} else {
|
|
281
|
+
marketplace.state.filter.options.unshift(categoryOption);
|
|
282
|
+
}
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {
|
|
286
|
+
let query = { ...route.query}
|
|
287
|
+
|
|
288
|
+
query.sortParam = newSortValue.param
|
|
289
|
+
query.sortOrder = newSortValue.order
|
|
290
|
+
|
|
291
|
+
// replace the current route
|
|
292
|
+
router.replace({ query });
|
|
293
|
+
}, { deep: true });
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
watch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {
|
|
297
|
+
// Переводим фильтр в формат query
|
|
298
|
+
const query = { ...route.query };
|
|
299
|
+
|
|
300
|
+
// Удаляем старые значения фильтра из query
|
|
301
|
+
Object.keys(oldFilterValue).forEach(key => {
|
|
302
|
+
if (query[key]) {
|
|
303
|
+
delete query[key];
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
// Добавляем новые значения фильтра в query
|
|
308
|
+
const newQueryValues = Object.fromEntries(
|
|
309
|
+
Object.entries(newFilterValue)
|
|
310
|
+
.filter(([key, value]) => Array.isArray(value) && value.length > 0)
|
|
311
|
+
.map(([key, value]) => [key, value.join(',')])
|
|
312
|
+
);
|
|
313
|
+
|
|
314
|
+
delete query.options;
|
|
315
|
+
Object.assign(query, newQueryValues);
|
|
316
|
+
|
|
317
|
+
// Обновляем маршрут с новым query
|
|
318
|
+
router.replace({ query });
|
|
319
|
+
}, { deep: true })
|
|
320
|
+
|
|
321
|
+
// watch(() => core.state.position, (newPosition) => {
|
|
322
|
+
// // get the current route
|
|
323
|
+
// const currentRoute = { ...router.currentRoute.value };
|
|
324
|
+
|
|
325
|
+
// // create new parameters based on globals state position
|
|
326
|
+
// let newParams = {
|
|
327
|
+
// country: normalizeUrlParam(newPosition.country),
|
|
328
|
+
// state: normalizeUrlParam(newPosition.state),
|
|
329
|
+
// city: normalizeUrlParam(newPosition.city),
|
|
330
|
+
// };
|
|
331
|
+
|
|
332
|
+
// // update route params
|
|
333
|
+
// currentRoute.params = newParams;
|
|
334
|
+
|
|
335
|
+
// // replace the current route
|
|
336
|
+
// router.replace(currentRoute);
|
|
337
|
+
// }, { deep: true });
|
|
338
|
+
|
|
339
|
+
const text = {
|
|
340
|
+
locale: 'en',
|
|
341
|
+
messages: {
|
|
342
|
+
en: {
|
|
343
|
+
meta: {
|
|
344
|
+
title: "Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",
|
|
345
|
+
description: "Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.",
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
ru: {
|
|
349
|
+
meta: {
|
|
350
|
+
title: "Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",
|
|
351
|
+
description: "Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.",
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const { t } = useI18n(text)
|
|
358
|
+
</script>
|
|
359
|
+
|
|
360
|
+
<style lang="scss">
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Feed
|
|
3
|
+
v-model:sort="marketplace.state.sort"
|
|
4
|
+
v-model:filter="marketplace.state.filter"
|
|
5
|
+
:search="true"
|
|
6
|
+
:showLoadMore="false"
|
|
7
|
+
:states="{
|
|
8
|
+
empty: {
|
|
9
|
+
title: 'No Shops Found',
|
|
10
|
+
description: 'Currently, there are no shops.'
|
|
11
|
+
},
|
|
12
|
+
}"
|
|
13
|
+
:store="{
|
|
14
|
+
read: (options) => organization.actions.read(options)
|
|
15
|
+
}"
|
|
16
|
+
:options="{
|
|
17
|
+
country: route.params.country,
|
|
18
|
+
state: route.params.state,
|
|
19
|
+
city: route.params.city,
|
|
20
|
+
categories: route.query.categories,
|
|
21
|
+
prices: route.query.prices,
|
|
22
|
+
delivery: route.query.delivery,
|
|
23
|
+
location: core.state.position?.location,
|
|
24
|
+
lookup: ['products','spots'],
|
|
25
|
+
contain: ['products'],
|
|
26
|
+
}"
|
|
27
|
+
v-slot="{
|
|
28
|
+
items
|
|
29
|
+
}"
|
|
30
|
+
class="rows-1 gap-thin"
|
|
31
|
+
>
|
|
32
|
+
<CardOrganization
|
|
33
|
+
v-for="organization in items"
|
|
34
|
+
:key="organization._id"
|
|
35
|
+
:organization="organization"
|
|
36
|
+
:showRating="true"
|
|
37
|
+
:showFollowers="false"
|
|
38
|
+
:showProducts="true"
|
|
39
|
+
class="bg-light w-100 o-hidden radius-medium pd-small "
|
|
40
|
+
/>
|
|
41
|
+
</Feed>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script setup>
|
|
45
|
+
import { computed,reactive,ref, onMounted,watch } from 'vue'
|
|
46
|
+
import { useRoute } from 'vue-router'
|
|
47
|
+
|
|
48
|
+
import Feed from '@martyrs/src/components/Feed/Feed.vue'
|
|
49
|
+
|
|
50
|
+
import * as organization from '@martyrs/src/modules/organizations/store/organizations.js'
|
|
51
|
+
import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'
|
|
52
|
+
const core = useStore()
|
|
53
|
+
|
|
54
|
+
import CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'
|
|
55
|
+
|
|
56
|
+
import * as marketplace from '../../store/marketplace';
|
|
57
|
+
|
|
58
|
+
const route = useRoute()
|
|
59
|
+
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
// Добавление Google Analytics event на открытие маркетплейса
|
|
62
|
+
if (typeof gtag === 'function') {
|
|
63
|
+
gtag('event', 'view_marketplace', {
|
|
64
|
+
location: core.state.position?.location || 'unknown',
|
|
65
|
+
page_path: window.location.pathname,
|
|
66
|
+
marketplace_id: route.params.id || 'main',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style lang="scss">
|
|
73
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import coreabac from '@martyrs/src/modules/core/controllers/classes/
|
|
1
|
+
import coreabac from '@martyrs/src/modules/core/controllers/classes/abac/abac.js';
|
|
2
2
|
import Logger from '@martyrs/src/modules/core/controllers/classes/core.logger.js';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import path from 'path';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import coreabac from '@martyrs/src/modules/core/controllers/classes/
|
|
1
|
+
import coreabac from '@martyrs/src/modules/core/controllers/classes/abac/abac.js';
|
|
2
2
|
import Cache from '@martyrs/src/modules/core/controllers/classes/core.cache.js';
|
|
3
3
|
import Logger from '@martyrs/src/modules/core/controllers/classes/core.logger.js';
|
|
4
4
|
|
|
@@ -10,8 +10,9 @@ export default (function initializeMusicPolicies(abacAccessControl) {
|
|
|
10
10
|
// For create actions, verify ownership
|
|
11
11
|
if (action === 'create') {
|
|
12
12
|
// Ensure that creator.target matches the authenticated user
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const creator = context.data.body?.creator;
|
|
14
|
+
if (creator?.target) {
|
|
15
|
+
return creator.target.toString() === user.toString();
|
|
15
16
|
}
|
|
16
17
|
return false;
|
|
17
18
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function getRoutes(options = {}) {
|
|
2
|
+
const route = options.route || 'Home';
|
|
3
|
+
const routes = [];
|
|
4
|
+
|
|
5
|
+
routes.push({
|
|
6
|
+
parentName: route,
|
|
7
|
+
config: {
|
|
8
|
+
basePath: 'music',
|
|
9
|
+
routes: [
|
|
10
|
+
{
|
|
11
|
+
path: 'library',
|
|
12
|
+
name: 'music-library',
|
|
13
|
+
component: () => import(/* webpackChunkName: 'music-library' */ '../components/pages/MusicLibrary.vue'),
|
|
14
|
+
meta: {
|
|
15
|
+
title: 'My Library',
|
|
16
|
+
requiresAuth: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return routes;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default { getRoutes };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
function createArtistRoutes() {
|
|
2
|
+
return [
|
|
3
|
+
{
|
|
4
|
+
path: 'artists/create',
|
|
5
|
+
name: 'artist-create',
|
|
6
|
+
component: () => import(/* webpackChunkName: 'music-artist-create' */ '../components/pages/ArtistCreate.vue'),
|
|
7
|
+
meta: {
|
|
8
|
+
title: 'Create Artist',
|
|
9
|
+
requiresAuth: true,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: 'artists/:url/edit',
|
|
14
|
+
name: 'artist-edit',
|
|
15
|
+
component: () => import(/* webpackChunkName: 'music-artist-edit' */ '../components/pages/ArtistEdit.vue'),
|
|
16
|
+
props: true,
|
|
17
|
+
meta: {
|
|
18
|
+
title: 'Edit Artist',
|
|
19
|
+
requiresAuth: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
path: 'artists/:url',
|
|
24
|
+
name: 'artist',
|
|
25
|
+
component: () => import(/* webpackChunkName: 'music-artist' */ '../components/pages/Artist.vue'),
|
|
26
|
+
props: true,
|
|
27
|
+
meta: {
|
|
28
|
+
title: 'Artist',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function createAlbumRoutes() {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
path: 'albums/create',
|
|
38
|
+
name: 'album-create',
|
|
39
|
+
component: () => import(/* webpackChunkName: 'music-album-create' */ '../components/pages/AlbumCreate.vue'),
|
|
40
|
+
meta: {
|
|
41
|
+
title: 'Create Album',
|
|
42
|
+
requiresAuth: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: 'albums/:url/edit',
|
|
47
|
+
name: 'album-edit',
|
|
48
|
+
component: () => import(/* webpackChunkName: 'music-album-edit' */ '../components/pages/AlbumEdit.vue'),
|
|
49
|
+
props: true,
|
|
50
|
+
meta: {
|
|
51
|
+
title: 'Edit Album',
|
|
52
|
+
requiresAuth: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: 'albums/:url',
|
|
57
|
+
name: 'album',
|
|
58
|
+
component: () => import(/* webpackChunkName: 'music-album' */ '../components/pages/Album.vue'),
|
|
59
|
+
props: true,
|
|
60
|
+
meta: {
|
|
61
|
+
title: 'Album',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function createTrackRoutes() {
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
path: 'tracks/create',
|
|
71
|
+
name: 'track-create',
|
|
72
|
+
component: () => import(/* webpackChunkName: 'music-track-create' */ '../components/pages/TrackCreate.vue'),
|
|
73
|
+
meta: {
|
|
74
|
+
title: 'Create Track',
|
|
75
|
+
requiresAuth: true,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: 'tracks/:url/edit',
|
|
80
|
+
name: 'track-edit',
|
|
81
|
+
component: () => import(/* webpackChunkName: 'music-track-edit' */ '../components/pages/TrackEdit.vue'),
|
|
82
|
+
props: true,
|
|
83
|
+
meta: {
|
|
84
|
+
title: 'Edit Track',
|
|
85
|
+
requiresAuth: true,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: 'tracks/:url',
|
|
90
|
+
name: 'track',
|
|
91
|
+
component: () => import(/* webpackChunkName: 'music-track' */ '../components/pages/Track.vue'),
|
|
92
|
+
props: true,
|
|
93
|
+
meta: {
|
|
94
|
+
title: 'Track',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function createPlaylistRoutes() {
|
|
101
|
+
return [
|
|
102
|
+
{
|
|
103
|
+
path: 'playlists/create',
|
|
104
|
+
name: 'playlist-create',
|
|
105
|
+
component: () => import(/* webpackChunkName: 'music-playlist-create' */ '../components/pages/PlaylistCreate.vue'),
|
|
106
|
+
meta: {
|
|
107
|
+
title: 'Create Playlist',
|
|
108
|
+
requiresAuth: true,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
path: 'playlists/:url/edit',
|
|
113
|
+
name: 'playlist-edit',
|
|
114
|
+
component: () => import(/* webpackChunkName: 'music-playlist-edit' */ '../components/pages/PlaylistEdit.vue'),
|
|
115
|
+
props: true,
|
|
116
|
+
meta: {
|
|
117
|
+
title: 'Edit Playlist',
|
|
118
|
+
requiresAuth: true,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: 'playlists/:url',
|
|
123
|
+
name: 'playlist',
|
|
124
|
+
component: () => import(/* webpackChunkName: 'music-playlist' */ '../components/pages/Playlist.vue'),
|
|
125
|
+
props: true,
|
|
126
|
+
meta: {
|
|
127
|
+
title: 'Playlist',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function buildMusicRoutes() {
|
|
134
|
+
return [
|
|
135
|
+
{
|
|
136
|
+
path: '',
|
|
137
|
+
name: 'music-home',
|
|
138
|
+
component: () => import(/* webpackChunkName: 'music-home' */ '../components/pages/MusicHome.vue'),
|
|
139
|
+
meta: {
|
|
140
|
+
title: 'Music Home',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: 'search',
|
|
145
|
+
name: 'music-search',
|
|
146
|
+
component: () => import(/* webpackChunkName: 'music-search' */ '../components/pages/SearchResults.vue'),
|
|
147
|
+
meta: {
|
|
148
|
+
title: 'Search Music',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
...createArtistRoutes(),
|
|
152
|
+
...createAlbumRoutes(),
|
|
153
|
+
...createTrackRoutes(),
|
|
154
|
+
...createPlaylistRoutes(),
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function getRoutes(options = {}) {
|
|
159
|
+
const route = options.route || 'Home';
|
|
160
|
+
const routes = [];
|
|
161
|
+
|
|
162
|
+
routes.push({
|
|
163
|
+
parentName: route,
|
|
164
|
+
config: {
|
|
165
|
+
basePath: options.basePath || 'music',
|
|
166
|
+
meta: {
|
|
167
|
+
player: options.playerComponent || (() => import(/* webpackChunkName: 'music-bottom-player' */ '../components/layouts/MusicBottomPlayer.vue')),
|
|
168
|
+
},
|
|
169
|
+
routes: buildMusicRoutes(options),
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
return routes;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export default { getRoutes };
|
|
@@ -83,17 +83,16 @@ const props = defineProps({
|
|
|
83
83
|
// Get router and notification functionality
|
|
84
84
|
const router = useRouter();
|
|
85
85
|
|
|
86
|
-
// Check if notifications module is loaded
|
|
87
|
-
const useNotifications = inject('useNotifications')
|
|
88
|
-
|
|
89
|
-
// Provide fallback values if module is not loaded
|
|
90
|
-
const { notifications, unreadCount, loading, markAllAsRead, getNotifications } = useNotifications ? useNotifications() : {
|
|
86
|
+
// Check if notifications module is loaded, provide fallback if not
|
|
87
|
+
const useNotifications = inject('useNotifications', () => ({
|
|
91
88
|
notifications: ref([]),
|
|
92
89
|
unreadCount: ref(0),
|
|
93
90
|
loading: ref(false),
|
|
94
91
|
markAllAsRead: () => {},
|
|
95
92
|
getNotifications: () => {}
|
|
96
|
-
};
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
const { notifications, unreadCount, loading, markAllAsRead, getNotifications } = useNotifications();
|
|
97
96
|
|
|
98
97
|
// Local state
|
|
99
98
|
const isOpen = ref(false);
|