@saooti/octopus-sdk 40.2.19 → 41.0.0

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 (214) hide show
  1. package/index.ts +2 -1
  2. package/package.json +4 -3
  3. package/src/App.vue +71 -95
  4. package/src/components/composable/player/usePlayerLive.ts +13 -4
  5. package/src/components/composable/player/usePlayerLogic.ts +6 -6
  6. package/src/components/composable/player/usePlayerVast.ts +7 -7
  7. package/src/components/composable/podcasts/usePodcastView.ts +3 -3
  8. package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
  9. package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
  10. package/src/components/composable/route/useSimplePageParam.ts +15 -8
  11. package/src/components/composable/useInit.ts +2 -2
  12. package/src/components/composable/useMetaTitleWatch.ts +2 -2
  13. package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
  14. package/src/components/display/categories/CategoryChooser.vue +144 -145
  15. package/src/components/display/categories/CategoryFilter.vue +172 -198
  16. package/src/components/display/categories/CategoryList.vue +122 -147
  17. package/src/components/display/comments/CommentInput.vue +100 -122
  18. package/src/components/display/comments/CommentList.vue +169 -191
  19. package/src/components/display/comments/CommentName.vue +35 -45
  20. package/src/components/display/comments/CommentParentInfo.vue +28 -34
  21. package/src/components/display/comments/CommentPlayer.vue +38 -50
  22. package/src/components/display/comments/CommentSection.vue +85 -103
  23. package/src/components/display/comments/item/CommentBasicView.vue +48 -61
  24. package/src/components/display/comments/item/CommentItem.vue +104 -115
  25. package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
  26. package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
  27. package/src/components/display/comments/like/LikeButton.vue +36 -41
  28. package/src/components/display/comments/like/LikeSection.vue +128 -136
  29. package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
  30. package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
  31. package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
  32. package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
  33. package/src/components/display/edit/EditBox.vue +9 -8
  34. package/src/components/display/edit/EditBoxRadio.vue +1 -5
  35. package/src/components/display/emission/EmissionInlineList.vue +82 -97
  36. package/src/components/display/emission/EmissionItem.vue +57 -69
  37. package/src/components/display/emission/EmissionList.vue +189 -218
  38. package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
  39. package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
  40. package/src/components/display/emission/EmissionPresentationList.vue +51 -61
  41. package/src/components/display/filter/AdvancedSearch.vue +151 -176
  42. package/src/components/display/filter/CategorySearchFilter.vue +43 -46
  43. package/src/components/display/filter/DateFilter.vue +76 -91
  44. package/src/components/display/filter/MonetizableFilter.vue +27 -30
  45. package/src/components/display/filter/ProductorSearch.vue +87 -90
  46. package/src/components/display/filter/RubriqueChoice.vue +58 -63
  47. package/src/components/display/filter/RubriqueFilter.vue +154 -169
  48. package/src/components/display/filter/SearchOrder.vue +35 -35
  49. package/src/components/display/list/ListPaginate.vue +72 -93
  50. package/src/components/display/list/PaginateParams.vue +36 -40
  51. package/src/components/display/list/PaginateSection.vue +113 -124
  52. package/src/components/display/list/SwiperList.vue +97 -109
  53. package/src/components/display/live/CountDown.vue +15 -9
  54. package/src/components/display/live/CountdownOctopus.vue +16 -10
  55. package/src/components/display/live/LiveHorizontalList.vue +95 -103
  56. package/src/components/display/live/LiveItem.vue +64 -73
  57. package/src/components/display/live/LiveList.vue +125 -137
  58. package/src/components/display/live/RadioCurrently.vue +66 -73
  59. package/src/components/display/live/RadioImage.vue +39 -50
  60. package/src/components/display/live/RadioItem.vue +9 -14
  61. package/src/components/display/live/RadioList.vue +39 -53
  62. package/src/components/display/live/RadioPlanning.vue +210 -222
  63. package/src/components/display/organisation/OrganisationChooser.vue +116 -122
  64. package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
  65. package/src/components/display/participant/ParticipantInlineList.vue +42 -58
  66. package/src/components/display/participant/ParticipantItem.vue +66 -74
  67. package/src/components/display/participant/ParticipantList.vue +116 -141
  68. package/src/components/display/playlist/PlaylistItem.vue +33 -46
  69. package/src/components/display/playlist/PlaylistList.vue +115 -144
  70. package/src/components/display/playlist/PodcastList.vue +90 -103
  71. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
  72. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
  73. package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
  74. package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
  75. package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
  76. package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
  77. package/src/components/display/podcasts/PodcastImage.vue +96 -99
  78. package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
  79. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
  80. package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
  81. package/src/components/display/podcasts/PodcastItem.vue +48 -63
  82. package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
  83. package/src/components/display/podcasts/PodcastList.vue +182 -206
  84. package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
  85. package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
  86. package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
  87. package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
  88. package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
  89. package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
  90. package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
  91. package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
  92. package/src/components/display/podcasts/TagList.vue +48 -50
  93. package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
  94. package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
  95. package/src/components/display/rubriques/RubriqueList.vue +140 -160
  96. package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
  97. package/src/components/display/sharing/FormatSwitch.vue +16 -11
  98. package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
  99. package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
  100. package/src/components/display/sharing/PlayerParameters.vue +69 -71
  101. package/src/components/display/sharing/QrCode.vue +55 -67
  102. package/src/components/display/sharing/ShareAnonymous.vue +160 -178
  103. package/src/components/display/sharing/ShareDistribution.vue +103 -117
  104. package/src/components/display/sharing/ShareNewsletter.vue +154 -161
  105. package/src/components/display/sharing/SharePlayer.vue +273 -295
  106. package/src/components/display/sharing/SharePlayerColors.vue +25 -16
  107. package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
  108. package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
  109. package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
  110. package/src/components/display/sharing/SubscribeButtons.vue +184 -207
  111. package/src/components/display/studio/RecordingItemButton.vue +1 -4
  112. package/src/components/form/ClassicCheckbox.vue +26 -30
  113. package/src/components/form/ClassicContentEditable.vue +37 -33
  114. package/src/components/form/ClassicCopyButton.vue +40 -44
  115. package/src/components/form/ClassicDatePicker.vue +114 -114
  116. package/src/components/form/ClassicEmojiPicker.vue +20 -28
  117. package/src/components/form/ClassicInputText.vue +116 -120
  118. package/src/components/form/ClassicLoading.vue +7 -12
  119. package/src/components/form/ClassicMultiselect.vue +115 -117
  120. package/src/components/form/ClassicRadio.vue +21 -16
  121. package/src/components/form/ClassicRadioLabel.vue +23 -22
  122. package/src/components/form/ClassicSearch.vue +24 -19
  123. package/src/components/form/ClassicSelect.vue +47 -38
  124. package/src/components/form/ClassicWysiwyg.vue +116 -123
  125. package/src/components/icons/AmazonMusicIcon.vue +7 -10
  126. package/src/components/icons/ApplePodcastIcon.vue +7 -11
  127. package/src/components/icons/BlueSkyIcon.vue +8 -11
  128. package/src/components/icons/DeezerIcon.vue +8 -11
  129. package/src/components/icons/EditFtpIcon.vue +8 -11
  130. package/src/components/icons/IHeartIcon.vue +8 -11
  131. package/src/components/icons/PlayVideoIcon.vue +7 -10
  132. package/src/components/icons/PlayerFmIcon.vue +7 -10
  133. package/src/components/icons/PocketCastIcon.vue +8 -11
  134. package/src/components/icons/PodcastAddictIcon.vue +7 -10
  135. package/src/components/icons/RadiolineIcon.vue +8 -11
  136. package/src/components/icons/TuninIcon.vue +8 -11
  137. package/src/components/icons/XIcon.vue +7 -10
  138. package/src/components/misc/AcpmImage.vue +6 -7
  139. package/src/components/misc/ClassicAccordion.vue +26 -31
  140. package/src/components/misc/ClassicLazy.vue +86 -90
  141. package/src/components/misc/ClassicNav.vue +16 -20
  142. package/src/components/misc/ClassicPopover.vue +271 -282
  143. package/src/components/misc/ClassicSpinner.vue +5 -27
  144. package/src/components/misc/ErrorMessage.vue +11 -12
  145. package/src/components/misc/FooterGarSection.vue +33 -41
  146. package/src/components/misc/FooterSection.vue +94 -131
  147. package/src/components/misc/HomeDropdown.vue +83 -105
  148. package/src/components/misc/MobileMenu.vue +101 -111
  149. package/src/components/misc/ProgressBar.vue +53 -62
  150. package/src/components/misc/TopBar.vue +98 -120
  151. package/src/components/misc/TopBarMainContent.vue +114 -133
  152. package/src/components/misc/modal/ClassicModal.vue +40 -33
  153. package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
  154. package/src/components/misc/modal/ClipboardModal.vue +27 -30
  155. package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
  156. package/src/components/misc/modal/MessageModal.vue +50 -47
  157. package/src/components/misc/modal/NewsletterModal.vue +30 -31
  158. package/src/components/misc/modal/QrCodeModal.vue +21 -21
  159. package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
  160. package/src/components/misc/player/PlayerCompact.vue +6 -4
  161. package/src/components/misc/player/PlayerComponent.vue +8 -9
  162. package/src/components/misc/player/PlayerLarge.vue +9 -8
  163. package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
  164. package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
  165. package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
  166. package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
  167. package/src/components/misc/player/elements/PlayerImage.vue +51 -57
  168. package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
  169. package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
  170. package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
  171. package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
  172. package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
  173. package/src/components/misc/player/radio/RadioHistory.vue +80 -99
  174. package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
  175. package/src/components/misc/player/video/PlayerVideo.vue +27 -40
  176. package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
  177. package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
  178. package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
  179. package/src/components/pages/CategoryPage.vue +28 -33
  180. package/src/components/pages/EmissionPage.vue +113 -132
  181. package/src/components/pages/EmissionsPage.vue +2 -0
  182. package/src/components/pages/Error403Page.vue +21 -20
  183. package/src/components/pages/HomePage.vue +91 -100
  184. package/src/components/pages/LivesPage.vue +35 -37
  185. package/src/components/pages/MapPage.vue +209 -241
  186. package/src/components/pages/PageLogout.vue +8 -11
  187. package/src/components/pages/PageNotFound.vue +9 -5
  188. package/src/components/pages/ParticipantPage.vue +96 -110
  189. package/src/components/pages/ParticipantsPage.vue +3 -0
  190. package/src/components/pages/PlaylistPage.vue +112 -117
  191. package/src/components/pages/PlaylistsPage.vue +9 -2
  192. package/src/components/pages/PodcastPage.vue +224 -238
  193. package/src/components/pages/PodcastsPage.vue +9 -2
  194. package/src/components/pages/RadioPage.vue +56 -70
  195. package/src/components/pages/RubriquePage.vue +7 -3
  196. package/src/components/pages/SearchPage.vue +31 -36
  197. package/src/components/pages/TagPage.vue +11 -9
  198. package/src/components/pages/VideoPage.vue +14 -11
  199. package/src/helper/displayHelper.ts +1 -1
  200. package/src/helper/loadScript.ts +4 -4
  201. package/src/i18n.ts +2 -2
  202. package/src/main.ts +1 -1
  203. package/src/router/router.ts +17 -4
  204. package/src/stores/AuthStore.ts +12 -12
  205. package/src/stores/FilterStore.ts +1 -1
  206. package/src/stores/VastStore.ts +2 -2
  207. package/src/stores/class/general/player.ts +1 -0
  208. package/public/css/fonts/icomoon.eot +0 -0
  209. package/public/css/fonts/icomoon.svg +0 -113
  210. package/public/css/fonts/icomoon.ttf +0 -0
  211. package/public/css/fonts/icomoon.woff +0 -0
  212. package/public/css/fonts/icomoon.woff2 +0 -0
  213. package/public/css/fonts/style.css +0 -352
  214. package/sonarqube-scanner.js +0 -10
@@ -3,7 +3,7 @@
3
3
  <template v-if="loaded && !error && radio">
4
4
  <PodcastmakerHeader
5
5
  v-if="isPodcastmaker"
6
- :page-title="$t('Radio')"
6
+ :page-title="t('Radio')"
7
7
  :img-url="radio.imageUrl"
8
8
  />
9
9
  <div
@@ -35,24 +35,24 @@
35
35
  </div>
36
36
  </template>
37
37
  <ClassicLoading
38
- :loading-text="!loaded ? $t('Loading content ...') : undefined"
39
- :error-text="error ? $t(`Emission doesn't exist`) : undefined"
38
+ :loading-text="!loaded ? t('Loading content ...') : undefined"
39
+ :error-text="error ? t(`Emission doesn't exist`) : undefined"
40
40
  />
41
41
  </section>
42
42
  </template>
43
43
 
44
- <script lang="ts">
44
+ <script setup lang="ts">
45
45
  import { useGeneralStore } from "../../stores/GeneralStore";
46
- import { mapActions, mapState } from "pinia";
47
46
  import classicApi from "../../api/classicApi";
48
47
  import {useSeoTitleUrl} from "../composable/route/useSeoTitleUrl";
49
48
  import {useOrgaComputed} from "../composable/useOrgaComputed";
50
49
  import {useErrorHandler} from "../composable/useErrorHandler";
51
50
  import ClassicLoading from "../form/ClassicLoading.vue";
52
- import { defineComponent, defineAsyncComponent } from "vue";
51
+ import { defineAsyncComponent, ref, Ref, computed, watch, onBeforeUnmount } from "vue";
53
52
  import { AxiosError } from "axios";
54
53
  import { Canal } from "@/stores/class/radio/canal";
55
54
  import { useAuthStore } from "../../stores/AuthStore";
55
+ import { useI18n } from "vue-i18n";
56
56
  const SharePlayerRadio = defineAsyncComponent(
57
57
  () => import("../display/sharing/SharePlayerRadio.vue"),
58
58
  );
@@ -75,70 +75,56 @@ const PodcastmakerHeader = defineAsyncComponent(
75
75
  () => import("../display/podcastmaker/PodcastmakerHeader.vue"),
76
76
  );
77
77
  const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
78
- export default defineComponent({
79
- components: {
80
- SharePlayerRadio,
81
- ShareSocialsButtons,
82
- EditBoxRadio,
83
- ClassicLoading,
84
- RadioCurrently,
85
- RadioImage,
86
- RadioPlanning,
87
- PodcastmakerHeader,
88
- ShareAnonymous
89
- },
90
- props: {
91
- canalId: { default: undefined, type: Number },
92
- },
93
- setup(){
94
- const { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();
95
- const { updatePathParams } = useSeoTitleUrl();
96
- const {handle403} = useErrorHandler();
97
- return { isPodcastmaker, isEditRights, authOrgaId, updatePathParams, handle403}
98
- },
99
- data() {
100
- return {
101
- loaded: false as boolean,
102
- radio: undefined as Canal | undefined,
103
- error: false as boolean,
104
- };
105
- },
78
+
79
+ //Props
80
+ const props = defineProps({
81
+ canalId: { default: undefined, type: Number },
82
+ });
83
+
84
+
85
+ //Data
86
+ const loaded = ref(false);
87
+ const error = ref(false);
88
+ const radio: Ref<Canal|undefined> = ref(undefined);
89
+
90
+
91
+ //Composables
92
+ const { t } = useI18n();
93
+ const { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();
94
+ const { updatePathParams } = useSeoTitleUrl();
95
+ const {handle403} = useErrorHandler();
96
+ const authStore = useAuthStore();
97
+ const generalStore = useGeneralStore();
98
+
106
99
 
107
- computed: {
108
- ...mapState(useAuthStore, ["isRoleRadio"]),
109
- editRight(): boolean {
110
- return this.isEditRights(this.radio?.organisationId, this.isRoleRadio);
111
- },
112
- },
113
- watch: {
114
- canalId: {
115
- immediate: true,
116
- handler() {
117
- this.getRadioDetails();
118
- },
119
- },
120
- },
121
- beforeUnmount() {
122
- this.contentToDisplayUpdate(null);
123
- },
124
- methods: {
125
- ...mapActions(useGeneralStore, ["contentToDisplayUpdate"]),
126
- async getRadioDetails(): Promise<void> {
127
- this.loaded = false;
128
- this.error = false;
129
- try {
130
- this.radio = await classicApi.fetchData<Canal>({
131
- api: 14,
132
- path: "canal/" + this.canalId,
133
- });
134
- this.contentToDisplayUpdate(this.radio);
135
- this.updatePathParams(this.radio.name);
136
- } catch (error) {
137
- this.handle403(error as AxiosError);
138
- this.error = true;
139
- }
140
- this.loaded = true;
141
- },
142
- },
100
+ //Computed
101
+ const editRight = computed(() =>isEditRights(radio.value?.organisationId, authStore.isRoleRadio));
102
+
103
+
104
+ //Watch
105
+ watch(()=>props.canalId, () => {getRadioDetails()}, {immediate: true});
106
+
107
+
108
+ onBeforeUnmount(() => {
109
+ generalStore.contentToDisplayUpdate(null);
143
110
  });
111
+
112
+
113
+ //Methods
114
+ async function getRadioDetails(): Promise<void> {
115
+ loaded.value = false;
116
+ loaded.value = false;
117
+ try {
118
+ radio.value = await classicApi.fetchData<Canal>({
119
+ api: 14,
120
+ path: "canal/" + props.canalId,
121
+ });
122
+ generalStore.contentToDisplayUpdate(radio.value);
123
+ updatePathParams(radio.value.name);
124
+ } catch (error) {
125
+ handle403(error as AxiosError);
126
+ loaded.value = true;
127
+ }
128
+ loaded.value = true;
129
+ }
144
130
  </script>
@@ -27,6 +27,7 @@ const ProductorSearch = defineAsyncComponent(
27
27
  () => import("../display/filter/ProductorSearch.vue"),
28
28
  );
29
29
 
30
+ //Props
30
31
  const props = defineProps({
31
32
  pr: { default: 0, type: Number },
32
33
  ps: { default: 30, type: Number },
@@ -35,6 +36,10 @@ const props = defineProps({
35
36
  routeQuery: { default: "", type: String },
36
37
  });
37
38
 
39
+ //Data
40
+ const title = ref("");
41
+
42
+ //Composables
38
43
  const {
39
44
  searchPattern,
40
45
  organisationId,
@@ -42,11 +47,10 @@ const {
42
47
  paginateFirst,
43
48
  isInit
44
49
  } = useSimplePageParam(props);
45
-
46
50
  const { updatePathParams } = useSeoTitleUrl();
47
51
 
48
- const title = ref("");
49
52
 
53
+ //Computed
50
54
  const orgaArray = computed(() =>organisationId.value ? [organisationId.value] : []);
51
55
  const sortOrder = computed(() =>{
52
56
  if(searchMinSize.value.length){
@@ -55,7 +59,7 @@ const sortOrder = computed(() =>{
55
59
  return undefined;
56
60
  });
57
61
 
58
-
62
+ //Watch
59
63
  watch(()=>props.rubriqueId, async () => {
60
64
  const data = await classicApi.fetchData<Rubrique>({
61
65
  api: 0,
@@ -2,11 +2,10 @@
2
2
  <section class="page-box">
3
3
  <h1>{{ titlePage }}</h1>
4
4
  <ClassicSearch
5
- v-if="!hideBar"
6
5
  v-model:text-init="rawQuery"
7
6
  :autofocus="true"
8
7
  id-search="search-page-input"
9
- :label="$t('Please type at least three characters')"
8
+ :label="t('Please type at least three characters')"
10
9
  />
11
10
  <PodcastList
12
11
  v-if="!!query"
@@ -18,41 +17,37 @@
18
17
  </section>
19
18
  </template>
20
19
 
21
- <script lang="ts">
20
+ <script setup lang="ts">
22
21
  import ClassicSearch from "../form/ClassicSearch.vue";
23
22
  import PodcastList from "../display/podcasts/PodcastList.vue";
24
- import { defineComponent } from "vue";
25
- export default defineComponent({
26
- name: "SearchPage",
27
- components: {
28
- PodcastList,
29
- ClassicSearch,
30
- },
31
- props: {
32
- queryRoute: { default: "", type: String },
33
- },
34
- data() {
35
- return {
36
- rawQuery: "" as string,
37
- noResult: false as boolean,
38
- };
39
- },
40
- computed: {
41
- titlePage(): string {
42
- const locale = !this.noResult ? "Search results" : "Search - no results";
43
- return this.$t(locale, { query: this.rawQuery });
44
- },
45
- query(): string {
46
- return this.rawQuery && this.rawQuery.length >= 3 ? this.rawQuery : "";
47
- },
48
- },
49
- watch: {
50
- queryRoute: {
51
- immediate: true,
52
- handler() {
53
- this.rawQuery = this.queryRoute;
54
- },
55
- },
56
- },
23
+ import { computed, ref, watch } from "vue";
24
+ import { useI18n } from "vue-i18n";
25
+
26
+ //Props
27
+ const props = defineProps({
28
+ queryRoute: { default: "", type: String },
57
29
  });
30
+
31
+ //Data
32
+ const rawQuery = ref("");
33
+ const noResult = ref(false);
34
+
35
+ //Composables
36
+ const { t } = useI18n();
37
+
38
+
39
+ //Computed
40
+ const titlePage = computed(() =>{
41
+ const locale = !noResult.value ? "Search results" : "Search - no results";
42
+ return t(locale, { query: rawQuery.value });
43
+ });
44
+ const query = computed(() =>{
45
+ return rawQuery.value && rawQuery.value.length >= 3 ? rawQuery.value : "";
46
+ });
47
+
48
+
49
+ //Watch
50
+ watch(()=>props.queryRoute, () => {
51
+ rawQuery.value = props.queryRoute;
52
+ }, {immediate: true});
58
53
  </script>
@@ -1,13 +1,14 @@
1
1
  <template>
2
2
  <section v-if="isInit" class="page-box tag-page">
3
3
  <h1>
4
- {{ $t("Search for keyword", {tag:titleDisplay})}}
4
+ {{ t("Search for keyword", {tag:titleDisplay})}}
5
5
  <img
6
6
  v-if="isOf"
7
7
  width="30"
8
8
  height="30"
9
9
  class="ouest-france-logo-tag-page"
10
- role="presentation"
10
+ aria-hidden="true"
11
+ alt=""
11
12
 
12
13
  title="Ouest France"
13
14
  src="/img/ouest_france_logo.svg"
@@ -39,6 +40,7 @@ const ProductorSearch = defineAsyncComponent(
39
40
  () => import("../display/filter/ProductorSearch.vue"),
40
41
  );
41
42
 
43
+ //Props
42
44
  const props = defineProps({
43
45
  pr: { default: 0, type: Number },
44
46
  ps: { default: 30, type: Number },
@@ -47,6 +49,11 @@ const props = defineProps({
47
49
  routeQuery: { default: "", type: String },
48
50
  });
49
51
 
52
+ //Data
53
+ const titleDisplay = ref("");
54
+ const isOf = ref(false);
55
+
56
+ //Composables
50
57
  const {
51
58
  searchPattern,
52
59
  organisationId,
@@ -54,15 +61,11 @@ const {
54
61
  paginateFirst,
55
62
  isInit
56
63
  } = useSimplePageParam(props);
57
-
58
64
  const { isOuestFranceTag, formateOfTag } = useTagOf();
59
-
60
65
  const { updatePathParams } = useSeoTitleUrl();
61
-
62
- const titleDisplay = ref("");
63
- const isOf = ref(false);
64
66
  const {t} = useI18n();
65
67
 
68
+ //Computed
66
69
  const orgaArray = computed(() =>organisationId.value ? [organisationId.value] : []);
67
70
  const sortOrder = computed(() =>{
68
71
  if(searchMinSize.value.length){
@@ -71,7 +74,7 @@ const sortOrder = computed(() =>{
71
74
  return undefined;
72
75
  });
73
76
 
74
-
77
+ //Watch
75
78
  watch(()=>props.tag, async () => {
76
79
  const tagString = props.tag?? "";
77
80
  isOf.value = isOuestFranceTag(tagString);
@@ -79,7 +82,6 @@ watch(()=>props.tag, async () => {
79
82
  updatePathParams(t("Search for keyword", {tag:titleDisplay.value}));
80
83
  }, {immediate: true});
81
84
 
82
-
83
85
  </script>
84
86
  <style lang="scss">
85
87
  .octopus-app .tag-page{
@@ -7,9 +7,9 @@
7
7
  params: { podcastId: podcastId },
8
8
  }"
9
9
  class="mt-3 mb-3 w-fit-content d-flex align-items-center"
10
- :title="$t('Episode name page', { name: podcast?.title })"
10
+ :title="t('Episode name page', { name: podcast?.title })"
11
11
  >
12
- <ChevronLeftIcon />{{ $t("Episode page") }}
12
+ <ChevronLeftIcon />{{ t("Episode page") }}
13
13
  </router-link>
14
14
  <div
15
15
  v-if="videoId || isLiveReadyToRecord"
@@ -78,13 +78,13 @@
78
78
  v-if="!error && !videoId && !isLiveReadyToRecord"
79
79
  class="text-center text-danger h3"
80
80
  >
81
- {{ $t("The episode does not have an associated video") }}
81
+ {{ t("The episode does not have an associated video") }}
82
82
  </div>
83
83
  <ClassicLoading
84
- :loading-text="!loaded ? $t('Loading content ...') : undefined"
84
+ :loading-text="!loaded ? t('Loading content ...') : undefined"
85
85
  :error-text="
86
86
  error
87
- ? $t(`This episode is not available for (re)listening`)
87
+ ? t(`This episode is not available for (re)listening`)
88
88
  : undefined
89
89
  "
90
90
  />
@@ -114,6 +114,7 @@ import { usePlayerStore } from "../../stores/PlayerStore";
114
114
  import { useGeneralStore } from "../../stores/GeneralStore";
115
115
  import { useI18n } from "vue-i18n";
116
116
  import { useRoute } from "vue-router";
117
+ import { useErrorHandler } from "../composable/useErrorHandler";
117
118
  const PlayerVideoDigiteka = defineAsyncComponent(
118
119
  () => import("../misc/player/video/PlayerVideoDigiteka.vue"),
119
120
  );
@@ -130,10 +131,12 @@ const CountdownOctopus = defineAsyncComponent(
130
131
  () => import("../display/live/CountdownOctopus.vue"),
131
132
  );
132
133
 
134
+ //Props
133
135
  const props = defineProps({
134
136
  podcastId:{ default: 0, type: Number },
135
137
  })
136
138
 
139
+ //Data
137
140
  const loaded = ref(false);
138
141
  const podcast: Ref<Podcast | undefined> = ref(undefined);
139
142
  const error = ref(false);
@@ -142,6 +145,7 @@ const configPodcast: Ref<CommentsConfig | undefined> = ref(undefined);
142
145
  const podcastConference: Ref<Conference | undefined> = ref(undefined);
143
146
  const intervalStatusConference: Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
144
147
 
148
+ //Composables
145
149
  const {
146
150
  isLiveReadyToRecord,
147
151
  isCounter,
@@ -151,7 +155,7 @@ const {
151
155
  durationIso,
152
156
  editRight
153
157
  } = usePodcastView(podcast, podcastConference);
154
-
158
+ const {handle403} = useErrorHandler();
155
159
  const { updatePathParams } = useSeoTitleUrl();
156
160
  const authStore = useAuthStore();
157
161
  const apiStore = useApiStore();
@@ -159,10 +163,10 @@ const generalStore = useGeneralStore();
159
163
  const playerStore = usePlayerStore();
160
164
  const filterStore = useFilterStore();
161
165
  const commentStore = useCommentStore();
162
-
163
166
  const {t} = useI18n();
164
167
  const route = useRoute();
165
168
 
169
+ //Computed
166
170
  const videoId = computed(() => podcast.value?.video?.videoId);
167
171
  const canPostComment = computed(() => {
168
172
  return commentStore.getCanPostComment(
@@ -201,7 +205,7 @@ const overrideText = computed(() => {
201
205
  return t("In the process of being published");
202
206
  });
203
207
 
204
-
208
+ //Watch
205
209
  watch(()=>props.podcastId, async () => {
206
210
  await getPodcastDetails();
207
211
  if (!podcast.value) {
@@ -216,6 +220,7 @@ onBeforeUnmount(() => {
216
220
  clearInterval(intervalStatusConference.value as unknown as number);
217
221
  })
218
222
 
223
+ //Methods
219
224
  async function getPodcastDetails(): Promise<void> {
220
225
  loaded.value = false;
221
226
  error.value = false;
@@ -257,7 +262,7 @@ async function getPodcastDetails(): Promise<void> {
257
262
  }
258
263
  }
259
264
  } catch (errorCatched) {
260
- this.handle403(errorCatched as AxiosError);
265
+ handle403(errorCatched as AxiosError);
261
266
  error.value = true;
262
267
  }
263
268
  loaded.value = true;
@@ -284,8 +289,6 @@ async function fetchConferenceStatus() {
284
289
  }
285
290
  </script>
286
291
  <style lang="scss">
287
-
288
-
289
292
  .octopus-app .video-page-container {
290
293
  align-items: stretch;
291
294
  flex-grow: 1;
@@ -4,7 +4,7 @@ export default {
4
4
  if (!text) return "";
5
5
  return text.replace(urlRegex, (url: string) => {
6
6
  return (
7
- '<a href="' + url + '" target="_blank" rel="noreferrer noopener" :title="$t(\'New window\', {text: '+url+'})">' + url + "</a>"
7
+ '<a href="' + url + '" target="_blank" rel="noreferrer noopener" :title="t(\'New window\', {text: '+url+'})">' + url + "</a>"
8
8
  );
9
9
  });
10
10
  },
@@ -1,4 +1,4 @@
1
- function loadScript(src: string, async:boolean, callback: any) {
1
+ function loadScript(src: string, async:boolean, callback: (isLoaded:boolean) => void) {
2
2
  const firstElement = document.getElementsByTagName('head')[0] || document.documentElement,
3
3
  scriptElement = document.createElement('script');
4
4
  scriptElement.type = 'text/javascript';
@@ -6,13 +6,13 @@ function loadScript(src: string, async:boolean, callback: any) {
6
6
  scriptElement.async = async;
7
7
  scriptElement.addEventListener('load', function() {
8
8
  if(callback && typeof callback === 'function') {
9
- callback(true, window);
9
+ callback(true);
10
10
  }
11
11
  }, false);
12
- scriptElement.addEventListener('error', function(error) {
12
+ scriptElement.addEventListener('error', function() {
13
13
  firstElement.removeChild(scriptElement);
14
14
  if(callback && typeof callback === 'function') {
15
- callback(false, error);
15
+ callback(false);
16
16
  }
17
17
  }, false);
18
18
  firstElement.insertBefore(scriptElement, firstElement.firstChild);
package/src/i18n.ts CHANGED
@@ -7,14 +7,14 @@ import "dayjs/locale/fr";
7
7
  import "dayjs/locale/it";
8
8
  import "dayjs/locale/sl";
9
9
 
10
- export function setupI18n(options: { locale: string }, isAuthenticated: boolean, isEducation: boolean) {
10
+ export function setupI18n(options: { [key:string]: string|boolean }, isAuthenticated: boolean, isEducation: boolean) {
11
11
  const i18n = createI18n(options);
12
12
  loadLocaleMessages(i18n.global, options.locale, isAuthenticated, isEducation);
13
13
  return i18n;
14
14
  }
15
15
 
16
16
  export function setI18nLanguage(i18n: any, locale: string) {
17
- i18n.locale = locale;
17
+ i18n.locale.value= locale;
18
18
  dayjs.locale(locale);
19
19
  const html = document.querySelector("html");
20
20
  if (html) {
package/src/main.ts CHANGED
@@ -38,7 +38,7 @@ if (0 === language.length) {
38
38
  }
39
39
  }
40
40
 
41
- const i18n = setupI18n({ locale: language }, false, false);
41
+ const i18n = setupI18n({legacy: false, locale: language }, false, false);
42
42
 
43
43
  paramStore.initialize({
44
44
  generalParameters: {},
@@ -144,9 +144,13 @@ const routes: Array<RouteRecordRaw> = [
144
144
  component: EmissionPage,
145
145
  props: (route: RouteLocationNormalized) => ({
146
146
  emissionId: parseInt(route.params.emissionId.toString(), 10),
147
+ pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
148
+ ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
149
+ routeQuery: route.query.q ?? "",
147
150
  }),
148
151
  meta:{
149
- title: ""
152
+ title: "",
153
+ noScroll:true
150
154
  }
151
155
  },
152
156
  {
@@ -177,9 +181,13 @@ const routes: Array<RouteRecordRaw> = [
177
181
  component: ParticipantPage,
178
182
  props: (route: RouteLocationNormalized) => ({
179
183
  participantId: parseInt(route.params.participantId.toString(), 10),
184
+ pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
185
+ ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
186
+ routeQuery: route.query.q ?? "",
180
187
  }),
181
188
  meta:{
182
- title: ""
189
+ title: "",
190
+ noScroll:true
183
191
  }
184
192
  },
185
193
  {
@@ -266,9 +274,13 @@ const routes: Array<RouteRecordRaw> = [
266
274
  component: PlaylistPage,
267
275
  props: (route: RouteLocationNormalized) => ({
268
276
  playlistId: parseInt(route.params.playlistId.toString(), 10),
277
+ pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
278
+ ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
279
+ routeQuery: route.query.q ?? "",
269
280
  }),
270
281
  meta:{
271
- title: ""
282
+ title: "",
283
+ noScroll:true
272
284
  }
273
285
  },
274
286
  //Fake route to avoid errors
@@ -321,7 +333,8 @@ const routes: Array<RouteRecordRaw> = [
321
333
  const router = createRouter({
322
334
  history: createWebHistory(),
323
335
  routes: routes,
324
- scrollBehavior(): { left: number; top: number } {
336
+ scrollBehavior(to, from) {
337
+ if (to.name === from.name && to.meta.noScroll) return false;
325
338
  return { left: 0, top: 0 };
326
339
  },
327
340
  });
@@ -5,19 +5,19 @@ import { defineStore } from "pinia";
5
5
  import { KeycloakInfo } from "@/stores/class/user/person";
6
6
  import { VideoConfig } from "@/stores/class/config/videoConfig";
7
7
  import classicApi from "../api/classicApi";
8
-
8
+ interface AuthParam{
9
+ accessToken?: string;
10
+ refreshToken?: string;
11
+ expiration?: Date|string;
12
+ clientId?: string;
13
+ }
9
14
  interface AuthState {
10
15
  authReload: number;
11
16
  authName: string;
12
17
  authOrgaId?: string;
13
18
  authOrgaName?: string;
14
19
  authRole: Array<string>;
15
- authParam: {
16
- accessToken?: string;
17
- refreshToken?: string;
18
- expiration?: Date;
19
- clientId?: string;
20
- };
20
+ authParam:AuthParam;
21
21
  authProfile?: Profile;
22
22
  authOrganisation: Organisation;
23
23
  authVideoConfig: VideoConfig;
@@ -115,25 +115,25 @@ export const useAuthStore = defineStore("AuthStore", {
115
115
  },
116
116
  },
117
117
  actions: {
118
- authUpdate(authentication: any) {
118
+ authUpdate(authentication: {name?:string, organisationId?:string,organisationName?:string, role?:Array<string>}) {
119
119
  this.authName = authentication.name ?? this.authName;
120
120
  this.authOrgaId = authentication.organisationId ?? this.authOrgaId;
121
121
  this.authOrgaName = authentication.organisationName ?? this.authOrgaName;
122
122
  this.authRole = authentication.role ?? this.authRole;
123
123
  },
124
- authUpdateParam(oAuthParam: any) {
124
+ authUpdateParam(oAuthParam: AuthParam) {
125
125
  this.authParam = oAuthParam;
126
126
  },
127
- authUpdateProfile(profile: any) {
127
+ authUpdateProfile(profile: Profile) {
128
128
  this.authProfile = profile;
129
129
  this.authName = profile.firstname + " " + profile.lastname;
130
130
  },
131
- authUpdateOrganisation(organisation: any) {
131
+ authUpdateOrganisation(organisation: Organisation) {
132
132
  this.authOrganisation = organisation;
133
133
  const saveFetchStore = useSaveFetchStore();
134
134
  saveFetchStore.forceUpdateAttributes(
135
135
  organisation.id,
136
- organisation.attributes,
136
+ organisation.attributes??{}
137
137
  );
138
138
  saveFetchStore.forceUpdateData(organisation.id, organisation);
139
139
  },
@@ -52,7 +52,7 @@ export const useFilterStore = defineStore("FilterStore", {
52
52
  this.filterRubrique = rubriqueFilter;
53
53
  },
54
54
  filterUpdateRubriqueDisplay(rubriques: Array<Rubrique>) {
55
- this.filterRubriqueDisplay = rubriques;
55
+ this.filterRubriqueDisplay = rubriques.filter(rubrique=> rubrique);
56
56
  },
57
57
  filterUpdateMedia(filter: {
58
58
  type?: string;
@@ -2,7 +2,7 @@ import { defineStore } from "pinia";
2
2
  import { AdPosition } from "./class/adserver/adPosition";
3
3
 
4
4
  interface VastState {
5
- currentAd: any;
5
+ currentAd: google.ima.Ad|undefined;
6
6
  isAdPlaying: boolean;
7
7
  isAdPaused: boolean;
8
8
  isAdSkippable: boolean;
@@ -79,7 +79,7 @@ export const useVastStore = defineStore("VastStore", {
79
79
  ) {
80
80
  this.adPositionsPodcasts[podcastId] = adPositions;
81
81
  },
82
- updateCurrentAd(currentAd: any) {
82
+ updateCurrentAd(currentAd: google.ima.Ad) {
83
83
  this.currentAd = currentAd;
84
84
  this.isAdSkipped = false;
85
85
  },
@@ -11,6 +11,7 @@ export interface Radio {
11
11
  podcast?: Podcast;
12
12
  sessionId?: string;
13
13
  dateSessionId?: string;
14
+ secured?:boolean;
14
15
  }
15
16
  export interface MediaRadio {
16
17
  artist: string;
Binary file