@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,15 +6,16 @@
|
|
|
6
6
|
params: { participantId: participant.participantId },
|
|
7
7
|
}"
|
|
8
8
|
class="mt-3 text-dark"
|
|
9
|
-
:title="
|
|
9
|
+
:title="t('Participant name page', { name: name })"
|
|
10
10
|
>
|
|
11
11
|
<img
|
|
12
12
|
v-lazy="useProxyImageUrl(participant.imageUrl, '200')"
|
|
13
13
|
width="200"
|
|
14
14
|
height="200"
|
|
15
|
-
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
alt=""
|
|
16
17
|
|
|
17
|
-
:title="
|
|
18
|
+
:title="t('Animator image', { name: name })"
|
|
18
19
|
class="img-box border"
|
|
19
20
|
/>
|
|
20
21
|
<div class="d-flex align-items-center h4 justify-content-center mt-2">
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
v-if="!activeParticipant && !isPodcastmaker && editRight"
|
|
23
24
|
:size="16"
|
|
24
25
|
class="text-danger me-1"
|
|
25
|
-
:title="
|
|
26
|
+
:title="t('Participant have not podcasts')"
|
|
26
27
|
/>
|
|
27
28
|
{{ name }}
|
|
28
29
|
</div>
|
|
@@ -51,87 +52,78 @@
|
|
|
51
52
|
</article>
|
|
52
53
|
</template>
|
|
53
54
|
|
|
54
|
-
<script lang="ts">
|
|
55
|
+
<script setup lang="ts">
|
|
55
56
|
import AlertIcon from "vue-material-design-icons/Alert.vue";
|
|
56
57
|
import classicApi from "../../../api/classicApi";
|
|
57
58
|
import { Participant } from "@/stores/class/general/participant";
|
|
58
59
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
59
60
|
import displayHelper from "../../../helper/displayHelper";
|
|
60
61
|
import {useOrgaComputed} from "../../composable/useOrgaComputed";
|
|
61
|
-
import {
|
|
62
|
+
import { computed, onBeforeMount, onMounted, ref, useTemplateRef } from "vue";
|
|
62
63
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
63
64
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
64
|
-
|
|
65
|
-
name: "ParticpantItem",
|
|
66
|
-
components: {
|
|
67
|
-
AlertIcon,
|
|
68
|
-
},
|
|
69
|
-
props: {
|
|
70
|
-
participant: { default: () => ({}), type: Object as () => Participant },
|
|
71
|
-
},
|
|
72
|
-
setup(){
|
|
73
|
-
const { useProxyImageUrl } = useImageProxy();
|
|
74
|
-
const { isPodcastmaker, isEditRights } = useOrgaComputed();
|
|
75
|
-
return { useProxyImageUrl, isPodcastmaker, isEditRights }
|
|
76
|
-
},
|
|
65
|
+
import { useI18n } from "vue-i18n";
|
|
77
66
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return `${this.participant.firstName ?? ""} ${
|
|
86
|
-
this.participant.lastName ?? ""
|
|
87
|
-
}`.trim();
|
|
88
|
-
},
|
|
89
|
-
editRight(): boolean {
|
|
90
|
-
if (!this.participant?.orga) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
return this.isEditRights(this.participant.orga.id);
|
|
94
|
-
},
|
|
95
|
-
},
|
|
67
|
+
//Props
|
|
68
|
+
const props = defineProps({
|
|
69
|
+
participant: { default: () => ({}), type: Object as () => Participant },
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
//Data
|
|
73
|
+
const activeParticipant = ref(true);
|
|
96
74
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
) {
|
|
110
|
-
participantDescContainer.classList.add("after-element-description");
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
methods: {
|
|
114
|
-
urlify(text:string|undefined){
|
|
115
|
-
return displayHelper.urlify(text);
|
|
116
|
-
},
|
|
117
|
-
async hasPodcast(): Promise<void> {
|
|
118
|
-
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
119
|
-
api: 0,
|
|
120
|
-
path: "podcast/search",
|
|
121
|
-
parameters: {
|
|
122
|
-
participantId: this.participant.participantId,
|
|
123
|
-
first: 0,
|
|
124
|
-
size: 0,
|
|
125
|
-
includeStatus: ["READY", "PROCESSING"],
|
|
126
|
-
},
|
|
127
|
-
specialTreatement: true,
|
|
128
|
-
});
|
|
129
|
-
if (0 === data.count) {
|
|
130
|
-
this.activeParticipant = false;
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
},
|
|
75
|
+
//Composables
|
|
76
|
+
const { t } = useI18n();
|
|
77
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
78
|
+
const { isPodcastmaker, isEditRights } = useOrgaComputed();
|
|
79
|
+
|
|
80
|
+
//Computed
|
|
81
|
+
const name = computed(() => `${props.participant.firstName ?? ""} ${props.participant.lastName ?? ""}`.trim());
|
|
82
|
+
const editRight = computed(() => {
|
|
83
|
+
if (!props.participant?.orga) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return isEditRights(props.participant.orga.id);
|
|
134
87
|
});
|
|
88
|
+
|
|
89
|
+
onBeforeMount(()=>{
|
|
90
|
+
if (!editRight.value) return;
|
|
91
|
+
hasPodcast();
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
onMounted(()=>{
|
|
95
|
+
const participantDesc = useTemplateRef('descriptionParticipant')?.value as HTMLElement;
|
|
96
|
+
const participantDescContainer = useTemplateRef('descriptionParticipantContainer')?.value as HTMLElement;
|
|
97
|
+
|
|
98
|
+
if (
|
|
99
|
+
null !== participantDesc &&
|
|
100
|
+
null !== participantDescContainer &&
|
|
101
|
+
participantDesc.clientHeight > participantDescContainer.clientHeight
|
|
102
|
+
) {
|
|
103
|
+
participantDescContainer.classList.add("after-element-description");
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
//Methods
|
|
108
|
+
function urlify(text:string|undefined){
|
|
109
|
+
return displayHelper.urlify(text);
|
|
110
|
+
}
|
|
111
|
+
async function hasPodcast(): Promise<void> {
|
|
112
|
+
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
113
|
+
api: 0,
|
|
114
|
+
path: "podcast/search",
|
|
115
|
+
parameters: {
|
|
116
|
+
participantId: props.participant.participantId,
|
|
117
|
+
first: 0,
|
|
118
|
+
size: 0,
|
|
119
|
+
includeStatus: ["READY", "PROCESSING"],
|
|
120
|
+
},
|
|
121
|
+
specialTreatement: true,
|
|
122
|
+
});
|
|
123
|
+
if (0 === data.count) {
|
|
124
|
+
activeParticipant.value = false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
135
127
|
</script>
|
|
136
128
|
<style lang="scss">
|
|
137
129
|
.octopus-app .participant-item-container {
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
v-model:is-mobile="isMobile"
|
|
7
7
|
:text-count="
|
|
8
8
|
showCount && displayCount > 1
|
|
9
|
-
? `${
|
|
9
|
+
? `${t('Number participants', { nb: displayCount })} ${t(
|
|
10
10
|
'sort by score',
|
|
11
11
|
)}`
|
|
12
12
|
: undefined
|
|
13
13
|
"
|
|
14
14
|
:total-count="totalCount"
|
|
15
15
|
:loading="loading"
|
|
16
|
-
:loading-text="loading ?
|
|
16
|
+
:loading-text="loading ? t('Loading participants ...') : undefined"
|
|
17
17
|
:player-responsive="true"
|
|
18
18
|
>
|
|
19
19
|
<template #list>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
name: 'participant',
|
|
31
31
|
params: { participantId: p.participantId },
|
|
32
32
|
}"
|
|
33
|
-
:title="
|
|
33
|
+
:title="t('Participant name page', { name: p.lastName })"
|
|
34
34
|
>
|
|
35
35
|
{{ p.lastName }}
|
|
36
36
|
</router-link>
|
|
@@ -41,162 +41,137 @@
|
|
|
41
41
|
</ListPaginate>
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
|
-
<script lang="ts">
|
|
44
|
+
<script setup lang="ts">
|
|
45
45
|
import ListPaginate from "../list/ListPaginate.vue";
|
|
46
46
|
import ClassicLazy from "../../misc/ClassicLazy.vue";
|
|
47
47
|
import {useErrorHandler} from "../../composable/useErrorHandler";
|
|
48
48
|
import classicApi from "../../../api/classicApi";
|
|
49
49
|
import ParticipantItem from "./ParticipantItem.vue";
|
|
50
50
|
import { useFilterStore } from "../../../stores/FilterStore";
|
|
51
|
-
import { mapState } from "pinia";
|
|
52
51
|
import {
|
|
53
52
|
Participant,
|
|
54
53
|
emptyParticipantData,
|
|
55
54
|
} from "@/stores/class/general/participant";
|
|
56
|
-
import {
|
|
55
|
+
import { computed, onBeforeMount, Ref, ref, watch } from "vue";
|
|
57
56
|
import { AxiosError } from "axios";
|
|
58
57
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
59
|
-
|
|
60
|
-
name: "ParticipantList",
|
|
58
|
+
import { useI18n } from "vue-i18n";
|
|
61
59
|
|
|
62
|
-
components: {
|
|
63
|
-
ParticipantItem,
|
|
64
|
-
ListPaginate,
|
|
65
|
-
ClassicLazy,
|
|
66
|
-
},
|
|
67
60
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
61
|
+
//Props
|
|
62
|
+
const props = defineProps({
|
|
63
|
+
first: { default: 0, type: Number },
|
|
64
|
+
size: { default: 30, type: Number },
|
|
65
|
+
query: { default: undefined, type: String },
|
|
66
|
+
organisationId: { default: undefined, type: String },
|
|
67
|
+
showCount: { default: false, type: Boolean },
|
|
68
|
+
})
|
|
75
69
|
|
|
76
|
-
setup(){
|
|
77
|
-
const {handle403} = useErrorHandler();
|
|
78
|
-
return { handle403 }
|
|
79
|
-
},
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
isMobile: false as boolean,
|
|
90
|
-
};
|
|
91
|
-
},
|
|
71
|
+
//Data
|
|
72
|
+
const loading = ref(true);
|
|
73
|
+
const dfirst = ref(props.first);
|
|
74
|
+
const dsize = ref(props.size);
|
|
75
|
+
const totalCount = ref(0);
|
|
76
|
+
const displayCount = ref(0);
|
|
77
|
+
const isMobile = ref(false);
|
|
78
|
+
const participants: Ref<Array<Participant>> = ref([]);
|
|
92
79
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
80
|
+
//Composables
|
|
81
|
+
const { t } = useI18n();
|
|
82
|
+
const {handle403} = useErrorHandler();
|
|
83
|
+
const filterStore = useFilterStore();
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
//Computed
|
|
87
|
+
const organisation = computed(() => props.organisationId ? props.organisationId : filterStore.filterOrgaId);
|
|
88
|
+
const displayArray = computed(() => {
|
|
89
|
+
if (isMobile.value) {
|
|
90
|
+
return participants.value;
|
|
91
|
+
}
|
|
92
|
+
return participants.value.slice(
|
|
93
|
+
dfirst.value,
|
|
94
|
+
Math.min(dfirst.value + dsize.value, totalCount.value),
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
const changePaginate = computed(() => `${props.first}|${props.size}`);
|
|
98
|
+
const sort = computed(() => !props.query ? "NAME" : "SCORE");
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
//Watch
|
|
102
|
+
watch(changePaginate, () => {
|
|
103
|
+
dfirst.value = props.first;
|
|
104
|
+
dsize.value = props.size;
|
|
105
|
+
});
|
|
106
|
+
watch(()=>props.query, () => fetchContent(true));
|
|
107
|
+
watch(organisation, () => fetchContent(true));
|
|
108
|
+
watch(dsize, () => fetchContent(true));
|
|
109
|
+
watch(dfirst, () => {
|
|
110
|
+
if (
|
|
111
|
+
!participants.value[dfirst.value] ||
|
|
112
|
+
0 === participants.value[dfirst.value].participantId
|
|
113
|
+
) {
|
|
114
|
+
fetchContent(false);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
onBeforeMount(()=>fetchContent(false))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
//Methods
|
|
122
|
+
async function fetchContent(reset: boolean): Promise<void> {
|
|
123
|
+
loading.value = true;
|
|
124
|
+
try {
|
|
125
|
+
const data = await classicApi.fetchData<ListClassicReturn<Participant>>(
|
|
126
|
+
{
|
|
127
|
+
api: 0,
|
|
128
|
+
path: "participant/search",
|
|
129
|
+
parameters: {
|
|
130
|
+
first: reset? 0: dfirst.value,
|
|
131
|
+
size: dsize.value,
|
|
132
|
+
query: props.query,
|
|
133
|
+
organisationId: organisation.value,
|
|
134
|
+
sort: sort.value
|
|
135
|
+
},
|
|
136
|
+
specialTreatement: true,
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
if (reset) {
|
|
140
|
+
dfirst.value = 0;
|
|
141
|
+
participants.value.length = 0;
|
|
142
|
+
}
|
|
143
|
+
displayCount.value = data.count;
|
|
144
|
+
if (dfirst.value > participants.value.length) {
|
|
145
|
+
for (
|
|
146
|
+
let i = participants.value.length - 1,
|
|
147
|
+
len = dfirst.value + dsize.value;
|
|
148
|
+
i < len;
|
|
149
|
+
i++
|
|
132
150
|
) {
|
|
133
|
-
|
|
151
|
+
participants.value.push(emptyParticipantData());
|
|
134
152
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
methods: {
|
|
142
|
-
reloadList() {
|
|
143
|
-
this.dfirst = 0;
|
|
144
|
-
this.fetchContent(true);
|
|
145
|
-
},
|
|
146
|
-
async fetchContent(reset: boolean): Promise<void> {
|
|
147
|
-
this.loading = true;
|
|
148
|
-
try {
|
|
149
|
-
const data = await classicApi.fetchData<ListClassicReturn<Participant>>(
|
|
150
|
-
{
|
|
151
|
-
api: 0,
|
|
152
|
-
path: "participant/search",
|
|
153
|
-
parameters: {
|
|
154
|
-
first: this.dfirst,
|
|
155
|
-
size: this.dsize,
|
|
156
|
-
query: this.query,
|
|
157
|
-
organisationId: this.organisation,
|
|
158
|
-
sort: this.sort
|
|
159
|
-
},
|
|
160
|
-
specialTreatement: true,
|
|
161
|
-
},
|
|
162
|
-
);
|
|
163
|
-
if (reset) {
|
|
164
|
-
this.participants.length = 0;
|
|
153
|
+
}
|
|
154
|
+
const responseParticipants = data.result.filter(
|
|
155
|
+
(p: Participant | null) => {
|
|
156
|
+
if (null === p) {
|
|
157
|
+
displayCount.value--;
|
|
165
158
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
);
|
|
185
|
-
this.participants = this.participants
|
|
186
|
-
.slice(0, this.dfirst)
|
|
187
|
-
.concat(responseParticipants)
|
|
188
|
-
.concat(
|
|
189
|
-
this.participants.slice(
|
|
190
|
-
this.dfirst + this.dsize,
|
|
191
|
-
this.participants.length,
|
|
192
|
-
),
|
|
193
|
-
);
|
|
194
|
-
this.totalCount = data.count;
|
|
195
|
-
} catch (error) {
|
|
196
|
-
this.handle403(error as AxiosError);
|
|
197
|
-
}
|
|
198
|
-
this.loading = false;
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
});
|
|
159
|
+
return null !== p;
|
|
160
|
+
},
|
|
161
|
+
);
|
|
162
|
+
participants.value = participants.value
|
|
163
|
+
.slice(0, dfirst.value)
|
|
164
|
+
.concat(responseParticipants)
|
|
165
|
+
.concat(
|
|
166
|
+
participants.value.slice(
|
|
167
|
+
dfirst.value + dsize.value,
|
|
168
|
+
participants.value.length,
|
|
169
|
+
),
|
|
170
|
+
);
|
|
171
|
+
totalCount.value = data.count;
|
|
172
|
+
} catch (error) {
|
|
173
|
+
handle403(error as AxiosError);
|
|
174
|
+
}
|
|
175
|
+
loading.value = false;
|
|
176
|
+
}
|
|
202
177
|
</script>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
name: 'playlist',
|
|
6
6
|
params: { playlistId: playlist.playlistId },
|
|
7
7
|
}"
|
|
8
|
-
:title="
|
|
8
|
+
:title="t('Playlist name page', { name: name })"
|
|
9
9
|
class="d-flex flex-grow-1 text-dark"
|
|
10
10
|
>
|
|
11
11
|
<div class="classic-element-text">
|
|
12
12
|
<div v-if="!activePlaylist" class="sticker-empty-ressource">
|
|
13
|
-
{{
|
|
13
|
+
{{ t("Empty playlist") }}
|
|
14
14
|
</div>
|
|
15
15
|
<div class="d-flex align-items-center element-name basic-line-clamp">
|
|
16
16
|
{{ name }}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<!-- eslint-enable -->
|
|
25
25
|
</div>
|
|
26
26
|
<router-link
|
|
27
|
-
v-if="!
|
|
27
|
+
v-if="!state.generalParameters.podcastmaker && playlist.organisation"
|
|
28
28
|
:to="{
|
|
29
29
|
name: 'productor',
|
|
30
30
|
params: { productorId: playlist.organisation.id },
|
|
@@ -38,63 +38,50 @@
|
|
|
38
38
|
v-lazy="useProxyImageUrl(playlist.imageUrl, '250')"
|
|
39
39
|
width="250"
|
|
40
40
|
height="250"
|
|
41
|
-
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
alt=""
|
|
42
43
|
|
|
43
|
-
:title="
|
|
44
|
+
:title="t('Playlist name image', { name: name })"
|
|
44
45
|
class="img-box"
|
|
45
46
|
/>
|
|
46
47
|
</router-link>
|
|
47
48
|
</article>
|
|
48
49
|
</template>
|
|
49
50
|
|
|
50
|
-
<script lang="ts">
|
|
51
|
+
<script setup lang="ts">
|
|
51
52
|
import { Playlist } from "@/stores/class/general/playlist";
|
|
52
53
|
import { state } from "../../../stores/ParamSdkStore";
|
|
53
54
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
54
55
|
import displayHelper from "../../../helper/displayHelper";
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
name: "PlaylistItem",
|
|
56
|
+
import { computed, onMounted, useTemplateRef } from "vue";
|
|
57
|
+
import { useI18n } from "vue-i18n";
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
const { useProxyImageUrl } = useImageProxy();
|
|
64
|
-
return { useProxyImageUrl }
|
|
65
|
-
},
|
|
59
|
+
//Props
|
|
60
|
+
const props = defineProps({
|
|
61
|
+
playlist: { default: () => ({}), type: Object as () => Playlist },
|
|
62
|
+
})
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return 0 !== Object.keys(this.playlist.samplingViews ?? []).length;
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
mounted() {
|
|
85
|
-
const playlistDesc = this.$refs.descriptionPlaylist as HTMLElement;
|
|
86
|
-
const playlistDescContainer = this.$refs
|
|
87
|
-
.descriptionPlaylistContainer as HTMLElement;
|
|
88
|
-
if (playlistDesc?.clientHeight > playlistDescContainer?.clientHeight) {
|
|
89
|
-
playlistDescContainer.classList.add("after-element-description");
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
methods:{
|
|
93
|
-
urlify(text:string|undefined){
|
|
94
|
-
return displayHelper.urlify(text);
|
|
95
|
-
},
|
|
64
|
+
//Composables
|
|
65
|
+
const { t } = useI18n();
|
|
66
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
67
|
+
|
|
68
|
+
//Computed
|
|
69
|
+
const description = computed(() => props.playlist.description ?? "");
|
|
70
|
+
const name = computed(() => props.playlist.title ?? "");
|
|
71
|
+
const activePlaylist = computed(() => 0 !== Object.keys(props.playlist.samplingViews ?? []).length);
|
|
72
|
+
|
|
73
|
+
onMounted(()=>{
|
|
74
|
+
const playlistDesc = useTemplateRef('descriptionPlaylist')?.value as HTMLElement;
|
|
75
|
+
const playlistDescContainer = useTemplateRef('descriptionPlaylistContainer')?.value as HTMLElement;
|
|
76
|
+
if (playlistDesc?.clientHeight > playlistDescContainer?.clientHeight) {
|
|
77
|
+
playlistDescContainer.classList.add("after-element-description");
|
|
96
78
|
}
|
|
97
|
-
})
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
//Methods
|
|
82
|
+
function urlify(text:string|undefined){
|
|
83
|
+
return displayHelper.urlify(text);
|
|
84
|
+
}
|
|
98
85
|
</script>
|
|
99
86
|
<style lang="scss">
|
|
100
87
|
.octopus-app .sticker-empty-ressource{
|