@saooti/octopus-sdk 37.0.6 → 37.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -0,0 +1,212 @@
1
+ <template>
2
+ <div
3
+ v-show="show && !disable"
4
+ :id="'popover' + target"
5
+ ref="popover"
6
+ tabindex="0"
7
+ class="octopus-popover"
8
+ :class="onlyClick ? 'octopus-dropdown' : ''"
9
+ :style="positionInlineStyle"
10
+ @blur="clearDataBlur"
11
+ >
12
+ <div v-if="title" class="bg-secondary p-2">
13
+ {{ title }}
14
+ </div>
15
+ <div class="p-2">
16
+ <slot>{{ content }}</slot>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent } from "vue";
23
+ export default defineComponent({
24
+ name: "ClassicPopover",
25
+ props: {
26
+ content: { type: String, default: "" },
27
+ title: { type: String, default: "" },
28
+ target: { type: String, required: true },
29
+ disable: { type: Boolean, default: false },
30
+ onlyClick: { type: Boolean, default: false },
31
+ isFixed: { type: Boolean, default: false },
32
+ relativeClass: { type: String, default: undefined },
33
+ leftPos: { type: Boolean, default: false },
34
+ },
35
+ data() {
36
+ return {
37
+ show: false as boolean,
38
+ isClick: false as boolean,
39
+ posX: 0 as number,
40
+ posY: 0 as number,
41
+ targetElement: null as HTMLElement | null,
42
+ };
43
+ },
44
+ computed: {
45
+ popoverId(): string {
46
+ return "popover" + this.target;
47
+ },
48
+ positionInlineStyle(): string {
49
+ return `left: ${this.posX}px; top: ${this.posY}px;`;
50
+ },
51
+ },
52
+ mounted() {
53
+ this.init();
54
+ },
55
+ unmounted() {
56
+ this.removeListeners();
57
+ },
58
+ methods: {
59
+ init() {
60
+ this.targetElement = document.getElementById(this.target);
61
+ if (this.targetElement) {
62
+ if (!this.onlyClick) {
63
+ this.targetElement.addEventListener(
64
+ "mouseenter",
65
+ this.setPopoverData,
66
+ );
67
+ this.targetElement.addEventListener("mouseleave", this.clearData);
68
+ }
69
+ this.targetElement.addEventListener("click", this.setPopoverData);
70
+ this.targetElement.addEventListener("blur", this.clearDataBlur);
71
+ }
72
+ },
73
+ removeListeners() {
74
+ if (this.targetElement) {
75
+ if (!this.onlyClick) {
76
+ this.targetElement.removeEventListener(
77
+ "mouseenter",
78
+ this.setPopoverData,
79
+ );
80
+ this.targetElement.removeEventListener("mouseleave", this.clearData);
81
+ }
82
+ this.targetElement.removeEventListener("click", this.setPopoverData);
83
+ this.targetElement.addEventListener("blur", this.clearDataBlur);
84
+ }
85
+ },
86
+ setPopoverData(e: MouseEvent | PointerEvent) {
87
+ if (this.disable || !e || !e.target) {
88
+ return;
89
+ }
90
+ if ("click" === e.type) {
91
+ if (this.show && this.isClick) {
92
+ this.isClick = false;
93
+ this.clearData();
94
+ return;
95
+ }
96
+ this.isClick = true;
97
+ }
98
+ this.show = true;
99
+ let parentLeft = 0;
100
+ let parentRight = 0;
101
+ let parentTop = 0;
102
+ let parentScrollTop = 0;
103
+ if (this.relativeClass) {
104
+ const modalBody = document.getElementsByClassName(
105
+ this.relativeClass,
106
+ )[0];
107
+ if (undefined === modalBody) {
108
+ (this.$refs.popover as HTMLElement).style.display = "block";
109
+ this.posX = 0;
110
+ this.posY = 0;
111
+ return;
112
+ }
113
+ const modalBodyRect = modalBody.getBoundingClientRect();
114
+ parentLeft = modalBodyRect.left;
115
+ parentRight = modalBodyRect.right;
116
+ parentTop = modalBodyRect.top;
117
+ parentScrollTop = modalBody.scrollTop;
118
+ }
119
+ const rectElement = (e.target as HTMLElement).getBoundingClientRect();
120
+ (this.$refs.popover as HTMLElement).style.display = "block";
121
+ this.posX = this.leftPos
122
+ ? rectElement.right -
123
+ parentRight -
124
+ (this.$refs.popover as HTMLElement).clientWidth
125
+ : rectElement.left - parentLeft;
126
+ this.posY =
127
+ rectElement.bottom +
128
+ parentScrollTop -
129
+ parentTop +
130
+ (this.isFixed ? 0 : window.scrollY) +
131
+ 5;
132
+ },
133
+ async clearDataBlur(e: FocusEvent) {
134
+ if (!e.relatedTarget) {
135
+ return this.clearClick();
136
+ }
137
+ const myElement = e.relatedTarget as HTMLElement;
138
+ if (this.popoverId === myElement.id) {
139
+ return;
140
+ }
141
+ const parent = this.$refs.popover as HTMLElement;
142
+ if (null === parent || !parent.contains(myElement)) {
143
+ return this.clearClick();
144
+ }
145
+ if (
146
+ null === myElement.classList ||
147
+ !myElement.classList.contains("octopus-dropdown-item")
148
+ ) {
149
+ return;
150
+ }
151
+ if (!(myElement as HTMLAnchorElement).href) {
152
+ return this.clearClick();
153
+ }
154
+ if ("true" === myElement.getAttribute("reallink")) {
155
+ myElement.click();
156
+ } else {
157
+ await this.$router.push((myElement as HTMLAnchorElement).pathname);
158
+ }
159
+ this.$nextTick(() => {
160
+ this.isClick = false;
161
+ this.clearData();
162
+ });
163
+ },
164
+ clearClick() {
165
+ this.isClick = false;
166
+ this.clearData();
167
+ },
168
+ clearData() {
169
+ if (this.isClick) {
170
+ return;
171
+ }
172
+ this.show = false;
173
+ this.posX = 0;
174
+ this.posY = 0;
175
+ },
176
+ },
177
+ });
178
+ </script>
179
+ <style lang="scss">
180
+ @import "@scss/_variables.scss";
181
+ .octopus-popover {
182
+ background: white;
183
+ border: 1px solid #ccc;
184
+ border-radius: $octopus-borderradius;
185
+ position: absolute;
186
+ z-index: 9999;
187
+ &.octopus-dropdown {
188
+ min-width: 200px;
189
+ .octopus-dropdown-item {
190
+ display: flex;
191
+ justify-content: center;
192
+ color: rgb(29, 29, 29);
193
+ width: 100%;
194
+ padding: 0.25rem 1rem;
195
+ font-weight: 400;
196
+ text-decoration: none;
197
+ white-space: nowrap;
198
+ background-color: transparent;
199
+ border: 0;
200
+ &:hover {
201
+ background: rgb(243, 243, 243);
202
+ }
203
+ }
204
+ hr {
205
+ margin: 0.5rem 0;
206
+ overflow: hidden;
207
+ border-top: 1px solid #ccc;
208
+ opacity: 1;
209
+ }
210
+ }
211
+ }
212
+ </style>
@@ -1,37 +1,36 @@
1
1
  <template>
2
- <div
3
- class="octopus-spinner"
4
- :class="small?'small':''"
5
- />
2
+ <div class="octopus-spinner" :class="small ? 'small' : ''" />
6
3
  </template>
7
4
 
8
5
  <script lang="ts">
9
- import { defineComponent } from 'vue';
6
+ import { defineComponent } from "vue";
10
7
  export default defineComponent({
11
- name: "Spinner",
8
+ name: "ClassicSpinner",
12
9
  props: {
13
10
  small: { default: false, type: Boolean },
14
11
  },
15
- })
12
+ });
16
13
  </script>
17
14
  <style lang="scss">
18
- .octopus-app .octopus-spinner{
15
+ .octopus-app .octopus-spinner {
19
16
  display: inline-block;
20
- width:2rem;
21
- height:2rem;
17
+ width: 2rem;
18
+ height: 2rem;
22
19
  border-radius: 50%;
23
20
  animation: 0.75s linear infinite spinner-border;
24
21
  border: 2px solid currentcolor;
25
22
  border-right-color: transparent;
26
23
  flex-shrink: 0;
27
24
 
28
- &.small{
29
- width:1rem;
30
- height:1rem;
25
+ &.small {
26
+ width: 1rem;
27
+ height: 1rem;
31
28
  }
32
29
 
33
30
  @keyframes spinner-border {
34
- to { transform: rotate(360deg); }
31
+ to {
32
+ transform: rotate(360deg);
33
+ }
35
34
  }
36
35
  }
37
- </style>
36
+ </style>
@@ -1,15 +1,7 @@
1
1
  <template>
2
- <div
3
- v-if="message && message.length"
4
- class="d-flex"
5
- >
6
- <div
7
- class="d-flex align-items-center bg-error-message p-2 rounded my-1"
8
- >
9
- <span
10
- :title="$t('Warning')"
11
- class="saooti-warning text-danger me-1"
12
- />
2
+ <div v-if="message && message.length" class="d-flex">
3
+ <div class="d-flex align-items-center bg-error-message p-2 rounded my-1">
4
+ <span :title="$t('Warning')" class="saooti-warning text-danger me-1" />
13
5
  <div class="alert-text">
14
6
  {{ message }}
15
7
  </div>
@@ -17,20 +9,20 @@
17
9
  </div>
18
10
  </template>
19
11
  <script lang="ts">
20
- import { defineComponent } from 'vue'
12
+ import { defineComponent } from "vue";
21
13
  export default defineComponent({
22
- name: 'ErrorMessage',
14
+ name: "ErrorMessage",
23
15
  props: {
24
- message: { default: undefined, type: String},
16
+ message: { default: undefined, type: String },
25
17
  },
26
- })
18
+ });
27
19
  </script>
28
20
  <style lang="scss">
29
- .octopus-app{
21
+ .octopus-app {
30
22
  .bg-error-message {
31
23
  background-color: #ffd84a9c;
32
24
  }
33
- .alert-text{
25
+ .alert-text {
34
26
  color: darkred;
35
27
  }
36
28
  }
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div
3
+ id="footer"
4
+ ref="footer"
5
+ class="d-flex align-items-center justify-content-between border-top mt-auto"
6
+ >
7
+ <div v-if="!isPodcastmaker" class="d-flex flex-column px-1">
8
+ <div class="text-dark my-1 special-select-align-magic-trick">
9
+ &copy; Saooti 2019
10
+ </div>
11
+ <router-link
12
+ v-for="link in routerLinkSecondArray"
13
+ :key="link.routeName"
14
+ class="link-hover my-1 special-select-align-magic-trick"
15
+ :to="link.routeName"
16
+ >
17
+ {{ link.title }}
18
+ </router-link>
19
+ <ClassicSelect
20
+ v-model:textInit="language"
21
+ :display-label="false"
22
+ id-select="language-chooser-select"
23
+ :label="$t('Change locale')"
24
+ :transparent="true"
25
+ :options="[
26
+ { title: 'Deutsch', value: 'de' },
27
+ { title: 'English', value: 'en' },
28
+ { title: 'Español', value: 'es' },
29
+ { title: 'Français', value: 'fr' },
30
+ { title: 'Italiano', value: 'it' },
31
+ { title: 'Slovenščina', value: 'sl' },
32
+ ]"
33
+ class="mb-2"
34
+ />
35
+ </div>
36
+ <a
37
+ v-if="isPodcastmaker && isContactLink"
38
+ id="footer-contact"
39
+ class="link-hover"
40
+ :href="isContactLink"
41
+ rel="noopener"
42
+ target="_blank"
43
+ >{{ $t("Contact") }}</a
44
+ >
45
+ <div class="d-flex align-items-center">
46
+ <div class="hosted-by">
47
+ {{ $t("Hosted by") }}<span class="ms-1 me-1 text-primary">Saooti</span>
48
+ </div>
49
+
50
+ <AcpmImage v-if="isGarRole" />
51
+ <a
52
+ v-else
53
+ href="https://www.acpm.fr/L-ACPM/Certifications-et-Labels/Les-Podcasts"
54
+ rel="noopener"
55
+ target="_blank"
56
+ :title="$t('Octopus is ACPM Podcast accredited')"
57
+ >
58
+ <AcpmImage />
59
+ </a>
60
+ </div>
61
+ </div>
62
+ </template>
63
+
64
+ <script lang="ts">
65
+ import cookies from "../mixins/cookies";
66
+ import ClassicSelect from "../form/ClassicSelect.vue";
67
+ import AcpmImage from "./AcpmImage.vue";
68
+ import { state } from "../../stores/ParamSdkStore";
69
+ import { loadLocaleMessages } from "@/i18n";
70
+ import octopusApi from "@saooti/octopus-api";
71
+ import { useFilterStore } from "@/stores/FilterStore";
72
+ import { useGeneralStore } from "@/stores/GeneralStore";
73
+ import { useAuthStore } from "@/stores/AuthStore";
74
+ import { mapState, mapActions } from "pinia";
75
+ import { Category } from "@/stores/class/general/category";
76
+ import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
77
+ import { defineComponent } from "vue";
78
+ export default defineComponent({
79
+ name: "FooterSection",
80
+ components: {
81
+ ClassicSelect,
82
+ AcpmImage,
83
+ },
84
+
85
+ mixins: [cookies],
86
+ data() {
87
+ return {
88
+ language: this.$i18n.locale,
89
+ };
90
+ },
91
+ computed: {
92
+ ...mapState(useGeneralStore, ["storedCategories", "platformEducation"]),
93
+ ...mapState(useFilterStore, [
94
+ "filterRubrique",
95
+ "filterOrgaId",
96
+ "filterIab",
97
+ ]),
98
+ ...mapState(useAuthStore, ["isGarRole"]),
99
+ routerLinkSecondArray() {
100
+ const links = [
101
+ { title: this.$t("Contact"), routeName: "/main/pub/contact" },
102
+ { title: this.$t("Term of use"), routeName: "/main/pub/cgu" },
103
+ ];
104
+
105
+ if (!this.isGarRole) {
106
+ links.push({
107
+ title: this.$t("Used libraries"),
108
+ routeName: "/main/pub/libraries",
109
+ });
110
+ }
111
+ return links;
112
+ },
113
+ isPodcastmaker(): boolean {
114
+ return state.generalParameters.podcastmaker as boolean;
115
+ },
116
+ isContactLink(): string | undefined {
117
+ return state.footer.contactLink;
118
+ },
119
+ rubriqueQueryParam(): string | undefined {
120
+ if (this.filterRubrique?.length) {
121
+ return this.filterRubrique
122
+ .map(
123
+ (value: RubriquageFilter) =>
124
+ value.rubriquageId + ":" + value.rubriqueId,
125
+ )
126
+ .join();
127
+ }
128
+ return undefined;
129
+ },
130
+ },
131
+ watch: {
132
+ language() {
133
+ this.changeLanguage();
134
+ },
135
+ },
136
+ methods: {
137
+ ...mapActions(useGeneralStore, ["storedUpdateCategories"]),
138
+ ...mapActions(useFilterStore, ["filterUpdateIab"]),
139
+ getQueriesRouter(routeName: string) {
140
+ if (
141
+ "podcasts" !== routeName &&
142
+ "emissions" !== routeName &&
143
+ "home" !== routeName
144
+ ) {
145
+ return { productor: this.filterOrgaId };
146
+ }
147
+ return {
148
+ productor: this.filterOrgaId,
149
+ iabId: this.filterIab?.id,
150
+ rubriquesId: this.rubriqueQueryParam,
151
+ };
152
+ },
153
+ changeLanguage(): void {
154
+ this.setCookie("octopus-language", this.language);
155
+ loadLocaleMessages(this.$i18n, this.language, this.platformEducation);
156
+ octopusApi
157
+ .fetchDataWithParams<Array<Category>>(
158
+ 0,
159
+ `iab/list${
160
+ state.octopusApi.organisationId
161
+ ? "/" + state.octopusApi.organisationId
162
+ : ""
163
+ }`,
164
+ { lang: this.$i18n.locale },
165
+ )
166
+ .then((data: Array<Category>) => {
167
+ this.storedUpdateCategories(data);
168
+ if (this.filterIab) {
169
+ const category = this.storedCategories.filter((c: Category) => {
170
+ return c.id === this.filterIab?.id;
171
+ });
172
+ if (category.length) {
173
+ this.filterUpdateIab(category[0]);
174
+ }
175
+ }
176
+ });
177
+ },
178
+ },
179
+ });
180
+ </script>
181
+
182
+ <style lang="scss">
183
+ .octopus-app {
184
+ #footer {
185
+ font-size: 0.6rem;
186
+ bottom: 0;
187
+ z-index: 10;
188
+ background: white;
189
+ padding: 0 2rem;
190
+ a {
191
+ color: #666;
192
+ }
193
+ .special-select-align-magic-trick {
194
+ margin-left: 0.16rem;
195
+ }
196
+ }
197
+ }
198
+ </style>
@@ -1,7 +1,5 @@
1
1
  <template>
2
- <div
3
- class="d-flex align-items-center"
4
- >
2
+ <div class="d-flex align-items-center">
5
3
  <router-link
6
4
  v-if="isAuthenticatedWithOrga"
7
5
  :title="$t('My space')"
@@ -19,33 +17,26 @@
19
17
  class="btn m-1 admin-button saooti-user"
20
18
  :title="$t('User menu')"
21
19
  />
22
- <Popover
20
+ <ClassicPopover
23
21
  target="home-dropdown"
24
22
  :only-click="true"
25
23
  :is-fixed="true"
26
24
  :left-pos="true"
27
25
  >
28
26
  <template v-if="!isAuthenticated">
29
- <a
30
- class="octopus-dropdown-item"
31
- href="/sso/login"
32
- realLink="true"
33
- >
34
- {{ $t('Login') }}
27
+ <a class="octopus-dropdown-item" href="/sso/login" realLink="true">
28
+ {{ $t("Login") }}
35
29
  </a>
36
30
  <router-link
37
31
  v-if="!isPodcastmaker"
38
32
  class="octopus-dropdown-item"
39
33
  to="/main/pub/create"
40
34
  >
41
- {{ $t('Create an account') }}
35
+ {{ $t("Create an account") }}
42
36
  </router-link>
43
37
  </template>
44
38
  <template v-else>
45
- <template
46
- v-for="routerBack in routerBackoffice"
47
- :key="routerBack.path"
48
- >
39
+ <template v-for="routerBack in routerBackoffice" :key="routerBack.path">
49
40
  <router-link
50
41
  v-if="!isPodcastmaker && routerBack.condition"
51
42
  :class="routerBack.class"
@@ -55,11 +46,8 @@
55
46
  </router-link>
56
47
  </template>
57
48
  <template v-if="helpLinks.length">
58
- <hr>
59
- <template
60
- v-for="helpLink in helpLinks"
61
- :key="helpLink.title"
62
- >
49
+ <hr />
50
+ <template v-for="helpLink in helpLinks" :key="helpLink.title">
63
51
  <a
64
52
  :href="helpLink.href"
65
53
  class="octopus-dropdown-item"
@@ -71,69 +59,81 @@
71
59
  </a>
72
60
  </template>
73
61
  </template>
74
- <hr>
75
- <a
76
- class="octopus-dropdown-item"
77
- href="/sso/logout"
78
- realLink="true"
79
- >
80
- {{ $t('Logout') }}
62
+ <hr />
63
+ <a class="octopus-dropdown-item" href="/sso/logout" realLink="true">
64
+ {{ $t("Logout") }}
81
65
  </a>
82
66
  </template>
83
- <router-link
84
- class="octopus-dropdown-item"
85
- to="/main/pub/contact"
86
- >
87
- {{ $t('Contact') }}
67
+ <router-link class="octopus-dropdown-item" to="/main/pub/contact">
68
+ {{ $t("Contact") }}
88
69
  </router-link>
89
- </Popover>
70
+ </ClassicPopover>
90
71
  </div>
91
72
  </template>
92
73
 
93
74
  <script lang="ts">
94
- import { state } from '../../stores/ParamSdkStore';
95
- import Popover from '../misc/Popover.vue';
96
- import { useAuthStore } from '@/stores/AuthStore';
97
- import { mapState } from 'pinia';
98
- import { defineComponent } from 'vue';
99
- import { Organisation } from '@/stores/class/general/organisation';
75
+ import { state } from "../../stores/ParamSdkStore";
76
+ import ClassicPopover from "../misc/ClassicPopover.vue";
77
+ import { useAuthStore } from "@/stores/AuthStore";
78
+ import { mapState } from "pinia";
79
+ import { defineComponent } from "vue";
80
+ import { Organisation } from "@/stores/class/general/organisation";
100
81
  export default defineComponent({
101
- name: 'HomeDropdown',
102
- components:{
103
- Popover
82
+ name: "HomeDropdown",
83
+ components: {
84
+ ClassicPopover,
104
85
  },
105
86
  props: {
106
- isEducation: { default: false, type: Boolean},
87
+ isEducation: { default: false, type: Boolean },
107
88
  },
108
89
  computed: {
109
- ...mapState(useAuthStore, ['authProfile', 'isGarRole']),
110
- organisationsAvailable(): Array<Organisation>{
111
- return this.authProfile.organisations?? [];
90
+ ...mapState(useAuthStore, ["authProfile", "isGarRole"]),
91
+ organisationsAvailable(): Array<Organisation> {
92
+ return this.authProfile.organisations ?? [];
112
93
  },
113
- helpLinks(){
114
- if(this.isGarRole || this.isEducation){return [];}
94
+ helpLinks() {
95
+ if (this.isGarRole || this.isEducation) {
96
+ return [];
97
+ }
115
98
  return [
116
- {title:this.$t('Help'), href:'https://help.octopus.saooti.com/Aide/'},
117
- {title:this.$t('TutoMag'),href:"https://help.octopus.saooti.com/"}];
99
+ {
100
+ title: this.$t("Help"),
101
+ href: "https://help.octopus.saooti.com/Aide/",
102
+ },
103
+ { title: this.$t("TutoMag"), href: "https://help.octopus.saooti.com/" },
104
+ ];
118
105
  },
119
- routerBackoffice(){
106
+ routerBackoffice() {
120
107
  return [
121
- {title:this.$t('Edit my profile'),class:"octopus-dropdown-item", path:'/main/priv/edit/profile', condition: true},
122
- {title:this.$t('Edit my organisation'),class:"octopus-dropdown-item", path:'/main/priv/edit/organisation', condition: this.isAuthenticatedWithOrga && ((state.generalParameters.isOrganisation as boolean) || 1<this.organisationsAvailable.length)}];
108
+ {
109
+ title: this.$t("Edit my profile"),
110
+ class: "octopus-dropdown-item",
111
+ path: "/main/priv/edit/profile",
112
+ condition: true,
113
+ },
114
+ {
115
+ title: this.$t("Edit my organisation"),
116
+ class: "octopus-dropdown-item",
117
+ path: "/main/priv/edit/organisation",
118
+ condition:
119
+ this.isAuthenticatedWithOrga &&
120
+ ((state.generalParameters.isOrganisation as boolean) ||
121
+ 1 < this.organisationsAvailable.length),
122
+ },
123
+ ];
123
124
  },
124
125
  isPodcastmaker(): boolean {
125
- return (state.generalParameters.podcastmaker as boolean);
126
+ return state.generalParameters.podcastmaker as boolean;
126
127
  },
127
128
  isAuthenticated(): boolean {
128
- return undefined!==this.authProfile?.userId;
129
+ return undefined !== this.authProfile?.userId;
129
130
  },
130
131
  isAuthenticatedWithOrga(): boolean {
131
- return state.generalParameters.authenticated??false;
132
+ return state.generalParameters.authenticated ?? false;
132
133
  },
133
134
  isContribution(): boolean {
134
- return state.generalParameters.isContribution??false;
135
+ return state.generalParameters.isContribution ?? false;
135
136
  },
136
137
  },
137
-
138
- })
139
- </script>
138
+ });
139
+ </script>