@saooti/octopus-sdk 40.2.18 → 41.0.0-SNAPSHOT

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 (204) hide show
  1. package/package.json +38 -39
  2. package/src/App.vue +68 -88
  3. package/src/components/composable/player/usePlayerLive.ts +12 -3
  4. package/src/components/composable/player/usePlayerLogic.ts +6 -6
  5. package/src/components/composable/podcasts/usePodcastView.ts +3 -3
  6. package/src/components/composable/useInit.ts +2 -2
  7. package/src/components/composable/useMetaTitleWatch.ts +2 -2
  8. package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
  9. package/src/components/display/categories/CategoryChooser.vue +142 -145
  10. package/src/components/display/categories/CategoryFilter.vue +172 -198
  11. package/src/components/display/categories/CategoryList.vue +122 -147
  12. package/src/components/display/comments/CommentInput.vue +100 -122
  13. package/src/components/display/comments/CommentList.vue +169 -191
  14. package/src/components/display/comments/CommentName.vue +35 -45
  15. package/src/components/display/comments/CommentParentInfo.vue +28 -34
  16. package/src/components/display/comments/CommentPlayer.vue +38 -50
  17. package/src/components/display/comments/CommentSection.vue +85 -103
  18. package/src/components/display/comments/item/CommentBasicView.vue +48 -61
  19. package/src/components/display/comments/item/CommentItem.vue +101 -116
  20. package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
  21. package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
  22. package/src/components/display/comments/like/LikeButton.vue +36 -41
  23. package/src/components/display/comments/like/LikeSection.vue +128 -136
  24. package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
  25. package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
  26. package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
  27. package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
  28. package/src/components/display/edit/EditBox.vue +6 -9
  29. package/src/components/display/edit/EditBoxRadio.vue +1 -5
  30. package/src/components/display/emission/EmissionInlineList.vue +82 -97
  31. package/src/components/display/emission/EmissionItem.vue +56 -69
  32. package/src/components/display/emission/EmissionList.vue +192 -218
  33. package/src/components/display/emission/EmissionPlayerItem.vue +48 -65
  34. package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
  35. package/src/components/display/emission/EmissionPresentationList.vue +51 -61
  36. package/src/components/display/filter/AdvancedSearch.vue +154 -176
  37. package/src/components/display/filter/CategorySearchFilter.vue +43 -46
  38. package/src/components/display/filter/DateFilter.vue +76 -91
  39. package/src/components/display/filter/MonetizableFilter.vue +27 -30
  40. package/src/components/display/filter/ProductorSearch.vue +87 -90
  41. package/src/components/display/filter/RubriqueChoice.vue +58 -63
  42. package/src/components/display/filter/RubriqueFilter.vue +154 -169
  43. package/src/components/display/filter/SearchOrder.vue +35 -35
  44. package/src/components/display/list/ListPaginate.vue +80 -93
  45. package/src/components/display/list/PaginateParams.vue +36 -40
  46. package/src/components/display/list/PaginateSection.vue +113 -124
  47. package/src/components/display/list/SwiperList.vue +97 -109
  48. package/src/components/display/live/CountDown.vue +15 -9
  49. package/src/components/display/live/CountdownOctopus.vue +16 -10
  50. package/src/components/display/live/LiveHorizontalList.vue +95 -103
  51. package/src/components/display/live/LiveItem.vue +65 -73
  52. package/src/components/display/live/LiveList.vue +125 -137
  53. package/src/components/display/live/RadioCurrently.vue +66 -73
  54. package/src/components/display/live/RadioImage.vue +40 -51
  55. package/src/components/display/live/RadioItem.vue +9 -14
  56. package/src/components/display/live/RadioList.vue +39 -53
  57. package/src/components/display/live/RadioPlanning.vue +211 -223
  58. package/src/components/display/organisation/OrganisationChooser.vue +117 -123
  59. package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
  60. package/src/components/display/participant/ParticipantInlineList.vue +42 -58
  61. package/src/components/display/participant/ParticipantItem.vue +66 -74
  62. package/src/components/display/participant/ParticipantList.vue +119 -141
  63. package/src/components/display/playlist/PlaylistItem.vue +33 -46
  64. package/src/components/display/playlist/PlaylistList.vue +118 -144
  65. package/src/components/display/playlist/PodcastList.vue +79 -101
  66. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
  67. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
  68. package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
  69. package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
  70. package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
  71. package/src/components/display/podcasts/PodcastFilterList.vue +48 -53
  72. package/src/components/display/podcasts/PodcastImage.vue +96 -99
  73. package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
  74. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
  75. package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
  76. package/src/components/display/podcasts/PodcastItem.vue +48 -63
  77. package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
  78. package/src/components/display/podcasts/PodcastList.vue +183 -206
  79. package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
  80. package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
  81. package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
  82. package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
  83. package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
  84. package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
  85. package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
  86. package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
  87. package/src/components/display/podcasts/TagList.vue +49 -51
  88. package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
  89. package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
  90. package/src/components/display/rubriques/RubriqueList.vue +140 -160
  91. package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
  92. package/src/components/display/sharing/FormatSwitch.vue +16 -11
  93. package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
  94. package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
  95. package/src/components/display/sharing/PlayerParameters.vue +69 -71
  96. package/src/components/display/sharing/QrCode.vue +55 -67
  97. package/src/components/display/sharing/ShareAnonymous.vue +160 -178
  98. package/src/components/display/sharing/ShareDistribution.vue +103 -117
  99. package/src/components/display/sharing/ShareNewsletter.vue +154 -161
  100. package/src/components/display/sharing/SharePlayer.vue +273 -295
  101. package/src/components/display/sharing/SharePlayerColors.vue +25 -16
  102. package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
  103. package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
  104. package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
  105. package/src/components/display/sharing/SubscribeButtons.vue +185 -209
  106. package/src/components/display/studio/RecordingItemButton.vue +1 -4
  107. package/src/components/form/ClassicCheckbox.vue +26 -30
  108. package/src/components/form/ClassicContentEditable.vue +37 -33
  109. package/src/components/form/ClassicCopyButton.vue +40 -44
  110. package/src/components/form/ClassicDatePicker.vue +114 -114
  111. package/src/components/form/ClassicEmojiPicker.vue +20 -28
  112. package/src/components/form/ClassicInputText.vue +116 -120
  113. package/src/components/form/ClassicLoading.vue +7 -12
  114. package/src/components/form/ClassicMultiselect.vue +106 -116
  115. package/src/components/form/ClassicRadio.vue +21 -16
  116. package/src/components/form/ClassicRadioLabel.vue +23 -22
  117. package/src/components/form/ClassicSearch.vue +24 -19
  118. package/src/components/form/ClassicSelect.vue +47 -38
  119. package/src/components/form/ClassicWysiwyg.vue +116 -123
  120. package/src/components/icons/AmazonMusicIcon.vue +7 -10
  121. package/src/components/icons/ApplePodcastIcon.vue +7 -11
  122. package/src/components/icons/BlueSkyIcon.vue +8 -11
  123. package/src/components/icons/DeezerIcon.vue +8 -11
  124. package/src/components/icons/EditFtpIcon.vue +8 -11
  125. package/src/components/icons/IHeartIcon.vue +8 -11
  126. package/src/components/icons/PlayVideoIcon.vue +7 -10
  127. package/src/components/icons/PlayerFmIcon.vue +7 -10
  128. package/src/components/icons/PocketCastIcon.vue +8 -11
  129. package/src/components/icons/PodcastAddictIcon.vue +7 -10
  130. package/src/components/icons/RadiolineIcon.vue +8 -11
  131. package/src/components/icons/TuninIcon.vue +8 -11
  132. package/src/components/icons/XIcon.vue +7 -10
  133. package/src/components/misc/AcpmImage.vue +6 -7
  134. package/src/components/misc/ClassicAccordion.vue +27 -32
  135. package/src/components/misc/ClassicLazy.vue +86 -90
  136. package/src/components/misc/ClassicNav.vue +16 -20
  137. package/src/components/misc/ClassicPopover.vue +266 -282
  138. package/src/components/misc/ClassicSpinner.vue +5 -27
  139. package/src/components/misc/ErrorMessage.vue +11 -12
  140. package/src/components/misc/FooterGarSection.vue +33 -41
  141. package/src/components/misc/FooterSection.vue +109 -130
  142. package/src/components/misc/HomeDropdown.vue +85 -108
  143. package/src/components/misc/MobileMenu.vue +102 -113
  144. package/src/components/misc/ProgressBar.vue +53 -62
  145. package/src/components/misc/TopBar.vue +97 -120
  146. package/src/components/misc/TopBarMainContent.vue +116 -135
  147. package/src/components/misc/modal/ClassicModal.vue +40 -33
  148. package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
  149. package/src/components/misc/modal/ClipboardModal.vue +27 -30
  150. package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
  151. package/src/components/misc/modal/MessageModal.vue +50 -47
  152. package/src/components/misc/modal/NewsletterModal.vue +30 -31
  153. package/src/components/misc/modal/QrCodeModal.vue +21 -21
  154. package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
  155. package/src/components/misc/player/PlayerCompact.vue +6 -4
  156. package/src/components/misc/player/PlayerComponent.vue +8 -9
  157. package/src/components/misc/player/PlayerLarge.vue +9 -8
  158. package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
  159. package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
  160. package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
  161. package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
  162. package/src/components/misc/player/elements/PlayerImage.vue +51 -57
  163. package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
  164. package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
  165. package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
  166. package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
  167. package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
  168. package/src/components/misc/player/radio/RadioHistory.vue +80 -99
  169. package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
  170. package/src/components/misc/player/video/PlayerVideo.vue +27 -40
  171. package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
  172. package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
  173. package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
  174. package/src/components/pages/CategoryPage.vue +28 -33
  175. package/src/components/pages/EmissionPage.vue +98 -131
  176. package/src/components/pages/EmissionsPage.vue +2 -0
  177. package/src/components/pages/Error403Page.vue +22 -21
  178. package/src/components/pages/HomePage.vue +91 -100
  179. package/src/components/pages/LivesPage.vue +35 -37
  180. package/src/components/pages/MapPage.vue +209 -241
  181. package/src/components/pages/PageLogout.vue +8 -11
  182. package/src/components/pages/PageNotFound.vue +9 -5
  183. package/src/components/pages/ParticipantPage.vue +83 -111
  184. package/src/components/pages/ParticipantsPage.vue +3 -0
  185. package/src/components/pages/PlaylistPage.vue +98 -116
  186. package/src/components/pages/PlaylistsPage.vue +9 -2
  187. package/src/components/pages/PodcastPage.vue +223 -238
  188. package/src/components/pages/PodcastsPage.vue +9 -2
  189. package/src/components/pages/RadioPage.vue +56 -70
  190. package/src/components/pages/RubriquePage.vue +7 -3
  191. package/src/components/pages/SearchPage.vue +31 -36
  192. package/src/components/pages/TagPage.vue +11 -9
  193. package/src/components/pages/VideoPage.vue +14 -11
  194. package/src/helper/displayHelper.ts +1 -1
  195. package/src/i18n.ts +2 -2
  196. package/src/main.ts +1 -1
  197. package/src/stores/class/general/player.ts +1 -0
  198. package/public/css/fonts/icomoon.eot +0 -0
  199. package/public/css/fonts/icomoon.svg +0 -113
  200. package/public/css/fonts/icomoon.ttf +0 -0
  201. package/public/css/fonts/icomoon.woff +0 -0
  202. package/public/css/fonts/icomoon.woff2 +0 -0
  203. package/public/css/fonts/style.css +0 -352
  204. package/sonarqube-scanner.js +0 -10
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section class="page-box">
3
- <template v-if="loaded && !error">
3
+ <template v-if="loaded && !error && podcast">
4
4
  <PodcastmakerHeader
5
5
  v-if="isPodcastmaker"
6
6
  :page-title="titlePage"
@@ -17,7 +17,7 @@
17
17
  @update-podcast="updatePodcast"
18
18
  />
19
19
  <ShareSocialsButtons
20
- v-if="pageParameters.isShareButtons"
20
+ v-if="state.podcastPage.ShareButtons"
21
21
  :organisation-id="podcast.organisation.id"
22
22
  />
23
23
  <SharePlayer
@@ -30,8 +30,8 @@
30
30
  <PodcastInlineList
31
31
  :emission-id="podcast.emission.emissionId"
32
32
  :href="'/main/pub/emission/' + podcast.emission.emissionId"
33
- :title="$t('More episodes of this emission')"
34
- :button-text="$t('All podcast emission button')"
33
+ :title="t('More episodes of this emission')"
34
+ :button-text="t('All podcast emission button')"
35
35
  title-tag="h3"
36
36
  />
37
37
  <section v-if="!hideSuggestions">
@@ -40,7 +40,7 @@
40
40
  class="mt-4"
41
41
  title-tag="h3"
42
42
  :podcast-id="podcastId"
43
- :title="$t('Suggested listening')"
43
+ :title="t('Suggested listening')"
44
44
  />
45
45
  </ClassicLazy>
46
46
  <ClassicLazy v-for="c in categories" :key="c.id" :min-height="550">
@@ -49,25 +49,25 @@
49
49
  title-tag="h3"
50
50
  :iab-id="c.id"
51
51
  :href="'/main/pub/category/' + c.id"
52
- :title="$t('More episodes of this category : ', { name: c.name })"
53
- :button-text="$t('All podcast button', { name: c.name })"
52
+ :title="t('More episodes of this category : ', { name: c.name })"
53
+ :button-text="t('All podcast button', { name: c.name })"
54
54
  />
55
55
  </ClassicLazy>
56
56
  </section>
57
57
  </div>
58
58
  </template>
59
59
  <ClassicLoading
60
- :loading-text="!loaded ? $t('Loading content ...') : undefined"
60
+ :loading-text="!loaded ? t('Loading content ...') : undefined"
61
61
  :error-text="
62
62
  error
63
- ? $t(`This episode is not available for (re)listening`)
63
+ ? t(`This episode is not available for (re)listening`)
64
64
  : undefined
65
65
  "
66
66
  />
67
67
  </section>
68
68
  </template>
69
69
 
70
- <script lang="ts">
70
+ <script setup lang="ts">
71
71
  import youtubeVideoHelper from "../../helper/youtubeVideoHelper";
72
72
  import {useOrgaComputed} from "../composable/useOrgaComputed";
73
73
  import PodcastInlineList from "../display/podcasts/PodcastInlineList.vue";
@@ -84,13 +84,14 @@ import {
84
84
  } from "@/stores/class/conference/conference";
85
85
  import {useErrorHandler} from "../composable/useErrorHandler";
86
86
  import {useSeoTitleUrl} from "../composable/route/useSeoTitleUrl";
87
- import { defineComponent, defineAsyncComponent } from "vue";
87
+ import { computed, defineAsyncComponent, onBeforeUnmount, ref, Ref, watch } from "vue";
88
88
  import { Category } from "@/stores/class/general/category";
89
89
  import { useAuthStore } from "../../stores/AuthStore";
90
90
  import { useGeneralStore } from "../../stores/GeneralStore";
91
- import { mapState, mapActions } from "pinia";
92
91
  import { AxiosError } from "axios";
93
92
  import { useCommentStore } from "../../stores/CommentStore";
93
+ import { useI18n } from "vue-i18n";
94
+ import { useRoute } from "vue-router";
94
95
  const ShareSocialsButtons = defineAsyncComponent(
95
96
  () => import("../display/sharing/ShareSocialsButtons.vue"),
96
97
  );
@@ -103,240 +104,224 @@ const CommentSection = defineAsyncComponent(
103
104
  const PodcastmakerHeader = defineAsyncComponent(
104
105
  () => import("../display/podcastmaker/PodcastmakerHeader.vue"),
105
106
  );
106
- export default defineComponent({
107
- name: "PodcastPage",
108
- components: {
109
- PodcastInlineList,
110
- ShareSocialsButtons,
111
- SharePlayer,
112
- CommentSection,
113
- PodcastModuleBox,
114
- ClassicLoading,
115
- ClassicLazy,
116
- PodcastmakerHeader,
117
- },
118
107
 
119
- props: {
120
- updateStatus: { default: undefined, type: String },
121
- playingPodcast: { default: undefined, type: Object as () => Podcast },
122
- podcastId: { default: 0, type: Number },
123
- },
108
+ //Props
109
+ const props = defineProps({
110
+ updateStatus: { default: undefined, type: String },
111
+ playingPodcast: { default: undefined, type: Object as () => Podcast },
112
+ podcastId: { default: 0, type: Number },
113
+ });
114
+
124
115
 
125
- setup(){
126
- const { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();
127
- const { updatePathParams } = useSeoTitleUrl();
128
- const {handle403} = useErrorHandler();
129
- return { isPodcastmaker, isEditRights, authOrgaId, updatePathParams, handle403 }
130
- },
116
+ //Data
117
+ const loaded = ref(false);
118
+ const error = ref(false);
119
+ const podcast: Ref<Podcast | undefined> = ref(undefined);
120
+ const fetchConference: Ref<Conference | undefined> = ref(undefined);
121
+ const infoReload: Ref<ReturnType<typeof setTimeout>| undefined> = ref(undefined);
122
+ const youtubeId: Ref<string| undefined> = ref(undefined);
131
123
 
132
- data() {
133
- return {
134
- loaded: false as boolean,
135
- podcast: undefined as Podcast | undefined,
136
- error: false as boolean,
137
- fetchConference: undefined as Conference | undefined,
138
- infoReload: undefined as ReturnType<typeof setTimeout> | undefined,
139
- youtubeId: undefined as string|undefined,
140
- };
141
- },
124
+ //Composables
125
+ const route = useRoute();
126
+ const { t } = useI18n();
127
+ const { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();
128
+ const { updatePathParams } = useSeoTitleUrl();
129
+ const {handle403} = useErrorHandler();
130
+ const authStore = useAuthStore();
131
+ const generalStore = useGeneralStore();
132
+ const filterStore = useFilterStore();
133
+ const commentStore = useCommentStore();
134
+
135
+ //Computed
136
+ const hideSuggestions = computed(() =>{
137
+ return (
138
+ "true" ===
139
+ (podcast.value?.emission?.annotations?.["HIDE_SUGGESTIONS"] as
140
+ | string
141
+ | undefined)
142
+ );
143
+ });
144
+ const emissionMainCategory = computed(() =>{
145
+ if (!podcast.value) {
146
+ return 0;
147
+ }
148
+ if (podcast.value.emission.annotations?.mainIabId) {
149
+ return parseInt(
150
+ podcast.value.emission.annotations.mainIabId as string,
151
+ 10,
152
+ );
153
+ } else if(podcast.value.emission.iabIds?.length) {
154
+ return podcast.value.emission.iabIds[0];
155
+ }
156
+ return 0;
157
+ });
142
158
 
143
- computed: {
144
- ...mapState(useFilterStore, ["filterOrgaId"]),
145
- ...mapState(useAuthStore, ["isRoleLive"]),
146
- ...mapState(useGeneralStore, ["storedCategories"]),
147
- hideSuggestions(): boolean {
159
+ const categories = computed(() =>{
160
+ if ("undefined" === typeof podcast.value) return [];
161
+ return generalStore.storedCategories
162
+ .filter((item: Category) => {
148
163
  return (
149
- "true" ===
150
- (this.podcast?.emission?.annotations?.["HIDE_SUGGESTIONS"] as
151
- | string
152
- | undefined)
164
+ podcast.value?.emission.iabIds &&
165
+ -1 !== podcast.value.emission.iabIds.indexOf(item.id)
153
166
  );
154
- },
155
- pageParameters() {
156
- return {
157
- isShareButtons: state.podcastPage.ShareButtons as boolean,
158
- };
159
- },
160
- emissionMainCategory(): number {
161
- if (!this.podcast) {
162
- return 0;
163
- }
164
- if (this.podcast.emission.annotations?.mainIabId) {
165
- return parseInt(
166
- this.podcast.emission.annotations.mainIabId as string,
167
- 10,
168
- );
169
- } else if (this.podcast.emission.iabIds?.length) {
170
- return this.podcast.emission.iabIds[0];
171
- }
167
+ })
168
+ .sort((a: Category, b: Category) => {
169
+ if (a.id === emissionMainCategory.value) return -1;
170
+ if (b.id === emissionMainCategory.value) return 1;
172
171
  return 0;
173
- },
174
- categories(): Array<Category> {
175
- if ("undefined" === typeof this.podcast) return [];
176
- return this.storedCategories
177
- .filter((item: Category) => {
178
- return (
179
- this.podcast?.emission.iabIds &&
180
- -1 !== this.podcast.emission.iabIds.indexOf(item.id)
181
- );
182
- })
183
- .sort((a: Category, b: Category) => {
184
- if (a.id === this.emissionMainCategory) return -1;
185
- if (b.id === this.emissionMainCategory) return 1;
186
- return 0;
187
- });
188
- },
189
- editRight(): boolean {
190
- return this.isEditRights(this.podcast?.organisation.id);
191
- },
192
- isLiveReadyToRecord(): boolean {
193
- return (
194
- undefined !== this.podcast?.conferenceId &&
195
- 0 !== this.podcast?.conferenceId &&
196
- "READY_TO_RECORD" === this.podcast?.processingStatus
197
- );
198
- },
199
- isOctopusAndAnimator(): boolean {
200
- return !this.isPodcastmaker && this.editRight && this.isRoleLive;
201
- },
202
- titlePage(): string {
203
- return this.isLiveReadyToRecord
204
- ? this.$t("Live episode")
205
- : this.$t("Episode");
206
- },
207
- },
208
- watch: {
209
- updateStatus(): void {
210
- if (this.fetchConference && null !== this.fetchConference) {
211
- this.fetchConference.status = this.updateStatus;
212
- }
213
- },
214
- podcastId: {
215
- immediate: true,
216
- async handler() {
217
- await this.getPodcastDetails();
218
- if (!this.podcast || this.error) {
219
- return;
220
- }
221
- this.initCommentUser();
222
- },
223
- },
224
- },
225
- beforeUnmount() {
226
- this.contentToDisplayUpdate(null);
227
- clearTimeout(this.infoReload);
228
- },
172
+ });
173
+ });
229
174
 
230
- methods: {
231
- ...mapActions(useGeneralStore, ["contentToDisplayUpdate"]),
232
- ...mapActions(useCommentStore, ["getCommentsConfig", "initCommentUser"]),
233
- async initConference() {
234
- if (!this.podcast || undefined == this.podcast.conferenceId || "READY_TO_RECORD" !== this.podcast.processingStatus) return;
235
- this.fetchConference = { conferenceId: this.podcast.conferenceId, title: "" };
236
- if (this.isOctopusAndAnimator) {
237
- try {
238
- this.fetchConference = await classicApi.fetchData<Conference>({
239
- api: 9,
240
- path: "conference/" + this.podcast.conferenceId,
241
- });
242
- } catch {
243
- await this.fetchConferenceStatus();
244
- }
245
- } else {
246
- await this.fetchConferenceStatus();
247
- }
248
- if (
249
- this.fetchConference &&
250
- -1 !== this.fetchConference.conferenceId &&
251
- "PUBLISHING" !== this.fetchConference.status &&
252
- "DEBRIEFING" !== this.fetchConference.status
253
- ) {
254
- this.fetchConferenceStatusLoop();
255
- }
256
- },
257
- async fetchConferenceStatusLoop() {
258
- if("PUBLISHING" ===this.fetchConference?.status){
259
- return;
260
- }
261
- this.infoReload = setTimeout(async () => {
262
- await this.fetchConferenceStatus();
263
- this.fetchConferenceStatusLoop();
264
- }, 3000);
265
- },
266
- async fetchConferenceStatus() {
267
- try {
268
- const data = await classicApi.fetchData<ConferencePublicInfo>({
269
- api: 9,
270
- path: "conference/info/" + this.podcast?.conferenceId,
271
- });
272
- this.fetchConference.status = data.status;
273
- } catch {
274
- //Do nothing
275
- }
276
- },
277
- updatePodcast(podcastUpdated: Podcast): void {
278
- this.podcast = podcastUpdated;
279
- },
280
- initError(): void {
281
- this.error = true;
282
- this.loaded = true;
283
- },
284
- async getPodcastDetails(): Promise<void> {
285
- this.loaded = false;
286
- this.error = false;
287
- try {
288
- const data = await classicApi.fetchData<Podcast>({
289
- api: 0,
290
- path: "podcast/" + this.podcastId,
291
- });
292
- if (
293
- "PUBLIC" !== data.organisation.privacy &&
294
- this.filterOrgaId !== data.organisation.id &&
295
- this.$route.query.productor !== data.organisation.id
296
- ) {
297
- this.initError();
298
- return;
299
- }
300
- this.podcast = data;
301
- this.contentToDisplayUpdate(data);
302
- if (
303
- (!this.podcast.availability.visibility ||
304
- ("READY_TO_RECORD" !== this.podcast.processingStatus &&
305
- "READY" !== this.podcast.processingStatus &&
306
- "PROCESSING" !== this.podcast.processingStatus) ||
307
- false === this.podcast.valid) &&
308
- !this.editRight
309
- ) {
310
- this.error = true;
311
- this.loaded = true;
312
- return;
313
- }
314
- this.podcastInProcessing();
315
- this.updatePathParams(this.podcast.title);
316
- await this.getCommentsConfig(this.podcast);
317
- if((this.fetchConference?.videoProfile?.includes("video_") && "READY_TO_RECORD" === this.podcast.processingStatus) || undefined !== this.podcast.video?.videoId){
318
- this.youtubeId = youtubeVideoHelper.getYoutubeId(this.podcast?.tags ?? []);
319
- }
320
- this.loaded = true;
321
- } catch (error) {
322
- this.handle403(error as AxiosError);
323
- this.initError();
324
- }
325
- },
175
+ const editRight = computed(() =>{
176
+ return isEditRights(podcast.value?.organisation.id);
177
+ });
326
178
 
327
- podcastInProcessing(){
328
- if("PLANNED" !== this.podcast?.processingStatus){
329
- this.initConference();
330
- return;
331
- }
332
- this.infoReload = setTimeout(async () => {
333
- this.podcast = await classicApi.fetchData<Podcast>({
334
- api: 0,
335
- path: "podcast/" + this.podcastId,
336
- });
337
- this.podcastInProcessing();
338
- }, 2000);
339
- }
340
- },
179
+ const isLiveReadyToRecord = computed(() =>{
180
+ return (
181
+ undefined !== podcast.value?.conferenceId &&
182
+ 0 !== podcast.value?.conferenceId &&
183
+ "READY_TO_RECORD" === podcast.value?.processingStatus
184
+ );
185
+ });
186
+
187
+ const isOctopusAndAnimator = computed(() =>{
188
+ return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;
341
189
  });
190
+
191
+ const titlePage = computed(() =>{
192
+ return isLiveReadyToRecord.value? t("Live episode"): t("Episode");
193
+ });
194
+
195
+
196
+ //Watch
197
+ watch(()=>props.updateStatus, () => {
198
+ if (fetchConference.value && null !== fetchConference.value) {
199
+ fetchConference.value.status = props.updateStatus;
200
+ }
201
+ });
202
+ watch(()=>props.podcastId, async () => {
203
+ await getPodcastDetails();
204
+ if (!podcast.value || error.value) {
205
+ return;
206
+ }
207
+ commentStore.initCommentUser();
208
+ }, {immediate: true});
209
+
210
+
211
+ onBeforeUnmount(() => {
212
+ generalStore.contentToDisplayUpdate(null);
213
+ clearTimeout(infoReload.value);
214
+ });
215
+
216
+
217
+ //Methods
218
+ async function initConference() {
219
+ if (!podcast.value || undefined == podcast.value.conferenceId || "READY_TO_RECORD" !== podcast.value.processingStatus) return;
220
+ fetchConference.value = { conferenceId: podcast.value.conferenceId, title: "" };
221
+ if (isOctopusAndAnimator.value) {
222
+ try {
223
+ fetchConference.value = await classicApi.fetchData<Conference>({
224
+ api: 9,
225
+ path: "conference/" + podcast.value.conferenceId,
226
+ });
227
+ } catch {
228
+ await fetchConferenceStatus();
229
+ }
230
+ } else {
231
+ await fetchConferenceStatus();
232
+ }
233
+ if (
234
+ fetchConference.value &&
235
+ -1 !== fetchConference.value.conferenceId &&
236
+ "PUBLISHING" !== fetchConference.value.status &&
237
+ "DEBRIEFING" !== fetchConference.value.status
238
+ ) {
239
+ fetchConferenceStatusLoop();
240
+ }
241
+ }
242
+
243
+ async function fetchConferenceStatusLoop() {
244
+ if("PUBLISHING" ===fetchConference.value?.status){
245
+ return;
246
+ }
247
+ infoReload.value = setTimeout(async () => {
248
+ await fetchConferenceStatus();
249
+ fetchConferenceStatusLoop();
250
+ }, 3000);
251
+ }
252
+ async function fetchConferenceStatus() {
253
+ try {
254
+ const data = await classicApi.fetchData<ConferencePublicInfo>({
255
+ api: 9,
256
+ path: "conference/info/" + podcast.value?.conferenceId,
257
+ });
258
+ fetchConference.value.status = data.status;
259
+ } catch {
260
+ //Do nothing
261
+ }
262
+ }
263
+ function updatePodcast(podcastUpdated: Podcast): void {
264
+ podcast.value = podcastUpdated;
265
+ }
266
+ function initError(): void {
267
+ error.value = true;
268
+ loaded.value = true;
269
+ }
270
+
271
+ async function getPodcastDetails(): Promise<void> {
272
+ loaded.value = false;
273
+ error.value = false;
274
+ try {
275
+ const data = await classicApi.fetchData<Podcast>({
276
+ api: 0,
277
+ path: "podcast/" + props.podcastId,
278
+ });
279
+ if (
280
+ "PUBLIC" !== data.organisation.privacy &&
281
+ filterStore.filterOrgaId !== data.organisation.id &&
282
+ route.query.productor !== data.organisation.id
283
+ ) {
284
+ initError();
285
+ return;
286
+ }
287
+ podcast.value = data;
288
+ generalStore.contentToDisplayUpdate(data);
289
+ if (
290
+ (!podcast.value.availability.visibility ||
291
+ ("READY_TO_RECORD" !== podcast.value.processingStatus &&
292
+ "READY" !== podcast.value.processingStatus &&
293
+ "PROCESSING" !== podcast.value.processingStatus) ||
294
+ false === podcast.value.valid) &&
295
+ !editRight.value
296
+ ) {
297
+ error.value = true;
298
+ loaded.value = true;
299
+ return;
300
+ }
301
+ podcastInProcessing();
302
+ updatePathParams(podcast.value.title);
303
+ await commentStore.getCommentsConfig(podcast.value);
304
+ if((fetchConference.value?.videoProfile?.includes("video_") && "READY_TO_RECORD" === podcast.value.processingStatus) || undefined !== podcast.value.video?.videoId){
305
+ youtubeId.value = youtubeVideoHelper.getYoutubeId(podcast.value?.tags ?? []);
306
+ }
307
+ loaded.value = true;
308
+ } catch (error) {
309
+ handle403(error as AxiosError);
310
+ initError();
311
+ }
312
+ }
313
+
314
+ function podcastInProcessing(){
315
+ if("PLANNED" !== podcast.value?.processingStatus){
316
+ initConference();
317
+ return;
318
+ }
319
+ infoReload.value = setTimeout(async () => {
320
+ podcast.value = await classicApi.fetchData<Podcast>({
321
+ api: 0,
322
+ path: "podcast/" + props.podcastId,
323
+ });
324
+ podcastInProcessing();
325
+ }, 2000);
326
+ }
342
327
  </script>
@@ -45,6 +45,7 @@ import AdvancedSearch from "../display/filter/AdvancedSearch.vue";
45
45
  import {useAdvancedParamInit} from "../composable/route/useAdvancedParamInit";
46
46
  import { computed, ref, watch } from "vue";
47
47
 
48
+ //Props
48
49
  const props = defineProps({
49
50
  pr: { default: 0, type: Number },
50
51
  ps: { default: 30, type: Number },
@@ -61,6 +62,12 @@ const props = defineProps({
61
62
  routeRubriques: { default: "", type: String },
62
63
  });
63
64
 
65
+
66
+ //Data
67
+ const onlyVideo = ref(false);
68
+
69
+
70
+ //Composables
64
71
  const {
65
72
  organisationId,
66
73
  searchPattern,
@@ -78,13 +85,13 @@ const {
78
85
  isInit
79
86
  } = useAdvancedParamInit(props, false);
80
87
 
81
- const onlyVideo = ref(false);
82
-
83
88
 
89
+ //Computed
84
90
  const orgaArray = computed(() => organisationId.value ? [organisationId.value] : []);
85
91
  const withVideo = computed(() => false === onlyVideo.value ? undefined : true);
86
92
 
87
93
 
94
+ //Watch
88
95
  watch(() => props.routeOnlyVideo, () =>{
89
96
  onlyVideo.value = "true" === props.routeOnlyVideo;
90
97
  }, {immediate: true});