@saooti/octopus-sdk 37.0.5 → 37.0.7

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 (263) hide show
  1. package/README.md +2 -2
  2. package/index.html +1 -0
  3. package/index.ts +21 -21
  4. package/package.json +26 -20
  5. package/public/css/fonts/icomoon.eot +0 -0
  6. package/public/css/fonts/icomoon.svg +1 -1
  7. package/public/css/fonts/icomoon.ttf +0 -0
  8. package/public/css/fonts/icomoon.woff +0 -0
  9. package/public/css/fonts/montserrat/Montserrat-Black.ttf +0 -0
  10. package/public/css/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
  11. package/public/css/fonts/montserrat/Montserrat-Bold.ttf +0 -0
  12. package/public/css/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
  13. package/public/css/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
  14. package/public/css/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
  15. package/public/css/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
  16. package/public/css/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
  17. package/public/css/fonts/montserrat/Montserrat-Italic.ttf +0 -0
  18. package/public/css/fonts/montserrat/Montserrat-Light.ttf +0 -0
  19. package/public/css/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
  20. package/public/css/fonts/montserrat/Montserrat-Medium.ttf +0 -0
  21. package/public/css/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
  22. package/public/css/fonts/montserrat/Montserrat-Regular.ttf +0 -0
  23. package/public/css/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
  24. package/public/css/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
  25. package/public/css/fonts/montserrat/Montserrat-Thin.ttf +0 -0
  26. package/public/css/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
  27. package/public/css/fonts/montserrat/style.css +28 -0
  28. package/public/css/fonts/style.css +5 -5
  29. package/src/App.vue +69 -60
  30. package/src/api/classicCrud.ts +12 -12
  31. package/src/api/initialize.ts +1 -1
  32. package/src/assets/bootstrap.scss +9 -0
  33. package/src/assets/general.scss +1 -1
  34. package/src/assets/share.scss +1 -1
  35. package/src/components/display/aggregator/RssSection.vue +3 -3
  36. package/src/components/display/categories/CategoryChooser.vue +73 -60
  37. package/src/components/display/categories/CategoryFilter.vue +134 -90
  38. package/src/components/display/categories/CategoryList.vue +76 -62
  39. package/src/components/display/comments/AddCommentModal.vue +44 -44
  40. package/src/components/display/comments/CommentBasicView.vue +38 -30
  41. package/src/components/display/comments/CommentInput.vue +122 -110
  42. package/src/components/display/comments/CommentItem.vue +144 -102
  43. package/src/components/display/comments/CommentList.vue +117 -85
  44. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  45. package/src/components/display/comments/CommentPlayer.vue +39 -41
  46. package/src/components/display/comments/CommentSection.vue +68 -53
  47. package/src/components/display/edit/EditBox.vue +7 -7
  48. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  49. package/src/components/display/edit/EditCommentBox.vue +34 -36
  50. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  51. package/src/components/display/emission/EmissionItem.vue +47 -35
  52. package/src/components/display/emission/EmissionList.vue +111 -83
  53. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  54. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  55. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  56. package/src/components/display/filter/DateFilter.vue +38 -38
  57. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  58. package/src/components/display/filter/ProductorSearch.vue +55 -47
  59. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  60. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  61. package/src/components/display/filter/SearchOrder.vue +16 -11
  62. package/src/components/display/list/ListPaginate.vue +72 -70
  63. package/src/components/display/list/PaginateParams.vue +29 -30
  64. package/src/components/display/list/PaginateSection.vue +210 -0
  65. package/src/components/display/list/SwiperList.vue +28 -32
  66. package/src/components/display/live/CountDown.vue +12 -14
  67. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  68. package/src/components/display/live/LiveItem.vue +42 -26
  69. package/src/components/display/live/LiveList.vue +92 -65
  70. package/src/components/display/live/RadioCurrently.vue +47 -42
  71. package/src/components/display/live/RadioImage.vue +40 -42
  72. package/src/components/display/live/RadioItem.vue +15 -22
  73. package/src/components/display/live/RadioList.vue +24 -21
  74. package/src/components/display/live/RadioPlanning.vue +105 -68
  75. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  76. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  77. package/src/components/display/participant/ParticipantItem.vue +89 -76
  78. package/src/components/display/participant/ParticipantList.vue +90 -60
  79. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  80. package/src/components/display/playlist/PlaylistList.vue +70 -52
  81. package/src/components/display/playlist/PodcastList.vue +61 -50
  82. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  83. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  84. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  85. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  86. package/src/components/display/podcasts/PodcastImage.vue +129 -138
  87. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  88. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  89. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  90. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  91. package/src/components/display/podcasts/PodcastItemInfo.vue +63 -65
  92. package/src/components/display/podcasts/PodcastList.vue +115 -84
  93. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  94. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  95. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  96. package/src/components/display/podcasts/TagList.vue +33 -37
  97. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  98. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  99. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  100. package/src/components/display/sharing/QrCode.vue +52 -46
  101. package/src/components/display/sharing/ShareButtons.vue +25 -27
  102. package/src/components/display/sharing/ShareButtonsIntern.vue +182 -155
  103. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  104. package/src/components/display/sharing/SharePlayer.vue +207 -127
  105. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  106. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  107. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  108. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  109. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  110. package/src/components/form/ClassicCheckbox.vue +32 -31
  111. package/src/components/form/ClassicDatePicker.vue +47 -49
  112. package/src/components/form/ClassicInputText.vue +99 -98
  113. package/src/components/form/ClassicLoading.vue +11 -14
  114. package/src/components/form/ClassicMultiselect.vue +125 -126
  115. package/src/components/form/ClassicRadio.vue +15 -18
  116. package/src/components/form/ClassicSearch.vue +17 -23
  117. package/src/components/form/ClassicSelect.vue +35 -27
  118. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +94 -109
  119. package/src/components/misc/AcpmImage.vue +26 -0
  120. package/src/components/misc/ClassicAccordion.vue +69 -0
  121. package/src/components/misc/ClassicNav.vue +117 -0
  122. package/src/components/misc/ClassicPopover.vue +212 -0
  123. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  124. package/src/components/misc/ErrorMessage.vue +9 -17
  125. package/src/components/misc/FooterSection.vue +198 -0
  126. package/src/components/misc/HomeDropdown.vue +67 -64
  127. package/src/components/misc/LeftMenu.vue +115 -79
  128. package/src/components/misc/ProgressBar.vue +36 -32
  129. package/src/components/misc/SnackBar.vue +169 -0
  130. package/src/components/misc/TopBar.vue +161 -115
  131. package/src/components/misc/modal/ClassicModal.vue +99 -103
  132. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  133. package/src/components/misc/modal/MessageModal.vue +22 -28
  134. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  135. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  136. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  137. package/src/components/misc/player/PlayerCompact.vue +47 -62
  138. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  139. package/src/components/misc/player/PlayerLarge.vue +66 -62
  140. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  141. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  142. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  143. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  144. package/src/components/mixins/cookies.ts +11 -10
  145. package/src/components/mixins/displayMethods.ts +5 -4
  146. package/src/components/mixins/handle403.ts +9 -9
  147. package/src/components/mixins/imageProxy.ts +14 -7
  148. package/src/components/mixins/init.ts +31 -16
  149. package/src/components/mixins/orgaComputed.ts +7 -7
  150. package/src/components/mixins/organisationFilter.ts +36 -22
  151. package/src/components/mixins/player/playerComment.ts +46 -37
  152. package/src/components/mixins/player/playerDisplay.ts +122 -87
  153. package/src/components/mixins/player/playerLive.ts +65 -43
  154. package/src/components/mixins/player/playerLogic.ts +133 -88
  155. package/src/components/mixins/player/playerTranscript.ts +48 -30
  156. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  157. package/src/components/mixins/selenium.ts +2 -2
  158. package/src/components/mixins/tagOfMixins.ts +11 -11
  159. package/src/components/pages/CategoryPage.vue +43 -0
  160. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  161. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  162. package/src/components/pages/Error403Page.vue +20 -19
  163. package/src/components/pages/HomePage.vue +144 -0
  164. package/src/components/pages/LivesPage.vue +66 -0
  165. package/src/components/pages/PageNotFound.vue +33 -22
  166. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  167. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  168. package/src/components/pages/PlaylistPage.vue +175 -0
  169. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  170. package/src/components/pages/PodcastPage.vue +365 -0
  171. package/src/components/pages/PodcastsPage.vue +152 -0
  172. package/src/components/pages/RadioPage.vue +131 -0
  173. package/src/components/pages/RubriquePage.vue +45 -0
  174. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  175. package/src/helper/dom.ts +1 -1
  176. package/src/helper/duration.ts +10 -4
  177. package/src/helper/useEventListener.ts +7 -8
  178. package/src/i18n.ts +31 -30
  179. package/src/locale/de.ts +263 -257
  180. package/src/locale/educationen.ts +13 -13
  181. package/src/locale/educationfr.ts +1 -1
  182. package/src/locale/en.ts +323 -324
  183. package/src/locale/es.ts +325 -318
  184. package/src/locale/fr.ts +330 -324
  185. package/src/locale/it.ts +332 -328
  186. package/src/locale/messages.ts +9 -9
  187. package/src/locale/sl.ts +315 -319
  188. package/src/main.ts +28 -31
  189. package/src/router/router.ts +218 -198
  190. package/src/shims-tsx.d.ts +1 -1
  191. package/src/shims-vue.d.ts +1 -1
  192. package/src/stores/ApiStore.ts +44 -44
  193. package/src/stores/AuthStore.ts +24 -16
  194. package/src/stores/CommentStore.ts +13 -11
  195. package/src/stores/FilterStore.ts +25 -15
  196. package/src/stores/GeneralStore.ts +15 -15
  197. package/src/stores/ParamSdkStore.ts +179 -137
  198. package/src/stores/PlayerStore.ts +139 -125
  199. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  200. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  201. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  202. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  203. package/src/stores/class/conference/conference.ts +10 -9
  204. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  205. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  206. package/src/stores/class/conference/studioCall.ts +6 -6
  207. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  208. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  209. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  210. package/src/stores/class/general/audioView.ts +19 -19
  211. package/src/stores/class/general/category.ts +1 -1
  212. package/src/stores/class/general/classicSelectType.ts +2 -3
  213. package/src/stores/class/general/customPlayer.ts +8 -8
  214. package/src/stores/class/general/emission.ts +20 -21
  215. package/src/stores/class/general/fetchParam.ts +8 -2
  216. package/src/stores/class/general/initState.ts +31 -31
  217. package/src/stores/class/general/interfacePageable.ts +13 -13
  218. package/src/stores/class/general/ituneCategory.ts +4 -4
  219. package/src/stores/class/general/listReturn.ts +12 -12
  220. package/src/stores/class/general/media.ts +7 -7
  221. package/src/stores/class/general/organisation.ts +9 -10
  222. package/src/stores/class/general/pageable.ts +10 -10
  223. package/src/stores/class/general/participant.ts +7 -7
  224. package/src/stores/class/general/player.ts +30 -28
  225. package/src/stores/class/general/playlist.ts +17 -19
  226. package/src/stores/class/general/podcast.ts +19 -19
  227. package/src/stores/class/general/sortPageable.ts +4 -4
  228. package/src/stores/class/general/soundcastCategory.ts +7 -7
  229. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  230. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  231. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  232. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  233. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  234. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  235. package/src/stores/class/radio/canal.ts +4 -4
  236. package/src/stores/class/radio/live.ts +6 -6
  237. package/src/stores/class/radio/mix.ts +16 -16
  238. package/src/stores/class/radio/playlistMedia.ts +7 -7
  239. package/src/stores/class/radio/recurrence.ts +54 -54
  240. package/src/stores/class/rss/rssEmission.ts +13 -13
  241. package/src/stores/class/rss/rssInfo.ts +7 -7
  242. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  243. package/src/stores/class/rubrique/rubrique.ts +1 -1
  244. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  245. package/src/stores/class/stat/statArrayObject.ts +26 -26
  246. package/src/stores/class/stat/statGraph.ts +6 -6
  247. package/src/stores/class/user/person.ts +4 -2
  248. package/src/stores/class/user/profile.ts +4 -2
  249. package/src/stores/class/user/userKeycloak.ts +4 -5
  250. package/src/components/display/list/Paginate.vue +0 -181
  251. package/src/components/misc/Accordion.vue +0 -78
  252. package/src/components/misc/Footer.vue +0 -165
  253. package/src/components/misc/Nav.vue +0 -119
  254. package/src/components/misc/Popover.vue +0 -193
  255. package/src/components/misc/Snackbar.vue +0 -168
  256. package/src/components/pages/Category.vue +0 -41
  257. package/src/components/pages/Home.vue +0 -125
  258. package/src/components/pages/Lives.vue +0 -64
  259. package/src/components/pages/Playlist.vue +0 -164
  260. package/src/components/pages/Podcast.vue +0 -307
  261. package/src/components/pages/Podcasts.vue +0 -146
  262. package/src/components/pages/Radio.vue +0 -122
  263. package/src/components/pages/Rubrique.vue +0 -42
@@ -1,43 +1,35 @@
1
1
  <template>
2
- <div
3
- v-if="isPresent"
4
- class="d-flex flex-column comment-input-container mt-3"
5
- >
2
+ <div v-if="isPresent" class="d-flex flex-column comment-input-container mt-3">
6
3
  <strong
7
4
  v-if="knownIdentity && !editName"
8
5
  class="h6 mt-1 c-hand"
9
6
  @click="changeIdentity"
10
- >{{ knownIdentity }}</strong>
11
- <div
12
- v-if="editName"
13
- class="d-flex"
7
+ >{{ knownIdentity }}</strong
14
8
  >
9
+ <div v-if="editName" class="d-flex">
15
10
  <div class="d-flex flex-column">
16
11
  <input
17
12
  v-model="temporaryName"
18
13
  class="h6 mt-1"
19
14
  type="text"
20
15
  :class="{ 'border border-danger': 0 === countName || !validName }"
21
- >
16
+ />
22
17
  <p
23
18
  class="d-flex justify-content-end h6 mb-0"
24
19
  :class="{ 'text-danger': !validName }"
25
20
  >
26
- {{ countName + ' / ' + maxName }}
21
+ {{ countName + " / " + maxName }}
27
22
  </p>
28
23
  </div>
29
- <button
30
- class="btn m-1"
31
- @click="editName = false"
32
- >
33
- {{ $t('Cancel') }}
24
+ <button class="btn m-1" @click="editName = false">
25
+ {{ $t("Cancel") }}
34
26
  </button>
35
27
  <button
36
28
  class="btn btn-primary m-1"
37
29
  :disabled="0 === countName || !validName"
38
30
  @click="validEdit"
39
31
  >
40
- {{ $t('Validate') }}
32
+ {{ $t("Validate") }}
41
33
  </button>
42
34
  </div>
43
35
  <textarea
@@ -54,14 +46,11 @@
54
46
  class="d-flex justify-content-end h6"
55
47
  :class="{ 'text-danger': !validComment }"
56
48
  >
57
- {{ countComment + ' / ' + maxComment }}
49
+ {{ countComment + " / " + maxComment }}
58
50
  </p>
59
51
  <div class="d-flex justify-content-end mt-1">
60
- <button
61
- class="btn me-2"
62
- @mousedown="cancelAction"
63
- >
64
- {{ $t('Cancel') }}
52
+ <button class="btn me-2" @mousedown="cancelAction">
53
+ {{ $t("Cancel") }}
65
54
  </button>
66
55
  <button
67
56
  class="btn btn-primary"
@@ -89,109 +78,122 @@
89
78
  </template>
90
79
 
91
80
  <script lang="ts">
92
- import octopusApi from '@saooti/octopus-api';
93
- import crudApi from '@/api/classicCrud';
94
- import cookies from '../../mixins/cookies';
95
- import { state } from '../../../stores/ParamSdkStore';
96
- import { Podcast } from '@/stores/class/general/podcast';
97
- import { Conference } from '@/stores/class/conference/conference';
98
- import { CommentPodcast } from '@/stores/class/general/comment';
99
- import Constants from '../../../../public/config';
100
- import { usePlayerStore } from '@/stores/PlayerStore';
101
- import { useAuthStore } from '@/stores/AuthStore';
102
- import { mapState } from 'pinia';
103
- import { defineComponent, defineAsyncComponent } from 'vue';
104
- const AddCommentModal = defineAsyncComponent(() => import('./AddCommentModal.vue'));
105
- const MessageModal = defineAsyncComponent(() => import('../../misc/modal/MessageModal.vue'));
81
+ import octopusApi from "@saooti/octopus-api";
82
+ import crudApi from "@/api/classicCrud";
83
+ import cookies from "../../mixins/cookies";
84
+ import { state } from "../../../stores/ParamSdkStore";
85
+ import { Podcast } from "@/stores/class/general/podcast";
86
+ import { Conference } from "@/stores/class/conference/conference";
87
+ import { CommentPodcast } from "@/stores/class/general/comment";
88
+ import Constants from "../../../../public/config";
89
+ import { usePlayerStore } from "@/stores/PlayerStore";
90
+ import { useAuthStore } from "@/stores/AuthStore";
91
+ import { mapState } from "pinia";
92
+ import { defineComponent, defineAsyncComponent } from "vue";
93
+ const AddCommentModal = defineAsyncComponent(
94
+ () => import("./AddCommentModal.vue"),
95
+ );
96
+ const MessageModal = defineAsyncComponent(
97
+ () => import("../../misc/modal/MessageModal.vue"),
98
+ );
106
99
  export default defineComponent({
107
- name: 'CommentInput',
100
+ name: "CommentInput",
108
101
  components: {
109
102
  AddCommentModal,
110
103
  MessageModal,
111
104
  },
112
- mixins:[cookies],
105
+ mixins: [cookies],
113
106
 
114
107
  props: {
115
- podcast: { default: undefined, type: Object as ()=>Podcast },
108
+ podcast: { default: undefined, type: Object as () => Podcast },
116
109
  knownIdentity: { default: undefined, type: String },
117
110
  focus: { default: false, type: Boolean },
118
- comment: { default: undefined, type: Object as ()=>CommentPodcast },
119
- fetchConference: { default: undefined, type: Object as ()=>Conference },
111
+ comment: { default: undefined, type: Object as () => CommentPodcast },
112
+ fetchConference: { default: undefined, type: Object as () => Conference },
120
113
  },
121
- emits: ['update:knownIdentity', 'cancelAction', 'newComment'],
114
+ emits: ["update:knownIdentity", "cancelAction", "newComment"],
122
115
 
123
116
  data() {
124
117
  return {
125
- newComment: '' as string,
118
+ newComment: "" as string,
126
119
  textareaFocus: false as boolean,
127
120
  checkIdentityModal: false as boolean,
128
121
  postError: false as boolean,
129
122
  isOneLine: true as boolean,
130
123
  editName: false as boolean,
131
- temporaryName: '' as string,
132
- maxComment : Constants.MAX_COMMENT as number,
133
- maxName : Constants.MAX_COMMENT_NAME as number
124
+ temporaryName: "" as string,
125
+ maxComment: Constants.MAX_COMMENT as number,
126
+ maxName: Constants.MAX_COMMENT_NAME as number,
134
127
  };
135
128
  },
136
129
 
137
130
  computed: {
138
- ...mapState(usePlayerStore, ['playerPodcast', 'playerLive', 'playerElapsed', 'playerTotal']),
139
- ...mapState(useAuthStore, ['authProfile']),
140
- validName(): boolean{
131
+ ...mapState(usePlayerStore, [
132
+ "playerPodcast",
133
+ "playerLive",
134
+ "playerElapsed",
135
+ "playerTotal",
136
+ ]),
137
+ ...mapState(useAuthStore, ["authProfile"]),
138
+ validName(): boolean {
141
139
  return this.countName <= this.maxName;
142
140
  },
143
- countName(): number{
141
+ countName(): number {
144
142
  return this.temporaryName.length;
145
143
  },
146
- validComment(): boolean{
144
+ validComment(): boolean {
147
145
  return this.countComment <= this.maxComment;
148
146
  },
149
- countComment(): number{
147
+ countComment(): number {
150
148
  return this.newComment.length;
151
149
  },
152
150
  isPresent(): boolean {
153
151
  if (!this.podcast) return true;
154
- let podcastComment = this.podcast.annotations?.COMMENTS ?? 'INHERIT';
155
- let organisationComment = this.podcast.organisation.comments??'LIVE_ONLY';
156
- return !(('LIVE_ONLY' === podcastComment &&
157
- 'READY_TO_RECORD' !== this.podcast.processingStatus) ||
158
- ('INHERIT' === podcastComment &&
159
- 'LIVE_ONLY' === organisationComment &&
160
- 'READY_TO_RECORD' !== this.podcast.processingStatus));
152
+ let podcastComment = this.podcast.annotations?.COMMENTS ?? "INHERIT";
153
+ let organisationComment =
154
+ this.podcast.organisation.comments ?? "LIVE_ONLY";
155
+ return !(
156
+ ("LIVE_ONLY" === podcastComment &&
157
+ "READY_TO_RECORD" !== this.podcast.processingStatus) ||
158
+ ("INHERIT" === podcastComment &&
159
+ "LIVE_ONLY" === organisationComment &&
160
+ "READY_TO_RECORD" !== this.podcast.processingStatus)
161
+ );
161
162
  },
162
163
  placeholder(): string {
163
- return this.comment?.comId? this.$t('Answer a comment') : this.$t('Write a comment');
164
+ return this.comment?.comId
165
+ ? this.$t("Answer a comment")
166
+ : this.$t("Write a comment");
164
167
  },
165
168
  isCertified(): boolean {
166
- return (true === state.generalParameters.isCommments &&
167
- state.generalParameters.organisationId === this.podcastOrga) ||
168
- true === state.generalParameters.isAdmin;
169
- },
170
- userId(): string|undefined {
171
- return state.generalParameters.authenticated ? this.authProfile?.userId : undefined;
169
+ return (
170
+ (true === state.generalParameters.isCommments &&
171
+ state.generalParameters.organisationId === this.podcastOrga) ||
172
+ true === state.generalParameters.isAdmin
173
+ );
172
174
  },
173
- phase(): string|undefined {
174
- if(undefined === this.podcast){
175
+ phase(): string | undefined {
176
+ if (undefined === this.podcast) {
175
177
  return this.comment ? this.comment.phase : undefined;
176
178
  }
177
179
  if (
178
180
  !this.podcast.conferenceId ||
179
181
  0 === this.podcast.conferenceId ||
180
- 'READY_TO_RECORD' !== this.podcast.processingStatus
182
+ "READY_TO_RECORD" !== this.podcast.processingStatus
181
183
  )
182
- return 'Podcast';
184
+ return "Podcast";
183
185
  if (
184
186
  this.fetchConference &&
185
- ('PLANNED' === this.fetchConference.status ||
186
- 'PENDING' === this.fetchConference.status)
187
+ ("PLANNED" === this.fetchConference.status ||
188
+ "PENDING" === this.fetchConference.status)
187
189
  )
188
- return 'Prelive';
189
- return 'Live';
190
+ return "Prelive";
191
+ return "Live";
190
192
  },
191
- podcastOrga(): string|undefined{
192
- const commentOrga = this.comment?.organisationId ??'';
193
+ podcastOrga(): string | undefined {
194
+ const commentOrga = this.comment?.organisationId ?? "";
193
195
  return this.podcast?.organisation.id ?? commentOrga;
194
- }
196
+ },
195
197
  },
196
198
  watch: {
197
199
  textareaFocus(): void {
@@ -207,25 +209,29 @@ export default defineComponent({
207
209
  (this.$refs.textarea as HTMLElement).clientWidth -
208
210
  this.inputExceeded(
209
211
  this.newComment,
210
- '18px Montserrat, sans-serif, Helvetica Neue'
212
+ "18px Montserrat, sans-serif, Helvetica Neue",
211
213
  ) >
212
214
  padding;
213
215
  },
214
216
  },
215
217
  methods: {
216
218
  changeIdentity(): void {
217
- if(!this.knownIdentity){return}
219
+ if (!this.knownIdentity) {
220
+ return;
221
+ }
218
222
  this.temporaryName = this.knownIdentity;
219
223
  this.editName = true;
220
224
  },
221
225
  validEdit(): void {
222
- this.setCookie('comment-octopus-name', this.temporaryName);
223
- this.$emit('update:knownIdentity', this.temporaryName);
226
+ this.setCookie("comment-octopus-name", this.temporaryName);
227
+ this.$emit("update:knownIdentity", this.temporaryName);
224
228
  this.editName = false;
225
229
  },
226
230
  inputExceeded(text: string, font: string): number {
227
- const context = document.createElement('canvas').getContext('2d');
228
- if(null === context){return 0;}
231
+ const context = document.createElement("canvas").getContext("2d");
232
+ if (null === context) {
233
+ return 0;
234
+ }
229
235
  context.font = font;
230
236
  return context.measureText(text).width;
231
237
  },
@@ -237,66 +243,72 @@ export default defineComponent({
237
243
  }
238
244
  },
239
245
  cancelAction(): void {
240
- this.$emit('cancelAction');
246
+ this.$emit("cancelAction");
241
247
  },
242
- defineTimelineValue(): number{
243
- let timeline = 0;
248
+ defineTimelineValue(): number {
249
+ let timeline = 0;
244
250
  if (
245
- undefined !== this.podcast &&(
246
- (this.playerPodcast?.podcastId ===this.podcast.podcastId) ||
247
- (this.playerLive?.podcastId ===this.podcast.podcastId))
251
+ undefined !== this.podcast &&
252
+ (this.playerPodcast?.podcastId === this.podcast.podcastId ||
253
+ this.playerLive?.podcastId === this.podcast.podcastId)
248
254
  ) {
249
- timeline = Math.round(
250
- this.playerElapsed * this.playerTotal
251
- );
255
+ timeline = Math.round(this.playerElapsed * this.playerTotal);
252
256
  if (this.podcast.duration && this.playerPodcast) {
253
257
  timeline = Math.round(
254
- timeline - (this.playerTotal - this.podcast.duration / 1000)
258
+ timeline - (this.playerTotal - this.podcast.duration / 1000),
255
259
  );
256
260
  }
257
261
  }
258
- return timeline < 0? 0 : timeline;
262
+ return timeline < 0 ? 0 : timeline;
259
263
  },
260
264
  async postComment(name?: string): Promise<void> {
261
265
  if (name) {
262
- this.setCookie('comment-octopus-name', name);
263
- this.$emit('update:knownIdentity', name);
266
+ this.setCookie("comment-octopus-name", name);
267
+ this.$emit("update:knownIdentity", name);
264
268
  }
265
- const sendName = name??this.knownIdentity;
269
+ const sendName = name ?? this.knownIdentity;
266
270
  const commentPodcastId = this.comment?.podcastId ?? 0;
267
271
  const comment: CommentPodcast = {
268
272
  content: this.newComment,
269
- name: sendName ??'',
273
+ name: sendName ?? "",
270
274
  podcastId: this.podcast?.podcastId ?? commentPodcastId,
271
275
  timeline: this.defineTimelineValue(),
272
276
  organisationId: this.podcastOrga,
273
- commentIdReferer:this.comment?.comId,
277
+ commentIdReferer: this.comment?.comId,
274
278
  certified: this.isCertified,
275
- userId: this.userId,
279
+ userId: this.authProfile?.userId,
276
280
  phase: this.phase,
277
281
  };
278
282
  try {
279
283
  let data;
280
284
  if (this.isCertified) {
281
- comment.status = 'Valid';
282
- data = await crudApi.postData<CommentPodcast>(2, 'registeredComment/' + comment.userId, {...comment, ...{userId: undefined}});
285
+ comment.status = "Valid";
286
+ data = await crudApi.postData<CommentPodcast>(
287
+ 2,
288
+ "registeredComment/" + comment.userId,
289
+ { ...comment, ...{ userId: undefined } },
290
+ );
283
291
  } else {
284
- data = await octopusApi.postDataPublic<CommentPodcast>(2,'unregisteredComment',comment);
292
+ data = await octopusApi.postDataPublic<CommentPodcast>(
293
+ 2,
294
+ "unregisteredComment",
295
+ comment,
296
+ );
285
297
  }
286
- this.$emit('newComment', data);
287
- this.newComment = '';
298
+ this.$emit("newComment", data);
299
+ this.newComment = "";
288
300
  } catch (error) {
289
301
  this.postError = true;
290
302
  }
291
303
  this.checkIdentityModal = false;
292
304
  },
293
305
  },
294
- })
306
+ });
295
307
  </script>
296
308
 
297
309
  <style lang="scss">
298
- @import '@scss/_variables.scss';
299
- .octopus-app{
310
+ @import "@scss/_variables.scss";
311
+ .octopus-app {
300
312
  .comment-input-container {
301
313
  textarea::placeholder {
302
314
  color: $octopus-primary-color;
@@ -313,10 +325,10 @@ export default defineComponent({
313
325
  box-shadow: unset !important;
314
326
  background: transparent !important;
315
327
  height: 50px;
316
- &.short{
328
+ &.short {
317
329
  max-height: 38px;
318
330
  }
319
331
  }
320
332
  }
321
333
  }
322
- </style>
334
+ </style>