@saooti/octopus-sdk 33.0.0 → 33.0.1

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 (73) hide show
  1. package/README.md +2 -1
  2. package/docker-compose.sonar.yml +8 -0
  3. package/package.json +13 -3
  4. package/public/css/fonts/icomoon.eot +0 -0
  5. package/public/css/fonts/icomoon.svg +1 -0
  6. package/public/css/fonts/icomoon.ttf +0 -0
  7. package/public/css/fonts/icomoon.woff +0 -0
  8. package/public/css/fonts/style.css +35 -32
  9. package/sonarqube-scanner.js +18 -0
  10. package/src/assets/bootstrap-diff.scss +0 -1
  11. package/src/assets/general.scss +2 -3
  12. package/src/assets/multiselect.scss +0 -4
  13. package/src/assets/share.scss +0 -8
  14. package/src/components/display/categories/CategoryList.vue +2 -3
  15. package/src/components/display/comments/AddCommentModal.vue +4 -1
  16. package/src/components/display/comments/CommentBasicView.vue +4 -4
  17. package/src/components/display/comments/CommentInput.vue +2 -2
  18. package/src/components/display/comments/CommentItem.vue +32 -25
  19. package/src/components/display/comments/CommentList.vue +34 -21
  20. package/src/components/display/comments/CommentSection.vue +2 -3
  21. package/src/components/display/edit/EditBox.vue +0 -1
  22. package/src/components/display/emission/EmissionChooser.vue +1 -1
  23. package/src/components/display/emission/EmissionItem.vue +2 -2
  24. package/src/components/display/emission/EmissionList.vue +4 -4
  25. package/src/components/display/filter/AdvancedSearch.vue +1 -1
  26. package/src/components/display/filter/DateFilter.vue +2 -2
  27. package/src/components/display/filter/SearchOrder.vue +1 -1
  28. package/src/components/display/list/ListPaginate.vue +6 -3
  29. package/src/components/display/list/Paginate.vue +32 -28
  30. package/src/components/display/live/LiveHorizontalList.vue +4 -4
  31. package/src/components/display/live/LiveList.vue +41 -33
  32. package/src/components/display/participant/ParticipantItem.vue +3 -3
  33. package/src/components/display/participant/ParticipantList.vue +4 -9
  34. package/src/components/display/playlist/PlaylistItem.vue +3 -3
  35. package/src/components/display/playlist/PlaylistList.vue +4 -4
  36. package/src/components/display/playlist/PodcastList.vue +2 -2
  37. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
  38. package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
  39. package/src/components/display/podcasts/PodcastImage.vue +4 -3
  40. package/src/components/display/podcasts/PodcastInlineList.vue +2 -0
  41. package/src/components/display/podcasts/PodcastInlineListClassic.vue +22 -1
  42. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +7 -4
  43. package/src/components/display/podcasts/PodcastItem.vue +2 -2
  44. package/src/components/display/podcasts/PodcastList.vue +4 -4
  45. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -1
  46. package/src/components/display/rubriques/RubriqueChooser.vue +1 -1
  47. package/src/components/display/rubriques/RubriqueList.vue +2 -2
  48. package/src/components/display/sharing/PlayerParameters.vue +1 -1
  49. package/src/components/display/sharing/QrCode.vue +1 -2
  50. package/src/components/display/sharing/ShareButtonsIntern.vue +1 -2
  51. package/src/components/display/sharing/ShareDistribution.vue +1 -2
  52. package/src/components/display/sharing/SharePlayer.vue +47 -33
  53. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  54. package/src/components/form/ClassicSelect.vue +0 -1
  55. package/src/components/misc/Footer.vue +1 -1
  56. package/src/components/misc/modal/NewsletterModal.vue +2 -3
  57. package/src/components/misc/modal/ShareModalPlayer.vue +1 -2
  58. package/src/components/misc/player/PlayerCompact.vue +1 -1
  59. package/src/components/misc/player/PlayerLarge.vue +1 -1
  60. package/src/components/mixins/functions.ts +3 -14
  61. package/src/components/mixins/player/playerComment.ts +34 -27
  62. package/src/components/mixins/player/playerLive.ts +1 -10
  63. package/src/components/mixins/player/playerLogic.ts +40 -29
  64. package/src/components/pages/Podcast.vue +4 -0
  65. package/src/helper/duration.ts +7 -36
  66. package/src/i18n.ts +1 -1
  67. package/src/locale/it.ts +0 -1
  68. package/src/main.ts +3 -10
  69. package/src/store/class/adserver/adserverConfig.ts +1 -1
  70. package/src/store/class/general/emission.ts +1 -1
  71. package/src/store/class/general/organisation.ts +1 -1
  72. package/src/store/class/general/podcast.ts +1 -1
  73. package/src/store/paramStore.ts +15 -13
@@ -9,7 +9,6 @@ export default defineComponent({
9
9
  methods:{
10
10
  updateComment(comment: CommentPodcast): void{
11
11
  console.log(comment);
12
- return;
13
12
  }
14
13
  }
15
14
  })
@@ -127,7 +127,7 @@ export default defineComponent({
127
127
 
128
128
  data() {
129
129
  return{
130
- emission: getDefaultEmission(this.defaultanswer) as Emission | undefined,
130
+ emission: getDefaultEmission(this.defaultanswer),
131
131
  emissions: [] as Array<Emission>,
132
132
  remainingElements: 0 as number,
133
133
  isLoading: false as boolean,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <li
2
+ <div
3
3
  class="mt-3 emission-item-container shadow-element"
4
4
  >
5
5
  <router-link
@@ -55,7 +55,7 @@
55
55
  </router-link>
56
56
  </div>
57
57
  </router-link>
58
- </li>
58
+ </div>
59
59
  </template>
60
60
 
61
61
  <script lang="ts">
@@ -10,7 +10,7 @@
10
10
  :loading-text="loading?$t('Loading emissions ...'):undefined"
11
11
  >
12
12
  <template #list>
13
- <ul
13
+ <div
14
14
  v-if="!itemPlayer"
15
15
  class="emission-list"
16
16
  :class="smallItems ? 'three-emissions' : 'two-emissions'"
@@ -24,7 +24,7 @@
24
24
  :emission="e"
25
25
  />
26
26
  </template>
27
- </ul>
27
+ </div>
28
28
  <div
29
29
  v-else
30
30
  v-show="(displayRubriquage && rubriques)||!displayRubriquage"
@@ -92,8 +92,8 @@ export default defineComponent({
92
92
  data() {
93
93
  return {
94
94
  loading: true as boolean,
95
- dfirst: this.first as number,
96
- dsize: this.size as number,
95
+ dfirst: this.first,
96
+ dsize: this.size,
97
97
  totalCount: 0 as number,
98
98
  displayCount: 0 as number,
99
99
  emissions: [] as Array<Emission>,
@@ -114,7 +114,7 @@ export default defineComponent({
114
114
  'updateRubriquageFilter'],
115
115
  data() {
116
116
  return {
117
- isNotVisible: this.includeHidden as boolean,
117
+ isNotVisible: this.includeHidden,
118
118
  isNotValidate: false as boolean,
119
119
  showFilters: false as boolean,
120
120
  };
@@ -79,8 +79,8 @@ export default defineComponent({
79
79
  return {
80
80
  isFrom: false as boolean,
81
81
  isTo: false as boolean,
82
- fromDate: moment().subtract(10, 'days').toISOString() as string,
83
- toDate: moment().toISOString() as string,
82
+ fromDate: moment().subtract(10, 'days').toISOString(),
83
+ toDate: moment().toISOString(),
84
84
  };
85
85
  },
86
86
 
@@ -26,7 +26,7 @@ export default defineComponent({
26
26
  emits: ['updateSortCriteria'],
27
27
  data() {
28
28
  return {
29
- sort: this.sortCriteria as string,
29
+ sort: this.sortCriteria,
30
30
  };
31
31
  },
32
32
  watch: {
@@ -76,7 +76,7 @@ export default defineComponent({
76
76
  emits: ['update:first', 'update:rowsPerPage', 'update:isMobile'],
77
77
  data() {
78
78
  return {
79
- windowWidth: window.innerWidth as number,
79
+ windowWidth: window.innerWidth,
80
80
  };
81
81
  },
82
82
  computed:{
@@ -87,7 +87,10 @@ export default defineComponent({
87
87
  return 960 >= this.windowWidth;
88
88
  },
89
89
  rangeSize(){
90
- return this.windowWidth > 1600 ? 3 : this.windowWidth > 1530 ? 2 : 1;
90
+ if(this.windowWidth > 1600){
91
+ return 3;
92
+ }
93
+ return this.windowWidth > 1530 ? 2 : 1;
91
94
  },
92
95
  },
93
96
  watch:{
@@ -124,7 +127,7 @@ export default defineComponent({
124
127
  scrollToTop(){
125
128
  const element = document.getElementById(this.id);
126
129
  if(!element || element.getBoundingClientRect().top > 0){return;}
127
- const y = element.getBoundingClientRect().top + window.pageYOffset - domHelper.convertRemToPixels(3.5);
130
+ const y = element.getBoundingClientRect().top + window.scrollY - domHelper.convertRemToPixels(3.5);
128
131
  window.scrollTo({top: y, behavior: 'smooth'});
129
132
  }
130
133
  }
@@ -126,40 +126,17 @@ export default defineComponent({
126
126
  },
127
127
  pagination(): (number | null)[] {
128
128
  if(-1===this.rangeSize){return[];}
129
- const res = [];
130
129
  const minPaginationElems = 5 + this.rangeSize * 2;
131
130
  let rangeStart = this.totalPage <= minPaginationElems ? 1 : (this.page + 1) - this.rangeSize;
132
131
  let rangeEnd =this.totalPage <= minPaginationElems ? this.totalPage : (this.page + 1)+ this.rangeSize;
133
132
  rangeEnd = rangeEnd > this.totalPage ? this.totalPage : rangeEnd;
134
133
  rangeStart = rangeStart < 1 ? 1 : rangeStart;
135
134
  if (this.totalPage > minPaginationElems) {
136
- const isStartBoundaryReached = rangeStart - 1 < 3;
137
- const isEndBoundaryReached = this.totalPage - rangeEnd < 3;
138
- if (isStartBoundaryReached) {
139
- rangeEnd = minPaginationElems - 2;
140
- for (let i = 1; i < rangeStart; i++) {
141
- res.push(i);
142
- }
143
- } else {
144
- res.push(1);
145
- res.push(null);
146
- }
147
- if (isEndBoundaryReached) {
148
- rangeStart = this.totalPage - (minPaginationElems - 3);
149
- for (let i = rangeStart; i <= this.totalPage; i++) {
150
- res.push(i);
151
- }
152
- } else {
153
- for (let i = rangeStart; i <= rangeEnd; i++) {
154
- res.push(i);
155
- }
156
- res.push(null);
157
- res.push(this.totalPage);
158
- }
159
- } else {
160
- for (let i = rangeStart; i <= rangeEnd; i++) {
161
- res.push(i);
162
- }
135
+ return this.getPaginationArrayWithEllipsis(rangeStart, rangeEnd, minPaginationElems);
136
+ }
137
+ const res = [];
138
+ for (let i = rangeStart; i <= rangeEnd; i++) {
139
+ res.push(i);
163
140
  }
164
141
  return res;
165
142
  },
@@ -184,6 +161,33 @@ export default defineComponent({
184
161
  },
185
162
 
186
163
  methods:{
164
+ getPaginationArrayWithEllipsis(rangeStart: number, rangeEnd:number, minPaginationElems:number){
165
+ const res = [];
166
+ const isStartBoundaryReached = rangeStart - 1 < 3;
167
+ const isEndBoundaryReached = this.totalPage - rangeEnd < 3;
168
+ if (isStartBoundaryReached) {
169
+ rangeEnd = minPaginationElems - 2;
170
+ for (let i = 1; i < rangeStart; i++) {
171
+ res.push(i);
172
+ }
173
+ } else {
174
+ res.push(1);
175
+ res.push(null);
176
+ }
177
+ if (isEndBoundaryReached) {
178
+ rangeStart = this.totalPage - (minPaginationElems - 3);
179
+ for (let i = rangeStart; i <= this.totalPage; i++) {
180
+ res.push(i);
181
+ }
182
+ } else {
183
+ for (let i = rangeStart; i <= rangeEnd; i++) {
184
+ res.push(i);
185
+ }
186
+ res.push(null);
187
+ res.push(this.totalPage);
188
+ }
189
+ return res;
190
+ },
187
191
  initRowsPerPage(){
188
192
  if(!this.optionsRowsPerPage.includes(this.rowsPerPage)){
189
193
  this.optionsRowsPerPage.push(this.rowsPerPage);
@@ -15,7 +15,7 @@
15
15
  :loading="false"
16
16
  >
17
17
  <template #list>
18
- <ul
18
+ <div
19
19
  class="podcast-list"
20
20
  >
21
21
  <template
@@ -27,7 +27,7 @@
27
27
  :podcast="p"
28
28
  />
29
29
  </template>
30
- </ul>
30
+ </div>
31
31
  </template>
32
32
  </ListPaginate>
33
33
  </div>
@@ -56,8 +56,8 @@ export default defineComponent({
56
56
 
57
57
  data() {
58
58
  return {
59
- dfirst: this.first as number,
60
- dsize: this.size as number,
59
+ dfirst: this.first,
60
+ dsize: this.size,
61
61
  totalCount: 0 as number,
62
62
  lives: [] as Array<Podcast>,
63
63
  notEmpty: false as boolean,
@@ -62,6 +62,7 @@ export default defineComponent({
62
62
  return {
63
63
  loading: true as boolean,
64
64
  loaded: true as boolean,
65
+ dataLivesToBe: [] as Array<Conference>
65
66
  };
66
67
  },
67
68
 
@@ -148,6 +149,45 @@ export default defineComponent({
148
149
  this.livesArray[i].lives.length = 0;
149
150
  }
150
151
  },
152
+ liveTreatement(i: number, dataLives: Array<Conference>, indexPast: number){
153
+ if("PLANNED"!==this.livesArray[i].status && "PENDING"!==this.livesArray[i].status){
154
+ this.livesArray[i].lives = dataLives.filter((p: Conference | null) => {
155
+ return null !== p;
156
+ });
157
+ }else if("PENDING"===this.livesArray[i].status){
158
+ this.dataLivesToBe = dataLives;
159
+ for (let index = 0, len = dataLives.length; index < len; index++) {
160
+ if (moment(dataLives[index].date).isBefore(moment())) {
161
+ this.livesArray[i].lives.push(dataLives[index]);
162
+ indexPast = index + 1;
163
+ } else {break;}
164
+ }
165
+ }else{
166
+ this.livesArray[i].lives = this.dataLivesToBe
167
+ .slice(indexPast)
168
+ .concat(dataLives)
169
+ .filter((p: Conference | null) => {
170
+ return null !== p;
171
+ });
172
+ }
173
+ return indexPast;
174
+ },
175
+ async fetchLives(): Promise<void>{
176
+ let indexPast = 0;
177
+ this.dataLivesToBe = [];
178
+ for (let i = 0, len = this.livesArray.length; i < len; i++) {
179
+ if (!this.organisationRight &&
180
+ ("DEBRIEFING"===this.livesArray[i].status ||"ERROR"===this.livesArray[i].status ||"PUBLISHING"===this.livesArray[i].status)) {
181
+ continue;
182
+ }
183
+ const dataLives = await octopusApi.fetchDataWithParams<Array<Conference>>(9, 'conference/list',{
184
+ organisationId: this.filterOrgaUsed,
185
+ withPodcastId: true,
186
+ status: this.livesArray[i].status,
187
+ });
188
+ indexPast = this.liveTreatement(i, dataLives, indexPast);
189
+ }
190
+ },
151
191
  async fetchContent(): Promise<void> {
152
192
  try {
153
193
  this.initArrays();
@@ -158,39 +198,7 @@ export default defineComponent({
158
198
  }
159
199
  this.loading = true;
160
200
  this.loaded = false;
161
- let indexPast = 0;
162
- let dataLivesToBe: Array<Conference> = [];
163
- for (let i = 0, len = this.livesArray.length; i < len; i++) {
164
- if (!this.organisationRight &&
165
- ("DEBRIEFING"===this.livesArray[i].status ||"ERROR"===this.livesArray[i].status ||"PUBLISHING"===this.livesArray[i].status)) {
166
- continue;
167
- }
168
- const dataLives = await octopusApi.fetchDataWithParams<Array<Conference>>(9, 'conference/list',{
169
- organisationId: this.filterOrgaUsed,
170
- withPodcastId: true,
171
- status: this.livesArray[i].status,
172
- });
173
- if("PLANNED"!==this.livesArray[i].status && "PENDING"!==this.livesArray[i].status){
174
- this.livesArray[i].lives = dataLives.filter((p: Conference | null) => {
175
- return null !== p;
176
- });
177
- }else if("PENDING"===this.livesArray[i].status){
178
- dataLivesToBe = dataLives;
179
- for (let index = 0, len = dataLives.length; index < len; index++) {
180
- if (moment(dataLives[index].date).isBefore(moment())) {
181
- this.livesArray[i].lives.push(dataLives[index]);
182
- indexPast = index + 1;
183
- } else {break;}
184
- }
185
- }else{
186
- this.livesArray[i].lives = dataLivesToBe
187
- .slice(indexPast)
188
- .concat(dataLives)
189
- .filter((p: Conference | null) => {
190
- return null !== p;
191
- });
192
- }
193
- }
201
+ await this.fetchLives();
194
202
  const listIds = this.livesArray[0].lives
195
203
  .concat(this.livesArray[1].lives)
196
204
  .concat(this.livesArray[2].lives);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <li
2
+ <div
3
3
  v-if="participant"
4
4
  class="participant-item-container"
5
5
  >
@@ -50,7 +50,7 @@
50
50
  >
51
51
  © {{ participant.orga.name }}
52
52
  </router-link>
53
- </li>
53
+ </div>
54
54
  </template>
55
55
 
56
56
  <script lang="ts">
@@ -83,7 +83,7 @@ export default defineComponent({
83
83
  if(!this.participant || !this.participant.orga){
84
84
  return false;
85
85
  }
86
- return (true == this.authenticated &&
86
+ return (this.authenticated &&
87
87
  this.myOrganisationId === this.participant.orga.id) ||
88
88
  true === state.generalParameters.isAdmin
89
89
  },
@@ -10,7 +10,7 @@
10
10
  :loading-text="loading?$t('Loading participants ...'):undefined"
11
11
  >
12
12
  <template #list>
13
- <ul
13
+ <div
14
14
  class="participant-list"
15
15
  >
16
16
  <template
@@ -22,7 +22,7 @@
22
22
  :participant="p"
23
23
  />
24
24
  </template>
25
- </ul>
25
+ </div>
26
26
  </template>
27
27
  </ListPaginate>
28
28
  </template>
@@ -57,8 +57,8 @@ export default defineComponent({
57
57
  data() {
58
58
  return {
59
59
  loading: true as boolean,
60
- dfirst: this.first as number,
61
- dsize: this.size as number,
60
+ dfirst: this.first,
61
+ dsize: this.size,
62
62
  totalCount: 0 as number,
63
63
  displayCount: 0 as number,
64
64
  participants: [] as Array<Participant>,
@@ -145,11 +145,6 @@ export default defineComponent({
145
145
  flex-grow: 1;
146
146
  margin: 0;
147
147
  padding: 0;
148
- /*For ie11 */
149
- display: flex;
150
- flex-wrap: wrap;
151
- /* end */
152
-
153
148
  display: grid; /* 1 */
154
149
  grid-template-columns: repeat(auto-fill, 14rem); /* 2 */
155
150
  grid-gap: 2rem; /* 3 */
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <li
2
+ <div
3
3
  v-if="editRight || activePlaylist"
4
4
  class="emission-item-container shadow-element"
5
5
  >
@@ -55,7 +55,7 @@
55
55
  </router-link>
56
56
  </div>
57
57
  </router-link>
58
- </li>
58
+ </div>
59
59
  </template>
60
60
 
61
61
  <script lang="ts">
@@ -91,7 +91,7 @@ export default defineComponent({
91
91
  editRight(): boolean {
92
92
  return (true===state.generalParameters.isPlaylist &&
93
93
  this.organisationId === this.playlist.organisation?.id) ||
94
- true == state.generalParameters.isAdmin;
94
+ (state.generalParameters.isAdmin as boolean);
95
95
  },
96
96
  activePlaylist(): boolean {
97
97
  return 0 !== Object.keys(this.playlist.samplingViews??[]).length;
@@ -10,7 +10,7 @@
10
10
  :loading-text="loading?$t('Loading content ...'):undefined"
11
11
  >
12
12
  <template #list>
13
- <ul
13
+ <div
14
14
  class="emission-list two-emissions"
15
15
  >
16
16
  <template
@@ -22,7 +22,7 @@
22
22
  :playlist="p"
23
23
  />
24
24
  </template>
25
- </ul>
25
+ </div>
26
26
  </template>
27
27
  </ListPaginate>
28
28
  </template>
@@ -56,8 +56,8 @@ export default defineComponent({
56
56
  data() {
57
57
  return {
58
58
  loading: true as boolean,
59
- dfirst: this.first as number,
60
- dsize: this.size as number,
59
+ dfirst: this.first,
60
+ dsize: this.size,
61
61
  totalCount: 0 as number,
62
62
  displayCount: 0 as number,
63
63
  playlists: [] as Array<Playlist>,
@@ -22,7 +22,7 @@
22
22
  :error-text="!loading && !podcasts.length && notEmptyPlaylist?$t(`No podcast match your query`):undefined"
23
23
  >
24
24
  <template #list>
25
- <ul
25
+ <div
26
26
  class="podcast-list"
27
27
  >
28
28
  <template
@@ -34,7 +34,7 @@
34
34
  :podcast="p"
35
35
  />
36
36
  </template>
37
- </ul>
37
+ </div>
38
38
  </template>
39
39
  </ListPaginate>
40
40
  </div>
@@ -100,7 +100,7 @@ export default defineComponent({
100
100
  return this.allPodcasts.slice(this.index, this.index + this.size);
101
101
  },
102
102
  sizeItem(): number {
103
- return state.generalParameters.podcastItem ? (state.generalParameters.podcastItem as number): 13;
103
+ return state.generalParameters.podcastItem ? state.generalParameters.podcastItem: 13;
104
104
  },
105
105
  overflowScroll(): boolean {
106
106
  return (state.emissionPage.overflowScroll as boolean);
@@ -20,7 +20,7 @@
20
20
  :key="'desc-'+participant.participantId"
21
21
  class="d-flex flex-column align-items-center"
22
22
  >
23
- <b><i>{{ getName(participant) }}</i></b>
23
+ <strong><em>{{ getName(participant) }}</em></strong>
24
24
  <!-- eslint-disable vue/no-v-html -->
25
25
  <div
26
26
  v-if="participant.description"
@@ -125,7 +125,7 @@ export default defineComponent({
125
125
  },
126
126
  }),
127
127
  mainRubrique(): boolean{
128
- return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && true==this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique);
128
+ return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && (this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique) as boolean);
129
129
  },
130
130
  isPodcastmaker(): boolean {
131
131
  return (state.generalParameters.podcastmaker as boolean);
@@ -160,7 +160,7 @@ export default defineComponent({
160
160
  iconName(): string {
161
161
  if (this.isLiveToBeRecorded) return 'saooti-clock';
162
162
  if ('READY' === this.podcast.processingStatus || this.fetchConference) {
163
- if (false == this.podcast.valid) return 'saooti-checkmark';
163
+ if (!this.podcast.valid) return 'saooti-checkmark';
164
164
  if (
165
165
  !this.podcast.availability.visibility &&
166
166
  this.podcast.availability.date
@@ -181,7 +181,7 @@ export default defineComponent({
181
181
  if (this.isLiveToBeRecorded)
182
182
  return this.$t('Podcast linked to waiting live');
183
183
  if ('READY' === this.podcast.processingStatus || this.fetchConference) {
184
- if (false == this.podcast.valid) return this.$t('Podcast to validate');
184
+ if (!this.podcast.valid) return this.$t('Podcast to validate');
185
185
  if (
186
186
  !this.podcast.availability.visibility &&
187
187
  this.podcast.availability.date
@@ -337,6 +337,7 @@ export default defineComponent({
337
337
  flex-direction: column;
338
338
  background: transparent;
339
339
  border-width: 0;
340
+ width: 100%;
340
341
  &:focus{
341
342
  background: rgba(0, 0, 0, 0.5);
342
343
  }
@@ -14,6 +14,7 @@
14
14
  :rubriquage-id="rubriquageId"
15
15
  :no-rubriquage-id="noRubriquageId"
16
16
  :query="query"
17
+ :podcastId="podcastId"
17
18
  @update:isArrow="$emit('update:isArrow',$event)"
18
19
  />
19
20
  <PodcastSwiperList
@@ -61,6 +62,7 @@ export default defineComponent({
61
62
  rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
62
63
  noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
63
64
  query: { default: undefined, type: String},
65
+ podcastId: { default: undefined, type: Number},
64
66
  },
65
67
  emits: ['update:isArrow'],
66
68
  computed:{
@@ -12,6 +12,7 @@
12
12
  :previous-available="previousAvailable"
13
13
  :next-available="nextAvailable"
14
14
  :no-rubriquage-id="noRubriquageId"
15
+ :podcastId="podcastId"
15
16
  @sortChrono="sortChrono"
16
17
  @sortPopular="sortPopular"
17
18
  @displayPrevious="displayPrevious"
@@ -79,6 +80,7 @@ export default defineComponent({
79
80
  rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
80
81
  noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
81
82
  query: { default: undefined, type: String},
83
+ podcastId: { default: undefined, type: Number},
82
84
  },
83
85
  emits: ['update:isArrow'],
84
86
 
@@ -100,7 +102,7 @@ export default defineComponent({
100
102
  return this.allPodcasts.slice(this.index, this.index + this.size);
101
103
  },
102
104
  sizeItem(): number {
103
- return state.generalParameters.podcastItem ? (state.generalParameters.podcastItem as number): 13;
105
+ return state.generalParameters.podcastItem ? state.generalParameters.podcastItem: 13;
104
106
  },
105
107
  overflowScroll(): boolean {
106
108
  return (state.emissionPage.overflowScroll as boolean);
@@ -153,7 +155,26 @@ export default defineComponent({
153
155
  this.fetchNext();
154
156
  },
155
157
  methods: {
158
+ async fetchRecommendations(): Promise<void>{
159
+ const podcastIdsArray = await octopusApi.fetchDataPublicWithParams<Array<number>>(13, 'get_predicts',{
160
+ reco: this.podcastId,
161
+ n_neightbors: 5,
162
+ });
163
+ for (let podcastIdReco of podcastIdsArray) {
164
+ try {
165
+ const entirePodcast = await octopusApi.fetchData<Podcast>(0, 'podcast/'+podcastIdReco);
166
+ this.allPodcasts.push(entirePodcast);
167
+ } catch {
168
+ //If doesn't exist, do nothing
169
+ }
170
+ }
171
+ this.totalCount = podcastIdsArray.length;
172
+ this.loading = false;
173
+ },
156
174
  async fetchNext(): Promise<void> {
175
+ if(this.podcastId){
176
+ return this.fetchRecommendations();
177
+ }
157
178
  const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',{
158
179
  first: this.first,
159
180
  size: this.size + 1,
@@ -2,7 +2,9 @@
2
2
  <div
3
3
  class="d-flex flex-column p-3"
4
4
  >
5
- <div class="d-flex align-items-center mb-2">
5
+ <div
6
+ class="d-flex align-items-center"
7
+ :class="podcastId?'mb-4':'mb-2'">
6
8
  <h2 class="mb-0">
7
9
  {{ title }}
8
10
  </h2>
@@ -14,7 +16,7 @@
14
16
  @click="handleSeeMoreButton"
15
17
  />
16
18
  </div>
17
- <div class="d-flex justify-content-between">
19
+ <div class="d-flex justify-content-between" v-if="!podcastId">
18
20
  <div class="d-flex">
19
21
  <button
20
22
  class="btn btn-underline"
@@ -51,7 +53,7 @@
51
53
  </div>
52
54
  <slot name="list-inline" />
53
55
  <router-link
54
- v-if="!isButtonNextTitle"
56
+ v-if="!isButtonNextTitle && buttonText"
55
57
  class="btn btn-primary align-self-center width-fit-content m-4"
56
58
  :to="refTo"
57
59
  @click="handleSeeMoreButton"
@@ -88,7 +90,8 @@ export default defineComponent({
88
90
  iabId: { default: undefined, type: Number},
89
91
  rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
90
92
  noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
91
- isButtonNextTitle: {default: false, type:Boolean}
93
+ isButtonNextTitle: {default: false, type:Boolean},
94
+ podcastId: { default: undefined, type: Number},
92
95
  },
93
96
  emits:['sortChrono','sortPopular', 'displayPrevious', 'displayNext'],
94
97
  data() {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <li
2
+ <div
3
3
  class="podcast-item-container"
4
4
  :class="[
5
5
  podcastShadow ? 'shadow-element' : '',
@@ -43,7 +43,7 @@
43
43
  @mouseenter="showDescription"
44
44
  @mouseleave="hideDescription"
45
45
  />
46
- </li>
46
+ </div>
47
47
  </template>
48
48
 
49
49
  <script lang="ts">