@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="position-relative w-100">
|
|
2
|
+
<div ref="root" class="position-relative w-100">
|
|
3
3
|
<template v-if="!isPhone">
|
|
4
4
|
<swiper
|
|
5
5
|
:key="manualReload"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
|
-
<script lang="ts">
|
|
29
|
+
<script setup lang="ts">
|
|
30
30
|
import domHelper from "../../../helper/domHelper";
|
|
31
31
|
import { state } from "../../../stores/ParamSdkStore";
|
|
32
32
|
import { Swiper, SwiperSlide } from "swiper/vue";
|
|
@@ -34,114 +34,102 @@ import { Navigation } from "swiper/modules";
|
|
|
34
34
|
import "swiper/css";
|
|
35
35
|
import "swiper/css/navigation";
|
|
36
36
|
import {useResizePhone} from "../../composable/useResizePhone";
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (this.windowWidth <= 450) {
|
|
72
|
-
return 12.5;
|
|
73
|
-
}
|
|
74
|
-
return state.generalParameters.podcastItem
|
|
75
|
-
? state.generalParameters.podcastItem
|
|
76
|
-
: 13.5;
|
|
77
|
-
},
|
|
78
|
-
/* isLoop(): boolean {
|
|
79
|
-
return this.listObject.length >= this.numberItem;
|
|
80
|
-
}, */
|
|
81
|
-
itemRecalculizedSize(): number {
|
|
82
|
-
return this.widthSwiperUsable / this.numberItem;
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
watch: {
|
|
86
|
-
windowWidth() {
|
|
87
|
-
if (!this.$el) return;
|
|
88
|
-
this.widthSwiperUsable =
|
|
89
|
-
(this.$el as HTMLElement).offsetWidth - this.offsetSwiper * 2;
|
|
90
|
-
const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.5);
|
|
91
|
-
this.numberItem = Math.max(
|
|
92
|
-
1,
|
|
93
|
-
Math.floor(this.widthSwiperUsable / sixteen),
|
|
94
|
-
);
|
|
95
|
-
this.itemSizeWithoutRecalculed =
|
|
96
|
-
(this.$el as HTMLElement).offsetWidth / this.numberItem;
|
|
97
|
-
},
|
|
98
|
-
listObject: {
|
|
99
|
-
deep: true,
|
|
100
|
-
handler() {
|
|
101
|
-
this.manualReload += 1;
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
mounted(){
|
|
106
|
-
this.$nextTick(() => {
|
|
107
|
-
this.composableInit = true;
|
|
108
|
-
});
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
methods: {
|
|
112
|
-
slidesUpdated() {
|
|
113
|
-
if (!this.$el) return;
|
|
114
|
-
const slides = this.$el.getElementsByClassName("swiper-slide");
|
|
115
|
-
for (const slide of slides) {
|
|
116
|
-
slide.style.width = this.itemRecalculizedSize + "px";
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
slideChange() {
|
|
120
|
-
if (!this.$el) return;
|
|
121
|
-
const wrapper = this.$el.getElementsByClassName("swiper-wrapper")[0];
|
|
122
|
-
if (wrapper.style.transform.includes("translate3d(40px")) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const matches = /^^translate3d\((-*\d+\.*\d*)px/.exec(
|
|
126
|
-
wrapper.style.transform,
|
|
127
|
-
);
|
|
128
|
-
if (!matches || matches.length <= 1) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const transformPixel = parseFloat(matches[1]) - this.offsetSwiper;
|
|
132
|
-
const nbTransformItems = Math.round(
|
|
133
|
-
transformPixel / this.itemSizeWithoutRecalculed,
|
|
134
|
-
);
|
|
135
|
-
wrapper.style.transform =
|
|
136
|
-
"translate3d(" +
|
|
137
|
-
(nbTransformItems * this.itemRecalculizedSize + this.offsetSwiper) +
|
|
138
|
-
"px, 0px, 0px)";
|
|
139
|
-
},
|
|
140
|
-
slidePrevButton() {
|
|
141
|
-
this.$el.querySelector(".swiper").swiper.slidePrev();
|
|
142
|
-
},
|
|
143
|
-
},
|
|
37
|
+
import { computed, nextTick, onMounted, ref, useTemplateRef, watch } from "vue";
|
|
38
|
+
|
|
39
|
+
//Props
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
listObject: { default: () => [], type: Array as () => Array<unknown> },
|
|
42
|
+
sizeItemOverload: { default: undefined, type: Number },
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
//Data
|
|
46
|
+
const manualReload = ref(0);
|
|
47
|
+
const modules = ref([Navigation]);
|
|
48
|
+
const numberItem = ref(5);
|
|
49
|
+
const offsetSwiper = ref(40);
|
|
50
|
+
const widthSwiperUsable = ref(0);
|
|
51
|
+
const itemSizeWithoutRecalculed = ref(0);
|
|
52
|
+
const composableInit = ref(false);
|
|
53
|
+
const rootRef = useTemplateRef('root');
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
//Composables
|
|
57
|
+
const { isPhone, windowWidth } = useResizePhone();
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
//Computed
|
|
61
|
+
const sizeItem = computed(() => {
|
|
62
|
+
if (props.sizeItemOverload) {
|
|
63
|
+
return props.sizeItemOverload;
|
|
64
|
+
}
|
|
65
|
+
if (windowWidth.value <= 450) {
|
|
66
|
+
return 12.5;
|
|
67
|
+
}
|
|
68
|
+
return state.generalParameters.podcastItem
|
|
69
|
+
? state.generalParameters.podcastItem
|
|
70
|
+
: 13.5;
|
|
144
71
|
});
|
|
72
|
+
const itemRecalculizedSize = computed(() => widthSwiperUsable.value / numberItem.value);
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
//Watch
|
|
76
|
+
watch(windowWidth, () => onWindowResize());
|
|
77
|
+
watch(()=>props.listObject, () => {
|
|
78
|
+
manualReload.value += 1;
|
|
79
|
+
}, {deep:true});
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
onMounted(()=>{
|
|
83
|
+
nextTick(() => {
|
|
84
|
+
onWindowResize();
|
|
85
|
+
composableInit.value = true;
|
|
86
|
+
});
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
//Methods
|
|
91
|
+
function onWindowResize(){
|
|
92
|
+
const el = rootRef?.value as HTMLElement;
|
|
93
|
+
if (!el) return;
|
|
94
|
+
widthSwiperUsable.value =el.offsetWidth - offsetSwiper.value * 2;
|
|
95
|
+
const sixteen = domHelper.convertRemToPixels(sizeItem.value + 0.5);
|
|
96
|
+
numberItem.value = Math.max(
|
|
97
|
+
1,
|
|
98
|
+
Math.floor(widthSwiperUsable.value / sixteen),
|
|
99
|
+
);
|
|
100
|
+
itemSizeWithoutRecalculed.value =el.offsetWidth / numberItem.value;
|
|
101
|
+
}
|
|
102
|
+
function slidesUpdated() {
|
|
103
|
+
const el = rootRef?.value as HTMLElement;
|
|
104
|
+
if (!el) return;
|
|
105
|
+
const slides = el.getElementsByClassName("swiper-slide") as Array<HTMLElement>;
|
|
106
|
+
for (const slide of slides) {
|
|
107
|
+
slide.style.width = itemRecalculizedSize.value + "px";
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function slideChange() {
|
|
111
|
+
const el = rootRef?.value as HTMLElement;
|
|
112
|
+
if (!el) return;
|
|
113
|
+
const wrapper = el.getElementsByClassName("swiper-wrapper")[0] as HTMLElement;
|
|
114
|
+
if (wrapper.style.transform.includes("translate3d(40px")) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const matches = /^^translate3d\((-*\d+\.*\d*)px/.exec(
|
|
118
|
+
wrapper.style.transform,
|
|
119
|
+
);
|
|
120
|
+
if (!matches || matches.length <= 1) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const transformPixel = parseFloat(matches[1]) - offsetSwiper.value;
|
|
124
|
+
const nbTransformItems = Math.round(
|
|
125
|
+
transformPixel / itemSizeWithoutRecalculed.value,
|
|
126
|
+
);
|
|
127
|
+
wrapper.style.transform =
|
|
128
|
+
"translate3d(" +
|
|
129
|
+
(nbTransformItems * itemRecalculizedSize.value + offsetSwiper.value) +
|
|
130
|
+
"px, 0px, 0px)";
|
|
131
|
+
}
|
|
132
|
+
|
|
145
133
|
</script>
|
|
146
134
|
<style lang="scss">
|
|
147
135
|
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column align-items-center bg-warning p-3 mb-3">
|
|
3
|
-
<div>{{
|
|
3
|
+
<div>{{ t("This live will start") }}</div>
|
|
4
4
|
<div v-if="countdownTimer">
|
|
5
5
|
{{
|
|
6
|
-
|
|
6
|
+
t("In days hours minutes seconds",countdownValues)
|
|
7
7
|
}}
|
|
8
8
|
</div>
|
|
9
9
|
<div v-else>
|
|
10
|
-
{{
|
|
10
|
+
{{ t("In a moment") }}
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script lang="ts"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { useI18n } from "vue-i18n";
|
|
17
|
+
import {useCountdown} from "../../composable/podcasts/useCountdown";
|
|
18
|
+
|
|
19
|
+
//Props
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
timeRemaining:{ default: undefined, type: Number },
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
//Composables
|
|
25
|
+
const { t } = useI18n();
|
|
26
|
+
const { countdownValues, countdownTimer } = useCountdown(props.timeRemaining);
|
|
21
27
|
</script>
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<div class="thought">
|
|
11
11
|
<template v-if="!props.overrideText">
|
|
12
|
-
{{
|
|
12
|
+
{{ t("This live will start") }}
|
|
13
13
|
<span class="text-lowercase">
|
|
14
14
|
<template v-if="countdownTimer">
|
|
15
15
|
{{
|
|
16
|
-
|
|
16
|
+
t("In days hours minutes seconds", countdownValues)
|
|
17
17
|
}}
|
|
18
18
|
</template>
|
|
19
19
|
<template v-else>
|
|
20
|
-
{{
|
|
20
|
+
{{ t("In a moment") }}
|
|
21
21
|
</template>
|
|
22
22
|
</span>
|
|
23
23
|
</template>
|
|
@@ -27,13 +27,19 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
|
-
<script lang="ts"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { useI18n } from "vue-i18n";
|
|
32
|
+
import {useCountdown} from "../../composable/podcasts/useCountdown";
|
|
33
|
+
|
|
34
|
+
//Props
|
|
35
|
+
const props = defineProps({
|
|
36
|
+
timeRemaining:{ default: undefined, type: Number },
|
|
37
|
+
overrideText: { default: undefined, type: String },
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
//Composables
|
|
41
|
+
const { t } = useI18n();
|
|
42
|
+
const { countdownValues, countdownTimer } = useCountdown(props.timeRemaining);
|
|
37
43
|
</script>
|
|
38
44
|
|
|
39
45
|
<style lang="scss">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="notEmpty">
|
|
3
3
|
<h3 class="mb-0 mt-3">
|
|
4
|
-
{{
|
|
4
|
+
{{ t("All live emission button") }}
|
|
5
5
|
</h3>
|
|
6
6
|
<ListPaginate
|
|
7
7
|
id="liveListPaginate"
|
|
@@ -23,117 +23,109 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<script lang="ts">
|
|
26
|
+
<script setup lang="ts">
|
|
27
27
|
import ListPaginate from "../list/ListPaginate.vue";
|
|
28
28
|
import classicApi from "../../../api/classicApi";
|
|
29
29
|
import PodcastItem from "../podcasts/PodcastItem.vue";
|
|
30
30
|
import { Podcast, emptyPodcastData } from "@/stores/class/general/podcast";
|
|
31
|
-
import {
|
|
31
|
+
import { computed, onBeforeMount, Ref, ref, watch } from "vue";
|
|
32
32
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
33
|
-
|
|
34
|
-
name: "LiveHorizontalList",
|
|
33
|
+
import { useI18n } from "vue-i18n";
|
|
35
34
|
|
|
36
|
-
components: {
|
|
37
|
-
PodcastItem,
|
|
38
|
-
ListPaginate,
|
|
39
|
-
},
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
36
|
+
//Props
|
|
37
|
+
const props = defineProps({
|
|
38
|
+
first: { default: 0, type: Number },
|
|
39
|
+
size: { default: 30, type: Number },
|
|
40
|
+
emissionId: { default: undefined, type: Number },
|
|
41
|
+
})
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
isMobile: false as boolean,
|
|
56
|
-
};
|
|
57
|
-
},
|
|
43
|
+
//Data
|
|
44
|
+
const dfirst = ref(props.first);
|
|
45
|
+
const dsize = ref(props.size);
|
|
46
|
+
const totalCount = ref(0);
|
|
47
|
+
const lives: Ref<Array<Podcast>> = ref([]);
|
|
48
|
+
const notEmpty = ref(false);
|
|
49
|
+
const inFetching = ref(false);
|
|
50
|
+
const isMobile = ref(false);
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (this.isMobile) {
|
|
62
|
-
return this.lives;
|
|
63
|
-
}
|
|
64
|
-
return this.lives.slice(
|
|
65
|
-
this.dfirst,
|
|
66
|
-
Math.min(this.dfirst + this.dsize, this.totalCount),
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
watch: {
|
|
71
|
-
dsize(): void {
|
|
72
|
-
this.reloadList();
|
|
73
|
-
},
|
|
74
|
-
dfirst(): void {
|
|
75
|
-
if (!this.lives[this.dfirst] || 0 === this.lives[this.dfirst].podcastId) {
|
|
76
|
-
this.fetchContent(false);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
},
|
|
52
|
+
//Composables
|
|
53
|
+
const { t } = useI18n();
|
|
80
54
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.inFetching = true;
|
|
91
|
-
if (reset) {
|
|
92
|
-
this.notEmpty = false;
|
|
93
|
-
}
|
|
94
|
-
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
95
|
-
api: 0,
|
|
96
|
-
path: "podcast/search",
|
|
97
|
-
parameters: {
|
|
98
|
-
first: this.dfirst,
|
|
99
|
-
size: this.dsize,
|
|
100
|
-
emissionId: this.emissionId,
|
|
101
|
-
sort: "DATE",
|
|
102
|
-
includeStatus: "READY_TO_RECORD",
|
|
103
|
-
},
|
|
104
|
-
specialTreatement: true,
|
|
105
|
-
});
|
|
106
|
-
this.afterFetching(reset, data);
|
|
107
|
-
},
|
|
108
|
-
afterFetching(
|
|
109
|
-
reset: boolean,
|
|
110
|
-
data: { count: number; result: Array<Podcast>; sort: string },
|
|
111
|
-
): void {
|
|
112
|
-
if (reset) {
|
|
113
|
-
this.lives.length = 0;
|
|
114
|
-
}
|
|
115
|
-
if (this.dfirst > this.lives.length) {
|
|
116
|
-
for (
|
|
117
|
-
let i = this.lives.length - 1, len = this.dfirst + this.dsize;
|
|
118
|
-
i < len;
|
|
119
|
-
i++
|
|
120
|
-
) {
|
|
121
|
-
this.lives.push(emptyPodcastData());
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const responseLives = data.result.filter((l: Podcast | null) => {
|
|
125
|
-
return null !== l;
|
|
126
|
-
});
|
|
127
|
-
this.lives = this.lives
|
|
128
|
-
.slice(0, this.dfirst)
|
|
129
|
-
.concat(responseLives)
|
|
130
|
-
.concat(this.lives.slice(this.dfirst + this.dsize, this.lives.length));
|
|
131
|
-
this.totalCount = data.count;
|
|
132
|
-
if (0 !== this.lives.length) {
|
|
133
|
-
this.notEmpty = true;
|
|
134
|
-
}
|
|
135
|
-
this.inFetching = false;
|
|
136
|
-
},
|
|
137
|
-
},
|
|
55
|
+
//Computed
|
|
56
|
+
const displayArray = computed(() => {
|
|
57
|
+
if (isMobile.value) {
|
|
58
|
+
return lives.value;
|
|
59
|
+
}
|
|
60
|
+
return lives.value.slice(
|
|
61
|
+
dfirst.value,
|
|
62
|
+
Math.min(dfirst.value + dsize.value, totalCount.value),
|
|
63
|
+
);
|
|
138
64
|
});
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
//Watch
|
|
68
|
+
watch(dsize, () => reloadList());
|
|
69
|
+
watch(dfirst, () => {
|
|
70
|
+
if (!lives.value[dfirst.value] || 0 === lives.value[dfirst.value].podcastId) {
|
|
71
|
+
fetchContent(false);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
onBeforeMount(()=>fetchContent(true))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
//Methods
|
|
79
|
+
function reloadList() {
|
|
80
|
+
dfirst.value = 0;
|
|
81
|
+
fetchContent(true);
|
|
82
|
+
}
|
|
83
|
+
async function fetchContent(reset: boolean): Promise<void> {
|
|
84
|
+
inFetching.value = true;
|
|
85
|
+
if (reset) {
|
|
86
|
+
notEmpty.value = false;
|
|
87
|
+
}
|
|
88
|
+
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
89
|
+
api: 0,
|
|
90
|
+
path: "podcast/search",
|
|
91
|
+
parameters: {
|
|
92
|
+
first: dfirst.value,
|
|
93
|
+
size: dsize.value,
|
|
94
|
+
emissionId: props.emissionId,
|
|
95
|
+
sort: "DATE",
|
|
96
|
+
includeStatus: "READY_TO_RECORD",
|
|
97
|
+
},
|
|
98
|
+
specialTreatement: true,
|
|
99
|
+
});
|
|
100
|
+
afterFetching(reset, data);
|
|
101
|
+
}
|
|
102
|
+
function afterFetching(
|
|
103
|
+
reset: boolean,
|
|
104
|
+
data: { count: number; result: Array<Podcast>; sort: string },
|
|
105
|
+
): void {
|
|
106
|
+
if (reset) {
|
|
107
|
+
lives.value.length = 0;
|
|
108
|
+
}
|
|
109
|
+
if (dfirst.value > lives.value.length) {
|
|
110
|
+
for (
|
|
111
|
+
let i = lives.value.length - 1, len = dfirst.value + dsize.value;
|
|
112
|
+
i < len;
|
|
113
|
+
i++
|
|
114
|
+
) {
|
|
115
|
+
lives.value.push(emptyPodcastData());
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const responseLives = data.result.filter((l: Podcast | null) => {
|
|
119
|
+
return null !== l;
|
|
120
|
+
});
|
|
121
|
+
lives.value = lives.value
|
|
122
|
+
.slice(0, dfirst.value)
|
|
123
|
+
.concat(responseLives)
|
|
124
|
+
.concat(lives.value.slice(dfirst.value + dsize.value, lives.value.length));
|
|
125
|
+
totalCount.value = data.count;
|
|
126
|
+
if (0 !== lives.value.length) {
|
|
127
|
+
notEmpty.value = true;
|
|
128
|
+
}
|
|
129
|
+
inFetching.value = false;
|
|
130
|
+
}
|
|
139
131
|
</script>
|
|
@@ -6,89 +6,80 @@
|
|
|
6
6
|
/>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<script lang="ts">
|
|
9
|
+
<script setup lang="ts">
|
|
10
10
|
import classicApi from "../../../api/classicApi";
|
|
11
11
|
import PodcastItem from "../podcasts/PodcastItem.vue";
|
|
12
12
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
13
|
-
import {
|
|
13
|
+
import {onBeforeMount, onUnmounted, ref, Ref } from "vue";
|
|
14
14
|
import {
|
|
15
15
|
Conference,
|
|
16
16
|
ConferencePublicInfo,
|
|
17
17
|
} from "@/stores/class/conference/conference";
|
|
18
|
-
export default defineComponent({
|
|
19
|
-
name: "LiveItem",
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
//Props
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
fetchConference: { default: undefined, type: Object as () => Conference },
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
//Emits
|
|
25
|
+
const emit = defineEmits(["deleteItem", "updateItem"]);
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
watchInterval: undefined as ReturnType<typeof setInterval> | undefined,
|
|
33
|
-
};
|
|
34
|
-
},
|
|
27
|
+
//Data
|
|
28
|
+
const live: Ref<Podcast | undefined> = ref(undefined);
|
|
29
|
+
const watchInterval: Ref<ReturnType<typeof setInterval> | undefined> = ref(undefined);
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
await classicApi.deleteData({
|
|
64
|
-
api: 9,
|
|
65
|
-
path: "conference/" + this.fetchConference.conferenceId,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
async fetchStatus(): Promise<void> {
|
|
71
|
-
if (
|
|
72
|
-
!this.fetchConference ||
|
|
73
|
-
("PLANNED" !== this.fetchConference.status &&
|
|
74
|
-
"PENDING" !== this.fetchConference.status &&
|
|
75
|
-
"RECORDING" !== this.fetchConference.status)
|
|
76
|
-
) {
|
|
77
|
-
this.clearWatchStatus();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const confInfo = await classicApi.fetchData<ConferencePublicInfo>({
|
|
31
|
+
|
|
32
|
+
onBeforeMount(()=>initLiveItem());
|
|
33
|
+
onUnmounted(()=>clearWatchStatus())
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
//Methods
|
|
37
|
+
function clearWatchStatus() {
|
|
38
|
+
clearInterval(watchInterval.value as unknown as number);
|
|
39
|
+
watchInterval.value = undefined;
|
|
40
|
+
}
|
|
41
|
+
async function initLiveItem(){
|
|
42
|
+
await fetchPodcastData();
|
|
43
|
+
watchInterval.value = setInterval(() => {
|
|
44
|
+
fetchStatus();
|
|
45
|
+
}, 5000);
|
|
46
|
+
}
|
|
47
|
+
async function fetchPodcastData(): Promise<void> {
|
|
48
|
+
if (!props.fetchConference?.podcastId) return;
|
|
49
|
+
try {
|
|
50
|
+
live.value = await classicApi.fetchData<Podcast>({
|
|
51
|
+
api: 0,
|
|
52
|
+
path: "podcast/" + props.fetchConference.podcastId,
|
|
53
|
+
});
|
|
54
|
+
} catch {
|
|
55
|
+
emit("deleteItem");
|
|
56
|
+
if (props.fetchConference.conferenceId) {
|
|
57
|
+
await classicApi.deleteData({
|
|
81
58
|
api: 9,
|
|
82
|
-
path: "conference/
|
|
59
|
+
path: "conference/" + props.fetchConference.conferenceId,
|
|
83
60
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function fetchStatus(): Promise<void> {
|
|
65
|
+
if (
|
|
66
|
+
!props.fetchConference ||
|
|
67
|
+
("PLANNED" !== props.fetchConference.status &&
|
|
68
|
+
"PENDING" !== props.fetchConference.status &&
|
|
69
|
+
"RECORDING" !== props.fetchConference.status)
|
|
70
|
+
) {
|
|
71
|
+
clearWatchStatus();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const confInfo = await classicApi.fetchData<ConferencePublicInfo>({
|
|
75
|
+
api: 9,
|
|
76
|
+
path: "conference/info/" + props.fetchConference.conferenceId,
|
|
77
|
+
});
|
|
78
|
+
if (confInfo.status !== props.fetchConference.status) {
|
|
79
|
+
emit("updateItem", {
|
|
80
|
+
...props.fetchConference,
|
|
81
|
+
...confInfo,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
94
85
|
</script>
|