@saooti/octopus-sdk 40.2.19 → 41.0.0
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/index.ts +2 -1
- package/package.json +4 -3
- package/src/App.vue +71 -95
- package/src/components/composable/player/usePlayerLive.ts +13 -4
- package/src/components/composable/player/usePlayerLogic.ts +6 -6
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/podcasts/usePodcastView.ts +3 -3
- package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +15 -8
- package/src/components/composable/useInit.ts +2 -2
- package/src/components/composable/useMetaTitleWatch.ts +2 -2
- package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
- package/src/components/display/categories/CategoryChooser.vue +144 -145
- package/src/components/display/categories/CategoryFilter.vue +172 -198
- package/src/components/display/categories/CategoryList.vue +122 -147
- package/src/components/display/comments/CommentInput.vue +100 -122
- package/src/components/display/comments/CommentList.vue +169 -191
- package/src/components/display/comments/CommentName.vue +35 -45
- package/src/components/display/comments/CommentParentInfo.vue +28 -34
- package/src/components/display/comments/CommentPlayer.vue +38 -50
- package/src/components/display/comments/CommentSection.vue +85 -103
- package/src/components/display/comments/item/CommentBasicView.vue +48 -61
- package/src/components/display/comments/item/CommentItem.vue +104 -115
- package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
- package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
- package/src/components/display/comments/like/LikeButton.vue +36 -41
- package/src/components/display/comments/like/LikeSection.vue +128 -136
- package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
- package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
- package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
- package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
- package/src/components/display/edit/EditBox.vue +9 -8
- package/src/components/display/edit/EditBoxRadio.vue +1 -5
- package/src/components/display/emission/EmissionInlineList.vue +82 -97
- package/src/components/display/emission/EmissionItem.vue +57 -69
- package/src/components/display/emission/EmissionList.vue +189 -218
- package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
- package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
- package/src/components/display/emission/EmissionPresentationList.vue +51 -61
- package/src/components/display/filter/AdvancedSearch.vue +151 -176
- package/src/components/display/filter/CategorySearchFilter.vue +43 -46
- package/src/components/display/filter/DateFilter.vue +76 -91
- package/src/components/display/filter/MonetizableFilter.vue +27 -30
- package/src/components/display/filter/ProductorSearch.vue +87 -90
- package/src/components/display/filter/RubriqueChoice.vue +58 -63
- package/src/components/display/filter/RubriqueFilter.vue +154 -169
- package/src/components/display/filter/SearchOrder.vue +35 -35
- package/src/components/display/list/ListPaginate.vue +72 -93
- package/src/components/display/list/PaginateParams.vue +36 -40
- package/src/components/display/list/PaginateSection.vue +113 -124
- package/src/components/display/list/SwiperList.vue +97 -109
- package/src/components/display/live/CountDown.vue +15 -9
- package/src/components/display/live/CountdownOctopus.vue +16 -10
- package/src/components/display/live/LiveHorizontalList.vue +95 -103
- package/src/components/display/live/LiveItem.vue +64 -73
- package/src/components/display/live/LiveList.vue +125 -137
- package/src/components/display/live/RadioCurrently.vue +66 -73
- package/src/components/display/live/RadioImage.vue +39 -50
- package/src/components/display/live/RadioItem.vue +9 -14
- package/src/components/display/live/RadioList.vue +39 -53
- package/src/components/display/live/RadioPlanning.vue +210 -222
- package/src/components/display/organisation/OrganisationChooser.vue +116 -122
- package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
- package/src/components/display/participant/ParticipantInlineList.vue +42 -58
- package/src/components/display/participant/ParticipantItem.vue +66 -74
- package/src/components/display/participant/ParticipantList.vue +116 -141
- package/src/components/display/playlist/PlaylistItem.vue +33 -46
- package/src/components/display/playlist/PlaylistList.vue +115 -144
- package/src/components/display/playlist/PodcastList.vue +90 -103
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
- package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
- package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
- package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
- package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
- package/src/components/display/podcasts/PodcastImage.vue +96 -99
- package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
- package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
- package/src/components/display/podcasts/PodcastItem.vue +48 -63
- package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
- package/src/components/display/podcasts/PodcastList.vue +182 -206
- package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
- package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
- package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
- package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
- package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
- package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
- package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
- package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
- package/src/components/display/podcasts/TagList.vue +48 -50
- package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
- package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
- package/src/components/display/rubriques/RubriqueList.vue +140 -160
- package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
- package/src/components/display/sharing/FormatSwitch.vue +16 -11
- package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
- package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
- package/src/components/display/sharing/PlayerParameters.vue +69 -71
- package/src/components/display/sharing/QrCode.vue +55 -67
- package/src/components/display/sharing/ShareAnonymous.vue +160 -178
- package/src/components/display/sharing/ShareDistribution.vue +103 -117
- package/src/components/display/sharing/ShareNewsletter.vue +154 -161
- package/src/components/display/sharing/SharePlayer.vue +273 -295
- package/src/components/display/sharing/SharePlayerColors.vue +25 -16
- package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
- package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
- package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
- package/src/components/display/sharing/SubscribeButtons.vue +184 -207
- package/src/components/display/studio/RecordingItemButton.vue +1 -4
- package/src/components/form/ClassicCheckbox.vue +26 -30
- package/src/components/form/ClassicContentEditable.vue +37 -33
- package/src/components/form/ClassicCopyButton.vue +40 -44
- package/src/components/form/ClassicDatePicker.vue +114 -114
- package/src/components/form/ClassicEmojiPicker.vue +20 -28
- package/src/components/form/ClassicInputText.vue +116 -120
- package/src/components/form/ClassicLoading.vue +7 -12
- package/src/components/form/ClassicMultiselect.vue +115 -117
- package/src/components/form/ClassicRadio.vue +21 -16
- package/src/components/form/ClassicRadioLabel.vue +23 -22
- package/src/components/form/ClassicSearch.vue +24 -19
- package/src/components/form/ClassicSelect.vue +47 -38
- package/src/components/form/ClassicWysiwyg.vue +116 -123
- package/src/components/icons/AmazonMusicIcon.vue +7 -10
- package/src/components/icons/ApplePodcastIcon.vue +7 -11
- package/src/components/icons/BlueSkyIcon.vue +8 -11
- package/src/components/icons/DeezerIcon.vue +8 -11
- package/src/components/icons/EditFtpIcon.vue +8 -11
- package/src/components/icons/IHeartIcon.vue +8 -11
- package/src/components/icons/PlayVideoIcon.vue +7 -10
- package/src/components/icons/PlayerFmIcon.vue +7 -10
- package/src/components/icons/PocketCastIcon.vue +8 -11
- package/src/components/icons/PodcastAddictIcon.vue +7 -10
- package/src/components/icons/RadiolineIcon.vue +8 -11
- package/src/components/icons/TuninIcon.vue +8 -11
- package/src/components/icons/XIcon.vue +7 -10
- package/src/components/misc/AcpmImage.vue +6 -7
- package/src/components/misc/ClassicAccordion.vue +26 -31
- package/src/components/misc/ClassicLazy.vue +86 -90
- package/src/components/misc/ClassicNav.vue +16 -20
- package/src/components/misc/ClassicPopover.vue +271 -282
- package/src/components/misc/ClassicSpinner.vue +5 -27
- package/src/components/misc/ErrorMessage.vue +11 -12
- package/src/components/misc/FooterGarSection.vue +33 -41
- package/src/components/misc/FooterSection.vue +94 -131
- package/src/components/misc/HomeDropdown.vue +83 -105
- package/src/components/misc/MobileMenu.vue +101 -111
- package/src/components/misc/ProgressBar.vue +53 -62
- package/src/components/misc/TopBar.vue +98 -120
- package/src/components/misc/TopBarMainContent.vue +114 -133
- package/src/components/misc/modal/ClassicModal.vue +40 -33
- package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
- package/src/components/misc/modal/ClipboardModal.vue +27 -30
- package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
- package/src/components/misc/modal/MessageModal.vue +50 -47
- package/src/components/misc/modal/NewsletterModal.vue +30 -31
- package/src/components/misc/modal/QrCodeModal.vue +21 -21
- package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
- package/src/components/misc/player/PlayerCompact.vue +6 -4
- package/src/components/misc/player/PlayerComponent.vue +8 -9
- package/src/components/misc/player/PlayerLarge.vue +9 -8
- package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
- package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
- package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
- package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
- package/src/components/misc/player/elements/PlayerImage.vue +51 -57
- package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
- package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
- package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
- package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
- package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
- package/src/components/misc/player/radio/RadioHistory.vue +80 -99
- package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
- package/src/components/misc/player/video/PlayerVideo.vue +27 -40
- package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
- package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
- package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
- package/src/components/pages/CategoryPage.vue +28 -33
- package/src/components/pages/EmissionPage.vue +113 -132
- package/src/components/pages/EmissionsPage.vue +2 -0
- package/src/components/pages/Error403Page.vue +21 -20
- package/src/components/pages/HomePage.vue +91 -100
- package/src/components/pages/LivesPage.vue +35 -37
- package/src/components/pages/MapPage.vue +209 -241
- package/src/components/pages/PageLogout.vue +8 -11
- package/src/components/pages/PageNotFound.vue +9 -5
- package/src/components/pages/ParticipantPage.vue +96 -110
- package/src/components/pages/ParticipantsPage.vue +3 -0
- package/src/components/pages/PlaylistPage.vue +112 -117
- package/src/components/pages/PlaylistsPage.vue +9 -2
- package/src/components/pages/PodcastPage.vue +224 -238
- package/src/components/pages/PodcastsPage.vue +9 -2
- package/src/components/pages/RadioPage.vue +56 -70
- package/src/components/pages/RubriquePage.vue +7 -3
- package/src/components/pages/SearchPage.vue +31 -36
- package/src/components/pages/TagPage.vue +11 -9
- package/src/components/pages/VideoPage.vue +14 -11
- package/src/helper/displayHelper.ts +1 -1
- package/src/helper/loadScript.ts +4 -4
- package/src/i18n.ts +2 -2
- package/src/main.ts +1 -1
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/FilterStore.ts +1 -1
- package/src/stores/VastStore.ts +2 -2
- package/src/stores/class/general/player.ts +1 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +0 -113
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/icomoon.woff2 +0 -0
- package/public/css/fonts/style.css +0 -352
- package/sonarqube-scanner.js +0 -10
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
v-model:is-mobile="isMobile"
|
|
7
7
|
:text-count="
|
|
8
8
|
showCount && emissions.length > 1
|
|
9
|
-
?
|
|
9
|
+
? t('Number emissions', { nb: displayCount }) + sortText
|
|
10
10
|
: undefined
|
|
11
11
|
"
|
|
12
12
|
:total-count="totalCount"
|
|
13
13
|
:loading="loading"
|
|
14
|
-
:loading-text="loading ?
|
|
14
|
+
:loading-text="loading ? t('Loading emissions ...') : undefined"
|
|
15
15
|
:player-responsive="true"
|
|
16
16
|
>
|
|
17
17
|
<template #list>
|
|
18
|
-
<div v-if="!itemPlayer" class="octopus-element-list two-items-list">
|
|
18
|
+
<div v-if="!state.emissionsPage.itemPlayer" class="octopus-element-list two-items-list">
|
|
19
19
|
<ClassicLazy
|
|
20
20
|
v-for="e in displayArray"
|
|
21
21
|
:key="e.emissionId"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
name: 'emission',
|
|
30
30
|
params: { emissionId: e.emissionId },
|
|
31
31
|
}"
|
|
32
|
-
:title="
|
|
32
|
+
:title="t('Series name page', { name: e.name })"
|
|
33
33
|
>
|
|
34
34
|
{{ e.name }}
|
|
35
35
|
</router-link>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</ListPaginate>
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
|
-
<script lang="ts">
|
|
59
|
+
<script setup lang="ts">
|
|
60
60
|
import ListPaginate from "../list/ListPaginate.vue";
|
|
61
61
|
import classicApi from "../../../api/classicApi";
|
|
62
62
|
import ClassicLazy from "../../misc/ClassicLazy.vue";
|
|
@@ -64,234 +64,205 @@ import {useErrorHandler} from "../../composable/useErrorHandler";
|
|
|
64
64
|
import { state } from "../../../stores/ParamSdkStore";
|
|
65
65
|
import { Emission, emptyEmissionData } from "@/stores/class/general/emission";
|
|
66
66
|
import { Rubrique } from "@/stores/class/rubrique/rubrique";
|
|
67
|
-
import {
|
|
67
|
+
import { defineAsyncComponent, ref, Ref, computed, watch, onMounted } from "vue";
|
|
68
68
|
import { FetchParam } from "@/stores/class/general/fetchParam";
|
|
69
69
|
import { AxiosError } from "axios";
|
|
70
70
|
import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
|
|
71
71
|
import { useFilterStore } from "../../../stores/FilterStore";
|
|
72
|
-
import { mapState } from "pinia";
|
|
73
72
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
73
|
+
import { useI18n } from "vue-i18n";
|
|
74
74
|
const EmissionItem = defineAsyncComponent(() => import("./EmissionItem.vue"));
|
|
75
75
|
const EmissionPlayerItem = defineAsyncComponent(
|
|
76
76
|
() => import("./EmissionPlayerItem.vue"),
|
|
77
77
|
);
|
|
78
|
-
export default defineComponent({
|
|
79
|
-
name: "EmissionList",
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
79
|
+
//Props
|
|
80
|
+
const props = defineProps({
|
|
81
|
+
first: { default: 0, type: Number },
|
|
82
|
+
size: { default: 30, type: Number },
|
|
83
|
+
query: { default: undefined, type: String },
|
|
84
|
+
iabId: { default: undefined, type: Number },
|
|
85
|
+
organisationId: { default: undefined, type: String },
|
|
86
|
+
monetisable: { default: "UNDEFINED", type: String },
|
|
87
|
+
before: { default: undefined, type: String },
|
|
88
|
+
after: { default: undefined, type: String },
|
|
89
|
+
sort: { default: "DATE", type: String },
|
|
90
|
+
showCount: { default: false, type: Boolean },
|
|
91
|
+
includeHidden: { default: false, type: Boolean },
|
|
92
|
+
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
93
|
+
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
94
|
+
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
95
|
+
nbPodcasts: { default: undefined, type: Number },
|
|
96
|
+
})
|
|
87
97
|
|
|
98
|
+
//Data
|
|
99
|
+
const loading = ref(true);
|
|
100
|
+
const dfirst = ref(props.first);
|
|
101
|
+
const dsize = ref(props.size);
|
|
102
|
+
const totalCount = ref(0);
|
|
103
|
+
const displayCount = ref(0);
|
|
104
|
+
const isMobile = ref(false);
|
|
105
|
+
const emissions: Ref<Array<Emission>> = ref([]);
|
|
106
|
+
const rubriques: Ref<Array<Rubrique> | undefined> = ref(undefined);
|
|
107
|
+
|
|
108
|
+
//Composables
|
|
109
|
+
const { t } = useI18n();
|
|
110
|
+
const {handle403} = useErrorHandler();
|
|
111
|
+
const filterStore = useFilterStore();
|
|
112
|
+
|
|
113
|
+
//Computed
|
|
114
|
+
const displayArray = computed(() => {
|
|
115
|
+
if (isMobile.value) {
|
|
116
|
+
return emissions.value;
|
|
117
|
+
}
|
|
118
|
+
return emissions.value.slice(
|
|
119
|
+
dfirst.value,
|
|
120
|
+
Math.min(dfirst.value + dsize.value, totalCount.value),
|
|
121
|
+
);
|
|
122
|
+
});
|
|
123
|
+
const displayRubriquage = computed(() => state.emissionsPage.rubriquage);
|
|
124
|
+
const changePaginate = computed(() => `${props.first}|${props.size}`);
|
|
125
|
+
const changed = computed(() => {
|
|
126
|
+
return `${props.organisationId}|${props.query}|${props.monetisable}|${props.includeHidden}
|
|
127
|
+
${props.iabId}|${props.rubriqueId}|${props.rubriquageId}|${props.before}|${props.after}|${props.sort}|${props.noRubriquageId}`;
|
|
128
|
+
});
|
|
129
|
+
const sortText = computed(() => {
|
|
130
|
+
let textSort = "";
|
|
131
|
+
switch (props.sort) {
|
|
132
|
+
case "SCORE":
|
|
133
|
+
textSort = " " + t("sort by score");
|
|
134
|
+
break;
|
|
135
|
+
case "LAST_PODCAST_DESC":
|
|
136
|
+
textSort = " " + t("sort by date");
|
|
137
|
+
break;
|
|
138
|
+
case "NAME":
|
|
139
|
+
textSort = " " + t("sort by alphabetical");
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
textSort = " " + t("sort by date");
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
return textSort.replace("triés", "triées");
|
|
146
|
+
});
|
|
147
|
+
const organisation = computed(() => props.organisationId ? props.organisationId : filterStore.filterOrgaId);
|
|
88
148
|
|
|
89
|
-
props: {
|
|
90
|
-
first: { default: 0, type: Number },
|
|
91
|
-
size: { default: 30, type: Number },
|
|
92
|
-
query: { default: undefined, type: String },
|
|
93
|
-
iabId: { default: undefined, type: Number },
|
|
94
|
-
organisationId: { default: undefined, type: String },
|
|
95
|
-
monetisable: { default: "UNDEFINED", type: String },
|
|
96
|
-
before: { default: undefined, type: String },
|
|
97
|
-
after: { default: undefined, type: String },
|
|
98
|
-
sort: { default: "DATE", type: String },
|
|
99
|
-
showCount: { default: false, type: Boolean },
|
|
100
|
-
includeHidden: { default: false, type: Boolean },
|
|
101
|
-
rubriqueId: { default: () => [], type: Array as () => Array<number> },
|
|
102
|
-
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
103
|
-
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
104
|
-
nbPodcasts: { default: undefined, type: Number },
|
|
105
|
-
},
|
|
106
|
-
setup(){
|
|
107
|
-
const {handle403} = useErrorHandler();
|
|
108
|
-
return { handle403 }
|
|
109
|
-
},
|
|
110
149
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
150
|
+
//Watch
|
|
151
|
+
watch(changePaginate, () => {
|
|
152
|
+
dfirst.value = props.first;
|
|
153
|
+
dsize.value = props.size;
|
|
154
|
+
});
|
|
155
|
+
watch(changed, () =>fetchContent(true));
|
|
156
|
+
watch(dsize, () =>fetchContent(true));
|
|
157
|
+
watch(dfirst, () =>{
|
|
158
|
+
if (
|
|
159
|
+
!emissions.value[dfirst.value] ||
|
|
160
|
+
0 === emissions.value[dfirst.value].emissionId
|
|
161
|
+
) {
|
|
162
|
+
fetchContent(false);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
123
165
|
|
|
124
|
-
computed: {
|
|
125
|
-
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
126
|
-
displayArray(): Array<Emission> {
|
|
127
|
-
if (this.isMobile) {
|
|
128
|
-
return this.emissions;
|
|
129
|
-
}
|
|
130
|
-
return this.emissions.slice(
|
|
131
|
-
this.dfirst,
|
|
132
|
-
Math.min(this.dfirst + this.dsize, this.totalCount),
|
|
133
|
-
);
|
|
134
|
-
},
|
|
135
|
-
itemPlayer(): boolean {
|
|
136
|
-
return state.emissionsPage.itemPlayer as boolean;
|
|
137
|
-
},
|
|
138
|
-
displayRubriquage(): number | undefined {
|
|
139
|
-
return state.emissionsPage.rubriquage;
|
|
140
|
-
},
|
|
141
|
-
changePaginate(): string {
|
|
142
|
-
return `${this.first}|${this.size}`;
|
|
143
|
-
},
|
|
144
|
-
changed(): string {
|
|
145
|
-
return `${this.organisationId}|${this.query}|${this.monetisable}|${this.includeHidden}
|
|
146
|
-
${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.sort}|${this.noRubriquageId}`;
|
|
147
|
-
},
|
|
148
|
-
sortText(): string {
|
|
149
|
-
let textSort = "";
|
|
150
|
-
switch (this.sort) {
|
|
151
|
-
case "SCORE":
|
|
152
|
-
textSort = " " + this.$t("sort by score");
|
|
153
|
-
break;
|
|
154
|
-
case "LAST_PODCAST_DESC":
|
|
155
|
-
textSort = " " + this.$t("sort by date");
|
|
156
|
-
break;
|
|
157
|
-
case "NAME":
|
|
158
|
-
textSort = " " + this.$t("sort by alphabetical");
|
|
159
|
-
break;
|
|
160
|
-
default:
|
|
161
|
-
textSort = " " + this.$t("sort by date");
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
166
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
watch: {
|
|
172
|
-
changePaginate() {
|
|
173
|
-
this.dfirst = this.first;
|
|
174
|
-
this.dsize = this.size;
|
|
175
|
-
},
|
|
176
|
-
changed(): void {
|
|
177
|
-
this.reloadList();
|
|
178
|
-
},
|
|
179
|
-
dsize(): void {
|
|
180
|
-
this.reloadList();
|
|
181
|
-
},
|
|
182
|
-
dfirst(): void {
|
|
183
|
-
if (
|
|
184
|
-
!this.emissions[this.dfirst] ||
|
|
185
|
-
0 === this.emissions[this.dfirst].emissionId
|
|
186
|
-
) {
|
|
187
|
-
this.fetchContent(false);
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
},
|
|
167
|
+
onMounted(()=>{
|
|
168
|
+
fetchContent(false);
|
|
169
|
+
if (displayRubriquage.value) {
|
|
170
|
+
fetchRubriques();
|
|
171
|
+
}
|
|
172
|
+
})
|
|
191
173
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
174
|
+
//Methods
|
|
175
|
+
async function fetchContent(reset: boolean): Promise<void> {
|
|
176
|
+
loading.value = true;
|
|
177
|
+
const param: FetchParam = {
|
|
178
|
+
first: reset? 0: dfirst.value,
|
|
179
|
+
size: dsize.value,
|
|
180
|
+
query: props.query,
|
|
181
|
+
organisationId: organisation.value,
|
|
182
|
+
monetisable: props.monetisable,
|
|
183
|
+
iabId: props.iabId,
|
|
184
|
+
before: props.before,
|
|
185
|
+
after: props.after,
|
|
186
|
+
sort: props.sort,
|
|
187
|
+
noRubriquageId: props.noRubriquageId.length
|
|
188
|
+
? props.noRubriquageId
|
|
189
|
+
: undefined,
|
|
190
|
+
rubriqueId: props.rubriqueId.length ? props.rubriqueId : undefined,
|
|
191
|
+
rubriquageId: props.rubriquageId.length ? props.rubriquageId : undefined,
|
|
192
|
+
includeHidden: props.includeHidden,
|
|
193
|
+
};
|
|
194
|
+
try {
|
|
195
|
+
const data = await classicApi.fetchData<ListClassicReturn<Emission>>({
|
|
196
|
+
api: 0,
|
|
197
|
+
path: "emission/search",
|
|
198
|
+
parameters: param,
|
|
199
|
+
specialTreatement: true,
|
|
200
|
+
});
|
|
201
|
+
afterFetching(reset, data);
|
|
202
|
+
} catch (error) {
|
|
203
|
+
handle403(error as AxiosError);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function afterFetching(
|
|
207
|
+
reset: boolean,
|
|
208
|
+
data: { count: number; result: Array<Emission>; sort: string },
|
|
209
|
+
): void {
|
|
210
|
+
if (reset) {
|
|
211
|
+
dfirst.value = 0;
|
|
212
|
+
emissions.value.length = 0;
|
|
213
|
+
}
|
|
214
|
+
if (dfirst.value > emissions.value.length) {
|
|
215
|
+
for (
|
|
216
|
+
let i = emissions.value.length - 1, len = dfirst.value + dsize.value;
|
|
217
|
+
i < len;
|
|
218
|
+
i++
|
|
219
|
+
) {
|
|
220
|
+
emissions.value.push(emptyEmissionData());
|
|
196
221
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
let i = this.emissions.length - 1, len = this.dfirst + this.dsize;
|
|
244
|
-
i < len;
|
|
245
|
-
i++
|
|
246
|
-
) {
|
|
247
|
-
this.emissions.push(emptyEmissionData());
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
this.displayCount = data.count;
|
|
251
|
-
const responseEmissions = data.result.filter((e: Emission | null) => {
|
|
252
|
-
if (null === e) {
|
|
253
|
-
this.displayCount--;
|
|
254
|
-
}
|
|
255
|
-
return null !== e;
|
|
256
|
-
});
|
|
257
|
-
this.emissions = this.emissions
|
|
258
|
-
.slice(0, this.dfirst)
|
|
259
|
-
.concat(responseEmissions)
|
|
260
|
-
.concat(
|
|
261
|
-
this.emissions.slice(this.dfirst + this.dsize, this.emissions.length),
|
|
262
|
-
);
|
|
263
|
-
this.totalCount = data.count;
|
|
264
|
-
this.loading = false;
|
|
265
|
-
},
|
|
266
|
-
async fetchRubriques(): Promise<void> {
|
|
267
|
-
const data = await classicApi.fetchData<Rubriquage>({
|
|
268
|
-
api: 0,
|
|
269
|
-
path: "rubriquage/" + this.displayRubriquage,
|
|
270
|
-
});
|
|
271
|
-
this.rubriques = data.rubriques;
|
|
272
|
-
},
|
|
273
|
-
mainRubriquage(emission: Emission): string {
|
|
274
|
-
return emission.rubriqueIds?.[0] === state.emissionsPage.mainRubrique
|
|
275
|
-
? "partenaireRubrique"
|
|
276
|
-
: "";
|
|
277
|
-
},
|
|
278
|
-
rubriquesId(emission: Emission): string | undefined {
|
|
279
|
-
if (
|
|
280
|
-
!this.displayRubriquage ||
|
|
281
|
-
!emission.rubriqueIds ||
|
|
282
|
-
0 === emission.rubriqueIds.length ||
|
|
283
|
-
!this.rubriques ||
|
|
284
|
-
!this.rubriques.length
|
|
285
|
-
)
|
|
286
|
-
return undefined;
|
|
287
|
-
const rubrique = this.rubriques.find(
|
|
288
|
-
(element: Rubrique) => element.rubriqueId === emission.rubriqueIds[0],
|
|
289
|
-
);
|
|
290
|
-
if (!rubrique) {
|
|
291
|
-
return undefined;
|
|
292
|
-
}
|
|
293
|
-
return rubrique.name;
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
});
|
|
222
|
+
}
|
|
223
|
+
displayCount.value = data.count;
|
|
224
|
+
const responseEmissions = data.result.filter((e: Emission | null) => {
|
|
225
|
+
if (null === e) {
|
|
226
|
+
displayCount.value--;
|
|
227
|
+
}
|
|
228
|
+
return null !== e;
|
|
229
|
+
});
|
|
230
|
+
emissions.value = emissions.value
|
|
231
|
+
.slice(0, dfirst.value)
|
|
232
|
+
.concat(responseEmissions)
|
|
233
|
+
.concat(
|
|
234
|
+
emissions.value.slice(dfirst.value + dsize.value, emissions.value.length),
|
|
235
|
+
);
|
|
236
|
+
totalCount.value = data.count;
|
|
237
|
+
loading.value = false;
|
|
238
|
+
}
|
|
239
|
+
async function fetchRubriques(): Promise<void> {
|
|
240
|
+
const data = await classicApi.fetchData<Rubriquage>({
|
|
241
|
+
api: 0,
|
|
242
|
+
path: "rubriquage/" + displayRubriquage.value,
|
|
243
|
+
});
|
|
244
|
+
rubriques.value = data.rubriques;
|
|
245
|
+
}
|
|
246
|
+
function mainRubriquage(emission: Emission): string {
|
|
247
|
+
return emission.rubriqueIds?.[0] === state.emissionsPage.mainRubrique
|
|
248
|
+
? "partenaireRubrique"
|
|
249
|
+
: "";
|
|
250
|
+
}
|
|
251
|
+
function rubriquesId(emission: Emission): string | undefined {
|
|
252
|
+
if (
|
|
253
|
+
!displayRubriquage.value ||
|
|
254
|
+
!emission.rubriqueIds ||
|
|
255
|
+
0 === emission.rubriqueIds.length ||
|
|
256
|
+
!rubriques.value ||
|
|
257
|
+
!rubriques.value.length
|
|
258
|
+
)
|
|
259
|
+
return undefined;
|
|
260
|
+
const rubrique = rubriques.value.find(
|
|
261
|
+
(element: Rubrique) => element.rubriqueId === emission.rubriqueIds[0],
|
|
262
|
+
);
|
|
263
|
+
if (!rubrique) {
|
|
264
|
+
return undefined;
|
|
265
|
+
}
|
|
266
|
+
return rubrique.name;
|
|
267
|
+
}
|
|
297
268
|
</script>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
name: 'emission',
|
|
6
6
|
params: { emissionId: emission.emissionId },
|
|
7
7
|
}"
|
|
8
|
-
:title="
|
|
8
|
+
:title="t('Series name page', { name: emission.name })"
|
|
9
9
|
class="d-flex flex-column text-dark"
|
|
10
10
|
>
|
|
11
11
|
<div v-if="rubriqueName" class="emission-player-item-info">
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
v-lazy="useProxyImageUrl(emission.imageUrl, '330')"
|
|
17
17
|
width="330"
|
|
18
18
|
height="330"
|
|
19
|
-
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
alt=""
|
|
20
21
|
|
|
21
|
-
:title="
|
|
22
|
+
:title="t('Emission name image', { name: emission.name })"
|
|
22
23
|
class="img-box"
|
|
23
24
|
/>
|
|
24
25
|
</div>
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
name: 'podcast',
|
|
38
39
|
params: { podcastId: p.podcastId },
|
|
39
40
|
}"
|
|
40
|
-
:title="
|
|
41
|
+
:title="t('Episode name page', { name: p.title })"
|
|
41
42
|
class="text-dark fw-bold basic-line-clamp"
|
|
42
43
|
>
|
|
43
44
|
{{ p.title }}
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
name: 'podcast',
|
|
51
52
|
params: { podcastId: p.podcastId },
|
|
52
53
|
}"
|
|
53
|
-
:title="
|
|
54
|
+
:title="t('Episode name page', { name: p.title })"
|
|
54
55
|
class="d-flex flex-grow-1 align-items-center define-width text-dark"
|
|
55
56
|
>
|
|
56
57
|
<div class="fw-bold text-truncate">
|
|
@@ -77,85 +78,67 @@
|
|
|
77
78
|
}"
|
|
78
79
|
class="btn"
|
|
79
80
|
>
|
|
80
|
-
{{
|
|
81
|
+
{{ t("More episodes") }}
|
|
81
82
|
</router-link>
|
|
82
83
|
</div>
|
|
83
84
|
</div>
|
|
84
85
|
</template>
|
|
85
86
|
|
|
86
|
-
<script lang="ts">
|
|
87
|
+
<script setup lang="ts">
|
|
87
88
|
import classicApi from "../../../api/classicApi";
|
|
88
89
|
import { Emission } from "@/stores/class/general/emission";
|
|
89
90
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
90
91
|
import { state } from "../../../stores/ParamSdkStore";
|
|
91
92
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
92
|
-
import {
|
|
93
|
-
import { defineAsyncComponent, defineComponent } from "vue";
|
|
93
|
+
import { computed, defineAsyncComponent, onBeforeMount, Ref, ref } from "vue";
|
|
94
94
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
95
|
+
import { useI18n } from "vue-i18n";
|
|
95
96
|
const PodcastPlayBar = defineAsyncComponent(
|
|
96
97
|
() => import("../podcasts/PodcastPlayBar.vue"),
|
|
97
98
|
);
|
|
98
99
|
const PodcastPlayBasicButton = defineAsyncComponent(() => import("../podcasts/PodcastPlayBasicButton.vue"));
|
|
99
|
-
export default defineComponent({
|
|
100
|
-
name: "EmissionPlayerItem",
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
nbPodcasts: { default: undefined, type: Number },
|
|
109
|
-
rubriqueName: { default: undefined, type: String },
|
|
110
|
-
},
|
|
111
|
-
setup(){
|
|
112
|
-
const { useProxyImageUrl } = useImageProxy();
|
|
113
|
-
const { isEditRights } = useOrgaComputed();
|
|
114
|
-
return { useProxyImageUrl, isEditRights }
|
|
115
|
-
},
|
|
101
|
+
//Props
|
|
102
|
+
const props = defineProps({
|
|
103
|
+
emission: { default: () => ({}), type: Object as () => Emission },
|
|
104
|
+
nbPodcasts: { default: undefined, type: Number },
|
|
105
|
+
rubriqueName: { default: undefined, type: String },
|
|
106
|
+
})
|
|
116
107
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
};
|
|
122
|
-
},
|
|
108
|
+
//Data
|
|
109
|
+
const activeEmission = ref(true);
|
|
110
|
+
const podcasts: Ref<Array<Podcast>> = ref([]);
|
|
111
|
+
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
editRight(): boolean {
|
|
132
|
-
return this.isEditRights(this.emission?.orga.id);
|
|
133
|
-
},
|
|
134
|
-
},
|
|
113
|
+
//Composables
|
|
114
|
+
const { t } = useI18n();
|
|
115
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
116
|
+
|
|
117
|
+
//Computed
|
|
118
|
+
const isProgressBar = computed(() => state.emissionsPage.progressBar as boolean);
|
|
119
|
+
const buttonMore = computed(() => state.emissionsPage.buttonMore as boolean);
|
|
135
120
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
specialTreatement: true,
|
|
151
|
-
});
|
|
152
|
-
if (0 === data.count) {
|
|
153
|
-
this.activeEmission = false;
|
|
154
|
-
}
|
|
155
|
-
this.podcasts = data.result;
|
|
121
|
+
|
|
122
|
+
onBeforeMount(()=>loadPodcasts())
|
|
123
|
+
|
|
124
|
+
//Methods
|
|
125
|
+
async function loadPodcasts(): Promise<void> {
|
|
126
|
+
const nb = props.nbPodcasts ? props.nbPodcasts : 2;
|
|
127
|
+
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
128
|
+
api: 0,
|
|
129
|
+
path: "podcast/search",
|
|
130
|
+
parameters: {
|
|
131
|
+
emissionId: props.emission.emissionId,
|
|
132
|
+
size: nb,
|
|
133
|
+
includeStatus: ["READY", "PROCESSING"],
|
|
156
134
|
},
|
|
157
|
-
|
|
158
|
-
});
|
|
135
|
+
specialTreatement: true,
|
|
136
|
+
});
|
|
137
|
+
if (0 === data.count) {
|
|
138
|
+
activeEmission.value = false;
|
|
139
|
+
}
|
|
140
|
+
podcasts.value = data.result;
|
|
141
|
+
}
|
|
159
142
|
</script>
|
|
160
143
|
|
|
161
144
|
<style lang="scss">
|