@ozdao/martyrs 0.2.470 → 0.2.472
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/{Media-CR0V1zvB.js → Media-DW8RLbfM.js} +1 -1
- package/dist/{Media-C4Ges_Sd.mjs → Media-y_TX6us_.mjs} +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/chats.server.js +1 -1
- package/dist/chats.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/{index-DQqZReAr.js → index-CVXl1rB5.js} +0 -1
- package/dist/{index-DICZTQ-1.mjs → index-Df8vtZx7.mjs} +0 -1
- package/dist/{main-CsZAG5Wz.js → main-CCfQH-Dd.js} +2 -2
- package/dist/{main-CTcal9qN.mjs → main-CgmHzhq5.mjs} +74 -74
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/{node_modules/.pnpm/uuid@11.1.0 → martyrs}/node_modules/uuid/dist/esm-browser/rng.cjs +4 -4
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +15 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- 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/Skeleton/Skeleton.vue.cjs +5 -5
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js +5 -5
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.cjs → Tab.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js.map → Tab.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs +3 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.js +3 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +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/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.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/store/auth.cjs +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +10 -14
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +12 -16
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +7 -13
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +7 -13
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +6 -7
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +7 -8
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +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/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- 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/products/components/blocks/CardCategory.vue.cjs +11 -5
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +12 -6
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +34 -13
- 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 +35 -14
- 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 +20 -9
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +21 -10
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- 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 +2 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- 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/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.js +35 -2
- package/dist/notifications.server.mjs +35 -2
- package/dist/orders.server.js +3 -3
- package/dist/orders.server.mjs +3 -3
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +78 -53
- package/dist/products.server.mjs +78 -53
- package/dist/rents.server.js +1 -1
- package/dist/rents.server.mjs +1 -1
- package/dist/style.css +37 -38
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/package.json +2 -1
- package/src/components/Feed/Feed.vue +2 -7
- package/src/components/Skeleton/Skeleton.vue +4 -5
- package/src/components/Tree/Tree.vue +5 -2
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/views/store/auth.js +2 -1
- package/src/modules/globals/controllers/classes/globals.crud.js +2 -2
- package/src/modules/globals/views/classes/globals.store.js +119 -31
- package/src/modules/globals/views/components/partials/Navigation.vue +11 -10
- package/src/modules/globals/views/utils/vue-app-renderer.js +7 -16
- package/src/modules/icons/entities/IconMusic.vue +14 -0
- package/src/modules/icons/navigation/IconCheck.vue +31 -0
- package/src/modules/icons/navigation/IconHeart.vue +26 -0
- package/src/modules/icons/navigation/IconPause.vue +31 -0
- package/src/modules/icons/navigation/IconPlay.vue +17 -0
- package/src/modules/icons/navigation/IconRefresh.vue +31 -0
- package/src/modules/icons/navigation/IconShuffle.vue +31 -0
- package/src/modules/icons/navigation/IconVolume.vue +31 -0
- package/src/modules/music/components/SidebarMusic.vue +156 -0
- package/src/modules/music/components/cards/AlbumCard.vue +107 -0
- package/src/modules/music/components/cards/ArtistCard.vue +37 -0
- package/src/modules/music/components/cards/PlaylistCard.vue +100 -0
- package/src/modules/music/components/cards/TrackCard.vue +86 -0
- package/src/modules/music/components/forms/PlaylistForm.vue +156 -0
- package/src/modules/music/components/forms/SearchForm.vue +82 -0
- package/src/modules/music/components/forms/UploadForm.vue +313 -0
- package/src/modules/music/components/layouts/MusicLayout.vue +137 -0
- package/src/modules/music/components/lists/AlbumList.vue +25 -0
- package/src/modules/music/components/lists/ArtistList.vue +25 -0
- package/src/modules/music/components/lists/PlaylistList.vue +25 -0
- package/src/modules/music/components/lists/TrackList.vue +175 -0
- package/src/modules/music/components/pages/AlbumDetail.vue +265 -0
- package/src/modules/music/components/pages/ArtistDetail.vue +247 -0
- package/src/modules/music/components/pages/MusicHome.vue +177 -0
- package/src/modules/music/components/pages/MusicLibrary.vue +192 -0
- package/src/modules/music/components/pages/MusicUpload.vue +44 -0
- package/src/modules/music/components/pages/PlaylistDetail.vue +504 -0
- package/src/modules/music/components/pages/SearchResults.vue +397 -0
- package/src/modules/music/components/pages/TrackDetail.vue +143 -0
- package/src/modules/music/components/player/MusicPlayer.vue +202 -0
- package/src/modules/music/components/player/TrackProgress.vue +110 -0
- package/src/modules/music/components/player/VolumeControl.vue +98 -0
- package/src/modules/music/controllers/album.controller.js +98 -0
- package/src/modules/music/controllers/artist.controller.js +111 -0
- package/src/modules/music/controllers/genre.controller.js +71 -0
- package/src/modules/music/controllers/music.controller.js +174 -0
- package/src/modules/music/controllers/playlist.controller.js +182 -0
- package/src/modules/music/controllers/search.controller.js +103 -0
- package/src/modules/music/controllers/stream.controller.js +106 -0
- package/src/modules/music/models/album.model.js +61 -0
- package/src/modules/music/models/artist.model.js +67 -0
- package/src/modules/music/models/genre.model.js +42 -0
- package/src/modules/music/models/play-history.model.js +51 -0
- package/src/modules/music/models/playlist.model.js +69 -0
- package/src/modules/music/models/track.model.js +94 -0
- package/src/modules/music/music.client.js +186 -0
- package/src/modules/music/music.server.js +114 -0
- package/src/modules/music/policies/music.policies.js +84 -0
- package/src/modules/music/router/music.js +77 -0
- package/src/modules/music/routes/album.routes.js +62 -0
- package/src/modules/music/routes/artist.routes.js +67 -0
- package/src/modules/music/routes/genre.routes.js +60 -0
- package/src/modules/music/routes/music.routes.js +145 -0
- package/src/modules/music/routes/playlist.routes.js +99 -0
- package/src/modules/music/routes/search.routes.js +10 -0
- package/src/modules/music/routes/stream.routes.js +38 -0
- package/src/modules/music/store/albums.js +200 -0
- package/src/modules/music/store/artists.js +180 -0
- package/src/modules/music/store/player.js +397 -0
- package/src/modules/music/store/playlists.js +211 -0
- package/src/modules/music/store/search.js +126 -0
- package/src/modules/music/store/tracks.js +230 -0
- package/src/modules/music/websocket/streaming.handler.js +151 -0
- package/src/modules/notifications/controllers/notifications.controller.js +44 -1
- package/src/modules/notifications/notifications.server.js +0 -1
- package/src/modules/notifications/routes/notifications.routes.js +3 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +0 -2
- package/src/modules/products/components/blocks/CardCategory.vue +5 -4
- package/src/modules/products/components/pages/Categories.vue +38 -20
- package/src/modules/products/components/pages/CategoryEdit.vue +16 -7
- package/src/modules/products/components/pages/ProductEdit.vue +1 -0
- package/src/modules/products/controllers/categories.controller.js +155 -103
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +0 -15
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -0
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs.map +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js.map +0 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
<!-- components/pages/PlaylistDetail.vue -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="playlist-detail-page">
|
|
4
|
+
<div v-if="isLoading" class="w-100 h-25r flex-center flex">
|
|
5
|
+
<Loader />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div v-else-if="!playlist" class="t-center pd-big">
|
|
9
|
+
<h2 class="t-white">Playlist not found</h2>
|
|
10
|
+
<p class="t-grey t-medium">The playlist you're looking for doesn't exist or has been removed.</p>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div v-else>
|
|
14
|
+
<!-- Playlist Header -->
|
|
15
|
+
<div class="playlist-header mn-b-medium flex flex-v-center gap-medium">
|
|
16
|
+
<div class="playlist-cover">
|
|
17
|
+
<Media
|
|
18
|
+
:url="playlist.coverUrl || '/assets/placeholder-playlist.jpg'"
|
|
19
|
+
class="w-15r h-15r object-fit-cover shadow-lg radius-small"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="playlist-info">
|
|
24
|
+
<div class="t-small t-uppercase t-white">Playlist</div>
|
|
25
|
+
<h1 class="t-white">{{ playlist.title }}</h1>
|
|
26
|
+
|
|
27
|
+
<div v-if="playlist.description" class="playlist-description t-grey mn-t-thin mn-b-small">
|
|
28
|
+
{{ playlist.description }}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="playlist-meta flex flex-v-center">
|
|
32
|
+
<router-link
|
|
33
|
+
v-if="playlist.owner && playlist.owner.target"
|
|
34
|
+
:to="getOwnerProfileLink(playlist.owner)"
|
|
35
|
+
class="t-white t-medium hover-t-main"
|
|
36
|
+
>
|
|
37
|
+
{{ getPlaylistOwnerName(playlist) }}
|
|
38
|
+
</router-link>
|
|
39
|
+
<span v-else class="t-white t-medium">{{ getPlaylistOwnerName(playlist) }}</span>
|
|
40
|
+
|
|
41
|
+
<span class="t-grey mn-l-small mn-r-small">•</span>
|
|
42
|
+
|
|
43
|
+
<span class="t-grey">{{ playlistTracks.length }} {{ playlistTracks.length === 1 ? 'song' : 'songs' }}</span>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<!-- Playlist Actions -->
|
|
49
|
+
<div class="playlist-actions mn-b-medium flex flex-v-center gap-small">
|
|
50
|
+
<Button
|
|
51
|
+
@click="playPlaylist"
|
|
52
|
+
class="play-button bg-main radius-round pd-small flex-v-center flex gap-small hover-scale-1"
|
|
53
|
+
:showLoader="false"
|
|
54
|
+
:showSucces="false"
|
|
55
|
+
>
|
|
56
|
+
<IconPlay class="i-small" fill="rgb(var(--black))"/>
|
|
57
|
+
<span class="t-black t-medium">Play</span>
|
|
58
|
+
</Button>
|
|
59
|
+
|
|
60
|
+
<Button
|
|
61
|
+
@click="toggleFavorite"
|
|
62
|
+
class="bg-transparent border-none pd-zero"
|
|
63
|
+
:showLoader="false"
|
|
64
|
+
:showSucces="false"
|
|
65
|
+
>
|
|
66
|
+
<IconHeart class="i-medium" :fill="isFavorite ? 'rgb(var(--main))' : 'rgb(var(--white))'"/>
|
|
67
|
+
</Button>
|
|
68
|
+
|
|
69
|
+
<Dropdown class="pos-relative">
|
|
70
|
+
<Button
|
|
71
|
+
@click="showDropdown = !showDropdown"
|
|
72
|
+
class="bg-transparent border-none pd-zero"
|
|
73
|
+
:showLoader="false"
|
|
74
|
+
:showSucces="false"
|
|
75
|
+
>
|
|
76
|
+
<IconEllipsis class="i-medium" fill="rgb(var(--white))"/>
|
|
77
|
+
</Button>
|
|
78
|
+
|
|
79
|
+
<template #content>
|
|
80
|
+
<ul v-if="showDropdown" class="pd-small bg-dark radius-small pos-absolute pos-t-100 pos-r-0 z-index-3 w-max-15r mn-t-thin">
|
|
81
|
+
<li v-if="isOwner" class="mn-b-thin">
|
|
82
|
+
<Button
|
|
83
|
+
@click="editPlaylist"
|
|
84
|
+
class="bg-transparent border-none pd-thin t-white w-100 t-left hover-bg-dark radius-small"
|
|
85
|
+
:showLoader="false"
|
|
86
|
+
:showSucces="false"
|
|
87
|
+
>
|
|
88
|
+
<span>Edit Details</span>
|
|
89
|
+
</Button>
|
|
90
|
+
</li>
|
|
91
|
+
<li class="mn-b-thin">
|
|
92
|
+
<Button
|
|
93
|
+
@click="addToQueue"
|
|
94
|
+
class="bg-transparent border-none pd-thin t-white w-100 t-left hover-bg-dark radius-small"
|
|
95
|
+
:showLoader="false"
|
|
96
|
+
:showSucces="false"
|
|
97
|
+
>
|
|
98
|
+
<span>Add to Queue</span>
|
|
99
|
+
</Button>
|
|
100
|
+
</li>
|
|
101
|
+
<li v-if="isOwner" class="mn-b-thin">
|
|
102
|
+
<Button
|
|
103
|
+
@click="toggleCollaborative"
|
|
104
|
+
class="bg-transparent border-none pd-thin t-white w-100 t-left hover-bg-dark radius-small"
|
|
105
|
+
:showLoader="false"
|
|
106
|
+
:showSucces="false"
|
|
107
|
+
>
|
|
108
|
+
<span>{{ playlist.isCollaborative ? 'Make Private' : 'Make Collaborative' }}</span>
|
|
109
|
+
</Button>
|
|
110
|
+
</li>
|
|
111
|
+
<li v-if="isOwner" class="mn-b-thin">
|
|
112
|
+
<Button
|
|
113
|
+
@click="deletePlaylist"
|
|
114
|
+
class="bg-transparent border-none pd-thin t-fourth w-100 t-left hover-bg-dark radius-small"
|
|
115
|
+
:showLoader="false"
|
|
116
|
+
:showSucces="false"
|
|
117
|
+
>
|
|
118
|
+
<span>Delete</span>
|
|
119
|
+
</Button>
|
|
120
|
+
</li>
|
|
121
|
+
<li>
|
|
122
|
+
<Button
|
|
123
|
+
@click="copyLink"
|
|
124
|
+
class="bg-transparent border-none pd-thin t-white w-100 t-left hover-bg-dark radius-small"
|
|
125
|
+
:showLoader="false"
|
|
126
|
+
:showSucces="false"
|
|
127
|
+
>
|
|
128
|
+
<span>Copy Link</span>
|
|
129
|
+
</Button>
|
|
130
|
+
</li>
|
|
131
|
+
</ul>
|
|
132
|
+
</template>
|
|
133
|
+
</Dropdown>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<!-- Playlist Tracks -->
|
|
137
|
+
<div class="playlist-tracks">
|
|
138
|
+
<div v-if="playlistTracks.length === 0" class="empty-tracks t-center pd-big bg-dark-transp-10 radius-medium">
|
|
139
|
+
<h3 class="t-white mn-b-small">This playlist is empty</h3>
|
|
140
|
+
<p class="t-grey t-medium">Add some tracks to get started</p>
|
|
141
|
+
|
|
142
|
+
<Button
|
|
143
|
+
v-if="isOwner || isCollaborator"
|
|
144
|
+
@click="$router.push({ name: 'music-search' })"
|
|
145
|
+
class="bg-main t-white radius-small pd-small mn-t-medium hover-scale-1"
|
|
146
|
+
:showLoader="false"
|
|
147
|
+
:showSucces="false"
|
|
148
|
+
>
|
|
149
|
+
Find Tracks
|
|
150
|
+
</Button>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<TrackList
|
|
154
|
+
v-else
|
|
155
|
+
:tracks="playlistTracks"
|
|
156
|
+
:showAlbum="true"
|
|
157
|
+
:showCover="true"
|
|
158
|
+
class="bg-dark-transp-10 radius-medium o-hidden"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<!-- Edit Playlist Modal -->
|
|
163
|
+
<Popup
|
|
164
|
+
v-if="showEditModal && isOwner"
|
|
165
|
+
@close-popup="showEditModal = false"
|
|
166
|
+
class="bg-dark pd-small w-m-25r radius-medium t-white"
|
|
167
|
+
>
|
|
168
|
+
<h3 class="mn-b-medium">Edit Playlist</h3>
|
|
169
|
+
|
|
170
|
+
<form @submit.prevent="updatePlaylist">
|
|
171
|
+
<div class="form-group mn-b-medium">
|
|
172
|
+
<label for="title" class="t-white t-medium mn-b-thin d-block">Playlist Name</label>
|
|
173
|
+
<Field
|
|
174
|
+
v-model:field="editForm.title"
|
|
175
|
+
id="title"
|
|
176
|
+
type="text"
|
|
177
|
+
placeholder="Playlist Name"
|
|
178
|
+
:validation="validationErrors.title"
|
|
179
|
+
class="w-100 pd-small bg-dark-transp-25 radius-small t-white"
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<div class="form-group mn-b-medium">
|
|
184
|
+
<label for="description" class="t-white t-medium mn-b-thin d-block">Description</label>
|
|
185
|
+
<Field
|
|
186
|
+
v-model:field="editForm.description"
|
|
187
|
+
id="description"
|
|
188
|
+
type="textarea"
|
|
189
|
+
placeholder="Add an optional description"
|
|
190
|
+
class="w-100 pd-small bg-dark-transp-25 radius-small t-white"
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="form-group mn-b-medium">
|
|
195
|
+
<label class="t-white t-medium mn-b-thin d-block">Privacy</label>
|
|
196
|
+
<div class="flex gap-small">
|
|
197
|
+
<Radio
|
|
198
|
+
v-model:radio="editForm.isPublic"
|
|
199
|
+
:value="true"
|
|
200
|
+
name="privacy"
|
|
201
|
+
label="Public"
|
|
202
|
+
class="t-white"
|
|
203
|
+
/>
|
|
204
|
+
<Radio
|
|
205
|
+
v-model:radio="editForm.isPublic"
|
|
206
|
+
:value="false"
|
|
207
|
+
name="privacy"
|
|
208
|
+
label="Private"
|
|
209
|
+
class="t-white"
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div class="form-group mn-b-medium">
|
|
215
|
+
<label class="t-white t-medium mn-b-thin d-block">Cover Image</label>
|
|
216
|
+
<div class="playlist-cover-upload flex gap-medium">
|
|
217
|
+
<div class="playlist-cover-preview bg-dark-transp-25 radius-small o-hidden">
|
|
218
|
+
<Media
|
|
219
|
+
v-if="editForm.coverUrl"
|
|
220
|
+
:url="editForm.coverUrl"
|
|
221
|
+
class="w-10r h-10r object-fit-cover"
|
|
222
|
+
/>
|
|
223
|
+
<div v-else class="w-10r h-10r flex-center flex">
|
|
224
|
+
<IconMusic class="i-big" fill="rgb(var(--grey))"/>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<UploadImage
|
|
229
|
+
v-model:photo="editForm.coverUrl"
|
|
230
|
+
uploadPath="playlists"
|
|
231
|
+
class="flex-1 h-10r bg-dark-transp-25 radius-small"
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div class="form-actions t-right">
|
|
237
|
+
<Button
|
|
238
|
+
@click="showEditModal = false"
|
|
239
|
+
type="button"
|
|
240
|
+
class="bg-dark-transp-25 t-white pd-small radius-small mn-r-small hover-bg-dark"
|
|
241
|
+
:showLoader="false"
|
|
242
|
+
:showSucces="false"
|
|
243
|
+
>
|
|
244
|
+
Cancel
|
|
245
|
+
</Button>
|
|
246
|
+
|
|
247
|
+
<Button
|
|
248
|
+
type="submit"
|
|
249
|
+
class="bg-main t-white pd-small radius-small hover-scale-1"
|
|
250
|
+
:submit="updatePlaylist"
|
|
251
|
+
:showLoader="true"
|
|
252
|
+
:showSucces="true"
|
|
253
|
+
:validation="!!Object.keys(validationErrors).length"
|
|
254
|
+
>
|
|
255
|
+
Save
|
|
256
|
+
</Button>
|
|
257
|
+
</div>
|
|
258
|
+
</form>
|
|
259
|
+
</Popup>
|
|
260
|
+
|
|
261
|
+
<!-- Delete Confirmation Modal -->
|
|
262
|
+
<Popup
|
|
263
|
+
v-if="showDeleteModal"
|
|
264
|
+
@close-popup="showDeleteModal = false"
|
|
265
|
+
class="bg-dark pd-small w-m-25r radius-medium t-white"
|
|
266
|
+
>
|
|
267
|
+
<h3 class="mn-b-medium">Delete Playlist</h3>
|
|
268
|
+
<p class="t-grey mn-b-medium">Are you sure you want to delete this playlist? This action cannot be undone.</p>
|
|
269
|
+
|
|
270
|
+
<div class="t-right">
|
|
271
|
+
<Button
|
|
272
|
+
@click="showDeleteModal = false"
|
|
273
|
+
class="bg-dark-transp-25 t-white pd-small radius-small mn-r-small hover-bg-dark"
|
|
274
|
+
:showLoader="false"
|
|
275
|
+
:showSucces="false"
|
|
276
|
+
>
|
|
277
|
+
Cancel
|
|
278
|
+
</Button>
|
|
279
|
+
|
|
280
|
+
<Button
|
|
281
|
+
@click="confirmDelete"
|
|
282
|
+
class="bg-fourth t-white pd-small radius-small hover-scale-1"
|
|
283
|
+
:showLoader="true"
|
|
284
|
+
:showSucces="true"
|
|
285
|
+
>
|
|
286
|
+
Delete
|
|
287
|
+
</Button>
|
|
288
|
+
</div>
|
|
289
|
+
</Popup>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
</template>
|
|
293
|
+
|
|
294
|
+
<script setup>
|
|
295
|
+
import { ref, computed, reactive, onMounted, watch } from 'vue';
|
|
296
|
+
import { useRoute, useRouter } from 'vue-router';
|
|
297
|
+
import TrackList from '../lists/TrackList.vue';
|
|
298
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
299
|
+
import Loader from '@martyrs/src/components/Loader/Loader.vue';
|
|
300
|
+
import Media from '@martyrs/src/components/Media/Media.vue';
|
|
301
|
+
import Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue';
|
|
302
|
+
import Popup from '@martyrs/src/components/Popup/Popup.vue';
|
|
303
|
+
import Field from '@martyrs/src/components/Field/Field.vue';
|
|
304
|
+
import Radio from '@martyrs/src/components/Radio/Radio.vue';
|
|
305
|
+
import UploadImage from '@martyrs/src/components/UploadImage/UploadImage.vue';
|
|
306
|
+
|
|
307
|
+
// Import icons
|
|
308
|
+
import IconPlay from '@martyrs/src/modules/icons/navigation/IconPlay.vue';
|
|
309
|
+
import IconHeart from '@martyrs/src/modules/icons/navigation/IconHeart.vue';
|
|
310
|
+
import IconEllipsis from '@martyrs/src/modules/icons/navigation/IconEllipsis.vue';
|
|
311
|
+
import IconMusic from '@martyrs/src/modules/icons/entities/IconMusic.vue';
|
|
312
|
+
|
|
313
|
+
// Import store modules
|
|
314
|
+
import { state as authState } from '@martyrs/src/modules/auth/views/store/auth.js';
|
|
315
|
+
import { state as playlistsState, actions as playlistsActions } from '../../store/playlists.js';
|
|
316
|
+
import { actions as playerActions } from '../../store/player.js';
|
|
317
|
+
|
|
318
|
+
const route = useRoute();
|
|
319
|
+
const router = useRouter();
|
|
320
|
+
|
|
321
|
+
// State
|
|
322
|
+
const isLoading = ref(true);
|
|
323
|
+
const isFavorite = ref(false);
|
|
324
|
+
const showDropdown = ref(false);
|
|
325
|
+
const showEditModal = ref(false);
|
|
326
|
+
const showDeleteModal = ref(false);
|
|
327
|
+
|
|
328
|
+
// Validation
|
|
329
|
+
const validationErrors = reactive({});
|
|
330
|
+
|
|
331
|
+
// Edit form
|
|
332
|
+
const editForm = reactive({
|
|
333
|
+
title: '',
|
|
334
|
+
description: '',
|
|
335
|
+
isPublic: true,
|
|
336
|
+
coverUrl: ''
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// Computed properties
|
|
340
|
+
const playlist = computed(() => playlistsState.currentPlaylist);
|
|
341
|
+
const playlistTracks = computed(() => playlistsState.currentPlaylistTracks);
|
|
342
|
+
|
|
343
|
+
const isOwner = computed(() => {
|
|
344
|
+
if (!playlist.value || !authState.user) return false;
|
|
345
|
+
|
|
346
|
+
return (
|
|
347
|
+
playlist.value.owner?.target?._id === authState.user._id ||
|
|
348
|
+
playlist.value.owner?.target === authState.user._id
|
|
349
|
+
);
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
const isCollaborator = computed(() => {
|
|
353
|
+
if (!playlist.value || !authState.user) return false;
|
|
354
|
+
|
|
355
|
+
return playlist.value.collaborators?.some(collab =>
|
|
356
|
+
collab._id === authState.user._id || collab === authState.user._id
|
|
357
|
+
);
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// Methods
|
|
361
|
+
const getPlaylistOwnerName = (playlist) => {
|
|
362
|
+
if (!playlist || !playlist.owner) return 'Unknown';
|
|
363
|
+
|
|
364
|
+
const owner = playlist.owner.target;
|
|
365
|
+
if (typeof owner === 'object') {
|
|
366
|
+
if (owner.profile?.name) {
|
|
367
|
+
return owner.profile.name;
|
|
368
|
+
}
|
|
369
|
+
return owner.name || 'Unknown';
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return 'Unknown';
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
const getOwnerProfileLink = (owner) => {
|
|
376
|
+
if (!owner || !owner.target) return { name: 'music-home' };
|
|
377
|
+
|
|
378
|
+
if (owner.type === 'User') {
|
|
379
|
+
return { name: 'user-profile', params: { _id: owner.target._id || owner.target } };
|
|
380
|
+
} else if (owner.type === 'Organization') {
|
|
381
|
+
return { name: 'organization-profile', params: { _id: owner.target._id || owner.target } };
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return { name: 'music-home' };
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
const playPlaylist = () => {
|
|
388
|
+
if (playlistTracks.value && playlistTracks.value.length > 0) {
|
|
389
|
+
playerActions.setQueue(playlistTracks.value);
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const toggleFavorite = () => {
|
|
394
|
+
isFavorite.value = !isFavorite.value;
|
|
395
|
+
// Implement favorite playlist logic here
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const addToQueue = () => {
|
|
399
|
+
if (playlistTracks.value && playlistTracks.value.length > 0) {
|
|
400
|
+
// Add all tracks to queue
|
|
401
|
+
playlistTracks.value.forEach(track => {
|
|
402
|
+
playerActions.addToQueue(track);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
showDropdown.value = false;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const editPlaylist = () => {
|
|
410
|
+
// Populate edit form with current playlist data
|
|
411
|
+
editForm.title = playlist.value.title;
|
|
412
|
+
editForm.description = playlist.value.description || '';
|
|
413
|
+
editForm.isPublic = playlist.value.isPublic;
|
|
414
|
+
editForm.coverUrl = playlist.value.coverUrl || '';
|
|
415
|
+
|
|
416
|
+
showEditModal.value = true;
|
|
417
|
+
showDropdown.value = false;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
const updatePlaylist = async () => {
|
|
421
|
+
// Validate form
|
|
422
|
+
validationErrors.title = !editForm.title ? { message: 'Playlist name is required' } : null;
|
|
423
|
+
|
|
424
|
+
// If there are validation errors, don't submit
|
|
425
|
+
if (Object.values(validationErrors).some(error => error !== null)) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
try {
|
|
430
|
+
// Update playlist
|
|
431
|
+
const updatedData = {
|
|
432
|
+
_id: playlist.value._id,
|
|
433
|
+
title: editForm.title,
|
|
434
|
+
description: editForm.description,
|
|
435
|
+
isPublic: editForm.isPublic,
|
|
436
|
+
coverUrl: editForm.coverUrl
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
await playlistsActions.updatePlaylist(updatedData);
|
|
440
|
+
showEditModal.value = false;
|
|
441
|
+
} catch (error) {
|
|
442
|
+
console.error('Error updating playlist:', error);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
const toggleCollaborative = async () => {
|
|
447
|
+
try {
|
|
448
|
+
// Toggle collaborative status
|
|
449
|
+
const updatedData = {
|
|
450
|
+
_id: playlist.value._id,
|
|
451
|
+
isCollaborative: !playlist.value.isCollaborative
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
await playlistsActions.updatePlaylist(updatedData);
|
|
455
|
+
showDropdown.value = false;
|
|
456
|
+
} catch (error) {
|
|
457
|
+
console.error('Error updating playlist:', error);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
const deletePlaylist = () => {
|
|
462
|
+
showDeleteModal.value = true;
|
|
463
|
+
showDropdown.value = false;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
const confirmDelete = async () => {
|
|
467
|
+
try {
|
|
468
|
+
await playlistsActions.deletePlaylist(playlist.value._id);
|
|
469
|
+
router.push({ name: 'music-library' });
|
|
470
|
+
} catch (error) {
|
|
471
|
+
console.error('Error deleting playlist:', error);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
const copyLink = () => {
|
|
476
|
+
const url = window.location.href;
|
|
477
|
+
navigator.clipboard.writeText(url).then(() => {
|
|
478
|
+
// Could show a success notification here
|
|
479
|
+
showDropdown.value = false;
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
const fetchPlaylistData = async () => {
|
|
484
|
+
isLoading.value = true;
|
|
485
|
+
|
|
486
|
+
try {
|
|
487
|
+
// Fetch playlist data
|
|
488
|
+
await playlistsActions.fetchPlaylistByUrl(route.params.url);
|
|
489
|
+
} catch (error) {
|
|
490
|
+
console.error('Error fetching playlist data:', error);
|
|
491
|
+
} finally {
|
|
492
|
+
isLoading.value = false;
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
// Fetch data when component mounts or URL changes
|
|
497
|
+
onMounted(fetchPlaylistData);
|
|
498
|
+
|
|
499
|
+
watch(() => route.params.url, (newUrl) => {
|
|
500
|
+
if (newUrl) {
|
|
501
|
+
fetchPlaylistData();
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
</script>
|