@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
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
class="d-flex justify-content-between flex-grow-1 mb-3 w-100 align-items-center"
|
|
5
5
|
>
|
|
6
6
|
<h2 class="mb-0">
|
|
7
|
-
{{
|
|
7
|
+
{{ t("Live") }}
|
|
8
8
|
</h2>
|
|
9
9
|
<router-link
|
|
10
10
|
v-if="liveRight && !isPodcastmaker"
|
|
11
11
|
to="/main/priv/edit/live"
|
|
12
12
|
>
|
|
13
13
|
<button class="btn btn-primary">
|
|
14
|
-
{{
|
|
14
|
+
{{ t("Launch a new live") }}
|
|
15
15
|
</button>
|
|
16
16
|
</router-link>
|
|
17
17
|
</div>
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
v-if="lives.length || 'ALL' !== selectedStatus"
|
|
20
20
|
v-model:text-init="selectedStatus"
|
|
21
21
|
id-select="status-live-chooser-select"
|
|
22
|
-
:label="
|
|
22
|
+
:label="t('Selection by status')"
|
|
23
23
|
:display-label="false"
|
|
24
24
|
:options="statusArraySelect"
|
|
25
25
|
class="mb-3"
|
|
26
26
|
/>
|
|
27
27
|
<ClassicLoading
|
|
28
|
-
:loading-text="loading ?
|
|
29
|
-
:error-text="0 === lives.length ?
|
|
28
|
+
:loading-text="loading ? t('Loading lives...') : undefined"
|
|
29
|
+
:error-text="0 === lives.length ? t('No live currently') : undefined"
|
|
30
30
|
/>
|
|
31
31
|
<template v-if="lives.length">
|
|
32
32
|
<SwiperList v-if="!loading" :list-object="lives">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</section>
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
|
-
<script lang="ts">
|
|
45
|
+
<script setup lang="ts">
|
|
46
46
|
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
47
47
|
import LiveItem from "./LiveItem.vue";
|
|
48
48
|
import ClassicSelect from "../../form/ClassicSelect.vue";
|
|
@@ -52,85 +52,79 @@ import {useOrgaComputed} from "../../composable/useOrgaComputed";
|
|
|
52
52
|
import classicApi from "../../../api/classicApi";
|
|
53
53
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
54
54
|
import { useFilterStore } from "../../../stores/FilterStore";
|
|
55
|
-
import { mapActions, mapState } from "pinia";
|
|
56
55
|
import { Conference } from "@/stores/class/conference/conference";
|
|
57
|
-
import {
|
|
56
|
+
import { computed, Ref, ref, watch } from "vue";
|
|
58
57
|
import { AxiosError } from "axios";
|
|
59
58
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
60
|
-
|
|
61
|
-
name: "LiveList",
|
|
62
|
-
components: {
|
|
63
|
-
LiveItem,
|
|
64
|
-
ClassicLoading,
|
|
65
|
-
SwiperList,
|
|
66
|
-
ClassicSelect,
|
|
67
|
-
},
|
|
59
|
+
import { useI18n } from "vue-i18n";
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
const { isPodcastmaker, isEditRights } = useOrgaComputed();
|
|
75
|
-
const {handle403} = useErrorHandler();
|
|
76
|
-
return { isPodcastmaker, isEditRights, handle403 }
|
|
77
|
-
},
|
|
78
|
-
data() {
|
|
79
|
-
return {
|
|
80
|
-
loading: true as boolean,
|
|
81
|
-
loaded: true as boolean,
|
|
82
|
-
lives: [] as Array<Conference>,
|
|
83
|
-
isLiveAuthorized: false as boolean,
|
|
84
|
-
statusClassic: ["RECORDING", "PENDING", "PLANNED"] as Array<string>,
|
|
85
|
-
statusAdmin: ["DEBRIEFING", "ERROR", "PUBLISHING"] as Array<string>,
|
|
86
|
-
selectedStatus: "ALL" as string,
|
|
87
|
-
};
|
|
88
|
-
},
|
|
61
|
+
//Props
|
|
62
|
+
const props = defineProps({
|
|
63
|
+
organisationId: { default: undefined, type: String },
|
|
64
|
+
hideIfEmpty: { default: false, type: Boolean },
|
|
65
|
+
})
|
|
89
66
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
67
|
+
//Data
|
|
68
|
+
const loading = ref(true);
|
|
69
|
+
const loaded = ref(true);
|
|
70
|
+
const lives: Ref<Array<Conference>> = ref([]);
|
|
71
|
+
const isLiveAuthorized = ref(false);
|
|
72
|
+
const statusClassic= ref(["RECORDING", "PENDING", "PLANNED"]);
|
|
73
|
+
const statusAdmin = ref(["DEBRIEFING", "ERROR", "PUBLISHING"]);
|
|
74
|
+
const selectedStatus = ref("ALL");
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
//Composables
|
|
78
|
+
const { t } = useI18n();
|
|
79
|
+
const { isPodcastmaker, isEditRights } = useOrgaComputed();
|
|
80
|
+
const {handle403} = useErrorHandler();
|
|
81
|
+
const authStore = useAuthStore();
|
|
82
|
+
const filterStore = useFilterStore();
|
|
83
|
+
const saveFetchStore = useSaveFetchStore();
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
//Computed
|
|
87
|
+
const displayLiveList = computed(() => {
|
|
88
|
+
return (
|
|
89
|
+
(undefined !== filterStore.filterOrgaId ||
|
|
90
|
+
undefined !== props.organisationId) &&
|
|
91
|
+
(!props.hideIfEmpty || (props.hideIfEmpty && 0 !== lives.value.length))
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
const filterOrgaUsed = computed(() => {
|
|
95
|
+
return filterStore.filterOrgaId ? filterStore.filterOrgaId : props.organisationId;
|
|
96
|
+
});
|
|
97
|
+
const editRight = computed(() => {
|
|
98
|
+
return isEditRights(filterOrgaUsed.value);
|
|
99
|
+
});
|
|
100
|
+
const liveRight = computed(() => {
|
|
101
|
+
return (
|
|
102
|
+
authStore.isRoleLive &&
|
|
103
|
+
"true" === authStore.authOrganisation.attributes?.["live.active"]
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
const statusArraySelect = computed(() => {
|
|
107
|
+
const statusArray = [{ title: t("All lives"), value: "ALL" }];
|
|
108
|
+
for (const status of statusFetched.value) {
|
|
115
109
|
let title = "";
|
|
116
110
|
switch (status) {
|
|
117
111
|
case "RECORDING":
|
|
118
|
-
title =
|
|
112
|
+
title = t("In live");
|
|
119
113
|
break;
|
|
120
114
|
case "PENDING":
|
|
121
|
-
title =
|
|
115
|
+
title = t("live upcoming");
|
|
122
116
|
break;
|
|
123
117
|
case "PLANNED":
|
|
124
|
-
title =
|
|
118
|
+
title = t("live in few time");
|
|
125
119
|
break;
|
|
126
120
|
case "DEBRIEFING":
|
|
127
|
-
title =
|
|
121
|
+
title = t("In debriefing");
|
|
128
122
|
break;
|
|
129
123
|
case "PUBLISHING":
|
|
130
|
-
title =
|
|
124
|
+
title = t("In the process of being published");
|
|
131
125
|
break;
|
|
132
126
|
case "ERROR":
|
|
133
|
-
title =
|
|
127
|
+
title = t("In error");
|
|
134
128
|
break;
|
|
135
129
|
default:
|
|
136
130
|
break;
|
|
@@ -138,75 +132,69 @@ export default defineComponent({
|
|
|
138
132
|
statusArray.push({ title: title, value: status });
|
|
139
133
|
}
|
|
140
134
|
return statusArray;
|
|
141
|
-
},
|
|
142
|
-
statusFetched(): Array<string> {
|
|
143
|
-
if (this.editRight) {
|
|
144
|
-
return this.statusClassic.concat(this.statusAdmin);
|
|
145
|
-
}
|
|
146
|
-
return this.statusClassic;
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
watch: {
|
|
150
|
-
filterOrgaUsed: {
|
|
151
|
-
async handler(): Promise<void> {
|
|
152
|
-
await this.checkIfLiveAuthorized();
|
|
153
|
-
this.fetchContent();
|
|
154
|
-
},
|
|
155
|
-
immediate: true,
|
|
156
|
-
},
|
|
157
|
-
selectedStatus() {
|
|
158
|
-
this.fetchContent();
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
methods: {
|
|
162
|
-
...mapActions(useSaveFetchStore, ["getOrgaLiveEnabled"]),
|
|
163
|
-
async checkIfLiveAuthorized(): Promise<void> {
|
|
164
|
-
if (!this.filterOrgaUsed) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
this.isLiveAuthorized = await this.getOrgaLiveEnabled(
|
|
168
|
-
this.filterOrgaUsed,
|
|
169
|
-
);
|
|
170
|
-
},
|
|
171
|
-
endLoading(): void {
|
|
172
|
-
this.loading = false;
|
|
173
|
-
this.loaded = true;
|
|
174
|
-
},
|
|
175
|
-
updateLive(live: Conference, index: number): void {
|
|
176
|
-
this.lives.splice(index, 1, live);
|
|
177
|
-
},
|
|
178
|
-
async fetchContent(): Promise<void> {
|
|
179
|
-
this.lives.length = 0;
|
|
180
|
-
if (!this.filterOrgaUsed || !this.isLiveAuthorized) {
|
|
181
|
-
this.endLoading();
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
this.loading = true;
|
|
185
|
-
this.loaded = false;
|
|
186
|
-
try {
|
|
187
|
-
const dataLives = await classicApi.fetchData<Array<Conference>>({
|
|
188
|
-
api: 9,
|
|
189
|
-
path: "conference/list",
|
|
190
|
-
parameters: {
|
|
191
|
-
organisationId: this.filterOrgaUsed,
|
|
192
|
-
withPodcastId: true,
|
|
193
|
-
status:
|
|
194
|
-
"ALL" === this.selectedStatus
|
|
195
|
-
? this.statusFetched
|
|
196
|
-
: this.selectedStatus,
|
|
197
|
-
},
|
|
198
|
-
});
|
|
199
|
-
this.lives = dataLives.filter((p: Conference | null) => {
|
|
200
|
-
return null !== p;
|
|
201
|
-
});
|
|
202
|
-
} catch (error) {
|
|
203
|
-
this.handle403(error as AxiosError);
|
|
204
|
-
}
|
|
205
|
-
this.endLoading();
|
|
206
|
-
},
|
|
207
|
-
deleteLive(index: number): void {
|
|
208
|
-
this.lives.splice(index, 1);
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
135
|
});
|
|
136
|
+
const statusFetched = computed(() => {
|
|
137
|
+
if (editRight.value) {
|
|
138
|
+
return statusClassic.value.concat(statusAdmin.value);
|
|
139
|
+
}
|
|
140
|
+
return statusClassic.value;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
//Watch
|
|
145
|
+
watch(filterOrgaUsed, async () => {
|
|
146
|
+
await checkIfLiveAuthorized();
|
|
147
|
+
fetchContent();
|
|
148
|
+
}, {immediate: true});
|
|
149
|
+
watch(selectedStatus, () => fetchContent());
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
//Methods
|
|
153
|
+
async function checkIfLiveAuthorized(): Promise<void> {
|
|
154
|
+
if (!filterOrgaUsed.value) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
isLiveAuthorized.value = await saveFetchStore.getOrgaLiveEnabled(
|
|
158
|
+
filterOrgaUsed.value,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function endLoading(): void {
|
|
162
|
+
loading.value = false;
|
|
163
|
+
loaded.value = true;
|
|
164
|
+
}
|
|
165
|
+
function updateLive(live: Conference, index: number): void {
|
|
166
|
+
lives.value.splice(index, 1, live);
|
|
167
|
+
}
|
|
168
|
+
async function fetchContent(): Promise<void> {
|
|
169
|
+
lives.value.length = 0;
|
|
170
|
+
if (!filterOrgaUsed.value || !isLiveAuthorized.value) {
|
|
171
|
+
endLoading();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
loading.value = true;
|
|
175
|
+
loaded.value = false;
|
|
176
|
+
try {
|
|
177
|
+
const dataLives = await classicApi.fetchData<Array<Conference>>({
|
|
178
|
+
api: 9,
|
|
179
|
+
path: "conference/list",
|
|
180
|
+
parameters: {
|
|
181
|
+
organisationId: filterOrgaUsed.value,
|
|
182
|
+
withPodcastId: true,
|
|
183
|
+
status:
|
|
184
|
+
"ALL" === selectedStatus.value
|
|
185
|
+
? statusFetched.value
|
|
186
|
+
: selectedStatus.value,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
lives.value = dataLives.filter((p: Conference | null) => {
|
|
190
|
+
return null !== p;
|
|
191
|
+
});
|
|
192
|
+
} catch (error) {
|
|
193
|
+
handle403(error as AxiosError);
|
|
194
|
+
}
|
|
195
|
+
endLoading();
|
|
196
|
+
}
|
|
197
|
+
function deleteLive(index: number): void {
|
|
198
|
+
lives.value.splice(index, 1);
|
|
199
|
+
}
|
|
212
200
|
</script>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
v-if="currentlyPlayingString.length || podcastRadio"
|
|
5
5
|
class="me-2 fw-bold"
|
|
6
6
|
>
|
|
7
|
-
{{
|
|
7
|
+
{{ t("Currently") + " : " }}
|
|
8
8
|
</div>
|
|
9
9
|
<router-link
|
|
10
10
|
v-if="podcastRadio"
|
|
@@ -13,16 +13,17 @@
|
|
|
13
13
|
name: 'podcast',
|
|
14
14
|
params: { podcastId: podcastRadio.podcastId },
|
|
15
15
|
}"
|
|
16
|
-
:title="
|
|
16
|
+
:title="t('Episode name page', { name: podcastRadio.title })"
|
|
17
17
|
>
|
|
18
18
|
<img
|
|
19
19
|
v-lazy="useProxyImageUrl(podcastRadio.imageUrl, '80')"
|
|
20
20
|
width="80"
|
|
21
21
|
height="80"
|
|
22
22
|
class="small-img-box"
|
|
23
|
-
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
alt=""
|
|
24
25
|
|
|
25
|
-
:title="
|
|
26
|
+
:title="t('Episode name image', { name: podcastRadio.title })"
|
|
26
27
|
/>
|
|
27
28
|
<div>{{ podcastRadio.title }}</div>
|
|
28
29
|
</router-link>
|
|
@@ -32,87 +33,79 @@
|
|
|
32
33
|
</div>
|
|
33
34
|
</template>
|
|
34
35
|
|
|
35
|
-
<script lang="ts">
|
|
36
|
+
<script setup lang="ts">
|
|
36
37
|
import {useFetchRadio} from "../../composable/radio/usefetchRadioData";
|
|
37
38
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
38
|
-
import { mapState } from "pinia";
|
|
39
39
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
40
|
-
import {
|
|
40
|
+
import { computed, onMounted, onUnmounted, ref, Ref } from "vue";
|
|
41
41
|
import { Canal } from "@/stores/class/radio/canal";
|
|
42
42
|
import { MediaRadio } from "@/stores/class/general/player";
|
|
43
43
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
44
|
-
|
|
45
|
-
name: "RadioItem",
|
|
44
|
+
import { useI18n } from "vue-i18n";
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
//Props
|
|
47
|
+
const props = defineProps({
|
|
48
|
+
radio: { default: undefined, type: Object as () => Canal },
|
|
49
|
+
})
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const { fetchRadioMetadata, displayTitle } = useFetchRadio();
|
|
54
|
-
const { useProxyImageUrl } = useImageProxy();
|
|
55
|
-
return { fetchRadioMetadata, displayTitle, useProxyImageUrl };
|
|
56
|
-
},
|
|
51
|
+
//Data
|
|
52
|
+
const currentMetadata: Ref<MediaRadio | undefined> = ref(undefined);
|
|
53
|
+
const currentPodcast: Ref<Podcast | undefined> = ref(undefined);
|
|
54
|
+
const radioInterval: Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
|
|
57
55
|
|
|
56
|
+
|
|
57
|
+
//Composables
|
|
58
|
+
const { t } = useI18n();
|
|
59
|
+
const { fetchRadioMetadata, displayTitle } = useFetchRadio();
|
|
60
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
61
|
+
const playerStore = usePlayerStore();
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
//Computed
|
|
64
|
+
const playingRadio = computed(() => playerStore.playerRadio && playerStore.playerRadio.canalId === props.radio?.id);
|
|
65
|
+
const podcastRadio = computed(() => {
|
|
66
|
+
if (playingRadio.value) {
|
|
67
|
+
return playerStore.playerRadio?.podcast;
|
|
68
|
+
}
|
|
69
|
+
return currentPodcast.value;
|
|
70
|
+
});
|
|
71
|
+
const currentlyPlayingString = computed(() => {
|
|
72
|
+
if (playingRadio.value && playerStore.playerRadio) {
|
|
73
|
+
return displayTitle(playerStore.playerRadio.metadata);
|
|
74
|
+
}
|
|
75
|
+
if (currentMetadata.value) {
|
|
76
|
+
return displayTitle(currentMetadata.value);
|
|
77
|
+
}
|
|
78
|
+
return "";
|
|
79
|
+
});
|
|
66
80
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (this.playingRadio) {
|
|
74
|
-
return this.playerRadio?.podcast;
|
|
75
|
-
}
|
|
76
|
-
return this.currentPodcast;
|
|
77
|
-
},
|
|
78
|
-
currentlyPlayingString(): string {
|
|
79
|
-
if (this.playingRadio && this.playerRadio) {
|
|
80
|
-
return this.displayTitle(this.playerRadio.metadata);
|
|
81
|
-
}
|
|
82
|
-
if (this.currentMetadata) {
|
|
83
|
-
return this.displayTitle(this.currentMetadata);
|
|
84
|
-
}
|
|
85
|
-
return "";
|
|
86
|
-
},
|
|
87
|
-
},
|
|
81
|
+
onMounted(()=>{
|
|
82
|
+
fetchCurrentlyPlaying();
|
|
83
|
+
radioInterval.value = setInterval(() => {
|
|
84
|
+
fetchCurrentlyPlaying();
|
|
85
|
+
}, 10000);
|
|
86
|
+
})
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
updateMetadata(metadata: MediaRadio, podcast?: Podcast): void {
|
|
111
|
-
this.currentMetadata = metadata;
|
|
112
|
-
this.currentPodcast = podcast;
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
});
|
|
88
|
+
onUnmounted(()=>{
|
|
89
|
+
clearInterval(radioInterval.value as unknown as number);
|
|
90
|
+
radioInterval.value= undefined;
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
//Methods
|
|
95
|
+
async function fetchCurrentlyPlaying(): Promise<void> {
|
|
96
|
+
if (!props.radio || playingRadio.value) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
fetchRadioMetadata(
|
|
100
|
+
props.radio.id,
|
|
101
|
+
currentMetadata.value?.title ?? "",
|
|
102
|
+
updateMetadata,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function updateMetadata(metadata: MediaRadio, podcast?: Podcast): void {
|
|
106
|
+
currentMetadata.value = metadata;
|
|
107
|
+
currentPodcast.value = podcast;
|
|
108
|
+
}
|
|
116
109
|
</script>
|
|
117
110
|
<style lang="scss">
|
|
118
111
|
.octopus-app .small-img-box {
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"
|
|
11
11
|
width="270"
|
|
12
12
|
height="270"
|
|
13
|
-
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
alt=""
|
|
14
15
|
|
|
15
16
|
class="img-box img-box-podcast"
|
|
16
|
-
:title="
|
|
17
|
+
:title="t('Canal name image', { name: radio.name })"
|
|
17
18
|
/>
|
|
18
19
|
<button class="radio-play-button" @click="playRadio">
|
|
19
|
-
<PlayIcon v-if="!playingRadio" :title="
|
|
20
|
+
<PlayIcon v-if="!playingRadio" :title="t('Play')" :size="40" />
|
|
20
21
|
<PodcastIsPlaying v-else/>
|
|
21
22
|
<div class="ms-2">
|
|
22
23
|
{{ playText }}
|
|
@@ -25,62 +26,50 @@
|
|
|
25
26
|
</div>
|
|
26
27
|
</template>
|
|
27
28
|
|
|
28
|
-
<script lang="ts">
|
|
29
|
+
<script setup lang="ts">
|
|
29
30
|
import PlayIcon from "vue-material-design-icons/Play.vue";
|
|
30
31
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
31
|
-
import {
|
|
32
|
-
import { mapState, mapActions } from "pinia";
|
|
32
|
+
import { useAuthStore } from "../../../stores/AuthStore";
|
|
33
33
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
34
|
-
import {
|
|
34
|
+
import { computed, defineAsyncComponent } from "vue";
|
|
35
35
|
import { Canal } from "@/stores/class/radio/canal";
|
|
36
|
+
import { useI18n } from "vue-i18n";
|
|
36
37
|
const PodcastIsPlaying = defineAsyncComponent(() => import("../podcasts/PodcastIsPlaying.vue"));
|
|
37
|
-
export default defineComponent({
|
|
38
|
-
name: "RadioImage",
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
//Props
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
radio: { default: undefined, type: Object as () => Canal },
|
|
42
|
+
})
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return { useProxyImageUrl }
|
|
51
|
-
},
|
|
44
|
+
//Composables
|
|
45
|
+
const { t } = useI18n();
|
|
46
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
47
|
+
const authStore = useAuthStore();
|
|
48
|
+
const playerStore = usePlayerStore();
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return this.playerRadio && this.playerRadio.canalId === this.radio?.id;
|
|
58
|
-
},
|
|
59
|
-
playText(): string {
|
|
60
|
-
return this.playingRadio && "PLAYING" === this.playerStatus
|
|
61
|
-
? this.$t("Pause")
|
|
62
|
-
: this.$t("Play");
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
methods: {
|
|
67
|
-
...mapActions(usePlayerStore, ["playerPlay", "playerChangeStatus"]),
|
|
68
|
-
playRadio(): void {
|
|
69
|
-
if (!this.radio) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (this.playingRadio) {
|
|
73
|
-
this.playerChangeStatus("PLAYING" === this.playerStatus);
|
|
74
|
-
} else {
|
|
75
|
-
this.playerPlay({
|
|
76
|
-
canalId: this.radio.id,
|
|
77
|
-
url: "https://" + this.radio.url + "/live.m3u8",
|
|
78
|
-
metadata: "",
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
},
|
|
50
|
+
//Computed
|
|
51
|
+
const playingRadio = computed(() => playerStore.playerRadio && playerStore.playerRadio.canalId === props.radio?.id);
|
|
52
|
+
const playText = computed(() => {
|
|
53
|
+
return playingRadio.value && "PLAYING" === playerStore.playerStatus? t("Pause") : t("Play");
|
|
83
54
|
});
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
//Methods
|
|
58
|
+
function playRadio(): void {
|
|
59
|
+
if (!props.radio) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (playingRadio.value) {
|
|
63
|
+
playerStore.playerChangeStatus("PLAYING" === playerStore.playerStatus);
|
|
64
|
+
} else {
|
|
65
|
+
playerStore.playerPlay({
|
|
66
|
+
canalId: props.radio.id,
|
|
67
|
+
url: "https://" + props.radio.url + "/live.m3u8",
|
|
68
|
+
metadata: "",
|
|
69
|
+
secured: props.radio.organisationId === authStore.authOrganisation?.id && "SECURED"===authStore.authOrganisation?.privacy
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
84
73
|
</script>
|
|
85
74
|
<style lang="scss">
|
|
86
75
|
.octopus-app .radio-play-button{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
params: { canalId: radio.id },
|
|
8
8
|
}"
|
|
9
9
|
class="text-dark classic-element-text"
|
|
10
|
-
:title="
|
|
10
|
+
:title="t('Radio name page', { name: radio.name })"
|
|
11
11
|
>
|
|
12
12
|
<div class="element-name mb-2 basic-line-clamp">
|
|
13
13
|
{{ radio.name }}
|
|
@@ -20,22 +20,17 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
|
-
<script lang="ts">
|
|
24
|
-
|
|
23
|
+
<script setup lang="ts">
|
|
25
24
|
import RadioImage from "./RadioImage.vue";
|
|
26
25
|
import RadioCurrently from "./RadioCurrently.vue";
|
|
27
|
-
import { defineComponent } from "vue";
|
|
28
26
|
import { Canal } from "@/stores/class/radio/canal";
|
|
29
|
-
|
|
30
|
-
name: "RadioItem",
|
|
27
|
+
import { useI18n } from "vue-i18n";
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
//Props
|
|
30
|
+
defineProps({
|
|
31
|
+
radio: { default: undefined, type: Object as () => Canal },
|
|
32
|
+
})
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
});
|
|
34
|
+
//Composables
|
|
35
|
+
const { t } = useI18n();
|
|
41
36
|
</script>
|