@saooti/octopus-sdk 32.0.1 → 32.0.4
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.
- package/README.md +6 -1
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/assets/bootstrap-diff.scss +1 -0
- package/src/assets/multiselect.scss +11 -0
- package/src/components/display/comments/AddCommentModal.vue +1 -3
- package/src/components/display/comments/CommentInput.vue +14 -30
- package/src/components/display/comments/CommentItem.vue +5 -12
- package/src/components/display/comments/CommentList.vue +7 -14
- package/src/components/display/comments/CommentPlayer.vue +1 -4
- package/src/components/display/edit/EditCommentBox.vue +1 -1
- package/src/components/display/emission/EmissionChooser.vue +4 -18
- package/src/components/display/emission/EmissionInlineList.vue +1 -6
- package/src/components/display/emission/EmissionItem.vue +3 -10
- package/src/components/display/emission/EmissionList.vue +6 -13
- package/src/components/display/emission/EmissionPlayerItem.vue +3 -11
- package/src/components/display/filter/AdvancedSearch.vue +5 -13
- package/src/components/display/filter/RubriqueFilter.vue +1 -3
- package/src/components/display/list/ListPaginate.vue +1 -6
- package/src/components/display/live/LiveItem.vue +6 -17
- package/src/components/display/live/LiveList.vue +12 -16
- package/src/components/display/organisation/OrganisationChooser.vue +2 -6
- package/src/components/display/organisation/OrganisationChooserLight.vue +1 -5
- package/src/components/display/participant/ParticipantItem.vue +4 -9
- package/src/components/display/participant/ParticipantList.vue +1 -3
- package/src/components/display/playlist/PlaylistItem.vue +6 -16
- package/src/components/display/playlist/PlaylistList.vue +2 -5
- package/src/components/display/playlist/PodcastList.vue +3 -7
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +2 -9
- package/src/components/display/podcasts/AnimatorsItem.vue +1 -1
- package/src/components/display/podcasts/ParticipantDescription.vue +1 -1
- package/src/components/display/podcasts/PodcastFilterList.vue +1 -1
- package/src/components/display/podcasts/PodcastImage.vue +10 -18
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +2 -8
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +2 -2
- package/src/components/display/podcasts/PodcastItem.vue +2 -5
- package/src/components/display/podcasts/PodcastItemInfo.vue +2 -7
- package/src/components/display/podcasts/PodcastList.vue +5 -13
- package/src/components/display/podcasts/PodcastModuleBox.vue +7 -22
- package/src/components/display/podcasts/PodcastPlayBar.vue +3 -4
- package/src/components/display/podcasts/PodcastSwiperList.vue +1 -3
- package/src/components/display/rubriques/RubriqueChooser.vue +4 -15
- package/src/components/display/rubriques/RubriqueList.vue +2 -2
- package/src/components/display/sharing/QrCode.vue +1 -1
- package/src/components/display/sharing/ShareButtons.vue +4 -0
- package/src/components/display/sharing/ShareButtonsIntern.vue +5 -1
- package/src/components/display/sharing/ShareDistribution.vue +26 -95
- package/src/components/display/sharing/SharePlayer.vue +6 -14
- package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
- package/src/components/display/sharing/SubscribeButtons.vue +2 -4
- package/src/components/form/ClassicSearch.vue +2 -2
- package/src/components/form/ClassicSelect.vue +1 -1
- package/src/components/misc/Footer.vue +2 -2
- package/src/components/misc/LeftMenu.vue +3 -3
- package/src/components/misc/TopBar.vue +7 -11
- package/src/components/misc/modal/NewsletterModal.vue +140 -128
- package/src/components/misc/player/Player.vue +1 -1
- package/src/components/misc/player/PlayerCompact.vue +1 -1
- package/src/components/misc/player/PlayerTimeline.vue +0 -5
- package/src/components/pages/Emission.vue +14 -33
- package/src/components/pages/Emissions.vue +6 -15
- package/src/components/pages/Home.vue +1 -4
- package/src/components/pages/Lives.vue +3 -11
- package/src/components/pages/PageNotFound.vue +2 -2
- package/src/components/pages/Participant.vue +8 -23
- package/src/components/pages/Participants.vue +3 -6
- package/src/components/pages/Playlist.vue +7 -13
- package/src/components/pages/Playlists.vue +2 -3
- package/src/components/pages/Podcast.vue +15 -51
- package/src/components/pages/Podcasts.vue +7 -16
- package/src/components/pages/Search.vue +3 -6
- package/public/img/article.png +0 -0
|
@@ -21,16 +21,26 @@
|
|
|
21
21
|
<h4 class="mb-3">
|
|
22
22
|
{{ $t('Configuration') }}
|
|
23
23
|
</h4>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
<label for="share-url-newsletter">{{$t('Share')}}</label>
|
|
25
|
+
<input
|
|
26
|
+
v-model="shareUrl"
|
|
27
|
+
id="share-url-newsletter"
|
|
28
|
+
class="form-input mb-2"
|
|
29
|
+
type="text"
|
|
30
|
+
:class="{ 'border border-danger': 0 === shareUrl }"
|
|
31
|
+
>
|
|
32
|
+
<template v-if="podcast">
|
|
33
|
+
<ClassicCheckbox
|
|
34
|
+
v-model:textInit="displayEmissionName"
|
|
35
|
+
id-checkbox="display-emission-name"
|
|
36
|
+
:label="$t('Display emission name')"
|
|
37
|
+
/>
|
|
38
|
+
<ClassicCheckbox
|
|
39
|
+
v-model:textInit="displayParticipantsNames"
|
|
40
|
+
id-checkbox="display-participants-names"
|
|
41
|
+
:label="$t('Display participants list')"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
34
44
|
<div class="d-flex align-items-center mt-2">
|
|
35
45
|
<VSwatches
|
|
36
46
|
v-model="color"
|
|
@@ -101,6 +111,9 @@ import { Podcast } from '@/store/class/general/podcast';
|
|
|
101
111
|
import { state } from '../../../store/paramStore';
|
|
102
112
|
import { defineComponent } from 'vue'
|
|
103
113
|
import SnackbarVue from '../../misc/Snackbar.vue';
|
|
114
|
+
import octopusApi from '@saooti/octopus-api';
|
|
115
|
+
import { Emission } from '@/store/class/general/emission';
|
|
116
|
+
import { Playlist } from '@/store/class/general/playlist';
|
|
104
117
|
export default defineComponent({
|
|
105
118
|
name: 'NewsletterModal',
|
|
106
119
|
|
|
@@ -113,7 +126,9 @@ export default defineComponent({
|
|
|
113
126
|
mixins: [displayMethods],
|
|
114
127
|
|
|
115
128
|
props: {
|
|
116
|
-
podcast: { default:
|
|
129
|
+
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
130
|
+
emission: { default: undefined, type: Object as ()=> Emission},
|
|
131
|
+
playlist: { default: undefined, type: Object as ()=>Playlist},
|
|
117
132
|
},
|
|
118
133
|
|
|
119
134
|
emits: ['close'],
|
|
@@ -123,164 +138,150 @@ export default defineComponent({
|
|
|
123
138
|
displayParticipantsNames: true as boolean,
|
|
124
139
|
displayEmissionName: true as boolean,
|
|
125
140
|
color: '#40a372' as string,
|
|
126
|
-
|
|
141
|
+
shareUrl: window.location.href as string,
|
|
142
|
+
|
|
127
143
|
};
|
|
128
144
|
},
|
|
129
145
|
|
|
130
146
|
computed: {
|
|
131
|
-
|
|
132
|
-
|
|
147
|
+
date(): string {
|
|
148
|
+
if(!this.podcast || 1970 === moment(this.podcast.pubDate).year()){return '';}
|
|
149
|
+
return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
150
|
+
},
|
|
151
|
+
duration(): string {
|
|
152
|
+
if (!this.podcast || this.podcast.duration <= 1) return '';
|
|
153
|
+
if (this.podcast.duration > 600000) {
|
|
154
|
+
return humanizeDuration(this.podcast.duration, {
|
|
155
|
+
language: this.$i18n.locale,
|
|
156
|
+
largest: 1,
|
|
157
|
+
round: true,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return humanizeDuration(this.podcast.duration, {
|
|
161
|
+
language: this.$i18n.locale,
|
|
162
|
+
largest: 2,
|
|
163
|
+
round: true,
|
|
164
|
+
});
|
|
133
165
|
},
|
|
134
166
|
emissionName(): string {
|
|
135
|
-
if (this.displayEmissionName)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
`</td></tr>`
|
|
140
|
-
);
|
|
141
|
-
return '';
|
|
167
|
+
if (!this.displayEmissionName || !this.podcast){return ''}
|
|
168
|
+
return (
|
|
169
|
+
`<tr><td colspan="2" style="font-size: 16px;line-height:24px;font-weight: bold;">${this.podcast.emission.name}</td></tr>`
|
|
170
|
+
);
|
|
142
171
|
},
|
|
143
172
|
articleHtml(): string{
|
|
144
|
-
if(this.podcast
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
`">
|
|
150
|
-
<img width="44" height="44" style="display: inline-block;vertical-align: middle; margin-right:3px" src="` +
|
|
151
|
-
this.resourcesUrl + `/img/article.png">
|
|
152
|
-
</a>
|
|
153
|
-
<a style="color: #000;text-decoration: none;" href="` +
|
|
154
|
-
this.podcast.article +
|
|
155
|
-
`">` +
|
|
156
|
-
this.$t('See associated article') +
|
|
157
|
-
`</a>`);
|
|
158
|
-
}
|
|
159
|
-
return '';
|
|
173
|
+
if (!this.podcast?.article ||0 === this.podcast.article?.length){return ''}
|
|
174
|
+
return (`<a href="${this.podcast.article}" title="${this.$t('See associated article')}">
|
|
175
|
+
<img width="44" height="44" style="display: inline-block;vertical-align: middle; margin-right:3px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA6UlEQVRIie3WPUpEMRTF8R9+4QpEBGttrcdeV+E2pp3KdYi7GBRttNVCZgOCjSuQ+UCLJzLIe7l3HpFpPJAuOf+T5F4SYh3jFZ/JMVlevJUwv8c+HvEQzD/FIBEaHOFtKdkosWb0PfdHGwXzOxxk03SpDVDNvA1Q1bwNcFMwn/cB/K6iQ+3VMsVVDQDcylVMSl1VBOea5FFjTXHWZVJqtCdcYjcI+YHnPoB3FY6qdERVVNrBHi6wGXgscK3Z8UqAE80dbAeAGV4wXhUwxk5gHurP72CtgP9Gw5oabYBhT7/wwZ/If09S35Yv52lVAXwyqt0AAAAASUVORK5CYII=">
|
|
176
|
+
</a>
|
|
177
|
+
<a style="color: #000;text-decoration: none;" href="${this.podcast.article}">${this.$t('See associated article')}</a>`);
|
|
160
178
|
},
|
|
161
179
|
participantsName(): string {
|
|
162
|
-
if (!this.displayParticipantsNames || !this.podcast.animators) return '';
|
|
180
|
+
if (!this.displayParticipantsNames || !this.podcast || !this.podcast.animators) return '';
|
|
163
181
|
const text = [''];
|
|
164
182
|
this.podcast.animators.forEach((element: Participant) => {
|
|
165
183
|
text.push(
|
|
166
184
|
`<table width='100%' style="width:100%;background: #f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-bottom-left-radius: 1.5em;border-bottom-right-radius: 1.5em;">
|
|
167
185
|
<tr>
|
|
168
186
|
<td width="90" rowspan="2" style="text-align:left; vertical-align: top; width: 90px;padding:0 15px 15px 10px">
|
|
169
|
-
<img width="72" style="width: 62px;height: 62px;border-radius: 50%;background-color: #fff;" src="
|
|
170
|
-
element.imageUrl +
|
|
171
|
-
`" alt="` +
|
|
172
|
-
this.$t('Animator image') +
|
|
173
|
-
`">
|
|
187
|
+
<img width="72" style="width: 62px;height: 62px;border-radius: 50%;background-color: #fff;" src="${element.imageUrl}" alt="${this.$t('Animator image')}">
|
|
174
188
|
</td>
|
|
175
|
-
<td height="1" style="height: 1px;text-align:left; font-size: 14px;line-height:20px;vertical-align: top;font-weight: bold;padding-top: 23px;"
|
|
176
|
-
this.getName(element) +
|
|
177
|
-
`</td>
|
|
189
|
+
<td height="1" style="height: 1px;text-align:left; font-size: 14px;line-height:20px;vertical-align: top;font-weight: bold;padding-top: 23px;">${this.getName(element)}</td>
|
|
178
190
|
</tr>`
|
|
179
191
|
);
|
|
180
192
|
if (element.description) {
|
|
181
193
|
text.push(
|
|
182
|
-
`<tr>
|
|
183
|
-
|
|
184
|
-
` +
|
|
185
|
-
element.description +
|
|
186
|
-
`
|
|
187
|
-
</td>
|
|
188
|
-
</tr>`
|
|
194
|
+
`<tr><td style="height: 100%;text-align:justify;padding-bottom: 15px;padding-right: 15px; font-size: 12px;line-height:16px;vertical-align: top">
|
|
195
|
+
${element.description}</td></tr>`
|
|
189
196
|
);
|
|
190
197
|
}
|
|
191
198
|
text.push(`</table>`);
|
|
192
199
|
});
|
|
193
200
|
return text.join('');
|
|
194
201
|
},
|
|
202
|
+
imageUrl():string{
|
|
203
|
+
if(this.podcast){
|
|
204
|
+
return `${this.podcast.imageUrl}" alt="${this.$t('Podcast image')}`;
|
|
205
|
+
}
|
|
206
|
+
if(this.emission){
|
|
207
|
+
return `${this.emission.imageUrl}" alt="${this.$t('Emission image')}`;
|
|
208
|
+
}
|
|
209
|
+
if(this.playlist){
|
|
210
|
+
return `${this.playlist.imageUrl}" alt="${this.$t('Playlist image')}`;
|
|
211
|
+
}
|
|
212
|
+
return '';
|
|
213
|
+
},
|
|
214
|
+
title():string{
|
|
215
|
+
if(this.podcast){
|
|
216
|
+
return this.podcast.title;
|
|
217
|
+
}
|
|
218
|
+
if(this.emission){
|
|
219
|
+
return this.emission.name;
|
|
220
|
+
}
|
|
221
|
+
if(this.playlist){
|
|
222
|
+
return this.playlist.title;
|
|
223
|
+
}
|
|
224
|
+
return '';
|
|
225
|
+
},
|
|
226
|
+
description():string{
|
|
227
|
+
if (this.podcast && this.podcast.description) {
|
|
228
|
+
return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.podcast.description}</td></tr>`;
|
|
229
|
+
}
|
|
230
|
+
if(this.emission && this.emission.description){
|
|
231
|
+
return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.emission.description}</td></tr>`;
|
|
232
|
+
}
|
|
233
|
+
if(this.playlist && this.playlist.description){
|
|
234
|
+
return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.playlist.description}</td></tr>`;
|
|
235
|
+
}
|
|
236
|
+
return '';
|
|
237
|
+
},
|
|
238
|
+
shareText():string{
|
|
239
|
+
if (this.podcast) {
|
|
240
|
+
return this.$t('Listen this episode');
|
|
241
|
+
}
|
|
242
|
+
if (this.emission) {
|
|
243
|
+
return this.$t('All podcast emission button');
|
|
244
|
+
}
|
|
245
|
+
return this.$t('Podcasts in the playlist');
|
|
246
|
+
},
|
|
247
|
+
durationPodcast():string{
|
|
248
|
+
if(!this.podcast){return ''}
|
|
249
|
+
return `<td colspan="2" style="height: 1px;color: #666;font-size: 12px;line-height: 16px;padding-top:15px;">
|
|
250
|
+
<span>${this.date}</span>
|
|
251
|
+
<span style="padding: 0 10px">${this.$t('Duration', { duration: this.duration })}</span>
|
|
252
|
+
</td>`;
|
|
253
|
+
},
|
|
195
254
|
newsletterHtml(): string {
|
|
196
255
|
const html = [
|
|
197
256
|
`<table width='100%' style="width:100%;background:#f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-top-left-radius: 1.5em;border-top-right-radius: 1.5em;">
|
|
198
|
-
|
|
257
|
+
<tr>
|
|
199
258
|
<td valign="top" rowspan="4" style="vertical-align: top; padding: 10px;">
|
|
200
|
-
<img width="140" height="140" src="
|
|
201
|
-
this.podcast.imageUrl +
|
|
202
|
-
`" alt="` +
|
|
203
|
-
this.$t('Podcast image') +
|
|
204
|
-
`" style="width: 140px;border-radius: 16px; box-shadow: 0px 12px 48px 6px rgba(64, 163, 114, 0.2);">
|
|
205
|
-
</td>
|
|
206
|
-
<td colspan="2" style="height: 1px;color: #666;font-size: 12px;line-height: 16px;padding-top:15px;">
|
|
207
|
-
<span>` +
|
|
208
|
-
this.date +
|
|
209
|
-
`</span> <span style="padding: 0 10px">` +
|
|
210
|
-
this.$t('Duration', { duration: this.duration }) +
|
|
211
|
-
`</span>
|
|
259
|
+
<img width="140" height="140" src="${this.imageUrl}" style="width: 140px;border-radius: 16px; box-shadow: 0px 12px 48px 6px rgba(64, 163, 114, 0.2);">
|
|
212
260
|
</td>
|
|
261
|
+
${this.durationPodcast}
|
|
213
262
|
</tr>
|
|
214
263
|
<tr>
|
|
215
|
-
<td colspan="2" valign="top" style="line-height:24px;color:
|
|
216
|
-
this.
|
|
217
|
-
`;font-size: 17px;text-transform: uppercase;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 400px;padding-top: 0.5em;">
|
|
218
|
-
` +
|
|
219
|
-
this.podcast.title +
|
|
220
|
-
`
|
|
264
|
+
<td colspan="2" valign="top" style="line-height:24px;color: ${this.color};font-size: 17px;text-transform: uppercase;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 400px;padding-top: 0.5em;">
|
|
265
|
+
${this.title}
|
|
221
266
|
</td>
|
|
222
267
|
</tr>
|
|
223
|
-
|
|
224
|
-
this.emissionName,
|
|
268
|
+
${this.emissionName},${this.description}`
|
|
225
269
|
];
|
|
226
|
-
if (this.podcast.description) {
|
|
227
|
-
html.push(
|
|
228
|
-
`<tr>
|
|
229
|
-
<td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">
|
|
230
|
-
` +
|
|
231
|
-
this.podcast.description +
|
|
232
|
-
`
|
|
233
|
-
</td>
|
|
234
|
-
</tr>`
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
270
|
html.push(
|
|
238
|
-
|
|
239
|
-
</table>
|
|
271
|
+
`</table>
|
|
240
272
|
<div style="font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;background: #f3f3f3;vertical-align: middle;padding: 15px 10px;display: flex; align-items:center; flex-wrap:wrap">
|
|
241
|
-
<a href="
|
|
242
|
-
window.location.href +
|
|
243
|
-
`" title="` +
|
|
244
|
-
this.$t('Listen this episode') +
|
|
245
|
-
`">
|
|
273
|
+
<a href="${this.shareUrl}">
|
|
246
274
|
<img width="44" height="44" style="display: inline-block;vertical-align: middle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAAxElEQVRIie3WMWpCURBG4Q8FSRrtbC2SPhvICmzchVuwtXQLbsE2pVUIkjqQHVgqNmIj6EvxGHhFQAIvcxt/OPVhhrlzh3sKZ4MvTLLFVYNPvJYQB294LiGucMYSw2xxcMQcj9niYIsputni4BvjEuJgjZcS4goXrDDKFgcnLDDIFgd7zNDLFgfvTUHnL23ISJuV7iS3Ooarn1VxkeeUvkDSV2b6J3FQT+pDW8Jb4vRD4Kqe1Kf/Ev4mTj32PhQ6b+9pPT+XHgysHrPM6QAAAABJRU5ErkJggg=="/>
|
|
247
275
|
</a>
|
|
248
|
-
<a style="color: #000;text-decoration: none; margin-right:8px" href="
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
this.$t('Listen this episode') +
|
|
252
|
-
`</a>` + this.articleHtml + `
|
|
253
|
-
</div>
|
|
254
|
-
` +
|
|
255
|
-
this.participantsName
|
|
276
|
+
<a style="color: #000;text-decoration: none; margin-right:8px" href="${this.shareUrl}">${this.shareText}</a>
|
|
277
|
+
${this.articleHtml}
|
|
278
|
+
</div>${this.participantsName}`
|
|
256
279
|
);
|
|
257
280
|
return html.join('');
|
|
258
281
|
},
|
|
259
|
-
|
|
260
|
-
date(): string {
|
|
261
|
-
if (1970 !== moment(this.podcast.pubDate).year()){
|
|
262
|
-
return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
263
|
-
}
|
|
264
|
-
return '';
|
|
265
|
-
},
|
|
266
|
-
duration(): string {
|
|
267
|
-
if (this.podcast.duration <= 1) return '';
|
|
268
|
-
if (this.podcast.duration > 600000) {
|
|
269
|
-
return humanizeDuration(this.podcast.duration, {
|
|
270
|
-
language: this.$i18n.locale,
|
|
271
|
-
largest: 1,
|
|
272
|
-
round: true,
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
return humanizeDuration(this.podcast.duration, {
|
|
276
|
-
language: this.$i18n.locale,
|
|
277
|
-
largest: 2,
|
|
278
|
-
round: true,
|
|
279
|
-
});
|
|
280
|
-
},
|
|
281
282
|
},
|
|
282
283
|
created(){
|
|
283
|
-
this.
|
|
284
|
+
this.initData();
|
|
284
285
|
},
|
|
285
286
|
methods: {
|
|
286
287
|
closePopup(event: { preventDefault: () => void }): void {
|
|
@@ -288,9 +289,7 @@ export default defineComponent({
|
|
|
288
289
|
this.$emit('close');
|
|
289
290
|
},
|
|
290
291
|
getName(person: Participant): string {
|
|
291
|
-
|
|
292
|
-
const last = person.lastName || '';
|
|
293
|
-
return (first + ' ' + last).trim();
|
|
292
|
+
return (`${person.firstName??''} ${person.lastName??''}`).trim();
|
|
294
293
|
},
|
|
295
294
|
selectAll(element: Event): void {
|
|
296
295
|
const target = element.target;
|
|
@@ -302,11 +301,24 @@ export default defineComponent({
|
|
|
302
301
|
afterCopy(): void{
|
|
303
302
|
(this.$refs.snackbar as InstanceType<typeof SnackbarVue>).open(this.$t('Data in clipboard'));
|
|
304
303
|
},
|
|
305
|
-
|
|
304
|
+
async initData(): Promise<void> {
|
|
305
|
+
let attributes;
|
|
306
|
+
if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
307
|
+
attributes = this.$store.state.organisation.attributes;
|
|
308
|
+
}else{
|
|
309
|
+
attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
|
|
310
|
+
}
|
|
311
|
+
if (Object.prototype.hasOwnProperty.call(attributes,'podcastmakerUrl')) {
|
|
312
|
+
this.shareUrl = attributes.podcastmakerUrl + window.location.pathname+window.location.search;
|
|
313
|
+
}
|
|
306
314
|
if(state.generalParameters.podcastmaker && state.generalParameters.podcastmakerColor){
|
|
307
315
|
this.color = state.generalParameters.podcastmakerColor;
|
|
316
|
+
return;
|
|
308
317
|
}
|
|
309
|
-
|
|
318
|
+
if (Object.prototype.hasOwnProperty.call(attributes,'COLOR')) {
|
|
319
|
+
this.color = attributes.COLOR;
|
|
320
|
+
}
|
|
321
|
+
},
|
|
310
322
|
},
|
|
311
323
|
})
|
|
312
324
|
</script>
|
|
@@ -142,42 +142,27 @@ export default defineComponent({
|
|
|
142
142
|
return (state.generalParameters.podcastmaker as boolean);
|
|
143
143
|
},
|
|
144
144
|
rssUrl(): string {
|
|
145
|
-
return state.generalParameters.ApiUri
|
|
145
|
+
return `${state.generalParameters.ApiUri}rss/emission/${this.emissionId}`;
|
|
146
146
|
},
|
|
147
147
|
name(): string {
|
|
148
|
-
return this.emission
|
|
148
|
+
return this.emission?.name??'';
|
|
149
149
|
},
|
|
150
150
|
imageUrl(): string {
|
|
151
|
-
return this.emission
|
|
152
|
-
? this.emission.imageUrl + '?dummy=' + this.dummyParam
|
|
153
|
-
: '';
|
|
151
|
+
return this.emission? `${this.emission.imageUrl}?dummy=${this.dummyParam}`:'';
|
|
154
152
|
},
|
|
155
153
|
description(): string {
|
|
156
|
-
return this.emission
|
|
154
|
+
return this.emission?.description??'';
|
|
157
155
|
},
|
|
158
156
|
editRight(): boolean {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
state.generalParameters.isAdmin
|
|
162
|
-
){
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
return false;
|
|
157
|
+
return (true===this.authenticated && this.myOrganisationId === this.emission?.orga.id) ||
|
|
158
|
+
true===state.generalParameters.isAdmin
|
|
166
159
|
},
|
|
167
160
|
countLink(): number {
|
|
161
|
+
const platformShare = ['amazon','googlePodcasts','applePodcast', 'deezer', 'spotify', 'tunein',
|
|
162
|
+
'radioline', 'podcastAddict', 'playerFm', 'stitcher', 'pocketCasts'];
|
|
168
163
|
let count = 0;
|
|
169
|
-
|
|
170
|
-
if (undefined !== this.emission
|
|
171
|
-
if (undefined !== this.emission.annotations.applePodcast) count++;
|
|
172
|
-
if (undefined !== this.emission.annotations.deezer) count++;
|
|
173
|
-
if (undefined !== this.emission.annotations.googlePodcasts) count++;
|
|
174
|
-
if (undefined !== this.emission.annotations.spotify) count++;
|
|
175
|
-
if (undefined !== this.emission.annotations.tunein) count++;
|
|
176
|
-
if (undefined !== this.emission.annotations.radioline) count++;
|
|
177
|
-
if (undefined !== this.emission.annotations.podcastAddict) count++;
|
|
178
|
-
if (undefined !== this.emission.annotations.playerFm) count++;
|
|
179
|
-
if (undefined !== this.emission.annotations.stitcher) count++;
|
|
180
|
-
if (undefined !== this.emission.annotations.pocketCasts) count++;
|
|
164
|
+
for (let i = 0, len = platformShare.length; i < len; i++) {
|
|
165
|
+
if (undefined !== this.emission?.annotations?.[platformShare[i]]) count++;
|
|
181
166
|
}
|
|
182
167
|
return count;
|
|
183
168
|
},
|
|
@@ -200,22 +185,18 @@ export default defineComponent({
|
|
|
200
185
|
this.rssEmission = this.emission.annotations.RSS? true: false;
|
|
201
186
|
this.ftpEmission = this.emission.annotations.FTP? true: false;
|
|
202
187
|
if (this.emission.annotations.exclusive) {
|
|
203
|
-
this.exclusive =
|
|
204
|
-
|
|
205
|
-
this.exclusive =
|
|
206
|
-
this.exclusive && this.myOrganisationId !== this.emission.orga.id;
|
|
188
|
+
this.exclusive ='true' === this.emission.annotations.exclusive;
|
|
189
|
+
this.exclusive =this.exclusive && this.myOrganisationId !== this.emission.orga.id;
|
|
207
190
|
}
|
|
208
191
|
if (this.emission.annotations.notExclusive) {
|
|
209
|
-
this.notExclusive =
|
|
210
|
-
'true' === this.emission.annotations.notExclusive ? true : false;
|
|
192
|
+
this.notExclusive ='true' === this.emission.annotations.notExclusive;
|
|
211
193
|
}
|
|
212
194
|
},
|
|
213
195
|
async getEmissionDetails(): Promise<void> {
|
|
214
196
|
this.loaded = false;
|
|
215
197
|
this.error = false;
|
|
216
198
|
try {
|
|
217
|
-
|
|
218
|
-
this.emission = data;
|
|
199
|
+
this.emission = await octopusApi.fetchData<Emission>(0,'emission/'+this.emissionId);
|
|
219
200
|
if("PUBLIC"!==this.emission.orga.privacy && this.filterOrga!==this.emission.orga.id){
|
|
220
201
|
this.initError();
|
|
221
202
|
return;
|
|
@@ -86,26 +86,17 @@ export default defineComponent({
|
|
|
86
86
|
|
|
87
87
|
computed: {
|
|
88
88
|
titleDisplay(): string{
|
|
89
|
-
|
|
90
|
-
return this.$t('All emissions');
|
|
91
|
-
}
|
|
92
|
-
return state.emissionsPage.titlePage;
|
|
89
|
+
return state.emissionsPage.titlePage??this.$t('All emissions');
|
|
93
90
|
},
|
|
94
91
|
isProductorSearch(): boolean{
|
|
95
92
|
return (state.podcastsPage.ProductorSearch as boolean);
|
|
96
93
|
},
|
|
97
94
|
organisationRight(): boolean {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
state.generalParameters.isAdmin
|
|
101
|
-
)
|
|
102
|
-
return true;
|
|
103
|
-
return false;
|
|
95
|
+
return (true===this.authenticated && this.myOrganisationId === this.organisationId) ||
|
|
96
|
+
true===state.generalParameters.isAdmin
|
|
104
97
|
},
|
|
105
98
|
organisation(): string|undefined {
|
|
106
|
-
|
|
107
|
-
if (this.filterOrga) return this.filterOrga;
|
|
108
|
-
return undefined;
|
|
99
|
+
return this.organisationId??this.filterOrga;
|
|
109
100
|
},
|
|
110
101
|
},
|
|
111
102
|
|
|
@@ -114,8 +105,8 @@ export default defineComponent({
|
|
|
114
105
|
},
|
|
115
106
|
methods: {
|
|
116
107
|
initComponent(): void{
|
|
117
|
-
this.iabId =
|
|
118
|
-
this.organisationId = this.productor
|
|
108
|
+
this.iabId =this.$store.state.filter.iab?.id;
|
|
109
|
+
this.organisationId = this.productor?? this.filterOrga;
|
|
119
110
|
if (this.organisation && this.organisationRight) {
|
|
120
111
|
this.includeHidden = true;
|
|
121
112
|
}
|
|
@@ -51,10 +51,7 @@ export default defineComponent({
|
|
|
51
51
|
return this.$store.state.filter.rubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
|
|
52
52
|
},
|
|
53
53
|
rubriquageFilter(): Array<Rubriquage>{
|
|
54
|
-
|
|
55
|
-
return this.$store.state.filter.rubriquageArray;
|
|
56
|
-
}
|
|
57
|
-
return [];
|
|
54
|
+
return this.$store.state.filter.organisationId ? this.$store.state.filter.rubriquageArray :[];
|
|
58
55
|
},
|
|
59
56
|
rubriqueFilter(): Array<RubriquageFilter>{
|
|
60
57
|
return this.$store.state.filter.rubriqueFilter;
|
|
@@ -57,11 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
|
|
58
58
|
computed: {
|
|
59
59
|
liveRight(): boolean {
|
|
60
|
-
|
|
61
|
-
return false;
|
|
62
|
-
},
|
|
63
|
-
isRoleLive(): boolean {
|
|
64
|
-
return (state.generalParameters.isRoleLive as boolean);
|
|
60
|
+
return (state.generalParameters.isRoleLive as boolean)&& this.live;
|
|
65
61
|
},
|
|
66
62
|
filterOrga(): string {
|
|
67
63
|
return this.$store.state.filter.organisationId;
|
|
@@ -76,11 +72,7 @@ export default defineComponent({
|
|
|
76
72
|
} else if (this.$store.state.filter.organisationId) {
|
|
77
73
|
this.$emit('update:organisationId',this.$store.state.filter.organisationId);
|
|
78
74
|
}
|
|
79
|
-
if (
|
|
80
|
-
this.$store.state.organisation &&
|
|
81
|
-
this.$store.state.organisation.attributes &&
|
|
82
|
-
!this.$store.state.organisation.attributes['live.active']
|
|
83
|
-
) {
|
|
75
|
+
if (!this.$store.state.organisation?.attributes?.['live.active']) {
|
|
84
76
|
this.live = false;
|
|
85
77
|
}
|
|
86
78
|
},
|
|
@@ -89,7 +81,7 @@ export default defineComponent({
|
|
|
89
81
|
this.$emit('initConferenceIds', listIds);
|
|
90
82
|
},
|
|
91
83
|
onOrganisationSelected(organisation: Organisation|undefined): void {
|
|
92
|
-
this.$emit('update:organisationId', organisation
|
|
84
|
+
this.$emit('update:organisationId', organisation?.id);
|
|
93
85
|
},
|
|
94
86
|
},
|
|
95
87
|
})
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:to="{
|
|
12
12
|
name: 'home',
|
|
13
13
|
query: { productor: $store.state.filter.organisationId,
|
|
14
|
-
iabId
|
|
14
|
+
iabId:$store.state.filter.iab?.id,
|
|
15
15
|
rubriquesId: rubriqueQueryParam},
|
|
16
16
|
}"
|
|
17
17
|
>
|
|
@@ -28,7 +28,7 @@ export default defineComponent({
|
|
|
28
28
|
name: 'PageNotFound',
|
|
29
29
|
computed:{
|
|
30
30
|
rubriqueQueryParam(): string|undefined{
|
|
31
|
-
if(this.$store.state.filter
|
|
31
|
+
if(this.$store.state.filter?.rubriqueFilter?.length){
|
|
32
32
|
return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
|
|
33
33
|
}
|
|
34
34
|
return undefined;
|
|
@@ -96,10 +96,7 @@ export default defineComponent({
|
|
|
96
96
|
},
|
|
97
97
|
computed: {
|
|
98
98
|
titleDisplay(): string{
|
|
99
|
-
|
|
100
|
-
return this.$t('Animator');
|
|
101
|
-
}
|
|
102
|
-
return state.intervenantPage.titlePage;
|
|
99
|
+
return state.intervenantPage.titlePage??this.$t('Animator');
|
|
103
100
|
},
|
|
104
101
|
pageParameters(){
|
|
105
102
|
return {
|
|
@@ -109,30 +106,18 @@ export default defineComponent({
|
|
|
109
106
|
};
|
|
110
107
|
},
|
|
111
108
|
rssUrl(): string {
|
|
112
|
-
return state.generalParameters.ApiUri
|
|
109
|
+
return `${state.generalParameters.ApiUri}rss/participant/${this.participantId}`;
|
|
113
110
|
},
|
|
114
111
|
description(): string {
|
|
115
|
-
|
|
116
|
-
return this.participant.description || '';
|
|
112
|
+
return this.participant?.description ?? '';
|
|
117
113
|
},
|
|
118
114
|
name(): string {
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
(this.participant.firstName || '') +
|
|
122
|
-
' ' +
|
|
123
|
-
(this.participant.lastName || '')
|
|
124
|
-
).trim();
|
|
115
|
+
return (`${this.participant?.firstName??''} ${this.participant?.lastName??''}`).trim();
|
|
125
116
|
},
|
|
126
117
|
editRight(): boolean {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.myOrganisationId === this.participant.orga.id) ||
|
|
131
|
-
state.generalParameters.isAdmin
|
|
132
|
-
){
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
return false;
|
|
118
|
+
return (true===this.authenticated &&
|
|
119
|
+
this.myOrganisationId === this.participant?.orga?.id) ||
|
|
120
|
+
true===state.generalParameters.isAdmin
|
|
136
121
|
},
|
|
137
122
|
},
|
|
138
123
|
watch: {
|
|
@@ -158,7 +143,7 @@ export default defineComponent({
|
|
|
158
143
|
this.loaded = false;
|
|
159
144
|
try {
|
|
160
145
|
const data = await octopusApi.fetchData<Participant>(0, 'participant/'+this.participantId);
|
|
161
|
-
if(
|
|
146
|
+
if("PUBLIC"!==data?.orga?.privacy && this.filterOrga!==data?.orga?.id){
|
|
162
147
|
this.initError();
|
|
163
148
|
return;
|
|
164
149
|
}
|
|
@@ -37,20 +37,17 @@ export default defineComponent({
|
|
|
37
37
|
return {
|
|
38
38
|
first: 0 as number,
|
|
39
39
|
size: 30 as number,
|
|
40
|
-
searchPattern: '',
|
|
40
|
+
searchPattern: '' as string,
|
|
41
41
|
organisationId: undefined as string | undefined,
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
computed: {
|
|
45
45
|
titleDisplay(): string{
|
|
46
|
-
|
|
47
|
-
return this.$t('All participants');
|
|
48
|
-
}
|
|
49
|
-
return state.intervenantsPage.titlePage;
|
|
46
|
+
return state.intervenantsPage.titlePage ?? this.$t('All participants');
|
|
50
47
|
},
|
|
51
48
|
},
|
|
52
49
|
created() {
|
|
53
|
-
this.organisationId = this.productor
|
|
50
|
+
this.organisationId = this.productor??this.filterOrga;
|
|
54
51
|
},
|
|
55
52
|
})
|
|
56
53
|
</script>
|