@ozdao/martyrs 0.2.492 → 0.2.493

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/builder.cjs +52 -45
  6. package/dist/builder.js +53 -46
  7. package/dist/{crud-B-kQw3Z5.cjs → crud-JN_LFj01.cjs} +3 -0
  8. package/dist/{crud-Cwx5VlSm.js → crud-sE7GLPbj.js} +3 -0
  9. package/dist/globals.server.cjs +322 -3
  10. package/dist/globals.server.js +303 -1
  11. package/dist/{globals.verifier-D68mHEBl.cjs → globals.verifier-C0zj_LLo.cjs} +8 -1
  12. package/dist/{globals.verifier-CWFz5Gh2.js → globals.verifier-DFqKQ7hK.js} +8 -1
  13. package/dist/inventory.server.cjs +2 -2
  14. package/dist/inventory.server.js +2 -2
  15. package/dist/{main-SZQ1QjeP.js → main-CJm5myDI.js} +631 -607
  16. package/dist/{main-MzmGbSxs.cjs → main-DTaE01lg.cjs} +6 -6
  17. package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs +1 -1
  18. package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs.map +1 -1
  19. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +1 -1
  20. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
  21. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +33 -7
  22. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  23. package/dist/martyrs/src/components/Feed/Feed.vue.js +33 -7
  24. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  25. package/dist/martyrs/src/components/Field/{Field.vue2.cjs → Field.vue.cjs} +2 -2
  26. package/dist/martyrs/src/components/Field/{Field.vue2.js.map → Field.vue.cjs.map} +1 -1
  27. package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
  28. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
  29. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  30. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  31. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  32. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  33. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  34. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  35. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  36. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  37. package/dist/martyrs/src/components/Menu/MenuItem.vue.js +2 -2
  38. package/dist/martyrs/src/components/Menu/MenuItem.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +4 -4
  40. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  47. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  50. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  55. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  56. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  58. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  59. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  60. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
  61. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
  62. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  63. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  64. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  65. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  66. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  67. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  68. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
  69. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  70. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  71. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  72. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  73. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  74. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +5 -1
  77. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +5 -1
  79. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  80. package/dist/martyrs/src/modules/icons/entities/IconTime.vue.cjs +2 -2
  81. package/dist/martyrs/src/modules/icons/entities/IconTime.vue.js +2 -2
  82. package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.cjs +2 -2
  83. package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.js +2 -2
  84. package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.cjs +2 -2
  85. package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.js +2 -2
  86. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +6 -6
  87. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  88. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  89. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  90. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  91. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  92. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
  93. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +22 -15
  96. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -1
  97. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +23 -16
  98. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  99. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +2 -2
  100. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
  102. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  103. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +31 -13
  104. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -1
  105. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +33 -15
  106. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  107. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +39 -22
  108. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +39 -22
  110. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
  111. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  113. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  115. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +385 -125
  116. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -1
  117. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +391 -131
  118. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  119. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +24 -7
  120. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +25 -8
  122. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +99 -87
  124. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -1
  125. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +111 -99
  126. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
  127. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs +21 -0
  128. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs.map +1 -0
  129. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js +21 -0
  130. package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js.map +1 -0
  131. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +442 -210
  132. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
  133. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +445 -213
  134. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  135. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +92 -117
  136. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +93 -118
  138. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
  139. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +72 -113
  140. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -1
  141. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +78 -119
  142. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +15 -12
  144. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -1
  145. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +15 -12
  146. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -1
  147. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +558 -429
  148. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
  149. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +560 -431
  150. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +146 -284
  152. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -1
  153. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +149 -287
  154. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +460 -63
  156. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
  157. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +462 -65
  158. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  159. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +126 -136
  160. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
  161. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +129 -139
  162. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  163. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +18 -15
  164. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -1
  165. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +18 -15
  166. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
  167. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +28 -23
  168. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -1
  169. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +29 -24
  170. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
  171. package/dist/martyrs/src/modules/music/music.client.cjs +3 -6
  172. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
  173. package/dist/martyrs/src/modules/music/music.client.js +9 -12
  174. package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
  175. package/dist/martyrs/src/modules/music/router/music.cjs +27 -1
  176. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  177. package/dist/martyrs/src/modules/music/router/music.js +27 -1
  178. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  179. package/dist/martyrs/src/modules/music/store/artists.cjs +6 -4
  180. package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -1
  181. package/dist/martyrs/src/modules/music/store/artists.js +6 -4
  182. package/dist/martyrs/src/modules/music/store/artists.js.map +1 -1
  183. package/dist/martyrs/src/modules/music/store/player.cjs +5 -0
  184. package/dist/martyrs/src/modules/music/store/player.cjs.map +1 -1
  185. package/dist/martyrs/src/modules/music/store/player.js +5 -0
  186. package/dist/martyrs/src/modules/music/store/player.js.map +1 -1
  187. package/dist/martyrs/src/modules/music/store/tracks.cjs +22 -0
  188. package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -1
  189. package/dist/martyrs/src/modules/music/store/tracks.js +22 -0
  190. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
  191. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +2 -2
  192. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  193. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  195. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  197. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  199. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  200. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  201. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +2 -2
  202. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  203. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  204. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  205. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  206. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  207. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  208. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  209. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  210. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  211. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  212. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  213. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  214. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  215. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  216. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  217. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  218. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  219. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  220. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  221. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  222. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  223. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  224. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  225. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  226. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  227. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  228. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  229. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  230. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  231. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  232. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  233. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  234. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs +4 -3
  235. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs.map +1 -1
  236. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +4 -3
  237. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
  238. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs +37 -70
  239. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs.map +1 -1
  240. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +38 -71
  241. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
  242. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -1
  243. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs.map +1 -1
  244. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +6 -5
  245. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
  246. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +45 -52
  247. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs.map +1 -1
  248. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +46 -53
  249. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
  250. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  251. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  252. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  253. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  254. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  255. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  256. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  257. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  258. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  259. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  260. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  261. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  262. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  263. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  264. package/dist/martyrs.cjs.js +1 -1
  265. package/dist/martyrs.css +1 -1
  266. package/dist/martyrs.es.js +1 -1
  267. package/dist/music.server.cjs +124 -31
  268. package/dist/music.server.js +124 -31
  269. package/dist/organizations.server.cjs +1 -1
  270. package/dist/organizations.server.js +1 -1
  271. package/dist/products.server.cjs +2 -2
  272. package/dist/products.server.js +2 -2
  273. package/dist/rents.server.cjs +3 -3
  274. package/dist/rents.server.js +3 -3
  275. package/dist/style.css +373 -80
  276. package/dist/{web-D7lZjuC0.js → web-Dkk0_7TA.js} +1 -1
  277. package/dist/{web-D-YZ9KHz.cjs → web-stVkXd0l.cjs} +1 -1
  278. package/package.json +1 -1
  279. package/src/builder/modes/ssr.prod.js +21 -5
  280. package/src/builder/rspack/rspack.config.ssr.client.js +40 -40
  281. package/src/components/Calendar/Calendar.vue +378 -377
  282. package/src/components/Feed/Feed.vue +28 -2
  283. package/src/modules/globals/controllers/classes/crud/crud.policies.js +5 -0
  284. package/src/modules/globals/controllers/classes/globals.validator.js +8 -1
  285. package/src/modules/globals/views/components/layouts/Client.vue +7 -0
  286. package/src/modules/music/README.md +8 -0
  287. package/src/modules/music/components/SidebarMusic.vue +6 -9
  288. package/src/modules/music/components/cards/AlbumCard.vue +20 -14
  289. package/src/modules/music/components/cards/ArtistCard.vue +1 -1
  290. package/src/modules/music/components/cards/PlaylistCard.vue +31 -11
  291. package/src/modules/music/components/cards/TrackListCard.vue +24 -13
  292. package/src/modules/music/components/forms/PlaylistForm.vue +417 -107
  293. package/src/modules/music/components/forms/SearchForm.vue +31 -8
  294. package/src/modules/music/components/forms/TrackForm.vue +50 -32
  295. package/src/modules/music/components/layouts/MusicBottomPlayer.vue +17 -0
  296. package/src/modules/music/components/pages/Album.vue +373 -186
  297. package/src/modules/music/components/pages/Artist.vue +54 -94
  298. package/src/modules/music/components/pages/MusicHome.vue +59 -56
  299. package/src/modules/music/components/pages/MusicLibrary.vue +13 -11
  300. package/src/modules/music/components/pages/Playlist.vue +495 -379
  301. package/src/modules/music/components/pages/SearchResults.vue +185 -313
  302. package/src/modules/music/components/pages/Track.vue +363 -69
  303. package/src/modules/music/components/player/MusicPlayer.vue +368 -97
  304. package/src/modules/music/components/player/TrackProgress.vue +76 -22
  305. package/src/modules/music/components/player/VolumeControl.vue +61 -28
  306. package/src/modules/music/controllers/search.controller.js +3 -0
  307. package/src/modules/music/controllers/stream.controller.js +11 -3
  308. package/src/modules/music/middlewares/playlists.verifier.js +1 -1
  309. package/src/modules/music/music.client.js +3 -6
  310. package/src/modules/music/music.server.js +8 -4
  311. package/src/modules/music/router/music.js +8 -1
  312. package/src/modules/music/routes/albums.routes.js +37 -5
  313. package/src/modules/music/routes/artists.routes.js +14 -4
  314. package/src/modules/music/routes/genres.routes.js +5 -1
  315. package/src/modules/music/routes/playlists.routes.js +42 -9
  316. package/src/modules/music/routes/tracks.routes.js +27 -2
  317. package/src/modules/music/store/artists.js +6 -2
  318. package/src/modules/music/store/player.js +6 -0
  319. package/src/modules/music/store/tracks.js +31 -0
  320. package/src/modules/music/websocket/streaming.handler.js +7 -1
  321. package/src/modules/rents/controllers/services/rents.services.js +2 -2
  322. package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +4 -3
  323. package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +42 -40
  324. package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +3 -1
  325. package/src/modules/rents/views/components/pages/Rents.vue +60 -56
  326. package/dist/globals.websocket-DzvdIBf6.js +0 -306
  327. package/dist/globals.websocket-k6_B1T7k.cjs +0 -322
  328. package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +0 -1
  329. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  330. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  331. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +0 -69
  332. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +0 -1
  333. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +0 -69
  334. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +0 -1
  335. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +0 -104
  336. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +0 -1
  337. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +0 -104
  338. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +0 -1
  339. package/src/modules/music/components/cards/TrackCard.vue +0 -86
  340. package/src/modules/music/components/layouts/MusicLayout.vue +0 -83
@@ -1,138 +1,229 @@
1
- import { ref, reactive, computed, onMounted, watch, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, createBlock, createCommentVNode, toDisplayString, withCtx, createTextVNode, Fragment, renderList, withModifiers } from "vue";
1
+ import { ref, computed, onMounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createVNode, createElementVNode, toDisplayString, withCtx, createTextVNode, Fragment, createBlock, unref, renderList } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
- import _sfc_main$6 from "../../../../components/Feed/Feed.vue.js";
4
- import TrackCard from "../cards/TrackCard.vue.js";
5
3
  import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
6
- import Loader from "../../../../components/Loader/Loader.vue2.js";
4
+ /* empty css */
7
5
  import Media from "../../../../components/Media/Media.vue.js";
8
6
  import _sfc_main$4 from "../../../../components/Dropdown/Dropdown.vue.js";
9
- import _sfc_main$7 from "../../../../components/Popup/Popup.vue.js";
10
- import Field from "../../../../components/Field/Field.vue2.js";
11
- import _sfc_main$8 from "../../../../components/Radio/Radio.vue.js";
12
- import _sfc_main$a from "../../../../components/UploadImage/UploadImage.vue.js";
7
+ import _sfc_main$a from "../../../../components/Feed/Feed.vue.js";
8
+ import _sfc_main$c from "../../../../components/Popup/Popup.vue.js";
13
9
  import _sfc_main$2 from "../../../icons/navigation/IconPlay.vue.js";
14
- import _sfc_main$3 from "../../../icons/navigation/IconLike.vue.js";
15
10
  import _sfc_main$5 from "../../../icons/navigation/IconEllipsis.vue.js";
16
- import _sfc_main$9 from "../../../icons/entities/IconMusic.vue.js";
17
- import { state as state$1 } from "../../../auth/views/store/auth.js";
11
+ import _sfc_main$3 from "../../../icons/navigation/IconShuffle.vue.js";
12
+ import _sfc_main$7 from "../../../icons/entities/IconCalendar.vue.js";
13
+ import IconClock from "../../../icons/entities/IconTime.vue.js";
14
+ import _sfc_main$9 from "../../../icons/actions/IconShow.vue.js";
15
+ import _sfc_main$8 from "../../../icons/navigation/IconRefresh.vue.js";
16
+ import _sfc_main$6 from "../../../icons/navigation/IconCheckmark.vue.js";
17
+ import _sfc_main$b from "../cards/TrackListCard.vue.js";
18
+ import PlaylistCard from "../cards/PlaylistCard.vue.js";
19
+ import _sfc_main$d from "../forms/PlaylistForm.vue.js";
18
20
  import { state, actions } from "../../store/playlists.js";
21
+ import "../../store/tracks.js";
19
22
  import { actions as actions$1 } from "../../store/player.js";
20
- const _hoisted_1 = { class: "playlist-page" };
23
+ import { state as state$1 } from "../../../auth/views/store/auth.js";
24
+ import { actions as actions$2 } from "../../../globals/views/store/globals.js";
25
+ const _hoisted_1 = { class: "playlist-page pd-small" };
21
26
  const _hoisted_2 = {
22
27
  key: 0,
23
- class: "w-100 h-25r flex-center flex"
28
+ class: "t-center pd-big"
24
29
  };
25
30
  const _hoisted_3 = {
26
31
  key: 1,
27
- class: "t-center pd-big"
32
+ class: "playlist-content cols-2-fit-content mobile:cols-1 gap-big"
28
33
  };
29
- const _hoisted_4 = { key: 2 };
30
- const _hoisted_5 = { class: "playlist-header mn-b-medium flex flex-v-center gap-medium" };
31
- const _hoisted_6 = { class: "playlist-cover" };
32
- const _hoisted_7 = { class: "playlist-info" };
33
- const _hoisted_8 = { class: "" };
34
- const _hoisted_9 = {
34
+ const _hoisted_4 = { class: "pos-sticky pos-t-0 mobile:pos-relative playlist-cover-section" };
35
+ const _hoisted_5 = { class: "cover-container relative mn-b-medium radius-big overflow-hidden shadow-big" };
36
+ const _hoisted_6 = { class: "stats-grid grid cols-2 gap-small" };
37
+ const _hoisted_7 = { class: "stat-card bg-light pd-medium radius-medium t-center" };
38
+ const _hoisted_8 = { class: "mn-b-thin" };
39
+ const _hoisted_9 = { class: "stat-card bg-light pd-medium radius-medium t-center" };
40
+ const _hoisted_10 = { class: "mn-b-thin" };
41
+ const _hoisted_11 = { class: "playlist-details-section" };
42
+ const _hoisted_12 = { class: "flex items-center gap-small mn-b-small" };
43
+ const _hoisted_13 = {
35
44
  key: 0,
36
- class: "playlist-description t-grey mn-t-thin mn-b-small"
45
+ class: "badge bg-secondary-transp-20 t-secondary pd-thin-big radius-small t-small"
37
46
  };
38
- const _hoisted_10 = { class: "playlist-meta flex flex-v-center" };
39
- const _hoisted_11 = {
47
+ const _hoisted_14 = {
40
48
  key: 1,
41
- class: "t-medium"
49
+ class: "badge bg-success-transp-20 t-success pd-thin-big radius-small t-small"
42
50
  };
43
- const _hoisted_12 = { class: "t-grey" };
44
- const _hoisted_13 = { class: "playlist-actions mn-b-medium flex flex-v-center gap-small" };
45
- const _hoisted_14 = {
46
- key: 0,
47
- class: "pd-small bg-dark radius-small pos-absolute pos-t-100 pos-r-0 z-index-3 w-max-15r mn-t-thin"
51
+ const _hoisted_15 = { class: "h1 mn-b-medium" };
52
+ const _hoisted_16 = { class: "flex gap-small mn-b-medium" };
53
+ const _hoisted_17 = { class: "dropdown-menu bg-dark pd-small radius-medium shadow-big mn-t-thin" };
54
+ const _hoisted_18 = { class: "owner-section mn-b-big" };
55
+ const _hoisted_19 = { class: "owner-card bg-light pd-medium radius-medium flex items-center gap-medium" };
56
+ const _hoisted_20 = { class: "owner-avatar" };
57
+ const _hoisted_21 = {
58
+ key: 1,
59
+ class: "w-4r h-4r radius-full bg-primary flex-center"
48
60
  };
49
- const _hoisted_15 = {
61
+ const _hoisted_22 = { class: "flex items-center gap-thin" };
62
+ const _hoisted_23 = { class: "t-large" };
63
+ const _hoisted_24 = { class: "t-small t-transp" };
64
+ const _hoisted_25 = {
50
65
  key: 0,
51
- class: "mn-b-thin"
66
+ class: "collaborators-section mn-b-big"
52
67
  };
53
- const _hoisted_16 = { class: "mn-b-thin" };
54
- const _hoisted_17 = {
68
+ const _hoisted_26 = { class: "flex flex-wrap gap-small" };
69
+ const _hoisted_27 = { class: "t-small" };
70
+ const _hoisted_28 = { class: "metadata-grid grid cols-2 gap-small mn-b-big" };
71
+ const _hoisted_29 = { class: "metadata-card bg-light pd-medium radius-medium flex items-center gap-medium" };
72
+ const _hoisted_30 = { class: "t-medium" };
73
+ const _hoisted_31 = { class: "metadata-card bg-light pd-medium radius-medium flex items-center gap-medium" };
74
+ const _hoisted_32 = { class: "t-medium" };
75
+ const _hoisted_33 = { class: "metadata-card bg-light pd-medium radius-medium flex items-center gap-medium" };
76
+ const _hoisted_34 = { class: "t-medium" };
77
+ const _hoisted_35 = { class: "metadata-card bg-light pd-medium radius-medium flex items-center gap-medium" };
78
+ const _hoisted_36 = { class: "t-medium" };
79
+ const _hoisted_37 = {
55
80
  key: 1,
56
- class: "mn-b-thin"
81
+ class: "tags-section mn-b-medium"
57
82
  };
58
- const _hoisted_18 = {
83
+ const _hoisted_38 = { class: "flex gap-thin flex-wrap" };
84
+ const _hoisted_39 = {
59
85
  key: 2,
60
- class: "mn-b-thin"
86
+ class: "description-section bg-light pd-medium radius-medium mn-b-medium"
61
87
  };
62
- const _hoisted_19 = { class: "playlist-tracks" };
63
- const _hoisted_20 = {
64
- key: 0,
65
- class: "empty-tracks t-center pd-big bg-dark-transp-10 radius-medium"
88
+ const _hoisted_40 = { class: "t-transp" };
89
+ const _hoisted_41 = {
90
+ key: 2,
91
+ class: "tracks-section mn-t-big"
66
92
  };
67
- const _hoisted_21 = { class: "form-group mn-b-medium" };
68
- const _hoisted_22 = { class: "form-group mn-b-medium" };
69
- const _hoisted_23 = { class: "form-group mn-b-medium" };
70
- const _hoisted_24 = { class: "flex gap-small" };
71
- const _hoisted_25 = { class: "form-group mn-b-medium" };
72
- const _hoisted_26 = { class: "playlist-cover-upload flex gap-medium" };
73
- const _hoisted_27 = { class: "playlist-cover-preview bg-dark-transp-25 radius-small o-hidden" };
74
- const _hoisted_28 = {
75
- key: 1,
76
- class: "w-10r h-10r flex-center flex"
93
+ const _hoisted_42 = { class: "bg-light radius-medium o-hidden" };
94
+ const _hoisted_43 = {
95
+ key: 3,
96
+ class: "empty-section mn-t-big"
77
97
  };
78
- const _hoisted_29 = { class: "form-actions t-right" };
79
- const _hoisted_30 = { class: "t-right" };
98
+ const _hoisted_44 = { class: "empty-tracks t-center pd-big bg-light radius-medium" };
99
+ const _hoisted_45 = {
100
+ key: 4,
101
+ class: "more-playlists-section mn-t-big"
102
+ };
103
+ const _hoisted_46 = { class: "flex justify-between items-center mn-b-medium" };
104
+ const _hoisted_47 = { class: "flex flex-nowrap gap-small o-x-scroll overscroll-behavior-x-contain scroll-behavior-smooth scroll-snap-type-x-mandatory scroll-hide" };
105
+ const _hoisted_48 = { class: "t-transp mn-b-medium" };
106
+ const _hoisted_49 = { class: "flex justify-end gap-small" };
80
107
  const _sfc_main = {
81
108
  __name: "Playlist",
82
- setup(__props) {
109
+ emits: ["page-loading", "page-loaded"],
110
+ setup(__props, { emit: __emit }) {
83
111
  const route = useRoute();
84
112
  const router = useRouter();
85
- const isLoading = ref(true);
86
- const isFavorite = ref(false);
113
+ const emits = __emit;
114
+ const hasLoaded = ref(false);
115
+ const isFollowing = ref(false);
87
116
  const showDropdown = ref(false);
88
117
  const showEditModal = ref(false);
89
118
  const showDeleteModal = ref(false);
90
- const validationErrors = reactive({});
91
- const editForm = reactive({
92
- title: "",
93
- description: "",
94
- isPublic: true,
95
- coverUrl: ""
96
- });
119
+ const followedUsers = ref([]);
120
+ const morePlaylists = ref([]);
121
+ state.currentPlaylist = null;
122
+ state.currentPlaylistTracks = [];
97
123
  const playlist = computed(() => state.currentPlaylist);
98
- const playlistTracks = computed(() => state.currentPlaylistTracks);
124
+ const playlistTracks = computed(() => state.currentPlaylistTracks || []);
99
125
  const isOwner = computed(() => {
100
126
  if (!playlist.value || !state$1.user) return false;
101
- return playlist.value.owner?.target?._id === state$1.user._id || playlist.value.owner?.target === state$1.user._id;
127
+ const ownerId = playlist.value.owner?.target?._id || playlist.value.owner?.target;
128
+ return ownerId === state$1.user._id;
102
129
  });
103
130
  const isCollaborator = computed(() => {
104
131
  if (!playlist.value || !state$1.user) return false;
105
132
  return playlist.value.collaborators?.some(
106
- (collab) => collab._id === state$1.user._id || collab === state$1.user._id
133
+ (collab) => (collab._id || collab) === state$1.user._id
107
134
  );
108
135
  });
136
+ const totalDuration = computed(() => {
137
+ if (!playlistTracks.value.length) return "0:00";
138
+ const totalSeconds = playlistTracks.value.reduce((sum, track) => sum + (track.duration || 0), 0);
139
+ return formatDuration(totalSeconds);
140
+ });
141
+ const getOwnerData = (playlist2) => {
142
+ if (!playlist2) return null;
143
+ const owner = playlist2.creator?.target || playlist2.owner?.target;
144
+ return typeof owner === "object" ? owner : null;
145
+ };
146
+ const getOwnerId = (playlist2) => {
147
+ if (!playlist2) return null;
148
+ const owner = playlist2.creator?.target || playlist2.owner?.target;
149
+ return typeof owner === "object" ? owner._id : owner;
150
+ };
109
151
  const getPlaylistOwnerName = (playlist2) => {
110
- if (!playlist2 || !playlist2.owner) return "Unknown";
111
- const owner = playlist2.owner.target;
112
- if (typeof owner === "object") {
113
- if (owner.profile?.name) {
114
- return owner.profile.name;
115
- }
116
- return owner.name || "Unknown";
152
+ if (!playlist2) return "Unknown";
153
+ const owner = getOwnerData(playlist2);
154
+ if (owner) {
155
+ return owner.profile?.name || owner.name || "Unknown";
117
156
  }
118
157
  return "Unknown";
119
158
  };
120
159
  const getOwnerProfileLink = (owner) => {
121
160
  if (!owner || !owner.target) return { name: "music-home" };
122
- if (owner.type === "User") {
123
- return { name: "user-profile", params: { _id: owner.target._id || owner.target } };
124
- } else if (owner.type === "Organization") {
125
- return { name: "organization-profile", params: { _id: owner.target._id || owner.target } };
161
+ const targetId = typeof owner.target === "object" ? owner.target._id : owner.target;
162
+ if (owner.type === "user" || owner.type === "User") {
163
+ return { name: "User Profile", params: { _id: targetId } };
164
+ } else if (owner.type === "organization" || owner.type === "Organization") {
165
+ return { name: "Organizatio", params: { _id: targetId } };
126
166
  }
127
167
  return { name: "music-home" };
128
168
  };
169
+ const formatDate = (dateString) => {
170
+ if (!dateString) return "Unknown";
171
+ return new Date(dateString).toLocaleDateString("en-US", {
172
+ year: "numeric",
173
+ month: "long",
174
+ day: "numeric"
175
+ });
176
+ };
177
+ const formatDuration = (seconds) => {
178
+ if (!seconds) return "0:00";
179
+ const h = Math.floor(seconds / 3600);
180
+ const m = Math.floor(seconds % 3600 / 60);
181
+ const s = Math.floor(seconds % 60);
182
+ if (h > 0) {
183
+ return `${h}:${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
184
+ }
185
+ return `${m}:${s.toString().padStart(2, "0")}`;
186
+ };
187
+ const formatNumber = (num) => {
188
+ if (!num) return "0";
189
+ if (num >= 1e6) {
190
+ return (num / 1e6).toFixed(1) + "M";
191
+ } else if (num >= 1e3) {
192
+ return (num / 1e3).toFixed(1) + "K";
193
+ }
194
+ return num.toString();
195
+ };
129
196
  const playPlaylist = () => {
130
197
  if (playlistTracks.value && playlistTracks.value.length > 0) {
131
198
  actions$1.setQueue(playlistTracks.value);
132
199
  }
133
200
  };
134
- const toggleFavorite = () => {
135
- isFavorite.value = !isFavorite.value;
201
+ const shufflePlay = () => {
202
+ if (playlistTracks.value && playlistTracks.value.length > 0) {
203
+ const shuffled = [...playlistTracks.value].sort(() => Math.random() - 0.5);
204
+ actions$1.setQueue(shuffled);
205
+ }
206
+ };
207
+ const toggleFollow = async () => {
208
+ isFollowing.value = !isFollowing.value;
209
+ try {
210
+ if (isFollowing.value) {
211
+ await actions.followPlaylist(playlist.value._id);
212
+ } else {
213
+ await actions.unfollowPlaylist(playlist.value._id);
214
+ }
215
+ } catch (error) {
216
+ console.error("Error toggling follow:", error);
217
+ isFollowing.value = !isFollowing.value;
218
+ }
219
+ };
220
+ const toggleFollowUser = (userId) => {
221
+ const index = followedUsers.value.indexOf(userId);
222
+ if (index > -1) {
223
+ followedUsers.value.splice(index, 1);
224
+ } else {
225
+ followedUsers.value.push(userId);
226
+ }
136
227
  };
137
228
  const addToQueue = () => {
138
229
  if (playlistTracks.value && playlistTracks.value.length > 0) {
@@ -143,32 +234,9 @@ const _sfc_main = {
143
234
  }
144
235
  };
145
236
  const editPlaylist = () => {
146
- editForm.title = playlist.value.title;
147
- editForm.description = playlist.value.description || "";
148
- editForm.isPublic = playlist.value.isPublic;
149
- editForm.coverUrl = playlist.value.coverUrl || "";
150
237
  showEditModal.value = true;
151
238
  showDropdown.value = false;
152
239
  };
153
- const updatePlaylist = async () => {
154
- validationErrors.title = !editForm.title ? { message: "Playlist name is required" } : null;
155
- if (Object.values(validationErrors).some((error) => error !== null)) {
156
- return;
157
- }
158
- try {
159
- const updatedData = {
160
- _id: playlist.value._id,
161
- title: editForm.title,
162
- description: editForm.description,
163
- isPublic: editForm.isPublic,
164
- coverUrl: editForm.coverUrl
165
- };
166
- await actions.updatePlaylist(updatedData);
167
- showEditModal.value = false;
168
- } catch (error) {
169
- console.error("Error updating playlist:", error);
170
- }
171
- };
172
240
  const toggleCollaborative = async () => {
173
241
  try {
174
242
  const updatedData = {
@@ -191,382 +259,443 @@ const _sfc_main = {
191
259
  router.push({ name: "music-library" });
192
260
  } catch (error) {
193
261
  console.error("Error deleting playlist:", error);
262
+ actions$2.setError({
263
+ message: "Failed to delete playlist"
264
+ });
265
+ }
266
+ };
267
+ const removeTrack = async (trackId) => {
268
+ try {
269
+ await actions.removeTrackFromPlaylist(playlist.value._id, trackId);
270
+ await fetchPlaylistData();
271
+ } catch (error) {
272
+ console.error("Error removing track:", error);
273
+ actions$2.setError({
274
+ message: "Failed to remove track"
275
+ });
194
276
  }
195
277
  };
196
278
  const copyLink = () => {
197
- const url = window.location.href;
198
- navigator.clipboard.writeText(url).then(() => {
199
- showDropdown.value = false;
200
- });
279
+ navigator.clipboard.writeText(window.location.href);
280
+ showDropdown.value = false;
281
+ };
282
+ const handlePlaylistUpdated = () => {
283
+ showEditModal.value = false;
284
+ fetchPlaylistData();
201
285
  };
202
286
  const fetchPlaylistData = async () => {
203
- isLoading.value = true;
204
287
  try {
205
288
  await actions.fetchPlaylistByUrl(route.params.url);
289
+ if (state$1.user && playlist.value) {
290
+ }
291
+ if (playlist.value?.creator?.target) {
292
+ const creatorId = typeof playlist.value.creator.target === "object" ? playlist.value.creator.target._id : playlist.value.creator.target;
293
+ const playlists = await actions.fetchPlaylists({
294
+ "creator.target": creatorId,
295
+ isPublic: true,
296
+ limit: 6
297
+ });
298
+ morePlaylists.value = playlists.filter((p) => p._id !== playlist.value._id).slice(0, 5);
299
+ }
206
300
  } catch (error) {
207
301
  console.error("Error fetching playlist data:", error);
208
- } finally {
209
- isLoading.value = false;
210
302
  }
211
303
  };
212
- onMounted(fetchPlaylistData);
213
- watch(() => route.params.url, (newUrl) => {
214
- if (newUrl) {
215
- fetchPlaylistData();
216
- }
304
+ onMounted(async () => {
305
+ emits("page-loading");
306
+ await fetchPlaylistData();
307
+ hasLoaded.value = true;
308
+ emits("page-loaded");
217
309
  });
218
310
  return (_ctx, _cache) => {
219
311
  const _component_router_link = resolveComponent("router-link");
220
312
  return openBlock(), createElementBlock("div", _hoisted_1, [
221
- isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
222
- createVNode(Loader)
223
- ])) : !playlist.value ? (openBlock(), createElementBlock("div", _hoisted_3, _cache[11] || (_cache[11] = [
313
+ hasLoaded.value && !playlist.value ? (openBlock(), createElementBlock("div", _hoisted_2, _cache[7] || (_cache[7] = [
224
314
  createElementVNode("h2", { class: "" }, "Playlist not found", -1),
225
- createElementVNode("p", { class: "t-grey t-medium" }, "The playlist you're looking for doesn't exist or has been removed.", -1)
226
- ]))) : (openBlock(), createElementBlock("div", _hoisted_4, [
227
- createElementVNode("div", _hoisted_5, [
228
- createElementVNode("div", _hoisted_6, [
315
+ createElementVNode("p", { class: "t-transp t-medium" }, "The playlist you're looking for doesn't exist or has been removed.", -1)
316
+ ]))) : createCommentVNode("", true),
317
+ playlist.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
318
+ createElementVNode("div", _hoisted_4, [
319
+ createElementVNode("div", _hoisted_5, [
229
320
  createVNode(Media, {
230
321
  url: playlist.value.coverUrl || "/assets/placeholder-playlist.jpg",
231
- class: "w-15r h-15r object-fit-cover shadow-lg radius-small"
232
- }, null, 8, ["url"])
322
+ alt: playlist.value.title,
323
+ class: "aspect-1x1 w-100 radius-medium o-hidden"
324
+ }, null, 8, ["url", "alt"])
233
325
  ]),
234
- createElementVNode("div", _hoisted_7, [
235
- _cache[13] || (_cache[13] = createElementVNode("div", { class: "t-small t-uppercase" }, "Playlist", -1)),
236
- createElementVNode("h1", _hoisted_8, toDisplayString(playlist.value.title), 1),
237
- playlist.value.description ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(playlist.value.description), 1)) : createCommentVNode("", true),
238
- createElementVNode("div", _hoisted_10, [
239
- playlist.value.owner && playlist.value.owner.target ? (openBlock(), createBlock(_component_router_link, {
240
- key: 0,
241
- to: getOwnerProfileLink(playlist.value.owner),
242
- class: "t-medium hover-t-main"
243
- }, {
244
- default: withCtx(() => [
245
- createTextVNode(toDisplayString(getPlaylistOwnerName(playlist.value)), 1)
246
- ]),
247
- _: 1
248
- }, 8, ["to"])) : (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(getPlaylistOwnerName(playlist.value)), 1)),
249
- _cache[12] || (_cache[12] = createElementVNode("span", { class: "t-grey mn-l-small mn-r-small" }, "•", -1)),
250
- createElementVNode("span", _hoisted_12, toDisplayString(playlistTracks.value.length) + " " + toDisplayString(playlistTracks.value.length === 1 ? "song" : "songs"), 1)
326
+ createElementVNode("div", _hoisted_6, [
327
+ createElementVNode("div", _hoisted_7, [
328
+ createElementVNode("div", _hoisted_8, toDisplayString(playlistTracks.value.length), 1),
329
+ _cache[8] || (_cache[8] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Tracks", -1))
330
+ ]),
331
+ createElementVNode("div", _hoisted_9, [
332
+ createElementVNode("div", _hoisted_10, toDisplayString(formatNumber(playlist.value.followers || 0)), 1),
333
+ _cache[9] || (_cache[9] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Followers", -1))
251
334
  ])
252
335
  ])
253
336
  ]),
254
- createElementVNode("div", _hoisted_13, [
255
- createVNode(_sfc_main$1, {
256
- onClick: playPlaylist,
257
- class: "play-button bg-main radius-round pd-small flex-v-center flex gap-small hover-scale-1",
258
- showLoader: false,
259
- showSucces: false
260
- }, {
261
- default: withCtx(() => [
262
- createVNode(_sfc_main$2, {
263
- class: "i-small",
264
- fill: "rgb(var(--black))"
265
- }),
266
- _cache[14] || (_cache[14] = createElementVNode("span", { class: "t-black t-medium" }, "Play", -1))
267
- ]),
268
- _: 1
269
- }),
270
- createVNode(_sfc_main$1, {
271
- onClick: toggleFavorite,
272
- class: "bg-transparent border-none pd-zero",
273
- showLoader: false,
274
- showSucces: false
275
- }, {
276
- default: withCtx(() => [
277
- createVNode(_sfc_main$3, {
278
- class: "i-medium",
279
- fill: isFavorite.value ? "rgb(var(--main))" : "rgb(var(--white))"
280
- }, null, 8, ["fill"])
281
- ]),
282
- _: 1
283
- }),
284
- createVNode(_sfc_main$4, { class: "pos-relative" }, {
285
- content: withCtx(() => [
286
- showDropdown.value ? (openBlock(), createElementBlock("ul", _hoisted_14, [
287
- isOwner.value ? (openBlock(), createElementBlock("li", _hoisted_15, [
288
- createVNode(_sfc_main$1, {
289
- onClick: editPlaylist,
290
- class: "bg-transparent border-none pd-thin w-100 t-left hover-bg-dark radius-small",
291
- showLoader: false,
292
- showSucces: false
293
- }, {
294
- default: withCtx(() => _cache[15] || (_cache[15] = [
295
- createElementVNode("span", null, "Edit Details", -1)
296
- ])),
297
- _: 1
298
- })
299
- ])) : createCommentVNode("", true),
300
- createElementVNode("li", _hoisted_16, [
337
+ createElementVNode("div", _hoisted_11, [
338
+ createElementVNode("div", _hoisted_12, [
339
+ _cache[10] || (_cache[10] = createElementVNode("span", { class: "badge bg-primary-transp-20 t-primary pd-thin-big radius-small t-small t-uppercase" }, " Playlist ", -1)),
340
+ playlist.value.isCollaborative ? (openBlock(), createElementBlock("span", _hoisted_13, " Collaborative ")) : createCommentVNode("", true),
341
+ playlist.value.status === "published" ? (openBlock(), createElementBlock("span", _hoisted_14, " Published ")) : createCommentVNode("", true)
342
+ ]),
343
+ createElementVNode("h1", _hoisted_15, toDisplayString(playlist.value.title), 1),
344
+ createElementVNode("div", _hoisted_16, [
345
+ createVNode(_sfc_main$1, {
346
+ onClick: playPlaylist,
347
+ color: "primary",
348
+ size: "medium",
349
+ class: "flex-1 flex-center gap-thin"
350
+ }, {
351
+ default: withCtx(() => [
352
+ createVNode(_sfc_main$2, { class: "i-medium" }),
353
+ _cache[11] || (_cache[11] = createTextVNode(" Play All "))
354
+ ]),
355
+ _: 1
356
+ }),
357
+ createVNode(_sfc_main$1, {
358
+ onClick: shufflePlay,
359
+ color: "primary",
360
+ size: "medium",
361
+ class: "flex-1 flex-center gap-thin"
362
+ }, {
363
+ default: withCtx(() => [
364
+ createVNode(_sfc_main$3, { class: "i-medium" }),
365
+ _cache[12] || (_cache[12] = createTextVNode(" Shuffle "))
366
+ ]),
367
+ _: 1
368
+ }),
369
+ createVNode(_sfc_main$1, {
370
+ onClick: toggleFollow,
371
+ color: "primary",
372
+ size: "medium",
373
+ class: "flex-1 flex-center gap-thin"
374
+ }, {
375
+ default: withCtx(() => [
376
+ createTextVNode(toDisplayString(isFollowing.value ? "Follow" : "Unfollow"), 1)
377
+ ]),
378
+ _: 1
379
+ }),
380
+ createVNode(_sfc_main$4, {
381
+ label: { component: _sfc_main$5, class: "i-medium" },
382
+ modelValue: showDropdown.value,
383
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showDropdown.value = $event),
384
+ class: "relative"
385
+ }, {
386
+ trigger: withCtx(() => [
387
+ createVNode(_sfc_main$1, {
388
+ color: "transp",
389
+ size: "medium",
390
+ class: "w-3r h-3r radius-full"
391
+ }, {
392
+ default: withCtx(() => [
393
+ createVNode(_sfc_main$5, { class: "w-1-25r h-1-25r" })
394
+ ]),
395
+ _: 1
396
+ })
397
+ ]),
398
+ default: withCtx(() => [
399
+ createElementVNode("div", _hoisted_17, [
301
400
  createVNode(_sfc_main$1, {
302
401
  onClick: addToQueue,
303
- class: "bg-transparent border-none pd-thin w-100 t-left hover-bg-dark radius-small",
304
- showLoader: false,
305
- showSucces: false
306
- }, {
307
- default: withCtx(() => _cache[16] || (_cache[16] = [
308
- createElementVNode("span", null, "Add to Queue", -1)
309
- ])),
310
- _: 1
311
- })
312
- ]),
313
- isOwner.value ? (openBlock(), createElementBlock("li", _hoisted_17, [
314
- createVNode(_sfc_main$1, {
315
- onClick: toggleCollaborative,
316
- class: "bg-transparent border-none pd-thin w-100 t-left hover-bg-dark radius-small",
317
- showLoader: false,
318
- showSucces: false
319
- }, {
320
- default: withCtx(() => [
321
- createElementVNode("span", null, toDisplayString(playlist.value.isCollaborative ? "Make Private" : "Make Collaborative"), 1)
322
- ]),
323
- _: 1
324
- })
325
- ])) : createCommentVNode("", true),
326
- isOwner.value ? (openBlock(), createElementBlock("li", _hoisted_18, [
327
- createVNode(_sfc_main$1, {
328
- onClick: deletePlaylist,
329
- class: "bg-transparent border-none pd-thin t-fourth w-100 t-left hover-bg-dark radius-small",
330
- showLoader: false,
331
- showSucces: false
402
+ color: "transp",
403
+ size: "small",
404
+ class: "w-100 justify-start"
332
405
  }, {
333
- default: withCtx(() => _cache[17] || (_cache[17] = [
334
- createElementVNode("span", null, "Delete", -1)
406
+ default: withCtx(() => _cache[13] || (_cache[13] = [
407
+ createTextVNode(" Add to Queue ")
335
408
  ])),
336
409
  _: 1
337
- })
338
- ])) : createCommentVNode("", true),
339
- createElementVNode("li", null, [
410
+ }),
340
411
  createVNode(_sfc_main$1, {
341
412
  onClick: copyLink,
342
- class: "bg-transparent border-none pd-thin w-100 t-left hover-bg-dark radius-small",
343
- showLoader: false,
344
- showSucces: false
413
+ color: "transp",
414
+ size: "small",
415
+ class: "w-100 justify-start"
345
416
  }, {
346
- default: withCtx(() => _cache[18] || (_cache[18] = [
347
- createElementVNode("span", null, "Copy Link", -1)
417
+ default: withCtx(() => _cache[14] || (_cache[14] = [
418
+ createTextVNode(" Copy Link ")
348
419
  ])),
349
420
  _: 1
350
- })
421
+ }),
422
+ isOwner.value || isCollaborator.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
423
+ _cache[17] || (_cache[17] = createElementVNode("hr", { class: "mn-v-thin border-dark-transp-10" }, null, -1)),
424
+ createVNode(_sfc_main$1, {
425
+ onClick: editPlaylist,
426
+ color: "transp",
427
+ size: "small",
428
+ class: "w-100 justify-start"
429
+ }, {
430
+ default: withCtx(() => _cache[15] || (_cache[15] = [
431
+ createTextVNode(" Edit Playlist ")
432
+ ])),
433
+ _: 1
434
+ }),
435
+ isOwner.value ? (openBlock(), createBlock(_sfc_main$1, {
436
+ key: 0,
437
+ onClick: toggleCollaborative,
438
+ color: "transp",
439
+ size: "small",
440
+ class: "w-100 justify-start"
441
+ }, {
442
+ default: withCtx(() => [
443
+ createTextVNode(toDisplayString(playlist.value.isCollaborative ? "Make Private" : "Make Collaborative"), 1)
444
+ ]),
445
+ _: 1
446
+ })) : createCommentVNode("", true),
447
+ isOwner.value ? (openBlock(), createBlock(_sfc_main$1, {
448
+ key: 1,
449
+ onClick: deletePlaylist,
450
+ color: "danger",
451
+ size: "small",
452
+ class: "w-100 justify-start"
453
+ }, {
454
+ default: withCtx(() => _cache[16] || (_cache[16] = [
455
+ createTextVNode(" Delete Playlist ")
456
+ ])),
457
+ _: 1
458
+ })) : createCommentVNode("", true)
459
+ ], 64)) : createCommentVNode("", true)
351
460
  ])
352
- ])) : createCommentVNode("", true)
353
- ]),
354
- default: withCtx(() => [
355
- createVNode(_sfc_main$1, {
356
- onClick: _cache[0] || (_cache[0] = ($event) => showDropdown.value = !showDropdown.value),
357
- class: "bg-transparent border-none pd-zero",
358
- showLoader: false,
359
- showSucces: false
461
+ ]),
462
+ _: 1
463
+ }, 8, ["label", "modelValue"])
464
+ ]),
465
+ createElementVNode("div", _hoisted_18, [
466
+ _cache[18] || (_cache[18] = createElementVNode("h3", { class: "t-medium mn-b-small" }, "Created by", -1)),
467
+ createElementVNode("div", _hoisted_19, [
468
+ createVNode(_component_router_link, {
469
+ to: getOwnerProfileLink(playlist.value.creator || playlist.value.owner),
470
+ class: "flex items-center gap-medium flex-1 hover-opacity"
471
+ }, {
472
+ default: withCtx(() => [
473
+ createElementVNode("div", _hoisted_20, [
474
+ getOwnerData(playlist.value)?.photoUrl ? (openBlock(), createBlock(Media, {
475
+ key: 0,
476
+ url: getOwnerData(playlist.value).photoUrl,
477
+ alt: getOwnerData(playlist.value)?.name,
478
+ class: "w-4r h-4r radius-full object-cover"
479
+ }, null, 8, ["url", "alt"])) : (openBlock(), createElementBlock("div", _hoisted_21, toDisplayString(getPlaylistOwnerName(playlist.value).charAt(0)), 1))
480
+ ]),
481
+ createElementVNode("div", null, [
482
+ createElementVNode("div", _hoisted_22, [
483
+ createElementVNode("span", _hoisted_23, toDisplayString(getPlaylistOwnerName(playlist.value)), 1),
484
+ getOwnerData(playlist.value)?.isVerified ? (openBlock(), createBlock(_sfc_main$6, {
485
+ key: 0,
486
+ class: "w-1r h-1r t-primary"
487
+ })) : createCommentVNode("", true)
488
+ ]),
489
+ createElementVNode("span", _hoisted_24, toDisplayString(playlist.value.creator?.type || "User"), 1)
490
+ ])
491
+ ]),
492
+ _: 1
493
+ }, 8, ["to"]),
494
+ !isOwner.value && unref(state$1).user ? (openBlock(), createBlock(_sfc_main$1, {
495
+ key: 0,
496
+ onClick: _cache[1] || (_cache[1] = () => toggleFollowUser(getOwnerId(playlist.value))),
497
+ color: followedUsers.value.includes(getOwnerId(playlist.value)) ? "primary" : "transp",
498
+ size: "small"
360
499
  }, {
361
500
  default: withCtx(() => [
362
- createVNode(_sfc_main$5, {
363
- class: "i-medium",
364
- fill: "rgb(var(--white))"
365
- })
501
+ createTextVNode(toDisplayString(followedUsers.value.includes(getOwnerId(playlist.value)) ? "Following" : "Follow"), 1)
366
502
  ]),
367
503
  _: 1
368
- })
504
+ }, 8, ["color"])) : createCommentVNode("", true)
505
+ ])
506
+ ]),
507
+ playlist.value.collaborators && playlist.value.collaborators.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_25, [
508
+ _cache[19] || (_cache[19] = createElementVNode("h3", { class: "t-medium mn-b-small" }, "Collaborators", -1)),
509
+ createElementVNode("div", _hoisted_26, [
510
+ (openBlock(true), createElementBlock(Fragment, null, renderList(playlist.value.collaborators, (collaborator) => {
511
+ return openBlock(), createElementBlock("div", {
512
+ key: collaborator._id || collaborator,
513
+ class: "collaborator-chip bg-light pd-thin-big radius-full flex items-center gap-thin"
514
+ }, [
515
+ collaborator.photoUrl ? (openBlock(), createBlock(Media, {
516
+ key: 0,
517
+ url: collaborator.photoUrl,
518
+ class: "w-1-5r h-1-5r radius-full object-cover"
519
+ }, null, 8, ["url"])) : createCommentVNode("", true),
520
+ createElementVNode("span", _hoisted_27, toDisplayString(collaborator.name || collaborator.profile?.name || "User"), 1)
521
+ ]);
522
+ }), 128))
523
+ ])
524
+ ])) : createCommentVNode("", true),
525
+ createElementVNode("div", _hoisted_28, [
526
+ createElementVNode("div", _hoisted_29, [
527
+ createVNode(_sfc_main$7, { class: "i-medium t-primary" }),
528
+ createElementVNode("div", null, [
529
+ _cache[20] || (_cache[20] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Created", -1)),
530
+ createElementVNode("div", _hoisted_30, toDisplayString(formatDate(playlist.value.createdAt)), 1)
531
+ ])
369
532
  ]),
370
- _: 1
371
- })
372
- ]),
373
- createElementVNode("div", _hoisted_19, [
374
- playlistTracks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_20, [
375
- _cache[20] || (_cache[20] = createElementVNode("h3", { class: "mn-b-small" }, "This playlist is empty", -1)),
376
- _cache[21] || (_cache[21] = createElementVNode("p", { class: "t-grey t-medium" }, "Add some tracks to get started", -1)),
377
- isOwner.value || isCollaborator.value ? (openBlock(), createBlock(_sfc_main$1, {
378
- key: 0,
379
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$router.push({ name: "music-search" })),
380
- class: "bg-main radius-small pd-small mn-t-medium hover-scale-1",
381
- showLoader: false,
382
- showSucces: false
383
- }, {
384
- default: withCtx(() => _cache[19] || (_cache[19] = [
385
- createTextVNode(" Find Tracks ")
386
- ])),
387
- _: 1
388
- })) : createCommentVNode("", true)
389
- ])) : (openBlock(), createBlock(_sfc_main$6, {
390
- key: 1,
391
- store: {
392
- read: () => _ctx.Promise.resolve(playlistTracks.value),
393
- state: { isLoading: false }
394
- },
395
- external: true,
396
- items: playlistTracks.value,
397
- states: {
398
- empty: {
399
- title: "No tracks in playlist",
400
- description: "Add some tracks to get started",
401
- class: "pd-medium bg-dark-transp-10 radius-medium"
402
- }
403
- },
404
- class: "gap-thin"
405
- }, {
406
- default: withCtx(({ items }) => [
407
- (openBlock(true), createElementBlock(Fragment, null, renderList(items, (track) => {
408
- return openBlock(), createBlock(TrackCard, {
533
+ createElementVNode("div", _hoisted_31, [
534
+ createVNode(IconClock, { class: "i-medium t-primary" }),
535
+ createElementVNode("div", null, [
536
+ _cache[21] || (_cache[21] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Duration", -1)),
537
+ createElementVNode("div", _hoisted_32, toDisplayString(totalDuration.value), 1)
538
+ ])
539
+ ]),
540
+ createElementVNode("div", _hoisted_33, [
541
+ createVNode(_sfc_main$8, { class: "i-medium t-primary" }),
542
+ createElementVNode("div", null, [
543
+ _cache[22] || (_cache[22] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Updated", -1)),
544
+ createElementVNode("div", _hoisted_34, toDisplayString(formatDate(playlist.value.updatedAt)), 1)
545
+ ])
546
+ ]),
547
+ createElementVNode("div", _hoisted_35, [
548
+ createVNode(_sfc_main$9, { class: "i-medium t-primary" }),
549
+ createElementVNode("div", null, [
550
+ _cache[23] || (_cache[23] = createElementVNode("div", { class: "t-small t-transp t-uppercase" }, "Visibility", -1)),
551
+ createElementVNode("div", _hoisted_36, toDisplayString(playlist.value.isPublic ? "Public" : "Private"), 1)
552
+ ])
553
+ ])
554
+ ]),
555
+ playlist.value.tags && playlist.value.tags.length ? (openBlock(), createElementBlock("div", _hoisted_37, [
556
+ _cache[24] || (_cache[24] = createElementVNode("h3", { class: "t-medium mn-b-small" }, "Tags", -1)),
557
+ createElementVNode("div", _hoisted_38, [
558
+ (openBlock(true), createElementBlock(Fragment, null, renderList(playlist.value.tags, (tag) => {
559
+ return openBlock(), createElementBlock("span", {
560
+ key: tag,
561
+ class: "tag bg-light t-transp pd-thin-big radius-small t-small hover-bg-light cursor-pointer"
562
+ }, " #" + toDisplayString(tag), 1);
563
+ }), 128))
564
+ ])
565
+ ])) : createCommentVNode("", true),
566
+ playlist.value.description ? (openBlock(), createElementBlock("div", _hoisted_39, [
567
+ _cache[25] || (_cache[25] = createElementVNode("h3", { class: "t-medium mn-b-small" }, "About", -1)),
568
+ createElementVNode("p", _hoisted_40, toDisplayString(playlist.value.description), 1)
569
+ ])) : createCommentVNode("", true)
570
+ ])
571
+ ])) : createCommentVNode("", true),
572
+ !_ctx.isLoading && playlist.value && playlistTracks.value.length ? (openBlock(), createElementBlock("section", _hoisted_41, [
573
+ _cache[26] || (_cache[26] = createElementVNode("h2", { class: "h2 mn-b-medium" }, "Tracklist", -1)),
574
+ createVNode(_sfc_main$a, {
575
+ store: {
576
+ read: () => _ctx.Promise.resolve(playlistTracks.value),
577
+ state: { isLoading: false }
578
+ },
579
+ external: true,
580
+ items: playlistTracks.value,
581
+ states: {
582
+ empty: {
583
+ title: "No tracks in playlist",
584
+ description: "Add some tracks to get started",
585
+ class: "pd-medium t-center"
586
+ }
587
+ }
588
+ }, {
589
+ default: withCtx(({ items }) => [
590
+ createElementVNode("div", _hoisted_42, [
591
+ (openBlock(true), createElementBlock(Fragment, null, renderList(items, (track, index) => {
592
+ return openBlock(), createBlock(_sfc_main$b, {
409
593
  key: track._id,
410
594
  track,
595
+ index: index + 1,
411
596
  showAlbum: true,
412
597
  showCover: true,
413
- class: "w-100 bg-dark-transp-10 radius-medium"
414
- }, null, 8, ["track"]);
598
+ canRemove: isOwner.value || isCollaborator.value,
599
+ onRemove: () => removeTrack(track._id)
600
+ }, null, 8, ["track", "index", "canRemove", "onRemove"]);
415
601
  }), 128))
416
- ]),
417
- _: 1
418
- }, 8, ["store", "items"]))
419
- ]),
420
- showEditModal.value && isOwner.value ? (openBlock(), createBlock(_sfc_main$7, {
421
- key: 0,
422
- onClosePopup: _cache[8] || (_cache[8] = ($event) => showEditModal.value = false),
423
- class: "bg-dark pd-small w-m-25r radius-medium"
424
- }, {
425
- default: withCtx(() => [
426
- _cache[28] || (_cache[28] = createElementVNode("h3", { class: "mn-b-medium" }, "Edit Playlist", -1)),
427
- createElementVNode("form", {
428
- onSubmit: withModifiers(updatePlaylist, ["prevent"])
429
- }, [
430
- createElementVNode("div", _hoisted_21, [
431
- _cache[22] || (_cache[22] = createElementVNode("label", {
432
- for: "title",
433
- class: "t-medium mn-b-thin d-block"
434
- }, "Playlist Name", -1)),
435
- createVNode(Field, {
436
- field: editForm.title,
437
- "onUpdate:field": _cache[2] || (_cache[2] = ($event) => editForm.title = $event),
438
- id: "title",
439
- type: "text",
440
- placeholder: "Playlist Name",
441
- validation: validationErrors.title,
442
- class: "w-100 pd-small bg-dark-transp-25 radius-small"
443
- }, null, 8, ["field", "validation"])
444
- ]),
445
- createElementVNode("div", _hoisted_22, [
446
- _cache[23] || (_cache[23] = createElementVNode("label", {
447
- for: "description",
448
- class: "t-medium mn-b-thin d-block"
449
- }, "Description", -1)),
450
- createVNode(Field, {
451
- field: editForm.description,
452
- "onUpdate:field": _cache[3] || (_cache[3] = ($event) => editForm.description = $event),
453
- id: "description",
454
- type: "textarea",
455
- placeholder: "Add an optional description",
456
- class: "w-100 pd-small bg-dark-transp-25 radius-small"
457
- }, null, 8, ["field"])
458
- ]),
459
- createElementVNode("div", _hoisted_23, [
460
- _cache[24] || (_cache[24] = createElementVNode("label", { class: "t-medium mn-b-thin d-block" }, "Privacy", -1)),
461
- createElementVNode("div", _hoisted_24, [
462
- createVNode(_sfc_main$8, {
463
- radio: editForm.isPublic,
464
- "onUpdate:radio": _cache[4] || (_cache[4] = ($event) => editForm.isPublic = $event),
465
- value: true,
466
- name: "privacy",
467
- label: "Public",
468
- class: ""
469
- }, null, 8, ["radio"]),
470
- createVNode(_sfc_main$8, {
471
- radio: editForm.isPublic,
472
- "onUpdate:radio": _cache[5] || (_cache[5] = ($event) => editForm.isPublic = $event),
473
- value: false,
474
- name: "privacy",
475
- label: "Private",
476
- class: ""
477
- }, null, 8, ["radio"])
478
- ])
479
- ]),
480
- createElementVNode("div", _hoisted_25, [
481
- _cache[25] || (_cache[25] = createElementVNode("label", { class: "t-medium mn-b-thin d-block" }, "Cover Image", -1)),
482
- createElementVNode("div", _hoisted_26, [
483
- createElementVNode("div", _hoisted_27, [
484
- editForm.coverUrl ? (openBlock(), createBlock(Media, {
485
- key: 0,
486
- url: editForm.coverUrl,
487
- class: "w-10r h-10r object-fit-cover"
488
- }, null, 8, ["url"])) : (openBlock(), createElementBlock("div", _hoisted_28, [
489
- createVNode(_sfc_main$9, {
490
- class: "i-big",
491
- fill: "rgb(var(--grey))"
492
- })
493
- ]))
494
- ]),
495
- createVNode(_sfc_main$a, {
496
- photo: editForm.coverUrl,
497
- "onUpdate:photo": _cache[6] || (_cache[6] = ($event) => editForm.coverUrl = $event),
498
- uploadPath: "playlists",
499
- class: "flex-1 h-10r bg-dark-transp-25 radius-small"
500
- }, null, 8, ["photo"])
501
- ])
502
- ]),
503
- createElementVNode("div", _hoisted_29, [
504
- createVNode(_sfc_main$1, {
505
- onClick: _cache[7] || (_cache[7] = ($event) => showEditModal.value = false),
506
- type: "button",
507
- class: "bg-dark-transp-25 pd-small radius-small mn-r-small hover-bg-dark",
508
- showLoader: false,
509
- showSucces: false
510
- }, {
511
- default: withCtx(() => _cache[26] || (_cache[26] = [
512
- createTextVNode(" Cancel ")
513
- ])),
514
- _: 1
515
- }),
516
- createVNode(_sfc_main$1, {
517
- type: "submit",
518
- class: "bg-main pd-small radius-small hover-scale-1",
519
- submit: updatePlaylist,
520
- showLoader: true,
521
- showSucces: true,
522
- validation: !!Object.keys(validationErrors).length
523
- }, {
524
- default: withCtx(() => _cache[27] || (_cache[27] = [
525
- createTextVNode(" Save ")
526
- ])),
527
- _: 1
528
- }, 8, ["validation"])
529
- ])
530
- ], 32)
531
- ]),
532
- _: 1
533
- })) : createCommentVNode("", true),
534
- showDeleteModal.value ? (openBlock(), createBlock(_sfc_main$7, {
535
- key: 1,
536
- onClosePopup: _cache[10] || (_cache[10] = ($event) => showDeleteModal.value = false),
537
- class: "bg-dark pd-small w-m-25r radius-medium"
538
- }, {
539
- default: withCtx(() => [
540
- _cache[31] || (_cache[31] = createElementVNode("h3", { class: "mn-b-medium" }, "Delete Playlist", -1)),
541
- _cache[32] || (_cache[32] = createElementVNode("p", { class: "t-grey mn-b-medium" }, "Are you sure you want to delete this playlist? This action cannot be undone.", -1)),
542
- createElementVNode("div", _hoisted_30, [
543
- createVNode(_sfc_main$1, {
544
- onClick: _cache[9] || (_cache[9] = ($event) => showDeleteModal.value = false),
545
- class: "bg-dark-transp-25 pd-small radius-small mn-r-small hover-bg-dark",
546
- showLoader: false,
547
- showSucces: false
548
- }, {
549
- default: withCtx(() => _cache[29] || (_cache[29] = [
550
- createTextVNode(" Cancel ")
551
- ])),
552
- _: 1
553
- }),
554
- createVNode(_sfc_main$1, {
555
- onClick: confirmDelete,
556
- class: "bg-fourth pd-small radius-small hover-scale-1",
557
- showLoader: true,
558
- showSucces: true
559
- }, {
560
- default: withCtx(() => _cache[30] || (_cache[30] = [
561
- createTextVNode(" Delete ")
562
- ])),
563
- _: 1
564
- })
565
602
  ])
566
603
  ]),
567
604
  _: 1
568
- })) : createCommentVNode("", true)
569
- ]))
605
+ }, 8, ["store", "items"])
606
+ ])) : !_ctx.isLoading && playlist.value && !playlistTracks.value.length ? (openBlock(), createElementBlock("section", _hoisted_43, [
607
+ createElementVNode("div", _hoisted_44, [
608
+ _cache[28] || (_cache[28] = createElementVNode("h3", { class: "mn-b-small" }, "This playlist is empty", -1)),
609
+ _cache[29] || (_cache[29] = createElementVNode("p", { class: "t-transp t-medium mn-b-medium" }, "Add some tracks to get started", -1)),
610
+ isOwner.value || isCollaborator.value ? (openBlock(), createBlock(_sfc_main$1, {
611
+ key: 0,
612
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$router.push({ name: "music-search" })),
613
+ color: "primary",
614
+ size: "medium"
615
+ }, {
616
+ default: withCtx(() => _cache[27] || (_cache[27] = [
617
+ createTextVNode(" Find Tracks ")
618
+ ])),
619
+ _: 1
620
+ })) : createCommentVNode("", true)
621
+ ])
622
+ ])) : createCommentVNode("", true),
623
+ !_ctx.isLoading && playlist.value && morePlaylists.value.length ? (openBlock(), createElementBlock("section", _hoisted_45, [
624
+ createElementVNode("div", _hoisted_46, [
625
+ _cache[31] || (_cache[31] = createElementVNode("h2", { class: "h2" }, "More Playlists", -1)),
626
+ playlist.value.creator ? (openBlock(), createBlock(_component_router_link, {
627
+ key: 0,
628
+ to: getOwnerProfileLink(playlist.value.creator),
629
+ class: "t-primary hover-opacity"
630
+ }, {
631
+ default: withCtx(() => _cache[30] || (_cache[30] = [
632
+ createTextVNode(" See all ")
633
+ ])),
634
+ _: 1
635
+ }, 8, ["to"])) : createCommentVNode("", true)
636
+ ]),
637
+ createElementVNode("div", _hoisted_47, [
638
+ (openBlock(true), createElementBlock(Fragment, null, renderList(morePlaylists.value, (relatedPlaylist) => {
639
+ return openBlock(), createElementBlock("li", {
640
+ key: relatedPlaylist._id,
641
+ class: "flex-none scroll-snap-align-start"
642
+ }, [
643
+ createVNode(PlaylistCard, {
644
+ playlist: relatedPlaylist,
645
+ class: "w-min-15r transition-cubic-in-out"
646
+ }, null, 8, ["playlist"])
647
+ ]);
648
+ }), 128))
649
+ ])
650
+ ])) : createCommentVNode("", true),
651
+ createVNode(_sfc_main$c, {
652
+ isPopupOpen: showEditModal.value && (isOwner.value || isCollaborator.value),
653
+ onClosePopup: _cache[4] || (_cache[4] = ($event) => showEditModal.value = false),
654
+ class: "bg-dark pd-medium w-m-30r radius-medium"
655
+ }, {
656
+ default: withCtx(() => [
657
+ createVNode(_sfc_main$d, {
658
+ editMode: true,
659
+ url: playlist.value.url,
660
+ onCancel: _cache[3] || (_cache[3] = ($event) => showEditModal.value = false),
661
+ onUpdated: handlePlaylistUpdated
662
+ }, null, 8, ["url"])
663
+ ]),
664
+ _: 1
665
+ }, 8, ["isPopupOpen"]),
666
+ createVNode(_sfc_main$c, {
667
+ isPopupOpen: showDeleteModal.value,
668
+ onClosePopup: _cache[6] || (_cache[6] = ($event) => showDeleteModal.value = false),
669
+ class: "bg-dark pd-medium w-m-25r radius-medium"
670
+ }, {
671
+ default: withCtx(() => [
672
+ _cache[34] || (_cache[34] = createElementVNode("h3", { class: "mn-b-medium" }, "Delete Playlist", -1)),
673
+ createElementVNode("p", _hoisted_48, 'Are you sure you want to delete "' + toDisplayString(playlist.value.title) + '"? This action cannot be undone.', 1),
674
+ createElementVNode("div", _hoisted_49, [
675
+ createVNode(_sfc_main$1, {
676
+ onClick: _cache[5] || (_cache[5] = ($event) => showDeleteModal.value = false),
677
+ color: "transp",
678
+ size: "medium"
679
+ }, {
680
+ default: withCtx(() => _cache[32] || (_cache[32] = [
681
+ createTextVNode(" Cancel ")
682
+ ])),
683
+ _: 1
684
+ }),
685
+ createVNode(_sfc_main$1, {
686
+ onClick: confirmDelete,
687
+ color: "danger",
688
+ size: "medium"
689
+ }, {
690
+ default: withCtx(() => _cache[33] || (_cache[33] = [
691
+ createTextVNode(" Delete Playlist ")
692
+ ])),
693
+ _: 1
694
+ })
695
+ ])
696
+ ]),
697
+ _: 1
698
+ }, 8, ["isPopupOpen"])
570
699
  ]);
571
700
  };
572
701
  }