@saooti/octopus-sdk 31.0.34 → 31.0.37
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/index.ts +8 -2
- package/package.json +1 -1
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/src/assets/bootstrap-diff.scss +25 -24
- package/src/assets/general.scss +57 -2
- package/src/assets/modal.scss +5 -4
- package/src/assets/share.scss +2 -0
- package/src/components/display/categories/CategoryFilter.vue +12 -26
- package/src/components/display/categories/CategoryList.vue +14 -20
- package/src/components/display/comments/AddCommentModal.vue +19 -36
- package/src/components/display/comments/CommentBasicView.vue +2 -5
- package/src/components/display/comments/CommentInput.vue +8 -21
- package/src/components/display/comments/CommentItem.vue +1 -1
- package/src/components/display/comments/CommentList.vue +10 -21
- package/src/components/display/comments/CommentPlayer.vue +0 -3
- package/src/components/display/comments/CommentSection.vue +6 -14
- package/src/components/display/emission/EmissionInlineList.vue +5 -10
- package/src/components/display/emission/EmissionItem.vue +5 -10
- package/src/components/display/emission/EmissionList.vue +66 -68
- package/src/components/display/filter/AdvancedSearch.vue +19 -45
- package/src/components/display/filter/CategoryFilter.vue +11 -20
- package/src/components/display/filter/MonetizableFilter.vue +7 -14
- package/src/components/display/filter/ProductorSearch.vue +69 -78
- package/src/components/display/filter/RubriqueChoice.vue +1 -4
- package/src/components/display/filter/RubriqueFilter.vue +1 -5
- package/src/components/display/list/ListPaginate.vue +150 -0
- package/src/components/display/list/Paginate.vue +219 -0
- package/src/components/display/live/LiveHorizontalList.vue +56 -40
- package/src/components/display/organisation/OrganisationChooser.vue +7 -12
- package/src/components/display/participant/ParticipantItem.vue +6 -17
- package/src/components/display/participant/ParticipantList.vue +53 -46
- package/src/components/display/playlist/PlaylistItem.vue +1 -4
- package/src/components/display/playlist/PlaylistList.vue +60 -63
- package/src/components/display/playlist/PodcastList.vue +74 -101
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -28
- package/src/components/display/podcasts/ParticipantDescription.vue +3 -11
- package/src/components/display/podcasts/PodcastFilterList.vue +8 -16
- package/src/components/display/podcasts/PodcastImage.vue +86 -92
- package/src/components/display/podcasts/PodcastItem.vue +1 -2
- package/src/components/display/podcasts/PodcastItemInfo.vue +10 -10
- package/src/components/display/podcasts/PodcastList.vue +61 -81
- package/src/components/display/podcasts/PodcastModuleBox.vue +19 -25
- package/src/components/display/podcasts/PodcastSwiperList.vue +2 -3
- package/src/components/display/podcasts/TagList.vue +0 -2
- package/src/components/display/sharing/QrCode.vue +2 -11
- package/src/components/display/sharing/ShareButtons.vue +44 -329
- package/src/components/display/sharing/ShareButtonsIntern.vue +209 -0
- package/src/components/display/sharing/SharePlayer.vue +21 -53
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +46 -39
- package/src/components/misc/Footer.vue +1 -4
- package/src/components/misc/HomeDropdown.vue +26 -24
- package/src/components/misc/LeftMenu.vue +3 -7
- package/src/components/misc/TopBar.vue +9 -16
- package/src/components/misc/modal/ClipboardModal.vue +1 -1
- package/src/components/misc/modal/MessageModal.vue +1 -1
- package/src/components/misc/modal/QrCodeModal.vue +1 -1
- package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
- package/src/components/mixins/organisationFilter.ts +6 -0
- package/src/components/mixins/player/playerLive.ts +1 -1
- package/src/components/pages/Category.vue +1 -1
- package/src/components/pages/Emission.vue +0 -6
- package/src/components/pages/Emissions.vue +1 -1
- package/src/components/pages/Error403Page.vue +44 -8
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +0 -15
- package/src/components/pages/Participants.vue +1 -1
- package/src/components/pages/Playlist.vue +2 -2
- package/src/components/pages/Playlists.vue +1 -1
- package/src/components/pages/Podcast.vue +1 -3
- package/src/components/pages/Podcasts.vue +11 -8
- package/src/components/pages/Rubrique.vue +1 -1
- package/src/locale/de.ts +3 -0
- package/src/locale/en.ts +9 -0
- package/src/locale/es.ts +3 -0
- package/src/locale/fr.ts +10 -1
- package/src/locale/it.ts +3 -0
- package/src/locale/sl.ts +3 -0
- package/src/router/router.ts +2 -0
- package/src/sass/_variables.scss +0 -1
- package/src/store/class/general/playlist.ts +1 -1
- package/src/store/paramStore.ts +7 -11
- package/src/store/typeAppStore.ts +20 -2
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
class="img-box"
|
|
9
9
|
:alt="$t('Episode name image', {name:podcast.title})"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</template>
|
|
11
|
+
<div
|
|
12
|
+
v-if="isPodcastmaker"
|
|
13
|
+
:class="mainRubrique? 'mainRubrique' : 'notMainRubrique'"
|
|
14
|
+
/>
|
|
16
15
|
<div
|
|
17
16
|
v-if="fetchConference"
|
|
18
17
|
class="live-image-status"
|
|
@@ -77,15 +76,10 @@
|
|
|
77
76
|
</div>
|
|
78
77
|
</div>
|
|
79
78
|
<div
|
|
80
|
-
v-if="
|
|
79
|
+
v-if="displayDescription && isMobile"
|
|
81
80
|
class="background-icon primary-bg saooti-arrow-up2"
|
|
82
|
-
:
|
|
83
|
-
|
|
84
|
-
/>
|
|
85
|
-
<div
|
|
86
|
-
v-if="isDescription && displayDescription && isMobile"
|
|
87
|
-
class="background-icon primary-bg saooti-arrow-down2"
|
|
88
|
-
:title="$t('Hide description')"
|
|
81
|
+
:class="isDescription ? 'saooti-arrow-down2':'saooti-arrow-up2'"
|
|
82
|
+
:title="isDescription ? $t('Hide description'):$t('Show description')"
|
|
89
83
|
@click="showDescription"
|
|
90
84
|
/>
|
|
91
85
|
</div>
|
|
@@ -210,21 +204,21 @@ export default defineComponent({
|
|
|
210
204
|
if (!this.fetchConference) return '';
|
|
211
205
|
switch (this.fetchConference.status) {
|
|
212
206
|
case 'PLANNED':
|
|
213
|
-
return this.$t('live in few time')
|
|
207
|
+
return this.$t('live in few time');
|
|
214
208
|
case 'PENDING':
|
|
215
|
-
if (this.isAnimatorLive) return this.$t('Open studio')
|
|
216
|
-
return this.$t('live upcoming')
|
|
209
|
+
if (this.isAnimatorLive) return this.$t('Open studio');
|
|
210
|
+
return this.$t('live upcoming');
|
|
217
211
|
case 'RECORDING':
|
|
218
|
-
return this.$t('In live')
|
|
212
|
+
return this.$t('In live');
|
|
219
213
|
case 'DEBRIEFING':
|
|
220
214
|
if (!this.isAnimatorLive) return '';
|
|
221
215
|
if ('READY_TO_RECORD' === this.podcast.processingStatus)
|
|
222
|
-
return this.$t('Not recording')
|
|
223
|
-
return this.$t('Debriefing')
|
|
216
|
+
return this.$t('Not recording');
|
|
217
|
+
return this.$t('Debriefing');
|
|
224
218
|
case 'ERROR':
|
|
225
|
-
return this.$t('In error')
|
|
219
|
+
return this.$t('In error');
|
|
226
220
|
case 'PUBLISHING':
|
|
227
|
-
return this.$t('Publishing')
|
|
221
|
+
return this.$t('Publishing');
|
|
228
222
|
default:
|
|
229
223
|
return '';
|
|
230
224
|
}
|
|
@@ -297,83 +291,83 @@ export default defineComponent({
|
|
|
297
291
|
|
|
298
292
|
<style lang="scss">
|
|
299
293
|
.octopus-app{
|
|
300
|
-
.live-image-status {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.background-icon{
|
|
311
|
-
border-radius: 50%;
|
|
312
|
-
width: 1rem;
|
|
313
|
-
height: 1rem;
|
|
314
|
-
font-size: 1rem;
|
|
315
|
-
right: 0;
|
|
316
|
-
bottom: 0;
|
|
317
|
-
margin: 5px;
|
|
318
|
-
position: absolute;
|
|
319
|
-
cursor: pointer;
|
|
320
|
-
z-index: 3;
|
|
321
|
-
}
|
|
322
|
-
.special-icon-play-button {
|
|
323
|
-
width: 30px;
|
|
324
|
-
height: 30px;
|
|
325
|
-
background-color: #ffd663;
|
|
326
|
-
border-radius: 50%;
|
|
327
|
-
position: absolute;
|
|
328
|
-
right: 4.5rem;
|
|
329
|
-
top: 6rem;
|
|
330
|
-
font-size: 0.9rem;
|
|
331
|
-
font-weight: bold;
|
|
332
|
-
display: flex;
|
|
333
|
-
align-items: center;
|
|
334
|
-
justify-content: center;
|
|
335
|
-
}
|
|
336
|
-
.transparent-background {
|
|
337
|
-
background-color: rgba(255, 255, 255, 0.5);
|
|
338
|
-
}
|
|
339
|
-
.podcast-image-play-button {
|
|
340
|
-
position: absolute;
|
|
341
|
-
display: flex;
|
|
342
|
-
align-items: center;
|
|
343
|
-
justify-content: center;
|
|
344
|
-
top: 0;
|
|
345
|
-
left: 0;
|
|
346
|
-
right: 0;
|
|
347
|
-
bottom: 0;
|
|
348
|
-
cursor: pointer;
|
|
349
|
-
flex-direction: column;
|
|
294
|
+
.live-image-status {
|
|
295
|
+
text-align: center;
|
|
296
|
+
width: 100%;
|
|
297
|
+
font-size: 0.6rem;
|
|
298
|
+
padding: 0.2rem 0;
|
|
299
|
+
color: white;
|
|
300
|
+
text-transform: uppercase;
|
|
301
|
+
position: absolute;
|
|
302
|
+
}
|
|
350
303
|
|
|
351
|
-
.icon
|
|
352
|
-
|
|
304
|
+
.background-icon{
|
|
305
|
+
border-radius: 50%;
|
|
306
|
+
width: 1rem;
|
|
307
|
+
height: 1rem;
|
|
308
|
+
font-size: 1rem;
|
|
309
|
+
right: 0;
|
|
310
|
+
bottom: 0;
|
|
311
|
+
margin: 5px;
|
|
312
|
+
position: absolute;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
z-index: 3;
|
|
315
|
+
}
|
|
316
|
+
.special-icon-play-button {
|
|
317
|
+
width: 30px;
|
|
318
|
+
height: 30px;
|
|
319
|
+
background-color: #ffd663;
|
|
353
320
|
border-radius: 50%;
|
|
354
|
-
|
|
355
|
-
|
|
321
|
+
position: absolute;
|
|
322
|
+
right: 4.5rem;
|
|
323
|
+
top: 6rem;
|
|
324
|
+
font-size: 0.9rem;
|
|
325
|
+
font-weight: bold;
|
|
356
326
|
display: flex;
|
|
357
327
|
align-items: center;
|
|
358
328
|
justify-content: center;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
329
|
+
}
|
|
330
|
+
.transparent-background {
|
|
331
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
332
|
+
}
|
|
333
|
+
.podcast-image-play-button {
|
|
334
|
+
position: absolute;
|
|
335
|
+
display: flex;
|
|
336
|
+
align-items: center;
|
|
337
|
+
justify-content: center;
|
|
338
|
+
top: 0;
|
|
339
|
+
left: 0;
|
|
340
|
+
right: 0;
|
|
341
|
+
bottom: 0;
|
|
342
|
+
cursor: pointer;
|
|
343
|
+
flex-direction: column;
|
|
344
|
+
|
|
345
|
+
.icon-container {
|
|
346
|
+
background: #00000050;
|
|
347
|
+
border-radius: 50%;
|
|
348
|
+
height: 3rem;
|
|
349
|
+
width: 3rem;
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
&.error-icon {
|
|
354
|
+
background: #00000050 !important;
|
|
355
|
+
cursor: default !important;
|
|
356
|
+
}
|
|
357
|
+
&:hover {
|
|
358
|
+
background: #00000030;
|
|
359
|
+
}
|
|
360
|
+
> .saooti-play2-bounty {
|
|
361
|
+
font-size: 2em;
|
|
362
|
+
position: relative;
|
|
363
|
+
right: -0.2rem;
|
|
364
|
+
}
|
|
365
|
+
.big-icon-error {
|
|
366
|
+
font-size: 2em;
|
|
367
|
+
position: relative;
|
|
368
|
+
}
|
|
369
|
+
z-index: 2;
|
|
374
370
|
}
|
|
375
|
-
z-index: 2;
|
|
376
371
|
}
|
|
377
372
|
}
|
|
378
|
-
}
|
|
379
373
|
</style>
|
|
@@ -84,8 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
return moment(this.podcast.pubDate).format('X');
|
|
85
85
|
},
|
|
86
86
|
description(): string {
|
|
87
|
-
|
|
88
|
-
return this.podcast.description;
|
|
87
|
+
return this.podcast.description ? this.podcast.description : '';
|
|
89
88
|
},
|
|
90
89
|
},
|
|
91
90
|
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
{{ durationString }}
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<AnimatorsItem
|
|
14
|
+
<AnimatorsItem
|
|
15
|
+
v-if="animators && 0!==animators.length"
|
|
16
|
+
:animator="animators[0]"
|
|
17
|
+
/>
|
|
15
18
|
<router-link
|
|
16
19
|
:to="{
|
|
17
20
|
name: 'podcast',
|
|
18
21
|
params: { podcastId: podcastId },
|
|
19
|
-
query: { productor:
|
|
22
|
+
query: { productor: filterOrga },
|
|
20
23
|
}"
|
|
21
24
|
class="text-dark d-flex flex-column flex-grow-1"
|
|
22
25
|
>
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
:to="{
|
|
36
39
|
name: 'productor',
|
|
37
40
|
params: { productorId: podcastOrganisationId },
|
|
38
|
-
query: { productor:
|
|
41
|
+
query: { productor: filterOrga },
|
|
39
42
|
}"
|
|
40
43
|
class="text-dark producer-podcast-item"
|
|
41
44
|
>
|
|
@@ -52,6 +55,7 @@
|
|
|
52
55
|
<script lang="ts">
|
|
53
56
|
import AnimatorsItem from './AnimatorsItem.vue';
|
|
54
57
|
import { state } from '../../../store/paramStore';
|
|
58
|
+
import { orgaComputed } from '../../mixins/orgaComputed';
|
|
55
59
|
import moment from 'moment';
|
|
56
60
|
// @ts-ignore
|
|
57
61
|
import humanizeDuration from 'humanize-duration';
|
|
@@ -66,6 +70,8 @@ export default defineComponent({
|
|
|
66
70
|
PodcastPlayBar
|
|
67
71
|
},
|
|
68
72
|
|
|
73
|
+
mixins:[orgaComputed],
|
|
74
|
+
|
|
69
75
|
props: {
|
|
70
76
|
podcastId: { default: undefined, type: Number},
|
|
71
77
|
title: { default: "", type: String},
|
|
@@ -84,16 +90,10 @@ export default defineComponent({
|
|
|
84
90
|
date(): string {
|
|
85
91
|
return moment(this.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
86
92
|
},
|
|
87
|
-
organisationId(): string|undefined {
|
|
88
|
-
return state.generalParameters.organisationId;
|
|
89
|
-
},
|
|
90
|
-
authenticated(): boolean {
|
|
91
|
-
return (state.generalParameters.authenticated as boolean);
|
|
92
|
-
},
|
|
93
93
|
editRight(): boolean {
|
|
94
94
|
if (
|
|
95
95
|
(this.authenticated &&
|
|
96
|
-
this.
|
|
96
|
+
this.myOrganisationId === this.podcastOrganisationId) ||
|
|
97
97
|
state.generalParameters.isAdmin
|
|
98
98
|
)
|
|
99
99
|
return true;
|
|
@@ -1,68 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<ListPaginate
|
|
3
|
+
id="podcastListPaginate"
|
|
4
|
+
v-model:first="dfirst"
|
|
5
|
+
v-model:rowsPerPage="dsize"
|
|
6
|
+
v-model:isMobile="isMobile"
|
|
7
|
+
:text-count="showCount && podcasts.length > 1 ? $t('Number podcasts', { nb: totalCount }) + sortText : undefined"
|
|
8
|
+
:total-count="totalCount"
|
|
9
|
+
:loading="loading"
|
|
10
|
+
:loading-text="loading?$t('Loading podcasts ...'):undefined"
|
|
11
|
+
:error-text="!loading && !podcasts.length?$t(`No podcast match your query`):undefined"
|
|
12
|
+
>
|
|
13
|
+
<template #list>
|
|
14
14
|
<ul
|
|
15
15
|
class="podcast-list"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
18
|
-
v-for="p in
|
|
17
|
+
<template
|
|
18
|
+
v-for="p in displayArray"
|
|
19
19
|
:key="p.podcastId"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class="btn"
|
|
26
|
-
:class="buttonPlus ? 'btn-primary align-self-center width-fit-content m-4' : 'btn-more'"
|
|
27
|
-
:disabled="inFetching"
|
|
28
|
-
:title="$t('See more')"
|
|
29
|
-
@click="displayMore"
|
|
30
|
-
>
|
|
31
|
-
<template v-if="buttonPlus">
|
|
32
|
-
{{ $t('See more') }}
|
|
20
|
+
>
|
|
21
|
+
<PodcastItem
|
|
22
|
+
v-if="-1!==p.podcastId"
|
|
23
|
+
:podcast="p"
|
|
24
|
+
/>
|
|
33
25
|
</template>
|
|
34
|
-
|
|
35
|
-
:class="buttonPlus?'ms-1':''"
|
|
36
|
-
class="saooti-more"
|
|
37
|
-
/>
|
|
38
|
-
</button>
|
|
26
|
+
</ul>
|
|
39
27
|
</template>
|
|
40
|
-
</
|
|
28
|
+
</ListPaginate>
|
|
41
29
|
</template>
|
|
42
30
|
|
|
43
31
|
<script lang="ts">
|
|
32
|
+
import ListPaginate from '../list/ListPaginate.vue';
|
|
44
33
|
import { handle403 } from '../../mixins/handle403';
|
|
45
34
|
import octopusApi from '@saooti/octopus-api';
|
|
46
35
|
import PodcastItem from './PodcastItem.vue';
|
|
47
36
|
import { state } from '../../../store/paramStore';
|
|
48
|
-
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
49
37
|
import { Podcast } from '@/store/class/general/podcast';
|
|
50
38
|
import { defineComponent } from 'vue'
|
|
51
39
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
52
40
|
import { AxiosError } from 'axios';
|
|
41
|
+
import { emptyPodcastData } from '@/store/typeAppStore';
|
|
53
42
|
export default defineComponent({
|
|
54
43
|
name: 'PodcastList',
|
|
55
44
|
|
|
56
45
|
components: {
|
|
57
46
|
PodcastItem,
|
|
58
|
-
|
|
47
|
+
ListPaginate
|
|
59
48
|
},
|
|
60
49
|
|
|
61
50
|
mixins: [handle403],
|
|
62
51
|
|
|
63
52
|
props: {
|
|
64
53
|
first: { default: 0, type: Number},
|
|
65
|
-
size: { default:
|
|
54
|
+
size: { default: 30, type: Number},
|
|
66
55
|
organisationId: { default: undefined, type: String},
|
|
67
56
|
emissionId: { default: undefined, type: Number},
|
|
68
57
|
iabId: { default: undefined, type: Number},
|
|
@@ -86,33 +75,29 @@ export default defineComponent({
|
|
|
86
75
|
data() {
|
|
87
76
|
return {
|
|
88
77
|
loading: true as boolean,
|
|
89
|
-
loaded: false as boolean,
|
|
90
78
|
dfirst: this.first as number,
|
|
91
79
|
dsize: this.size as number,
|
|
92
80
|
totalCount: 0 as number,
|
|
93
81
|
podcasts: [] as Array<Podcast>,
|
|
94
|
-
|
|
82
|
+
isMobile: false as boolean,
|
|
95
83
|
};
|
|
96
84
|
},
|
|
97
85
|
|
|
98
86
|
computed: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
|
|
87
|
+
displayArray(): Array<Podcast>{
|
|
88
|
+
if(this.isMobile){
|
|
89
|
+
return this.podcasts;
|
|
90
|
+
}
|
|
91
|
+
return this.podcasts.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
|
|
92
|
+
},
|
|
105
93
|
changed(): string {
|
|
106
94
|
return `${this.first}|${this.size}|${this.organisation}|${this.emissionId}|${this.sortCriteria}|${this.sort}
|
|
107
95
|
${this.iabId}|${this.participantId}|${this.query}|${this.monetization}|${this.popularSort}|
|
|
108
96
|
${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.notValid}`;
|
|
109
97
|
},
|
|
110
|
-
filterOrga(): string {
|
|
111
|
-
return this.$store.state.filter.organisationId;
|
|
112
|
-
},
|
|
113
98
|
organisation(): string|undefined {
|
|
114
99
|
if (this.organisationId) return this.organisationId;
|
|
115
|
-
if (this.
|
|
100
|
+
if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
|
|
116
101
|
return undefined;
|
|
117
102
|
},
|
|
118
103
|
sort(): string {
|
|
@@ -122,40 +107,39 @@ export default defineComponent({
|
|
|
122
107
|
},
|
|
123
108
|
sortText(): string {
|
|
124
109
|
switch (this.sortCriteria) {
|
|
125
|
-
case 'SCORE':
|
|
126
|
-
|
|
127
|
-
case '
|
|
128
|
-
|
|
129
|
-
case 'NAME':
|
|
130
|
-
return " "+this.$t('sort by alphabetical').toString();
|
|
131
|
-
default:
|
|
132
|
-
return " "+this.$t('sort by date').toString();
|
|
110
|
+
case 'SCORE':return " "+this.$t('sort by score');
|
|
111
|
+
case 'DATE':return " "+this.$t('sort by date');
|
|
112
|
+
case 'NAME':return " "+this.$t('sort by alphabetical');
|
|
113
|
+
default:return " "+this.$t('sort by date');
|
|
133
114
|
}
|
|
134
115
|
},
|
|
135
|
-
isProduction(): boolean {
|
|
136
|
-
return (state.generalParameters.isProduction as boolean);
|
|
137
|
-
},
|
|
138
116
|
},
|
|
139
117
|
watch: {
|
|
140
118
|
changed(): void {
|
|
141
|
-
this.
|
|
119
|
+
this.reloadList();
|
|
142
120
|
},
|
|
143
121
|
reload(): void {
|
|
144
|
-
this.
|
|
122
|
+
this.reloadList();
|
|
145
123
|
},
|
|
124
|
+
dsize():void{
|
|
125
|
+
this.reloadList();
|
|
126
|
+
},
|
|
127
|
+
dfirst(): void{
|
|
128
|
+
if(!this.podcasts[this.dfirst] || -1===this.podcasts[this.dfirst].podcastId){
|
|
129
|
+
this.fetchContent(false);
|
|
130
|
+
}
|
|
131
|
+
},
|
|
146
132
|
},
|
|
147
|
-
|
|
148
133
|
async created() {
|
|
149
134
|
await this.fetchContent(true);
|
|
150
135
|
},
|
|
151
136
|
methods: {
|
|
137
|
+
reloadList(){
|
|
138
|
+
this.dfirst = 0;
|
|
139
|
+
this.fetchContent(true);
|
|
140
|
+
},
|
|
152
141
|
async fetchContent(reset: boolean): Promise<void> {
|
|
153
|
-
this.
|
|
154
|
-
if (reset) {
|
|
155
|
-
this.dfirst = 0;
|
|
156
|
-
this.loading = true;
|
|
157
|
-
this.loaded = false;
|
|
158
|
-
}
|
|
142
|
+
this.loading = true;
|
|
159
143
|
const param: FetchParam = {
|
|
160
144
|
first: this.dfirst,
|
|
161
145
|
size: this.dsize,
|
|
@@ -176,7 +160,7 @@ export default defineComponent({
|
|
|
176
160
|
if (undefined !== this.notValid) {
|
|
177
161
|
param.validity = !this.notValid;
|
|
178
162
|
}
|
|
179
|
-
if (this.notValid && !
|
|
163
|
+
if (this.notValid && !(state.generalParameters.isProduction as boolean)) {
|
|
180
164
|
param.publisherId = this.$store.state.profile.userId;
|
|
181
165
|
}
|
|
182
166
|
try {
|
|
@@ -189,26 +173,22 @@ export default defineComponent({
|
|
|
189
173
|
afterFetching(reset: boolean, data: {count: number, result: Array<Podcast>, sort: string}): void {
|
|
190
174
|
if (reset) {
|
|
191
175
|
this.podcasts.length = 0;
|
|
192
|
-
this.dfirst = 0;
|
|
193
|
-
this.loading = true;
|
|
194
|
-
this.loaded = false;
|
|
195
176
|
}
|
|
196
|
-
this.
|
|
197
|
-
|
|
198
|
-
|
|
177
|
+
if(this.dfirst > this.podcasts.length){
|
|
178
|
+
for (let i = this.podcasts.length-1, len = this.dfirst + this.dsize; i < len; i++) {
|
|
179
|
+
this.podcasts.push(emptyPodcastData());
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const responsePodcasts= data.result.filter((p: Podcast|null) => {
|
|
199
183
|
return null !== p;
|
|
200
184
|
});
|
|
185
|
+
this.podcasts = this.podcasts.slice(0, this.dfirst).concat(responsePodcasts).concat(this.podcasts.slice(this.dfirst+this.dsize, this.podcasts.length));
|
|
201
186
|
this.$emit('fetch', this.podcasts);
|
|
202
|
-
this.dfirst += this.dsize;
|
|
203
187
|
this.totalCount = data.count;
|
|
204
188
|
if (0 === this.podcasts.length) {
|
|
205
189
|
this.$emit('emptyList');
|
|
206
190
|
}
|
|
207
|
-
this.
|
|
208
|
-
},
|
|
209
|
-
displayMore(event: { preventDefault: () => void }): void {
|
|
210
|
-
event.preventDefault();
|
|
211
|
-
this.fetchContent(false);
|
|
191
|
+
this.loading = false;
|
|
212
192
|
},
|
|
213
193
|
},
|
|
214
194
|
})
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
name: 'emission',
|
|
61
61
|
params: { emissionId: podcast.emission.emissionId },
|
|
62
62
|
query: {
|
|
63
|
-
productor:
|
|
63
|
+
productor: filterOrga,
|
|
64
64
|
},
|
|
65
65
|
}"
|
|
66
66
|
>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
name: 'productor',
|
|
76
76
|
params: { productorId: podcast.organisation.id },
|
|
77
77
|
query: {
|
|
78
|
-
productor:
|
|
78
|
+
productor: filterOrga,
|
|
79
79
|
},
|
|
80
80
|
}"
|
|
81
81
|
>
|
|
@@ -107,16 +107,8 @@
|
|
|
107
107
|
{{ $t('From RSS') }}
|
|
108
108
|
</div>
|
|
109
109
|
<ErrorMessage
|
|
110
|
-
v-if="
|
|
111
|
-
:message="
|
|
112
|
-
/>
|
|
113
|
-
<ErrorMessage
|
|
114
|
-
v-if="'ERROR' === podcast.processingStatus"
|
|
115
|
-
:message="$t('Podcast in ERROR, please contact Saooti')"
|
|
116
|
-
/>
|
|
117
|
-
<ErrorMessage
|
|
118
|
-
v-if="podcastNotValid"
|
|
119
|
-
:message="$t('Podcast not validated')"
|
|
110
|
+
v-if="''!==errorMessage"
|
|
111
|
+
:message="errorMessage"
|
|
120
112
|
/>
|
|
121
113
|
</div>
|
|
122
114
|
</div>
|
|
@@ -138,6 +130,7 @@ import moment from 'moment';
|
|
|
138
130
|
// @ts-ignore
|
|
139
131
|
import humanizeDuration from 'humanize-duration';
|
|
140
132
|
import { displayMethods } from '../../mixins/functions';
|
|
133
|
+
import { orgaComputed } from '../../mixins/orgaComputed';
|
|
141
134
|
import { Podcast } from '@/store/class/general/podcast';
|
|
142
135
|
import { Conference } from '@/store/class/conference/conference';
|
|
143
136
|
|
|
@@ -153,7 +146,7 @@ export default defineComponent({
|
|
|
153
146
|
PodcastPlayBar
|
|
154
147
|
},
|
|
155
148
|
|
|
156
|
-
mixins:[displayMethods],
|
|
149
|
+
mixins:[displayMethods, orgaComputed],
|
|
157
150
|
|
|
158
151
|
props: {
|
|
159
152
|
playingPodcast: { default: undefined, type: Object as ()=> Podcast},
|
|
@@ -163,21 +156,22 @@ export default defineComponent({
|
|
|
163
156
|
|
|
164
157
|
emits: ['playPodcast'],
|
|
165
158
|
|
|
166
|
-
data() {
|
|
167
|
-
return {
|
|
168
|
-
};
|
|
169
|
-
},
|
|
170
|
-
|
|
171
159
|
computed: {
|
|
160
|
+
errorMessage(): string{
|
|
161
|
+
if(!this.podcast?.availability.visibility){
|
|
162
|
+
return this.$t('Podcast is not visible for listeners');
|
|
163
|
+
}
|
|
164
|
+
if('ERROR' === this.podcast?.processingStatus){
|
|
165
|
+
return this.$t('Podcast in ERROR, please contact Saooti');
|
|
166
|
+
}
|
|
167
|
+
if(this.podcastNotValid){
|
|
168
|
+
return this.$t('Podcast not validated');
|
|
169
|
+
}
|
|
170
|
+
return '';
|
|
171
|
+
},
|
|
172
172
|
isPodcastmaker(): boolean {
|
|
173
173
|
return (state.generalParameters.podcastmaker as boolean);
|
|
174
174
|
},
|
|
175
|
-
organisationId(): string|undefined {
|
|
176
|
-
return state.generalParameters.organisationId;
|
|
177
|
-
},
|
|
178
|
-
authenticated(): boolean {
|
|
179
|
-
return (state.generalParameters.authenticated as boolean);
|
|
180
|
-
},
|
|
181
175
|
date(): string {
|
|
182
176
|
if (this.podcast && 1970 !== moment(this.podcast.pubDate).year()){
|
|
183
177
|
return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
@@ -202,7 +196,7 @@ export default defineComponent({
|
|
|
202
196
|
editRight(): boolean {
|
|
203
197
|
if ( this.podcast &&
|
|
204
198
|
(this.authenticated &&
|
|
205
|
-
this.
|
|
199
|
+
this.myOrganisationId === this.podcast.organisation.id) ||
|
|
206
200
|
state.generalParameters.isAdmin
|
|
207
201
|
)
|
|
208
202
|
return true;
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
:loop="true"
|
|
25
25
|
:navigation="true"
|
|
26
26
|
:modules="modules"
|
|
27
|
-
class="mySwiper"
|
|
28
27
|
>
|
|
29
28
|
<swiper-slide
|
|
30
29
|
v-for="p in allPodcasts"
|
|
@@ -129,13 +128,14 @@ export default defineComponent({
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
mounted() {
|
|
131
|
+
this.handleResize();
|
|
132
132
|
this.fetchNext();
|
|
133
133
|
},
|
|
134
134
|
methods: {
|
|
135
135
|
handleResize(): void {
|
|
136
136
|
if (!this.$el) return;
|
|
137
137
|
const width = (this.$el as HTMLElement).offsetWidth;
|
|
138
|
-
const sixteen = domHelper.convertRemToPixels(this.sizeItem +
|
|
138
|
+
const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.5);
|
|
139
139
|
this.numberItem = Math.floor(width / sixteen);
|
|
140
140
|
},
|
|
141
141
|
async fetchNext(): Promise<void> {
|
|
@@ -182,7 +182,6 @@ export default defineComponent({
|
|
|
182
182
|
.swiper {
|
|
183
183
|
width: 100%;
|
|
184
184
|
height: 100%;
|
|
185
|
-
padding: 50px 20px;
|
|
186
185
|
}
|
|
187
186
|
.swiper-button-next, .swiper-button-prev{
|
|
188
187
|
color: $octopus-primary-color !important;
|