@saooti/octopus-sdk 37.0.6 → 37.0.8

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 (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -1,37 +1,37 @@
1
1
  <template>
2
2
  <PodcastItem
3
- v-if="live && 0!==live.podcastId"
3
+ v-if="live && 0 !== live.podcastId"
4
4
  :podcast="live"
5
5
  :fetch-conference="fetchConference"
6
6
  />
7
7
  </template>
8
8
 
9
9
  <script lang="ts">
10
- import octopusApi from '@saooti/octopus-api';
11
- import PodcastItem from '../podcasts/PodcastItem.vue';
12
- import crudApi from '@/api/classicCrud';
13
- import displayMethods from '../../mixins/displayMethods';
14
- import { Podcast } from '@/stores/class/general/podcast';
15
- import { defineComponent } from 'vue';
16
- import { Conference } from '@/stores/class/conference/conference';
10
+ import octopusApi from "@saooti/octopus-api";
11
+ import PodcastItem from "../podcasts/PodcastItem.vue";
12
+ import crudApi from "@/api/classicCrud";
13
+ import displayMethods from "../../mixins/displayMethods";
14
+ import { Podcast } from "@/stores/class/general/podcast";
15
+ import { defineComponent } from "vue";
16
+ import { Conference } from "@/stores/class/conference/conference";
17
17
  export default defineComponent({
18
- name: 'LiveItem',
18
+ name: "LiveItem",
19
19
 
20
20
  components: {
21
21
  PodcastItem,
22
22
  },
23
23
  mixins: [displayMethods],
24
24
  props: {
25
- fetchConference: { default: undefined, type: Object as ()=>Conference},
25
+ fetchConference: { default: undefined, type: Object as () => Conference },
26
26
  },
27
- emits: ['deleteItem', 'updateItem'],
27
+ emits: ["deleteItem", "updateItem"],
28
28
 
29
29
  data() {
30
30
  return {
31
- live: undefined as Podcast|undefined,
31
+ live: undefined as Podcast | undefined,
32
32
  };
33
33
  },
34
-
34
+
35
35
  async created() {
36
36
  this.fetchPodcastData();
37
37
  this.watchStatus();
@@ -40,28 +40,44 @@ export default defineComponent({
40
40
  async fetchPodcastData(): Promise<void> {
41
41
  if (!this.fetchConference || !this.fetchConference.podcastId) return;
42
42
  try {
43
- this.live = await octopusApi.fetchData<Podcast>(0, 'podcast/'+this.fetchConference.podcastId);
43
+ this.live = await octopusApi.fetchData<Podcast>(
44
+ 0,
45
+ "podcast/" + this.fetchConference.podcastId,
46
+ );
44
47
  } catch {
45
- this.$emit('deleteItem');
46
- if(this.fetchConference.conferenceId){
47
- await crudApi.deleteData(9 ,'conference/'+this.fetchConference.conferenceId);
48
+ this.$emit("deleteItem");
49
+ if (this.fetchConference.conferenceId) {
50
+ await crudApi.deleteData(
51
+ 9,
52
+ "conference/" + this.fetchConference.conferenceId,
53
+ );
48
54
  }
49
55
  }
50
56
  },
51
- async watchStatus():Promise<void>{
52
- if(!this.fetchConference || ("PLANNED"!==this.fetchConference.status && "PENDING"!==this.fetchConference.status && "RECORDING"!==this.fetchConference.status)){
57
+ async watchStatus(): Promise<void> {
58
+ if (
59
+ !this.fetchConference ||
60
+ ("PLANNED" !== this.fetchConference.status &&
61
+ "PENDING" !== this.fetchConference.status &&
62
+ "RECORDING" !== this.fetchConference.status)
63
+ ) {
53
64
  return;
54
65
  }
55
- const newStatus = await octopusApi.fetchData<string>(9, 'conference/realstatus/'+this.fetchConference.conferenceId);
56
- if(newStatus !== this.fetchConference.status){
57
- this.$emit('updateItem', {...this.fetchConference, ...{status: newStatus}});
58
- }else{
66
+ const newStatus = await octopusApi.fetchData<string>(
67
+ 9,
68
+ "conference/realstatus/" + this.fetchConference.conferenceId,
69
+ );
70
+ if (newStatus !== this.fetchConference.status) {
71
+ this.$emit("updateItem", {
72
+ ...this.fetchConference,
73
+ ...{ status: newStatus },
74
+ });
75
+ } else {
59
76
  setTimeout(() => {
60
77
  this.watchStatus();
61
78
  }, 5000);
62
79
  }
63
- }
80
+ },
64
81
  },
65
- })
82
+ });
66
83
  </script>
67
-
@@ -3,21 +3,23 @@
3
3
  v-if="filterOrgaId || organisationId"
4
4
  class="d-flex flex-column align-items-start mt-3"
5
5
  >
6
- <div class="d-flex justify-content-between flex-grow-1 mb-3 w-100 align-items-center">
6
+ <div
7
+ class="d-flex justify-content-between flex-grow-1 mb-3 w-100 align-items-center"
8
+ >
7
9
  <h2 class="mb-0 big-h2">
8
- {{ $t('Live') }}
10
+ {{ $t("Live") }}
9
11
  </h2>
10
12
  <router-link
11
13
  v-if="liveRight && !isPodcastmaker"
12
14
  to="/main/priv/edit/live"
13
15
  >
14
16
  <button class="btn btn-primary">
15
- {{ $t('Launch a new live') }}
17
+ {{ $t("Launch a new live") }}
16
18
  </button>
17
19
  </router-link>
18
20
  </div>
19
21
  <ClassicSelect
20
- v-if="lives.length || 'ALL'!==selectedStatus"
22
+ v-if="lives.length || 'ALL' !== selectedStatus"
21
23
  v-model:textInit="selectedStatus"
22
24
  id-select="status-live-chooser-select"
23
25
  :label="$t('Selection by status')"
@@ -26,19 +28,16 @@
26
28
  class="mb-3"
27
29
  />
28
30
  <ClassicLoading
29
- :loading-text="loading?$t('Loading lives...'):undefined"
30
- :error-text="0===lives.length?$t('No live currently'):undefined"
31
+ :loading-text="loading ? $t('Loading lives...') : undefined"
32
+ :error-text="0 === lives.length ? $t('No live currently') : undefined"
31
33
  />
32
34
  <template v-if="lives.length">
33
- <SwiperList
34
- v-if="!loading"
35
- :list-object="lives"
36
- >
37
- <template #octopusSlide="{option, index}">
35
+ <SwiperList v-if="!loading" :list-object="lives">
36
+ <template #octopusSlide="{ option, index }">
38
37
  <LiveItem
39
38
  :fetch-conference="option"
40
- @deleteItem="deleteLive(index)"
41
- @updateItem="updateLive($event, index)"
39
+ @delete-item="deleteLive(index)"
40
+ @update-item="updateLive($event, index)"
42
41
  />
43
42
  </template>
44
43
  </SwiperList>
@@ -47,33 +46,33 @@
47
46
  </template>
48
47
 
49
48
  <script lang="ts">
50
- import ClassicLoading from '../../form/ClassicLoading.vue';
51
- import LiveItem from './LiveItem.vue';
52
- import ClassicSelect from '../../form/ClassicSelect.vue';
53
- import SwiperList from '../list/SwiperList.vue';
54
- import { handle403 } from '../../mixins/handle403';
55
- import { orgaComputed } from '../../mixins/orgaComputed';
56
- import octopusApi from '@saooti/octopus-api';
57
- import { useFilterStore } from '@/stores/FilterStore';
58
- import { useAuthStore } from '@/stores/AuthStore';
59
- import { mapState } from 'pinia';
60
- import { state } from '../../../stores/ParamSdkStore';
61
- import { Conference } from '@/stores/class/conference/conference';
62
- import { defineComponent } from 'vue'
63
- import { AxiosError } from 'axios';
49
+ import ClassicLoading from "../../form/ClassicLoading.vue";
50
+ import LiveItem from "./LiveItem.vue";
51
+ import ClassicSelect from "../../form/ClassicSelect.vue";
52
+ import SwiperList from "../list/SwiperList.vue";
53
+ import { handle403 } from "../../mixins/handle403";
54
+ import { orgaComputed } from "../../mixins/orgaComputed";
55
+ import octopusApi from "@saooti/octopus-api";
56
+ import { useFilterStore } from "@/stores/FilterStore";
57
+ import { useAuthStore } from "@/stores/AuthStore";
58
+ import { mapState } from "pinia";
59
+ import { state } from "../../../stores/ParamSdkStore";
60
+ import { Conference } from "@/stores/class/conference/conference";
61
+ import { defineComponent } from "vue";
62
+ import { AxiosError } from "axios";
64
63
  export default defineComponent({
65
- name: 'LiveList',
64
+ name: "LiveList",
66
65
  components: {
67
66
  LiveItem,
68
67
  ClassicLoading,
69
68
  SwiperList,
70
- ClassicSelect
69
+ ClassicSelect,
71
70
  },
72
71
 
73
72
  mixins: [handle403, orgaComputed],
74
73
 
75
74
  props: {
76
- organisationId: { default: undefined, type: String},
75
+ organisationId: { default: undefined, type: String },
77
76
  },
78
77
  data() {
79
78
  return {
@@ -83,48 +82,68 @@ export default defineComponent({
83
82
  isLiveAuthorized: false as boolean,
84
83
  statusClassic: ["RECORDING", "PENDING", "PLANNED"] as Array<string>,
85
84
  statusAdmin: ["DEBRIEFING", "ERROR", "PUBLISHING"] as Array<string>,
86
- selectedStatus: "ALL" as string
85
+ selectedStatus: "ALL" as string,
87
86
  };
88
87
  },
89
-
88
+
90
89
  computed: {
91
- ...mapState(useFilterStore, ['filterOrgaId']),
92
- ...mapState(useAuthStore, ['authOrganisation']),
93
- filterOrgaUsed(): string|undefined {
94
- return this.filterOrgaId?this.filterOrgaId:this.organisationId;
90
+ ...mapState(useFilterStore, ["filterOrgaId"]),
91
+ ...mapState(useAuthStore, ["authOrganisation"]),
92
+ filterOrgaUsed(): string | undefined {
93
+ return this.filterOrgaId ? this.filterOrgaId : this.organisationId;
95
94
  },
96
95
  editRight(): boolean {
97
- return (true ===this.authenticated && this.myOrganisationId === this.filterOrgaUsed) ||true===state.generalParameters.isAdmin;
96
+ return (
97
+ (true === this.authenticated &&
98
+ this.myOrganisationId === this.filterOrgaUsed) ||
99
+ true === state.generalParameters.isAdmin
100
+ );
98
101
  },
99
102
  liveRight(): boolean {
100
- return (state.generalParameters.isRoleLive as boolean)&& "true"===this.authOrganisation.attributes?.['live.active'];
103
+ return (
104
+ (state.generalParameters.isRoleLive as boolean) &&
105
+ "true" === this.authOrganisation.attributes?.["live.active"]
106
+ );
101
107
  },
102
108
  isPodcastmaker(): boolean {
103
- return (state.generalParameters.podcastmaker as boolean);
109
+ return state.generalParameters.podcastmaker as boolean;
104
110
  },
105
- statusArraySelect(): Array<{title: string, value:string}>{
106
- const statusArray =[{title: this.$t('All lives'), value:'ALL'}];
107
- for(let status of this.statusFetched){
108
- let title ="";
111
+ statusArraySelect(): Array<{ title: string; value: string }> {
112
+ const statusArray = [{ title: this.$t("All lives"), value: "ALL" }];
113
+ for (let status of this.statusFetched) {
114
+ let title = "";
109
115
  switch (status) {
110
- case "RECORDING": title = this.$t('In live'); break;
111
- case "PENDING": title = this.$t('live upcoming'); break;
112
- case "PLANNED": title = this.$t('live in few time'); break;
113
- case "DEBRIEFING": title = this.$t('In debriefing'); break;
114
- case "PUBLISHING": title = this.$t('In the process of being published'); break;
115
- case "ERROR": title = this.$t('In error'); break;
116
- default: break;
116
+ case "RECORDING":
117
+ title = this.$t("In live");
118
+ break;
119
+ case "PENDING":
120
+ title = this.$t("live upcoming");
121
+ break;
122
+ case "PLANNED":
123
+ title = this.$t("live in few time");
124
+ break;
125
+ case "DEBRIEFING":
126
+ title = this.$t("In debriefing");
127
+ break;
128
+ case "PUBLISHING":
129
+ title = this.$t("In the process of being published");
130
+ break;
131
+ case "ERROR":
132
+ title = this.$t("In error");
133
+ break;
134
+ default:
135
+ break;
117
136
  }
118
- statusArray.push({title: title, value: status});
137
+ statusArray.push({ title: title, value: status });
119
138
  }
120
139
  return statusArray;
121
140
  },
122
- statusFetched(): Array<string>{
123
- if(this.editRight){
141
+ statusFetched(): Array<string> {
142
+ if (this.editRight) {
124
143
  return this.statusClassic.concat(this.statusAdmin);
125
144
  }
126
145
  return this.statusClassic;
127
- }
146
+ },
128
147
  },
129
148
  watch: {
130
149
  filterOrgaUsed: {
@@ -134,22 +153,25 @@ export default defineComponent({
134
153
  },
135
154
  immediate: true,
136
155
  },
137
- selectedStatus(){
156
+ selectedStatus() {
138
157
  this.fetchContent();
139
- }
158
+ },
140
159
  },
141
160
  methods: {
142
- async checkIfLiveAuthorized(): Promise<void>{
143
- if(!this.filterOrgaUsed){
161
+ async checkIfLiveAuthorized(): Promise<void> {
162
+ if (!this.filterOrgaUsed) {
144
163
  return;
145
164
  }
146
- this.isLiveAuthorized = await octopusApi.fetchData<boolean>(0, 'organisation/liveEnabled/'+this.filterOrgaUsed);
165
+ this.isLiveAuthorized = await octopusApi.fetchData<boolean>(
166
+ 0,
167
+ "organisation/liveEnabled/" + this.filterOrgaUsed,
168
+ );
147
169
  },
148
- endLoading():void{
170
+ endLoading(): void {
149
171
  this.loading = false;
150
172
  this.loaded = true;
151
173
  },
152
- updateLive(live: Conference, index:number):void{
174
+ updateLive(live: Conference, index: number): void {
153
175
  this.lives.splice(index, 1, live);
154
176
  },
155
177
  async fetchContent(): Promise<void> {
@@ -161,16 +183,21 @@ export default defineComponent({
161
183
  this.loading = true;
162
184
  this.loaded = false;
163
185
  try {
164
- const dataLives = await octopusApi.fetchDataWithParams<Array<Conference>>(9, 'conference/list',{
186
+ const dataLives = await octopusApi.fetchDataWithParams<
187
+ Array<Conference>
188
+ >(9, "conference/list", {
165
189
  organisationId: this.filterOrgaUsed,
166
190
  withPodcastId: true,
167
- status: "ALL"===this.selectedStatus ? this.statusFetched : this.selectedStatus,
191
+ status:
192
+ "ALL" === this.selectedStatus
193
+ ? this.statusFetched
194
+ : this.selectedStatus,
168
195
  });
169
196
  this.lives = dataLives.filter((p: Conference | null) => {
170
197
  return null !== p;
171
198
  });
172
199
  } catch (error) {
173
- this.handle403((error as AxiosError));
200
+ this.handle403(error as AxiosError);
174
201
  }
175
202
  this.endLoading();
176
203
  },
@@ -178,5 +205,5 @@ export default defineComponent({
178
205
  this.lives.splice(index, 1);
179
206
  },
180
207
  },
181
- })
208
+ });
182
209
  </script>
@@ -4,9 +4,9 @@
4
4
  v-if="currentlyPlayingString.length || podcastRadio"
5
5
  class="me-2 fw-bold"
6
6
  >
7
- {{ $t('Currently') +' : ' }}
7
+ {{ $t("Currently") + " : " }}
8
8
  </div>
9
- <router-link
9
+ <router-link
10
10
  v-if="podcastRadio"
11
11
  class="d-flex align-items-center"
12
12
  :to="{
@@ -20,9 +20,9 @@
20
20
  width="80"
21
21
  height="80"
22
22
  class="small-img-box"
23
- :title="$t('Episode name image', {name:podcastRadio.title})"
24
- :alt="$t('Episode name image', {name:podcastRadio.title})"
25
- >
23
+ :title="$t('Episode name image', { name: podcastRadio.title })"
24
+ :alt="$t('Episode name image', { name: podcastRadio.title })"
25
+ />
26
26
  <div>{{ podcastRadio.title }}</div>
27
27
  </router-link>
28
28
  <div v-else-if="currentlyPlayingString.length">
@@ -32,58 +32,57 @@
32
32
  </template>
33
33
 
34
34
  <script lang="ts">
35
- import { usePlayerStore } from '@/stores/PlayerStore';
36
- import { useFilterStore } from '@/stores/FilterStore';
37
- import { mapState } from 'pinia';
38
- import imageProxy from '../../mixins/imageProxy';
39
- import {fetchRadioData} from '../../mixins/radio/fetchRadioData';
40
- import { defineComponent } from 'vue';
41
- import { Canal } from '@/stores/class/radio/canal';
42
- import { MediaRadio } from '@/stores/class/general/player';
43
- import { Podcast } from '@/stores/class/general/podcast';
35
+ import { usePlayerStore } from "@/stores/PlayerStore";
36
+ import { useFilterStore } from "@/stores/FilterStore";
37
+ import { mapState } from "pinia";
38
+ import imageProxy from "../../mixins/imageProxy";
39
+ import { fetchRadioData } from "../../mixins/radio/fetchRadioData";
40
+ import { defineComponent } from "vue";
41
+ import { Canal } from "@/stores/class/radio/canal";
42
+ import { MediaRadio } from "@/stores/class/general/player";
43
+ import { Podcast } from "@/stores/class/general/podcast";
44
44
  export default defineComponent({
45
- name: 'RadioItem',
45
+ name: "RadioItem",
46
46
 
47
- components: {
48
- },
47
+ components: {},
49
48
 
50
49
  mixins: [imageProxy, fetchRadioData],
51
50
 
52
51
  props: {
53
- radio: { default: undefined, type: Object as ()=>Canal},
52
+ radio: { default: undefined, type: Object as () => Canal },
54
53
  },
55
54
 
56
55
  data() {
57
56
  return {
58
- currentMetadata: undefined as undefined|MediaRadio,
59
- currentPodcast: undefined as undefined|Podcast,
60
- radioInterval: undefined as ReturnType<typeof setTimeout>|undefined,
57
+ currentMetadata: undefined as undefined | MediaRadio,
58
+ currentPodcast: undefined as undefined | Podcast,
59
+ radioInterval: undefined as ReturnType<typeof setTimeout> | undefined,
61
60
  };
62
61
  },
63
62
 
64
- computed:{
65
- ...mapState(usePlayerStore, ['playerRadio']),
66
- ...mapState(useFilterStore, ['filterOrgaId']),
67
- playingRadio(){
63
+ computed: {
64
+ ...mapState(usePlayerStore, ["playerRadio"]),
65
+ ...mapState(useFilterStore, ["filterOrgaId"]),
66
+ playingRadio() {
68
67
  return this.playerRadio && this.playerRadio.canalId === this.radio?.id;
69
68
  },
70
- podcastRadio():Podcast|undefined{
71
- if(this.playingRadio){
69
+ podcastRadio(): Podcast | undefined {
70
+ if (this.playingRadio) {
72
71
  return this.playerRadio?.podcast;
73
72
  }
74
73
  return this.currentPodcast;
75
74
  },
76
- currentlyPlayingString(): string{
77
- if(this.playingRadio && this.playerRadio){
75
+ currentlyPlayingString(): string {
76
+ if (this.playingRadio && this.playerRadio) {
78
77
  return this.displayTitle(this.playerRadio.metadata);
79
78
  }
80
- if(this.currentMetadata){
79
+ if (this.currentMetadata) {
81
80
  return this.displayTitle(this.currentMetadata);
82
81
  }
83
82
  return "";
84
- }
83
+ },
85
84
  },
86
-
85
+
87
86
  mounted() {
88
87
  this.fetchCurrentlyPlaying();
89
88
  this.radioInterval = setInterval(() => {
@@ -91,20 +90,26 @@ export default defineComponent({
91
90
  }, 10000);
92
91
  },
93
92
  methods: {
94
- async fetchCurrentlyPlaying(): Promise<void>{
95
- if(!this.radio || this.playingRadio){return;}
96
- this.fetchRadioMetadata(this.radio.id,this.currentMetadata?.title??"", this.updateMetadata);
93
+ async fetchCurrentlyPlaying(): Promise<void> {
94
+ if (!this.radio || this.playingRadio) {
95
+ return;
96
+ }
97
+ this.fetchRadioMetadata(
98
+ this.radio.id,
99
+ this.currentMetadata?.title ?? "",
100
+ this.updateMetadata,
101
+ );
97
102
  },
98
- updateMetadata(metadata: MediaRadio, podcast?:Podcast): void{
99
- this.currentMetadata=metadata;
100
- this.currentPodcast=podcast;
103
+ updateMetadata(metadata: MediaRadio, podcast?: Podcast): void {
104
+ this.currentMetadata = metadata;
105
+ this.currentPodcast = podcast;
101
106
  },
102
107
  },
103
- })
108
+ });
104
109
  </script>
105
110
  <style lang="scss">
106
- .octopus-app{
107
- .small-img-box{
111
+ .octopus-app {
112
+ .small-img-box {
108
113
  height: 80px;
109
114
  width: 80px;
110
115
  border-radius: 0.2rem;
@@ -113,4 +118,4 @@ export default defineComponent({
113
118
  margin: 0.5rem;
114
119
  }
115
120
  }
116
- </style>
121
+ </style>
@@ -1,27 +1,23 @@
1
1
  <template>
2
- <div class="img-box img-box-podcast position-relative flex-shrink-0 mb-3 me-3 float-start">
2
+ <div
3
+ class="img-box img-box-podcast position-relative flex-shrink-0 mb-3 me-3 float-start"
4
+ >
3
5
  <img
4
- v-lazy="radio.imageUrl ?proxyImageUrl(radio.imageUrl, '330') :'/img/emptyradio.webp'"
6
+ v-lazy="
7
+ radio.imageUrl
8
+ ? proxyImageUrl(radio.imageUrl, '330')
9
+ : '/img/emptyradio.webp'
10
+ "
5
11
  width="330"
6
12
  height="330"
7
13
  class="img-box img-box-podcast"
8
- :title="$t('Canal name image',{name:radio.name})"
9
- :alt="$t('Canal name image',{name:radio.name})"
10
- >
11
- <button
12
- class="image-play-button"
13
- @click="playRadio"
14
- >
14
+ :title="$t('Canal name image', { name: radio.name })"
15
+ :alt="$t('Canal name image', { name: radio.name })"
16
+ />
17
+ <button class="image-play-button" @click="playRadio">
15
18
  <div class="icon-container">
16
- <div
17
- v-if="!playingRadio"
18
- :title="$t('Play')"
19
- class="saooti-play"
20
- />
21
- <div
22
- v-else
23
- class="bloc-paddle"
24
- >
19
+ <div v-if="!playingRadio" :title="$t('Play')" class="saooti-play" />
20
+ <div v-else class="bloc-paddle">
25
21
  <span class="paddle1" />
26
22
  <span class="paddle2" />
27
23
  <span class="paddle3" />
@@ -35,50 +31,52 @@
35
31
  </template>
36
32
 
37
33
  <script lang="ts">
38
- import { usePlayerStore } from '@/stores/PlayerStore';
39
- import { useFilterStore } from '@/stores/FilterStore';
40
- import { mapState, mapActions } from 'pinia';
41
- import imageProxy from '../../mixins/imageProxy';
42
- import { defineComponent } from 'vue';
43
- import { Canal } from '@/stores/class/radio/canal';
34
+ import { usePlayerStore } from "@/stores/PlayerStore";
35
+ import { useFilterStore } from "@/stores/FilterStore";
36
+ import { mapState, mapActions } from "pinia";
37
+ import imageProxy from "../../mixins/imageProxy";
38
+ import { defineComponent } from "vue";
39
+ import { Canal } from "@/stores/class/radio/canal";
44
40
  export default defineComponent({
45
- name: 'RadioImage',
41
+ name: "RadioImage",
46
42
 
47
- components: {
48
- },
43
+ components: {},
49
44
 
50
45
  mixins: [imageProxy],
51
46
 
52
47
  props: {
53
- radio: { default: undefined, type: Object as ()=>Canal},
48
+ radio: { default: undefined, type: Object as () => Canal },
54
49
  },
55
50
 
56
- computed:{
57
- ...mapState(usePlayerStore, ['playerRadio', 'playerStatus']),
58
- ...mapState(useFilterStore, ['filterOrgaId']),
59
- playingRadio(){
51
+ computed: {
52
+ ...mapState(usePlayerStore, ["playerRadio", "playerStatus"]),
53
+ ...mapState(useFilterStore, ["filterOrgaId"]),
54
+ playingRadio() {
60
55
  return this.playerRadio && this.playerRadio.canalId === this.radio?.id;
61
56
  },
62
57
  playText(): string {
63
- return this.playingRadio && "PLAYING"===this.playerStatus ? this.$t('Pause'):this.$t('Play');
58
+ return this.playingRadio && "PLAYING" === this.playerStatus
59
+ ? this.$t("Pause")
60
+ : this.$t("Play");
64
61
  },
65
62
  },
66
63
 
67
64
  methods: {
68
- ...mapActions(usePlayerStore, ['playerPlay', 'playerChangeStatus']),
69
- playRadio(): void{
70
- if(!this.radio){return;}
65
+ ...mapActions(usePlayerStore, ["playerPlay", "playerChangeStatus"]),
66
+ playRadio(): void {
67
+ if (!this.radio) {
68
+ return;
69
+ }
71
70
  if (this.playingRadio) {
72
- this.playerChangeStatus("PLAYING"===this.playerStatus);
71
+ this.playerChangeStatus("PLAYING" === this.playerStatus);
73
72
  } else {
74
73
  this.playerPlay({
75
74
  canalId: this.radio.id,
76
- url: "https://"+this.radio.url + "/live.m3u8",
77
- metadata : ""
75
+ url: "https://" + this.radio.url + "/live.m3u8",
76
+ metadata: "",
78
77
  });
79
78
  }
80
- }
79
+ },
81
80
  },
82
- })
81
+ });
83
82
  </script>
84
-