@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "40.2.18",
3
+ "version": "41.0.0-SNAPSHOT",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -12,63 +12,62 @@
12
12
  "proxy_non_authentifié": "node proxy.ts false",
13
13
  "lint": "eslint --fix src",
14
14
  "stylelint": "stylelint **/*.{scss,vue} --fix",
15
- "sonar": "node sonarqube-scanner.js"
15
+ "sonar": "sonar -Dsonar.host.url=http://localhost:9000"
16
16
  },
17
17
  "dependencies": {
18
18
  "@multiformats/murmur3": "^2.1.8",
19
19
  "@popperjs/core": "^2.11.8",
20
- "@stomp/stompjs": "^7.0.0",
20
+ "@stomp/stompjs": "^7.1.1",
21
21
  "@tato30/vue-pdf": "^1.11.3",
22
- "@tiptap/extension-hard-break": "^2.9.1",
23
- "@tiptap/extension-link": "^2.9.1",
24
- "@tiptap/extension-text-style": "^2.9.1",
25
- "@tiptap/extension-underline": "^2.9.1",
26
- "@tiptap/starter-kit": "^2.9.1",
27
- "@tiptap/vue-3": "^2.9.1",
28
- "@vuepic/vue-datepicker": "^10.0.0",
29
- "@vueuse/core": "^12.0.0",
30
- "autoprefixer": "^10.4.20",
31
- "axios": "^1.7.9",
22
+ "@tiptap/extension-hard-break": "^2.14.0",
23
+ "@tiptap/extension-link": "^2.14.0",
24
+ "@tiptap/extension-text-style": "^2.14.0",
25
+ "@tiptap/extension-underline": "^2.14.0",
26
+ "@tiptap/starter-kit": "^2.14.0",
27
+ "@tiptap/vue-3": "^2.14.0",
28
+ "@vuepic/vue-datepicker": "^11.0.2",
29
+ "@vueuse/core": "^13.3.0",
30
+ "autoprefixer": "^10.4.21",
31
+ "axios": "^1.9.0",
32
32
  "dayjs": "^1.11.13",
33
- "emoji-mart-vue-fast": "^15.0.3",
34
- "eslint-config-prettier": "^9.1.0",
35
- "express": "^4.21.2",
36
- "globals": "^15.13.0",
37
- "hls.js": "^1.5.17",
38
- "humanize-duration": "^3.32.1",
39
- "pinia": "^2.3.0",
40
- "postcss-html": "^1.7.0",
33
+ "emoji-mart-vue-fast": "^15.0.4",
34
+ "eslint-config-prettier": "^10.1.5",
35
+ "express": "^5.1.0",
36
+ "globals": "^16.2.0",
37
+ "hls.js": "^1.6.5",
38
+ "humanize-duration": "^3.33.0",
39
+ "pinia": "^3.0.3",
40
+ "postcss-html": "^1.8.0",
41
41
  "qrcode.vue": "^3.6.0",
42
- "sass": "^1.82.0",
42
+ "sass": "^1.89.2",
43
43
  "sockjs-client": "^1.6.1",
44
- "sonarqube-scanner": "^3.3.0",
45
- "stylelint": "^16.13.0",
46
- "stylelint-config-recommended-scss": "^14.1.0",
47
- "stylelint-config-recommended-vue": "^1.5.0",
48
- "stylelint-config-standard": "^37.0.0",
49
- "stylelint-config-standard-scss": "^14.0.0",
44
+ "stylelint": "^16.20.0",
45
+ "stylelint-config-recommended-scss": "^15.0.1",
46
+ "stylelint-config-recommended-vue": "^1.6.0",
47
+ "stylelint-config-standard": "^38.0.0",
48
+ "stylelint-config-standard-scss": "^15.0.1",
50
49
  "stylelint-config-standard-vue": "^1.0.0",
51
50
  "stylelint-gamut": "^1.3.4",
52
- "swiper": "^11.1.14",
53
- "typescript-eslint": "^8.18.1",
54
- "video.js": "^8.21.0",
51
+ "swiper": "^11.2.8",
52
+ "typescript-eslint": "^8.34.0",
53
+ "video.js": "^8.23.3",
55
54
  "videojs-quality-selector-hls": "^1.1.1",
56
- "vite": "^5.4.11",
57
- "vue": "^3.5.12",
58
- "vue-i18n": "^10.0.5",
55
+ "vite": "^6.3.5",
56
+ "vue": "^3.5.16",
57
+ "vue-i18n": "^11.1.5",
59
58
  "vue-material-design-icons": "^5.3.1",
60
59
  "vue-recaptcha": "^2.0.3",
61
- "vue-router": "^4.4.5",
60
+ "vue-router": "^4.5.1",
62
61
  "vue-select": "^4.0.0-beta.6",
63
62
  "vue3-lazyload": "^0.3.8",
64
63
  "vue3-swatches": "^1.2.4"
65
64
  },
66
65
  "devDependencies": {
67
66
  "@types/sockjs-client": "^1.5.4",
68
- "@vitejs/plugin-vue": "^5.1.4",
69
- "eslint": "^9.17.0",
70
- "eslint-plugin-vue": "^9.32.0",
71
- "typescript": "^5.6.3"
67
+ "@vitejs/plugin-vue": "^5.2.4",
68
+ "eslint": "^9.28.0",
69
+ "eslint-plugin-vue": "^9.33.0",
70
+ "typescript": "^5.8.3"
72
71
  },
73
72
  "postcss": {
74
73
  "plugins": {
package/src/App.vue CHANGED
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
  </div>
16
16
  </template>
17
- <script lang="ts">
17
+ <script setup lang="ts">
18
18
  import TopBar from "@/components/misc/TopBar.vue";
19
19
  import PlayerComponent from "@/components/misc/player/PlayerComponent.vue";
20
20
  import ClassicLazy from "@/components/misc/ClassicLazy.vue";
@@ -22,104 +22,84 @@ import {useInit} from "./components/composable/useInit";
22
22
  import {useMetaTitle} from "./components/composable/useMetaTitle";
23
23
  import {useOrganisationFilter} from "./components/composable/useOrganisationFilter";
24
24
  import { useAuthStore } from "./stores/AuthStore";
25
- import { useFilterStore } from "./stores/FilterStore";
26
- import { useGeneralStore } from "./stores/GeneralStore";
27
- import { mapState, mapActions } from "pinia";
28
- import { defineAsyncComponent, defineComponent } from "vue";
25
+ import { defineAsyncComponent, getCurrentInstance, onBeforeMount, ref, watch } from "vue";
26
+ import { useRoute } from "vue-router";
27
+ import { useI18n } from "vue-i18n";
29
28
  const FooterOctopus = defineAsyncComponent(
30
29
  () => import("@/components/misc/FooterSection.vue"),
31
30
  );
32
31
  const CategoryFilter = defineAsyncComponent(
33
32
  () => import("@/components/display/categories/CategoryFilter.vue"),
34
33
  );
35
- export default defineComponent({
36
- name: "App",
37
34
 
38
- components: {
39
- TopBar,
40
- CategoryFilter,
41
- FooterOctopus,
42
- PlayerComponent,
43
- ClassicLazy
44
- },
35
+ //Data
36
+ const reload = ref(false);
37
+ const pageFullyLoad = ref(false);
38
+ const firstDisplayCategoryFilter = ref(false);
45
39
 
46
- setup(){
47
- const { updateMetaTitle } = useMetaTitle();
48
- const {initSdk} = useInit();
49
- const {selectOrganisation} = useOrganisationFilter();
50
- return { updateMetaTitle, initSdk, selectOrganisation }
51
- },
40
+ //Composables
41
+ const {locale} = useI18n();
42
+ const { updateMetaTitle } = useMetaTitle();
43
+ const {initSdk} = useInit();
44
+ const {selectOrganisation} = useOrganisationFilter();
45
+ const authStore = useAuthStore();
46
+ const route = useRoute();
52
47
 
53
- data() {
54
- return {
55
- reload: false as boolean,
56
- pageFullyLoad: false as boolean,
57
- firstDisplayCategoryFilter: false as boolean,
58
- };
59
- },
60
48
 
61
- computed: {
62
- ...mapState(useFilterStore, ["filterRubriquage", "filterOrgaId"]),
63
- ...mapState(useGeneralStore, ["storedCategories"]),
64
- ...mapState(useAuthStore, ["authOrgaId"]),
65
- },
66
-
67
- watch: {
68
- $route: {
69
- immediate: true,
70
- async handler() {
71
- this.updateMetaTitle();
72
- if (this.firstDisplayCategoryFilter) {
73
- return;
74
- }
75
- const namesRouteWithCategoryFilter = [
76
- "homePriv",
77
- "home",
78
- "podcasts",
79
- "emissions",
80
- "participants",
81
- "playlists",
82
- ];
83
- this.firstDisplayCategoryFilter = namesRouteWithCategoryFilter.includes(
84
- this.$route.name?.toString() ?? "",
85
- );
86
- },
87
- },
88
- "$i18n.locale"() {
89
- this.updateMetaTitle();
90
- this.$forceUpdate();
91
- this.reload = !this.reload;
92
- },
93
- },
94
- created() {
95
- this.initApp();
96
- setTimeout(() => {
97
- this.pageFullyLoad = true;
98
- }, 2000);
99
- },
100
- methods: {
101
- ...mapActions(useFilterStore, ["filterUpdateRubrique"]),
102
- async initApp() {
103
- await this.initSdk();
104
- await this.handleOrganisationFilter();
105
- },
106
- async handleOrganisationFilter() {
107
- let orgaId = "";
108
- if (
109
- this.$route.query.productor &&
110
- "string" === typeof this.$route.query.productor
111
- ) {
112
- orgaId = this.$route.query.productor;
113
- } else if (this.authOrgaId) {
114
- orgaId = this.authOrgaId;
115
- }
116
- if ("" === orgaId) {
117
- return;
118
- }
119
- await this.selectOrganisation(orgaId);
120
- },
121
- },
49
+ //Watch
50
+ watch(route, async () => {
51
+ updateMetaTitle();
52
+ if (firstDisplayCategoryFilter.value) {
53
+ return;
54
+ }
55
+ const namesRouteWithCategoryFilter = [
56
+ "homePriv",
57
+ "home",
58
+ "podcasts",
59
+ "emissions",
60
+ "participants",
61
+ "playlists",
62
+ ];
63
+ firstDisplayCategoryFilter.value = namesRouteWithCategoryFilter.includes(
64
+ route.name?.toString() ?? "",
65
+ );
66
+ }, {immediate: true});
67
+ watch(locale,() => {
68
+ updateMetaTitle();
69
+ const instance = getCurrentInstance();
70
+ instance?.proxy?.$forceUpdate();
71
+ reload.value = !reload.value;
122
72
  });
73
+
74
+
75
+ onBeforeMount(()=>{
76
+ initApp();
77
+ setTimeout(() => {
78
+ pageFullyLoad.value = true;
79
+ }, 2000);
80
+ })
81
+
82
+
83
+ //Methods
84
+ async function initApp() {
85
+ await initSdk();
86
+ await handleOrganisationFilter();
87
+ }
88
+ async function handleOrganisationFilter() {
89
+ let orgaId = "";
90
+ if (
91
+ route.query.productor &&
92
+ "string" === typeof route.query.productor
93
+ ) {
94
+ orgaId = route.query.productor;
95
+ } else if (authStore.authOrgaId) {
96
+ orgaId = authStore.authOrgaId;
97
+ }
98
+ if ("" === orgaId) {
99
+ return;
100
+ }
101
+ await selectOrganisation(orgaId);
102
+ }
123
103
  </script>
124
104
 
125
105
  <style lang="scss" src="@/style/octopus-library.scss"></style>
@@ -1,6 +1,6 @@
1
1
  import stringHelper from "../../../helper/stringHelper";
2
2
  import { usePlayerLogicProgress } from "./usePlayerLogicProgress";
3
- import { Ref, ref } from "vue";
3
+ import { computed, Ref, ref } from "vue";
4
4
  import { usePlayerStore } from "../../../stores/PlayerStore";
5
5
  import { useApiStore } from "../../../stores/ApiStore";
6
6
  import dayjs from "dayjs";
@@ -24,6 +24,12 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
24
24
  const apiStore = useApiStore();
25
25
  const authStore = useAuthStore();
26
26
 
27
+ const needToAddToken = computed(() => {
28
+ return authStore.authParam.accessToken && ("SECURED" === playerStore.playerLive?.organisation?.privacy || playerStore.playerRadio?.secured);
29
+ });
30
+
31
+
32
+
27
33
 
28
34
  function onPlay(): void {
29
35
  playerStore.playerChangeStatus("PAUSED"===playerStore.playerStatus);
@@ -69,7 +75,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
69
75
  audioElement.value.canPlayType("application/vnd.apple.mpegurl") &&
70
76
  !isAndroid
71
77
  ) {
72
- if ("SECURED" === playerStore.playerLive?.organisation?.privacy && authStore.authParam.accessToken) {
78
+ if(needToAddToken.value) {
73
79
  audioElement.value.src = playerStore.playerHlsUrl+"?access_token="+authStore.authParam.accessToken;
74
80
  }else{
75
81
  audioElement.value.src = playerStore.playerHlsUrl;
@@ -107,7 +113,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
107
113
  }
108
114
  hls.value = new Hls({
109
115
  xhrSetup: (xhr: XMLHttpRequest) => {
110
- if ("SECURED" === playerStore.playerLive?.organisation?.privacy && authStore.authParam.accessToken) {
116
+ if (needToAddToken.value) {
111
117
  xhr.setRequestHeader("Authorization", "Bearer " +authStore.authParam.accessToken);
112
118
  }
113
119
  }
@@ -140,6 +146,9 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
140
146
  async function endingLive(): Promise<void> {
141
147
  clearTimeout(hlsRetryTimeout.value);
142
148
  hlsRetryTimeout.value = undefined;
149
+ if(null===audioElement.value){
150
+ return;
151
+ }
143
152
  audioElement.value = null;
144
153
  const audio: HTMLElement | null = document.getElementById("audio-player");
145
154
  if (audio && hls.value) {
@@ -62,21 +62,21 @@ export const usePlayerLogic = (forceHide: Ref<boolean, boolean>)=>{
62
62
  getTranscription();
63
63
  }, {deep:true});
64
64
 
65
- watch(()=>playerStore.playerLive, async () => {
65
+ watch(()=>playerStore.playerLive, async (_, oldLive) => {
66
66
  if(playerStore.playerVideo){
67
67
  return;
68
68
  }
69
69
  nextTick(async () => {
70
70
  hlsReady.value = false;
71
- reInitPlayer();
71
+ reInitPlayer(oldLive!==undefined);
72
72
  playLive();
73
73
  });
74
74
  }, {deep:true});
75
75
 
76
- watch(()=>playerStore.playerRadio, async () => {
76
+ watch(()=>playerStore.playerRadio, async (_, oldRadio) => {
77
77
  nextTick(async () => {
78
78
  hlsReady.value = false;
79
- reInitPlayer();
79
+ reInitPlayer(oldRadio !== undefined);
80
80
  playRadio();
81
81
  });
82
82
  });
@@ -154,10 +154,10 @@ export const usePlayerLogic = (forceHide: Ref<boolean, boolean>)=>{
154
154
  return playerStore.playerPodcast.podcastId + ".mp3?"+fetchHelper.getUriSearchParams(getAudioUrlParameters());
155
155
  }
156
156
 
157
- function reInitPlayer(): void {
157
+ function reInitPlayer(force=false): void {
158
158
  setDownloadId(null);
159
159
  listenError.value = false;
160
- if (playerStore.playerLive || playerStore.playerRadio) {
160
+ if (force || playerStore.playerLive || playerStore.playerRadio) {
161
161
  endingLive();
162
162
  }
163
163
  }
@@ -10,7 +10,7 @@ import { useI18n } from 'vue-i18n';
10
10
  import {useOrgaComputed} from "../useOrgaComputed"
11
11
  export const usePodcastView = (podcast: Ref<Podcast|undefined>, podcastConference: Ref<Conference|undefined>)=>{
12
12
 
13
- const i18n = useI18n();
13
+ const {locale} = useI18n();
14
14
 
15
15
  const {isEditRights, isPodcastmaker} = useOrgaComputed();
16
16
 
@@ -54,13 +54,13 @@ export const usePodcastView = (podcast: Ref<Podcast|undefined>, podcastConferen
54
54
  if (!podcast.value || podcast.value.duration <= 1){return ""};
55
55
  if (podcast.value.duration > 600000) {
56
56
  return humanizeDuration(podcast.value.duration, {
57
- language: i18n.locale.value,
57
+ language: locale.value,
58
58
  largest: 1,
59
59
  round: true,
60
60
  });
61
61
  }
62
62
  return humanizeDuration(podcast.value.duration, {
63
- language: i18n.locale.value,
63
+ language: locale.value,
64
64
  largest: 2,
65
65
  round: true,
66
66
  });
@@ -10,13 +10,13 @@ export const useInit= ()=>{
10
10
  const authStore = useAuthStore();
11
11
  const generalStore = useGeneralStore();
12
12
 
13
- const i18n = useI18n()
13
+ const {locale} = useI18n()
14
14
 
15
15
  async function initSdk() {
16
16
  classicApi.fetchData<Array<Category>>({
17
17
  api: 0,
18
18
  path:`iab/list${authStore.authOrgaId ? "/" + authStore.authOrgaId : ""}`,
19
- parameters:{ lang: i18n.locale.value },
19
+ parameters:{ lang: locale.value },
20
20
  })
21
21
  .then((data: Array<Category>) => {
22
22
  if(data.length){
@@ -7,8 +7,8 @@ export const useMetaTitleWatch = ()=>{
7
7
  const { updateMetaTitle } = useMetaTitle();
8
8
 
9
9
  const route = useRoute();
10
- const i18n = useI18n();
10
+ const {locale} = useI18n();
11
11
 
12
12
  watch(route, () => updateMetaTitle(), {immediate:true});
13
- watch(()=>i18n.locale, () => updateMetaTitle());
13
+ watch(locale, () => updateMetaTitle());
14
14
  }
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <ClassicModalInBody
3
3
  id-modal="accessibility-modal"
4
- :title-modal="$t('Transcript Accessibility')"
4
+ :title-modal="t('Transcript Accessibility')"
5
5
  @close="closePopup"
6
6
  >
7
7
  <template #body>
8
8
  <div class="d-flex gap-3 flex-wrap mb-3">
9
9
  <div class="d-flex flex-nowrap align-items-center flex-grow-1">
10
- <div class="form-label me-3">{{ $t('Choose background color') }}</div>
10
+ <div class="form-label me-3">{{ t('Choose background color') }}</div>
11
11
  <VSwatches
12
12
  v-model:model-value="background"
13
13
  class="c-hand"
@@ -19,7 +19,7 @@
19
19
  />
20
20
  </div>
21
21
  <div class="d-flex flex-nowrap align-items-center flex-grow-1">
22
- <div class="form-label me-3">{{ $t('Choose text color') }}</div>
22
+ <div class="form-label me-3">{{ t('Choose text color') }}</div>
23
23
  <VSwatches
24
24
  v-model:model-value="color"
25
25
  class="c-hand"
@@ -33,98 +33,86 @@
33
33
  </div>
34
34
 
35
35
  <div class="d-flex align-items-center flex-nowrap mb-3">
36
- <label class="form-label me-3" for="accessibility-font-size">{{ $t('Font size') }}</label>
36
+ <label class="form-label me-3" for="accessibility-font-size">{{ t('Font size') }}</label>
37
37
  <button class="btn me-3" :disabled="isMinSize" @click="decreaseFontSize"><FormatFontSizeDecreaseIcon :size="44"/></button>
38
38
  <button class="btn" :disabled="isMaxSize" @click="increaseFontSize"><FormatFontSizeIncreaseIcon :size="44"/></button>
39
39
  </div>
40
40
 
41
- <div class="form-label mt-3">{{ $t('Preview') }}</div>
41
+ <div class="form-label mt-3">{{ t('Preview') }}</div>
42
42
  <div class="border p-2 mb-3" :style="stylePreview">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
43
43
  </template>
44
44
  <template #footer>
45
45
  <button class="btn m-1" @click="closePopup">
46
- {{ $t("No") }}
46
+ {{ t("No") }}
47
47
  </button>
48
48
  <button
49
49
  class="btn btn-primary m-1"
50
50
  @click="saveData"
51
51
  >
52
- {{ $t("Save") }}
52
+ {{ t("Save") }}
53
53
  </button>
54
54
  </template>
55
55
  </ClassicModalInBody>
56
56
  </template>
57
57
 
58
- <script lang="ts">
58
+ <script setup lang="ts">
59
59
  import { VSwatches } from "vue3-swatches";
60
60
  import "vue3-swatches/dist/style.css";
61
61
  import FormatFontSizeIncreaseIcon from "vue-material-design-icons/FormatFontSizeIncrease.vue";
62
62
  import FormatFontSizeDecreaseIcon from "vue-material-design-icons/FormatFontSizeDecrease.vue";
63
- import { defineAsyncComponent, defineComponent } from "vue";
63
+ import { computed, defineAsyncComponent, onBeforeMount, ref } from "vue";
64
+ import { useI18n } from "vue-i18n";
64
65
  const ClassicModalInBody = defineAsyncComponent(
65
66
  () => import("../../misc/modal/ClassicModalInBody.vue"),
66
67
  );
67
- export default defineComponent({
68
- name: "AccessibilityModal",
69
68
 
70
- components: {
71
- ClassicModalInBody,
72
- FormatFontSizeIncreaseIcon,
73
- FormatFontSizeDecreaseIcon,
74
- VSwatches
75
- },
69
+ //Emits
70
+ const emit = defineEmits(["close", "save"]);
76
71
 
77
- emits: ["close", "save"],
78
- data() {
79
- return {
80
- fontSize :16 as number,
81
- background: "white" as string,
82
- color: "black" as string,
83
- };
84
- },
85
- computed:{
86
- isMaxSize(){
87
- return this.fontSize>=30;
88
- },
89
- isMinSize(){
90
- return this.fontSize<=16;
91
- },
92
- stylePreview(){
93
- return 'font-size:'+this.fontSize+'px; background:'+this.background+'; color:'+this.color;
94
- }
95
- },
96
- created(){
97
- this.initAccessibility();
98
- },
99
- methods: {
100
- initAccessibility(){
101
- const actualFontSize = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-font-size');
102
- this.fontSize = isNaN(parseInt(actualFontSize.slice(0, -2), 10)) ? 16 :parseInt(actualFontSize.slice(0, -2), 10);
103
- this.background = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-background');
104
- this.color = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-color');
105
- },
106
- closePopup() {
107
- this.$emit("close");
108
- },
109
- decreaseFontSize(){
110
- if(!this.isMinSize){
111
- this.fontSize -=2;
112
- }
113
- },
114
- increaseFontSize(){
115
- if(!this.isMaxSize){
116
- this.fontSize +=2;
117
- }
118
- },
119
- saveData(){
120
- this.$emit('save', {
121
- fontSize: this.fontSize,
122
- background: this.background,
123
- color: this.color,
124
- });
125
- }
126
- },
127
- });
72
+ //Data
73
+ const fontSize = ref(16);
74
+ const background = ref("white");
75
+ const color = ref("black");
76
+
77
+
78
+ //Composables
79
+ const { t } = useI18n();
80
+
81
+
82
+ //Computed
83
+ const isMaxSize = computed(() => fontSize.value>=30);
84
+ const isMinSize = computed(() => fontSize.value<=16);
85
+ const stylePreview = computed(() => 'font-size:'+fontSize.value+'px; background:'+background.value+'; color:'+color.value);
86
+
87
+ onBeforeMount(()=>initAccessibility())
88
+
89
+ //Methods
90
+ function initAccessibility(){
91
+ const actualFontSize = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-font-size');
92
+ fontSize.value = isNaN(parseInt(actualFontSize.slice(0, -2), 10)) ? 16 :parseInt(actualFontSize.slice(0, -2), 10);
93
+ background.value = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-background');
94
+ color.value = getComputedStyle(document.documentElement).getPropertyValue('--octopus-accessibility-color');
95
+ }
96
+ function closePopup() {
97
+ emit("close");
98
+ }
99
+ function decreaseFontSize(){
100
+ if(!isMinSize.value){
101
+ fontSize.value -=2;
102
+ }
103
+ }
104
+ function increaseFontSize(){
105
+ if(!isMaxSize.value){
106
+ fontSize.value +=2;
107
+ }
108
+ }
109
+ function saveData(){
110
+ emit('save', {
111
+ fontSize: fontSize.value,
112
+ background: background.value,
113
+ color: color.value,
114
+ });
115
+ }
128
116
  </script>
129
117
  <style lang="scss">
130
118
  .octopus-app #accessibility-modal .octopus-modal-body{