@saooti/octopus-sdk 32.0.2 → 32.0.5

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 (89) hide show
  1. package/README.md +6 -1
  2. package/package.json +2 -2
  3. package/public/css/fonts/icomoon.eot +0 -0
  4. package/public/css/fonts/icomoon.svg +130 -0
  5. package/public/css/fonts/icomoon.ttf +0 -0
  6. package/public/css/fonts/icomoon.woff +0 -0
  7. package/public/css/fonts/style.css +185 -1275
  8. package/src/App.vue +1 -1
  9. package/src/assets/bootstrap-diff.scss +1 -0
  10. package/src/assets/form.scss +3 -1
  11. package/src/assets/multiselect.scss +11 -0
  12. package/src/components/display/categories/CategoryChooser.vue +1 -1
  13. package/src/components/display/comments/AddCommentModal.vue +1 -3
  14. package/src/components/display/comments/CommentInput.vue +14 -30
  15. package/src/components/display/comments/CommentItem.vue +7 -14
  16. package/src/components/display/comments/CommentList.vue +7 -15
  17. package/src/components/display/comments/CommentPlayer.vue +1 -4
  18. package/src/components/display/comments/CommentSection.vue +1 -1
  19. package/src/components/display/edit/EditCommentBox.vue +3 -3
  20. package/src/components/display/emission/EmissionChooser.vue +5 -20
  21. package/src/components/display/emission/EmissionInlineList.vue +1 -6
  22. package/src/components/display/emission/EmissionItem.vue +3 -10
  23. package/src/components/display/emission/EmissionList.vue +6 -13
  24. package/src/components/display/emission/EmissionPlayerItem.vue +5 -13
  25. package/src/components/display/filter/AdvancedSearch.vue +6 -14
  26. package/src/components/display/filter/MonetizableFilter.vue +1 -1
  27. package/src/components/display/filter/RubriqueChoice.vue +1 -1
  28. package/src/components/display/filter/RubriqueFilter.vue +1 -3
  29. package/src/components/display/list/ListPaginate.vue +1 -6
  30. package/src/components/display/live/LiveItem.vue +6 -17
  31. package/src/components/display/live/LiveList.vue +12 -16
  32. package/src/components/display/organisation/OrganisationChooser.vue +3 -7
  33. package/src/components/display/organisation/OrganisationChooserLight.vue +1 -5
  34. package/src/components/display/participant/ParticipantItem.vue +4 -9
  35. package/src/components/display/participant/ParticipantList.vue +1 -3
  36. package/src/components/display/playlist/PlaylistItem.vue +6 -16
  37. package/src/components/display/playlist/PlaylistList.vue +2 -5
  38. package/src/components/display/playlist/PodcastList.vue +3 -7
  39. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +2 -9
  40. package/src/components/display/podcasts/AnimatorsItem.vue +1 -1
  41. package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
  42. package/src/components/display/podcasts/PodcastFilterList.vue +1 -1
  43. package/src/components/display/podcasts/PodcastImage.vue +14 -22
  44. package/src/components/display/podcasts/PodcastInlineListClassic.vue +2 -8
  45. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +2 -2
  46. package/src/components/display/podcasts/PodcastItem.vue +2 -5
  47. package/src/components/display/podcasts/PodcastItemInfo.vue +4 -9
  48. package/src/components/display/podcasts/PodcastList.vue +5 -13
  49. package/src/components/display/podcasts/PodcastModuleBox.vue +7 -22
  50. package/src/components/display/podcasts/PodcastPlayBar.vue +3 -4
  51. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -3
  52. package/src/components/display/rubriques/RubriqueChooser.vue +5 -16
  53. package/src/components/display/rubriques/RubriqueList.vue +2 -2
  54. package/src/components/display/sharing/QrCode.vue +1 -1
  55. package/src/components/display/sharing/ShareButtonsIntern.vue +5 -5
  56. package/src/components/display/sharing/ShareDistribution.vue +30 -95
  57. package/src/components/display/sharing/SharePlayer.vue +6 -14
  58. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  59. package/src/components/display/sharing/SubscribeButtons.vue +2 -4
  60. package/src/components/form/ClassicSearch.vue +4 -4
  61. package/src/components/form/ClassicSelect.vue +1 -1
  62. package/src/components/misc/Footer.vue +2 -2
  63. package/src/components/misc/HomeDropdown.vue +1 -1
  64. package/src/components/misc/LeftMenu.vue +3 -3
  65. package/src/components/misc/TopBar.vue +11 -15
  66. package/src/components/misc/modal/MessageModal.vue +1 -1
  67. package/src/components/misc/modal/NewsletterModal.vue +5 -7
  68. package/src/components/misc/modal/ShareModalPlayer.vue +4 -4
  69. package/src/components/misc/player/Player.vue +1 -1
  70. package/src/components/misc/player/PlayerCompact.vue +4 -4
  71. package/src/components/misc/player/PlayerLarge.vue +4 -4
  72. package/src/components/misc/player/PlayerTimeline.vue +1 -6
  73. package/src/components/pages/Emission.vue +14 -33
  74. package/src/components/pages/Emissions.vue +6 -15
  75. package/src/components/pages/Home.vue +1 -4
  76. package/src/components/pages/Lives.vue +3 -11
  77. package/src/components/pages/PageNotFound.vue +2 -2
  78. package/src/components/pages/Participant.vue +8 -23
  79. package/src/components/pages/Participants.vue +3 -6
  80. package/src/components/pages/Playlist.vue +10 -13
  81. package/src/components/pages/Playlists.vue +2 -3
  82. package/src/components/pages/Podcast.vue +15 -51
  83. package/src/components/pages/Podcasts.vue +7 -16
  84. package/src/components/pages/Search.vue +3 -6
  85. package/public/css/fonts/saooti-ui.eot +0 -0
  86. package/public/css/fonts/saooti-ui.svg +0 -843
  87. package/public/css/fonts/saooti-ui.ttf +0 -0
  88. package/public/css/fonts/saooti-ui.woff +0 -0
  89. package/public/css/fonts/stitcher-logo.svg +0 -83
@@ -62,25 +62,25 @@ export default defineComponent({
62
62
  return {
63
63
  loading: true as boolean,
64
64
  loaded: true as boolean,
65
- livesArray: [
65
+ };
66
+ },
67
+
68
+ computed: {
69
+ livesArray(): Array<{status:string, title:string, lives:Array<Conference>}>{
70
+ return [
66
71
  {status: "RECORDING", title:this.$t('In live'), lives:[]},
67
72
  {status: "PENDING", title:this.$t('This live is not started yet'), lives:[]},
68
73
  {status: "PLANNED", title:this.$t('Live to be'), lives:[]},
69
74
  {status: "DEBRIEFING", title:this.$t('Live terminated'), lives:[]},
70
75
  {status: "PUBLISHING", title:this.$t('Publishing'), lives:[]},
71
76
  {status: "ERROR", title:this.$t('In error'), lives:[]}
72
- ] as Array<{status:string, title:string, lives:Array<Conference>}>
73
- };
74
- },
75
-
76
- computed: {
77
+ ];
78
+ },
77
79
  isNoLive(): boolean{
78
80
  return this.loaded && !this.livesArray[0].lives.length && !this.livesArray[2].lives.length && !this.livesArray[3].lives.length;
79
81
  },
80
82
  filterOrgaUsed(): string|undefined {
81
- if (this.filterOrga) return this.filterOrga;
82
- if (this.organisationId) return this.organisationId;
83
- return undefined;
83
+ return this.filterOrga??this.organisationId;
84
84
  },
85
85
  filterOrga(): string {
86
86
  return this.$store.state.filter.organisationId;
@@ -88,20 +88,16 @@ export default defineComponent({
88
88
  displayNextLiveMessage(): string {
89
89
  if (0 !== this.livesArray[0].lives.length) return '';
90
90
  if (this.livesArray[1].lives.length > 0)
91
- return this.$t('A live can start any moment').toString();
91
+ return this.$t('A live can start any moment');
92
92
  if (this.livesArray[2].lives.length > 0)
93
- return this.$t('Next live date', {
94
- date: moment(this.livesArray[2].lives[0].date).format('LLLL'),
95
- }).toString();
93
+ return this.$t('Next live date', {date: moment(this.livesArray[2].lives[0].date).format('LLLL'),});
96
94
  return '';
97
95
  },
98
96
  myOrganisationId(): string|undefined {
99
97
  return state.generalParameters.organisationId;
100
98
  },
101
99
  organisationRight(): boolean {
102
- if (this.isRoleLive && this.myOrganisationId === this.filterOrgaUsed)
103
- return true;
104
- return false;
100
+ return this.isRoleLive && this.myOrganisationId === this.filterOrgaUsed;
105
101
  },
106
102
  isRoleLive(): boolean {
107
103
  return (state.generalParameters.isRoleLive as boolean);
@@ -100,7 +100,7 @@
100
100
  class="position-relative"
101
101
  >
102
102
  <span
103
- class="saooti-arrow_down octopus-arrow-down"
103
+ class="saooti-down octopus-arrow-down"
104
104
  />
105
105
  </div>
106
106
  </template>
@@ -161,13 +161,9 @@ export default defineComponent({
161
161
  myOrganisation(): Organisation|undefined {
162
162
  if (!this.authenticated) return undefined;
163
163
  return {
164
- id: this.myOrganisationId ? this.myOrganisationId : "",
164
+ id: this.myOrganisationId??"",
165
165
  imageUrl: this.myImage,
166
- name:
167
- this.$t('Edit my organisation') +
168
- ' (' +
169
- state.organisation.name +
170
- ')',
166
+ name: `${this.$t('Edit my organisation')} (${state.organisation.name})`
171
167
  };
172
168
  },
173
169
  },
@@ -65,11 +65,7 @@ export default defineComponent({
65
65
 
66
66
  methods: {
67
67
  onOrganisationSelected(): void{
68
- if (-1 === this.actual) {
69
- this.$emit('selected', undefined);
70
- } else {
71
- this.$emit('selected', this.organisation);
72
- }
68
+ this.$emit('selected', -1 === this.actual? undefined:this.organisation);
73
69
  },
74
70
  async fetchOrganisation(): Promise<void> {
75
71
  if(!this.value){return;}
@@ -75,20 +75,15 @@ export default defineComponent({
75
75
  return (state.generalParameters.podcastmaker as boolean);
76
76
  },
77
77
  name(): string {
78
- return (`${this.participant.firstName||''} ${this.participant.lastName||''}`).trim();
78
+ return (`${this.participant.firstName??''} ${this.participant.lastName??''}`).trim();
79
79
  },
80
80
  editRight(): boolean {
81
81
  if(!this.participant || !this.participant.orga){
82
82
  return false;
83
83
  }
84
- if (
85
- (this.authenticated &&
86
- this.myOrganisationId === this.participant.orga.id) ||
87
- state.generalParameters.isAdmin
88
- ){
89
- return true;
90
- }
91
- return false;
84
+ return (true == this.authenticated &&
85
+ this.myOrganisationId === this.participant.orga.id) ||
86
+ true === state.generalParameters.isAdmin
92
87
  },
93
88
  },
94
89
 
@@ -75,9 +75,7 @@ export default defineComponent({
75
75
  return this.participants.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
76
76
  },
77
77
  organisation(): string|undefined {
78
- if (this.organisationId) return this.organisationId;
79
- if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
80
- return undefined;
78
+ return this.organisationId??this.$store.state.filter.organisationId;
81
79
  },
82
80
  },
83
81
  watch: {
@@ -81,13 +81,10 @@ export default defineComponent({
81
81
  return (state.generalParameters.podcastmaker as boolean);
82
82
  },
83
83
  organisation(): string {
84
- if(this.playlist && this.playlist.publisher && this.playlist.publisher.organisation){
85
- return '' + this.playlist.publisher.organisation.name;
86
- }
87
- return '';
84
+ return this.playlist?.publisher?.organisation?.name ??'';
88
85
  },
89
86
  description(): string {
90
- return this.playlist.description || '';
87
+ return this.playlist.description ?? '';
91
88
  },
92
89
  name(): string {
93
90
  return this.playlist.title;
@@ -96,13 +93,9 @@ export default defineComponent({
96
93
  return state.generalParameters.organisationId;
97
94
  },
98
95
  editRight(): boolean {
99
- if (
100
- (state.generalParameters.isPlaylist &&
101
- this.organisationId === this.playlist.organisation?.id) ||
102
- state.generalParameters.isAdmin
103
- )
104
- return true;
105
- return false;
96
+ return (true===state.generalParameters.isPlaylist &&
97
+ this.organisationId === this.playlist.organisation?.id) ||
98
+ true == state.generalParameters.isAdmin;
106
99
  },
107
100
  activePlaylist(): boolean {
108
101
  return 0 !== Object.keys(this.playlist.podcasts).length;
@@ -111,10 +104,7 @@ export default defineComponent({
111
104
  mounted() {
112
105
  const playlistDesc = (this.$refs.descriptionPlaylist as HTMLElement);
113
106
  const playlistDescContainer = (this.$refs.descriptionPlaylistContainer as HTMLElement);
114
- if (
115
- null !== playlistDesc && null !== playlistDescContainer &&
116
- playlistDesc.clientHeight > playlistDescContainer.clientHeight
117
- ) {
107
+ if (playlistDesc?.clientHeight > playlistDescContainer?.clientHeight) {
118
108
  playlistDescContainer.classList.add('after-emission-description');
119
109
  }
120
110
  },
@@ -77,13 +77,10 @@ export default defineComponent({
77
77
  return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
78
78
  },
79
79
  sort(): string {
80
- if (!this.query) return 'NAME';
81
- return 'SCORE';
80
+ return !this.query ?'NAME': 'SCORE';
82
81
  },
83
82
  organisation(): string|undefined {
84
- if (this.organisationId) return this.organisationId;
85
- if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
86
- return undefined;
83
+ return this.organisationId ?? this.$store.state.filter.organisationId;
87
84
  },
88
85
  },
89
86
  watch: {
@@ -94,13 +94,9 @@ export default defineComponent({
94
94
  return this.podcastsQuery.slice(this.first, Math.min(this.first + this.size,this.podcasts.length));
95
95
  },
96
96
  editRight(): boolean {
97
- if (
98
- (this.authenticated &&
99
- this.myOrganisationId === this.playlist.organisation?.id) ||
100
- state.generalParameters.isAdmin
101
- )
102
- return true;
103
- return false;
97
+ return (true===this.authenticated &&
98
+ this.myOrganisationId === this.playlist.organisation?.id) ||
99
+ true ===state.generalParameters.isAdmin
104
100
  },
105
101
  },
106
102
  watch: {
@@ -98,10 +98,7 @@ export default defineComponent({
98
98
  },
99
99
  computed: {
100
100
  title(): string{
101
- if(this.playlist){
102
- return this.playlist.title;
103
- }
104
- return "";
101
+ return this.playlist?.title??"";
105
102
  },
106
103
  podcasts(): Array<Podcast> {
107
104
  return this.allPodcasts.slice(this.index, this.index + this.size);
@@ -159,11 +156,7 @@ export default defineComponent({
159
156
  );
160
157
  });
161
158
  }
162
- if (this.allPodcasts.length <= 3) {
163
- this.alignLeft = true;
164
- } else {
165
- this.alignLeft = false;
166
- }
159
+ this.alignLeft = this.allPodcasts.length <= 3;
167
160
  this.loading = false;
168
161
  },
169
162
  displayPrevious(): void {
@@ -29,7 +29,7 @@ export default defineComponent({
29
29
  },
30
30
  computed:{
31
31
  animatorName(): string{
32
- return (`${this.animator?.firstName||''} ${this.animator?.lastName||''}`).trim();
32
+ return (`${this.animator?.firstName??''} ${this.animator?.lastName??''}`).trim();
33
33
  }
34
34
  }
35
35
  })
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  },
76
76
  methods: {
77
77
  getName(person: Participant): string {
78
- return (`${person.firstName||''} ${person.lastName||''}`).trim();
78
+ return (`${person.firstName??''} ${person.lastName??''}`).trim();
79
79
  },
80
80
  },
81
81
  })
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  },
82
82
  methods: {
83
83
  onCategorySelected(category: Category|undefined): void {
84
- this.iabId = category && category.id ? category.id : undefined;
84
+ this.iabId = category?.id ? category.id : undefined;
85
85
  },
86
86
  fetch(podcasts: Array<Podcast>): void {
87
87
  this.$emit('fetch', podcasts);
@@ -42,7 +42,7 @@
42
42
  <div
43
43
  v-show="!playingPodcast"
44
44
  :title="$t('Play')"
45
- class="saooti-play2-bounty primary-color"
45
+ class="saooti-play primary-color"
46
46
  />
47
47
  <div
48
48
  v-if="!classicPodcastPlay"
@@ -77,8 +77,8 @@
77
77
  </button>
78
78
  <div
79
79
  v-if="displayDescription && isMobile"
80
- class="background-icon primary-bg saooti-arrow-up2"
81
- :class="isDescription ? 'saooti-arrow-down2':'saooti-arrow-up2'"
80
+ class="background-icon primary-bg saooti-arrow-up"
81
+ :class="isDescription ? 'saooti-arrow-down':'saooti-arrow-up'"
82
82
  :title="isDescription ? $t('Hide description'):$t('Show description')"
83
83
  @click="showDescription"
84
84
  />
@@ -123,11 +123,7 @@ export default defineComponent({
123
123
  },
124
124
  }),
125
125
  mainRubrique(): boolean{
126
- if(this.podcast && this.podcast.rubriqueIds &&state.podcastPage.mainRubrique && this.podcast.rubriqueIds.includes(state.podcastPage.mainRubrique)){
127
- return true;
128
- }else{
129
- return false;
130
- }
126
+ return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && true==this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique);
131
127
  },
132
128
  isPodcastmaker(): boolean {
133
129
  return (state.generalParameters.podcastmaker as boolean);
@@ -181,24 +177,24 @@ export default defineComponent({
181
177
  },
182
178
  textVisible(): string {
183
179
  if (this.isLiveToBeRecorded)
184
- return this.$t('Podcast linked to waiting live').toString();
180
+ return this.$t('Podcast linked to waiting live');
185
181
  if ('READY' === this.podcast.processingStatus || this.fetchConference) {
186
- if (false == this.podcast.valid) return this.$t('Podcast to validate').toString();
182
+ if (false == this.podcast.valid) return this.$t('Podcast to validate');
187
183
  if (
188
184
  !this.podcast.availability.visibility &&
189
185
  this.podcast.availability.date
190
186
  )
191
- return this.$t('Podcast publish in future').toString();
192
- return this.$t('Podcast no visible').toString();
187
+ return this.$t('Podcast publish in future');
188
+ return this.$t('Podcast no visible');
193
189
  }
194
190
  if (
195
191
  'PLANNED' === this.podcast.processingStatus ||
196
192
  'PROCESSING' === this.podcast.processingStatus
197
193
  )
198
- return this.$t('Podcast in process').toString();
194
+ return this.$t('Podcast in process');
199
195
  if ('CANCELED' === this.podcast.processingStatus)
200
- return this.$t('Podcast in cancelled status').toString();
201
- return this.$t('Podcast in error').toString();
196
+ return this.$t('Podcast in cancelled status');
197
+ return this.$t('Podcast in error');
202
198
  },
203
199
  statusText(): string {
204
200
  if (!this.fetchConference) return '';
@@ -253,11 +249,7 @@ export default defineComponent({
253
249
  return;
254
250
  }
255
251
  if(this.playingPodcast){
256
- if("PLAYING"===this.$store.state.player.status){
257
- this.$store.commit('playerPause', true);
258
- }else{
259
- this.$store.commit('playerPause', false);
260
- }
252
+ this.$store.commit('playerPause', "PLAYING"===this.$store.state.player.status);
261
253
  return;
262
254
  }
263
255
  if (!this.recordingLive) {
@@ -267,7 +259,7 @@ export default defineComponent({
267
259
  title: this.podcast.title,
268
260
  audioUrl: this.podcast.audioUrl,
269
261
  duration: this.podcast.duration,
270
- conferenceId: this.fetchConference ? this.fetchConference.conferenceId : undefined,
262
+ conferenceId: this.fetchConference?.conferenceId,
271
263
  livePodcastId: this.podcast.podcastId,
272
264
  organisation: this.podcast.organisation,
273
265
  });
@@ -362,7 +354,7 @@ export default defineComponent({
362
354
  &:hover {
363
355
  background: #00000030;
364
356
  }
365
- > .saooti-play2-bounty {
357
+ > .saooti-play {
366
358
  font-size: 2em;
367
359
  position: relative;
368
360
  right: -0.2rem;
@@ -111,9 +111,7 @@ export default defineComponent({
111
111
  return this.$store.state.filter.organisationId;
112
112
  },
113
113
  organisation(): string|undefined {
114
- if (this.organisationId) return this.organisationId;
115
- if (this.filterOrga) return this.filterOrga;
116
- return undefined;
114
+ return this.organisationId ?? this.filterOrga;
117
115
  },
118
116
  previousAvailable(): boolean {
119
117
  return this.index > 0;
@@ -179,11 +177,7 @@ export default defineComponent({
179
177
  this.allPodcasts = this.allPodcasts.concat(
180
178
  data.result.filter((pod: Podcast|null) => null !== pod)
181
179
  );
182
- if (this.allPodcasts.length <= 3) {
183
- this.alignLeft = true;
184
- } else {
185
- this.alignLeft = false;
186
- }
180
+ this.alignLeft = this.allPodcasts.length <= 3;
187
181
  this.first += this.size;
188
182
  },
189
183
  displayPrevious(): void {
@@ -102,7 +102,7 @@ export default defineComponent({
102
102
 
103
103
  computed: {
104
104
  rubriqueQueryParam(): string|undefined{
105
- if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
105
+ if(this.$store.state.filter?.rubriqueFilter?.length){
106
106
  return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
107
107
  }
108
108
  return undefined;
@@ -119,7 +119,7 @@ export default defineComponent({
119
119
  return {
120
120
  name: 'podcasts',
121
121
  query: { productor: this.$store.state.filter.organisationId,
122
- iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
122
+ iabId:this.$store.state.filter.iab?.id,
123
123
  rubriquesId: this.rubriqueQueryParam },
124
124
  };
125
125
  },
@@ -88,7 +88,7 @@ export default defineComponent({
88
88
  return moment(this.podcast.pubDate).format('X');
89
89
  },
90
90
  description(): string {
91
- return this.podcast.description ? this.podcast.description : '';
91
+ return this.podcast.description ?? '';
92
92
  },
93
93
  },
94
94
 
@@ -96,10 +96,7 @@ export default defineComponent({
96
96
  if(!this.podcastItemDescription){return}
97
97
  const podcastDesc = (this.$refs.descriptionPodcast as HTMLElement);
98
98
  const podcastDescContainer = (this.$refs.descriptionPodcastContainer as HTMLElement);
99
- if (
100
- null !== podcastDesc && null !== podcastDescContainer &&
101
- podcastDesc.clientHeight > podcastDescContainer.clientHeight
102
- ) {
99
+ if (podcastDesc?.clientHeight > podcastDescContainer?.clientHeight) {
103
100
  this.isDescriptionBig = true;
104
101
  }
105
102
  },
@@ -46,7 +46,7 @@
46
46
  </router-link>
47
47
  <span
48
48
  v-if="editRight && podcastOrder && podcastOrder > 1"
49
- class="saooti-pin-octopus text-danger pe-2"
49
+ class="saooti-pin text-danger pe-2"
50
50
  />
51
51
  </div>
52
52
  </div>
@@ -91,13 +91,8 @@ export default defineComponent({
91
91
  return moment(this.pubDate).format('D MMMM YYYY, HH[h]mm');
92
92
  },
93
93
  editRight(): boolean {
94
- if (
95
- (this.authenticated &&
96
- this.myOrganisationId === this.podcastOrganisationId) ||
97
- state.generalParameters.isAdmin
98
- )
99
- return true;
100
- return false;
94
+ return (true===this.authenticated && this.myOrganisationId === this.podcastOrganisationId) ||
95
+ true===state.generalParameters.isAdmin
101
96
  },
102
97
  durationString(): string {
103
98
  if (this.duration <= 1) return '';
@@ -143,7 +138,7 @@ export default defineComponent({
143
138
  .text-secondary {
144
139
  margin: 0.5rem !important;
145
140
  }
146
- .saooti-pin-octopus {
141
+ .saooti-pin {
147
142
  font-size: 22px;
148
143
  }
149
144
  .title-podcast-item {
@@ -96,14 +96,10 @@ export default defineComponent({
96
96
  ${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.notValid}`;
97
97
  },
98
98
  organisation(): string|undefined {
99
- if (this.organisationId) return this.organisationId;
100
- if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
101
- return undefined;
99
+ return this.organisationId ?? this.$store.state.filter.organisationId;
102
100
  },
103
101
  sort(): string {
104
- if (this.popularSort) return "POPULARITY";
105
- if (this.sortCriteria) return this.sortCriteria;
106
- return 'DATE';
102
+ return this.popularSort? "POPULARITY" : this.sortCriteria??'DATE';
107
103
  },
108
104
  sortText(): string {
109
105
  switch (this.sortCriteria) {
@@ -155,14 +151,10 @@ export default defineComponent({
155
151
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
156
152
  rubriqueId: this.rubriqueId.length ? this.rubriqueId : undefined,
157
153
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
158
- includeHidden: this.includeHidden
154
+ includeHidden: this.includeHidden,
155
+ validity: undefined !== this.notValid?!this.notValid: undefined,
156
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.profile.userId:undefined
159
157
  };
160
- if (undefined !== this.notValid) {
161
- param.validity = !this.notValid;
162
- }
163
- if (this.notValid && !(state.generalParameters.isProduction as boolean)) {
164
- param.publisherId = this.$store.state.profile.userId;
165
- }
166
158
  try {
167
159
  const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
168
160
  this.afterFetching(reset, data);
@@ -167,10 +167,7 @@ export default defineComponent({
167
167
  if('ERROR' === this.podcast?.processingStatus){
168
168
  return this.$t('Podcast in ERROR, please contact Saooti');
169
169
  }
170
- if(this.podcastNotValid){
171
- return this.$t('Podcast not validated');
172
- }
173
- return '';
170
+ return this.podcastNotValid ? this.$t('Podcast not validated') : '';
174
171
  },
175
172
  isPodcastmaker(): boolean {
176
173
  return (state.generalParameters.podcastmaker as boolean);
@@ -197,23 +194,17 @@ export default defineComponent({
197
194
  });
198
195
  },
199
196
  editRight(): boolean {
200
- if ( this.podcast &&
201
- (this.authenticated &&
202
- this.myOrganisationId === this.podcast.organisation.id) ||
203
- state.generalParameters.isAdmin
204
- )
205
- return true;
206
- return false;
197
+ return (true===this.authenticated &&
198
+ this.myOrganisationId === this.podcast?.organisation.id) ||true===state.generalParameters.isAdmin
207
199
  },
208
200
  isLiveReadyToRecord(): boolean {
209
201
  return (undefined!==this.podcast && undefined!==this.podcast.conferenceId && 0 !== this.podcast.conferenceId && 'READY_TO_RECORD' === this.podcast.processingStatus);
210
202
  },
211
203
  isLiveReady(): boolean {
212
204
  return (
213
- undefined!==this.podcast &&
214
- undefined!==this.podcast.conferenceId &&
215
- 0 !== this.podcast.conferenceId &&
216
- 'READY' === this.podcast.processingStatus
205
+ undefined!==this.podcast?.conferenceId &&
206
+ 0 !== this.podcast?.conferenceId &&
207
+ 'READY' === this.podcast?.processingStatus
217
208
  );
218
209
  },
219
210
  isNotRecorded(): boolean {
@@ -231,13 +222,7 @@ export default defineComponent({
231
222
  );
232
223
  },
233
224
  podcastNotValid(): boolean {
234
- if (
235
- this.podcast &&
236
- this.podcast.availability &&
237
- false === this.podcast.valid
238
- )
239
- return true;
240
- return false;
225
+ return undefined!==this.podcast?.availability && false === this.podcast?.valid;
241
226
  },
242
227
  },
243
228
  methods: {
@@ -48,14 +48,13 @@ export default defineComponent({
48
48
  return (state.emissionsPage.progressBar as boolean);
49
49
  },
50
50
  percentProgress(): number{
51
- if(!this.$store.state.player.podcast || this.podcastId !== this.$store.state.player.podcast.podcastId){
51
+ if(this.podcastId !== this.$store.state.player.podcast?.podcastId){
52
52
  return 0;
53
53
  }
54
- if(!this.$store.state.player.elapsed){return 0;}
55
- return this.$store.state.player.elapsed * 100;
54
+ return !this.$store.state.player.elapsed ? 0 : this.$store.state.player.elapsed * 100;
56
55
  },
57
56
  playedTime(): string{
58
- if(this.$store.state.player.podcast && this.podcastId === this.$store.state.player.podcast.podcastId){
57
+ if(this.podcastId === this.$store.state.player.podcast?.podcastId){
59
58
  if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0) {
60
59
  return DurationHelper.formatDuration(
61
60
  Math.round(this.$store.state.player.elapsed * this.$store.state.player.total)
@@ -95,9 +95,7 @@ export default defineComponent({
95
95
  return this.$store.state.filter.organisationId;
96
96
  },
97
97
  organisation(): string|undefined {
98
- if (this.organisationId) return this.organisationId;
99
- if (this.filterOrga) return this.filterOrga;
100
- return undefined;
98
+ return this.organisationId ?? this.filterOrga;
101
99
  },
102
100
  watchVariable():string{
103
101
  return `${this.emissionId}|${this.organisationId}|${this.filterOrga}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
@@ -60,7 +60,7 @@
60
60
  {{ $t('No elements found. Consider changing the search query.') }}
61
61
  </template>
62
62
  <template #caret>
63
- <span class="saooti-arrow_down octopus-arrow-down" />
63
+ <span class="saooti-down octopus-arrow-down" />
64
64
  </template>
65
65
  </VueMultiselect>
66
66
  </div>
@@ -110,15 +110,11 @@ export default defineComponent({
110
110
  },
111
111
  computed: {
112
112
  id(): string {
113
- if (this.rubriquageId) return 'rubriqueChooser' + this.rubriquageId;
114
- return 'rubriqueChooser';
113
+ return this.rubriquageId? 'rubriqueChooser' + this.rubriquageId : 'rubriqueChooser';
115
114
  },
116
115
  model: {
117
116
  get(): Rubrique| Array<Rubrique>|undefined{
118
- if(false===this.multiple){
119
- return this.rubrique;
120
- }
121
- return this.rubriqueForArray;
117
+ return false===this.multiple ? this.rubrique:this.rubriqueForArray;
122
118
  },
123
119
  set(value: Rubrique| Array<Rubrique>|undefined): void{
124
120
  if(false===this.multiple){
@@ -181,11 +177,8 @@ export default defineComponent({
181
177
  rubriqueDefault,
182
178
  this.withoutItem,
183
179
  ].concat(this.allRubriques);
184
- } else {
185
- return [rubriqueDefault].concat(
186
- this.allRubriques
187
- );
188
180
  }
181
+ return [rubriqueDefault].concat(this.allRubriques);
189
182
  },
190
183
  onOpen(): void {
191
184
  (this.$refs.multiselectRef as VueMultiselect).$refs.search.setAttribute(
@@ -200,11 +193,7 @@ export default defineComponent({
200
193
  this.initRubriqueSelected(this.rubriqueSelected);
201
194
  return;
202
195
  }
203
- if ('' !== this.defaultanswer) {
204
- this.rubrique = getDefaultRubrique(this.defaultanswer);
205
- } else {
206
- this.rubrique = undefined;
207
- }
196
+ this.rubrique ='' !== this.defaultanswer? getDefaultRubrique(this.defaultanswer): undefined;
208
197
  this.onRubriqueSelected(this.rubrique);
209
198
  },
210
199
  onSearchRubrique(query: string): void {
@@ -121,8 +121,8 @@ export default defineComponent({
121
121
  addFilter(rubrique: Rubrique): void{
122
122
  if(!this.rubriquage){ return ;}
123
123
  const filterToAdd = {
124
- rubriquageId: this.rubriquage.rubriquageId?this.rubriquage.rubriquageId: 0,
125
- rubriqueId: rubrique.rubriqueId? rubrique.rubriqueId:0,
124
+ rubriquageId: this.rubriquage.rubriquageId??0,
125
+ rubriqueId: rubrique.rubriqueId??0,
126
126
  nameRubriquage: this.rubriquage.title,
127
127
  nameRubrique: rubrique.name
128
128
  };