@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<button
|
|
4
4
|
id="anonymous-share-button"
|
|
5
5
|
:class="btnClass"
|
|
6
|
-
:title="
|
|
6
|
+
:title="t('Share')"
|
|
7
7
|
>
|
|
8
8
|
<DotsHorizontalIcon />
|
|
9
9
|
</button>
|
|
@@ -67,22 +67,22 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
|
-
<script lang="ts">
|
|
70
|
+
<script setup lang="ts">
|
|
71
71
|
import QrcodeIcon from "vue-material-design-icons/Qrcode.vue";
|
|
72
72
|
import LinkVariantIcon from "vue-material-design-icons/LinkVariant.vue";
|
|
73
73
|
import DotsHorizontalIcon from "vue-material-design-icons/DotsHorizontal.vue";
|
|
74
74
|
import ClassicPopover from "../../misc/ClassicPopover.vue";
|
|
75
75
|
import displayHelper from "../../../helper/displayHelper";
|
|
76
|
-
import { defineAsyncComponent,
|
|
76
|
+
import { computed, defineAsyncComponent, onBeforeMount, ref, useTemplateRef } from "vue";
|
|
77
77
|
import { useApiStore } from "../../../stores/ApiStore";
|
|
78
78
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
79
79
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
80
80
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
81
81
|
import { Emission } from "@/stores/class/general/emission";
|
|
82
82
|
import { Playlist } from "@/stores/class/general/playlist";
|
|
83
|
-
import { mapActions, mapState } from "pinia";
|
|
84
83
|
import { state } from "../../../stores/ParamSdkStore";
|
|
85
84
|
import classicApi from "../../../api/classicApi";
|
|
85
|
+
import { useI18n } from "vue-i18n";
|
|
86
86
|
const SnackBar = defineAsyncComponent(() => import("../../misc/SnackBar.vue"));
|
|
87
87
|
const NewsletterModal = defineAsyncComponent(
|
|
88
88
|
() => import("../../misc/modal/NewsletterModal.vue"),
|
|
@@ -105,186 +105,168 @@ const EmailNewsletterIcon = defineAsyncComponent(
|
|
|
105
105
|
const RssIcon = defineAsyncComponent(
|
|
106
106
|
() => import("vue-material-design-icons/Rss.vue"),
|
|
107
107
|
);
|
|
108
|
-
export default defineComponent({
|
|
109
|
-
name: "PodcastShareAnonymous",
|
|
110
|
-
components: {
|
|
111
|
-
ClassicPopover,
|
|
112
|
-
DotsHorizontalIcon,
|
|
113
|
-
LinkVariantIcon,
|
|
114
|
-
EmailNewsletterIcon,
|
|
115
|
-
QrcodeIcon,
|
|
116
|
-
CodeTagsIcon,
|
|
117
|
-
RssIcon,
|
|
118
|
-
SnackBar,
|
|
119
|
-
NewsletterModal,
|
|
120
|
-
QrCodeModal,
|
|
121
|
-
ClipboardModal,
|
|
122
|
-
PlayerAnonymousModal
|
|
123
|
-
},
|
|
124
108
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
},
|
|
109
|
+
//Props
|
|
110
|
+
const props = defineProps({
|
|
111
|
+
podcast: { default: undefined, type: Object as () => Podcast },
|
|
112
|
+
emission: { default: undefined, type: Object as () => Emission },
|
|
113
|
+
playlist: { default: undefined, type: Object as () => Playlist },
|
|
114
|
+
participantId: { default: undefined, type: Number },
|
|
115
|
+
organisationId: { default: undefined, type: String },
|
|
116
|
+
relativeClass: { default: "page-element", type: String },
|
|
117
|
+
btnClass: { default: "btn btn-transparent", type: String },
|
|
118
|
+
})
|
|
134
119
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
{
|
|
196
|
-
title: this.$t("Share the player"),
|
|
197
|
-
icon: "CodeTagsIcon",
|
|
198
|
-
condition: !this.isPodcastmaker && (this.playerCanBeSharedAnonymous || (this.playerCanBeSharedOthers && this.authOrgaId)),
|
|
199
|
-
emitName: "player",
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
title: this.$t("Share newsletter"),
|
|
203
|
-
icon: "EmailNewsletterIcon",
|
|
204
|
-
condition: this.podcast || this.emission || this.playlist,
|
|
205
|
-
emitName: "newsletter",
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
title: this.$t("Share QR Code"),
|
|
209
|
-
icon: "QrcodeIcon",
|
|
210
|
-
condition: true,
|
|
211
|
-
emitName: "qrcode",
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
title: this.titleRssButton,
|
|
215
|
-
icon: "RssIcon",
|
|
216
|
-
condition: '' !== this.rssUrl && this.displayRss && !this.isGarRole,
|
|
217
|
-
emitName: "rss",
|
|
218
|
-
},
|
|
219
|
-
];
|
|
120
|
+
//Data
|
|
121
|
+
const lazyLoadingSnackbar = ref(false);
|
|
122
|
+
const isNewsletterModal = ref(false);
|
|
123
|
+
const isQrCodeModal = ref(false);
|
|
124
|
+
const displayRss = ref(false);
|
|
125
|
+
const noSharing = ref(true);
|
|
126
|
+
const playerCanBeSharedAnonymous = ref(false);
|
|
127
|
+
const playerCanBeSharedOthers = ref(false);
|
|
128
|
+
const isLoading = ref(true);
|
|
129
|
+
const isRssModal = ref(false);
|
|
130
|
+
const isPlayerModal = ref(false);
|
|
131
|
+
const snackBarRef = useTemplateRef('snackbar');
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
//Composables
|
|
135
|
+
const { t } = useI18n();
|
|
136
|
+
const authStore = useAuthStore();
|
|
137
|
+
const apiStore = useApiStore();
|
|
138
|
+
const saveFetchStore = useSaveFetchStore();
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
//Computed
|
|
142
|
+
const urlPage = computed(() => window.location.href);
|
|
143
|
+
const isPodcastmaker = computed(() => state.generalParameters.podcastmaker);
|
|
144
|
+
const rssUrl = computed(() => {
|
|
145
|
+
const api = apiStore.apiUrl + "rss/";
|
|
146
|
+
if (
|
|
147
|
+
(!isPodcastmaker.value && props.playlist) ||
|
|
148
|
+
props.podcast ||
|
|
149
|
+
props.emission
|
|
150
|
+
) {
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
if (props.participantId) {
|
|
154
|
+
return api + "participant/" + props.participantId + ".rss";
|
|
155
|
+
}
|
|
156
|
+
if (props.playlist) {
|
|
157
|
+
return api + "playlist/" + props.playlist.playlistId + ".rss";
|
|
158
|
+
}
|
|
159
|
+
if (props.organisationId) {
|
|
160
|
+
return api + "productor/" + props.organisationId + ".rss";
|
|
161
|
+
}
|
|
162
|
+
return "";
|
|
163
|
+
});
|
|
164
|
+
const titleRssButton = computed(() => {
|
|
165
|
+
if (props.participantId) {
|
|
166
|
+
return t("Subscribe to this participant");
|
|
167
|
+
}
|
|
168
|
+
if (props.emission) {
|
|
169
|
+
return t("Subscribe to this emission");
|
|
170
|
+
}
|
|
171
|
+
return t("Subscribe to this RSS feed");
|
|
172
|
+
});
|
|
173
|
+
const dropdownButtons = computed(() => {
|
|
174
|
+
return [
|
|
175
|
+
{
|
|
176
|
+
title: t("Copy this page URL"),
|
|
177
|
+
icon: LinkVariantIcon,
|
|
178
|
+
condition:true,
|
|
179
|
+
emitName: "link",
|
|
220
180
|
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
|
|
227
|
-
async initShareButtons() {
|
|
228
|
-
if (undefined !== this.participantId) {
|
|
229
|
-
this.displayRss = await classicApi.fetchData<boolean>({
|
|
230
|
-
api: 0,
|
|
231
|
-
path: `rss/participants/allowed/${this.organisationId}`,
|
|
232
|
-
isNotAuth: true,
|
|
233
|
-
});
|
|
234
|
-
} else {
|
|
235
|
-
this.displayRss = true;
|
|
236
|
-
}
|
|
237
|
-
this.determinePlayerCanBeShared();
|
|
238
|
-
if (!this.organisationId) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
const attributes = await this.getOrgaAttributes(this.organisationId);
|
|
242
|
-
this.noSharing = "true" === attributes.noSharing;
|
|
243
|
-
this.isLoading = false;
|
|
181
|
+
{
|
|
182
|
+
title: t("Share the player"),
|
|
183
|
+
icon: CodeTagsIcon,
|
|
184
|
+
condition: !isPodcastmaker.value && (playerCanBeSharedAnonymous.value || (playerCanBeSharedOthers.value && authStore.authOrgaId)),
|
|
185
|
+
emitName: "player",
|
|
244
186
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
if (emissionAnnot.notExclusive) {
|
|
252
|
-
this.playerCanBeSharedAnonymous = "true" === emissionAnnot.notExclusive;
|
|
253
|
-
}
|
|
187
|
+
{
|
|
188
|
+
title: t("Share newsletter"),
|
|
189
|
+
icon: EmailNewsletterIcon,
|
|
190
|
+
condition: props.podcast || props.emission || props.playlist,
|
|
191
|
+
emitName: "newsletter",
|
|
254
192
|
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
case "newsletter":
|
|
261
|
-
this.isNewsletterModal = true;
|
|
262
|
-
break;
|
|
263
|
-
case "qrcode":
|
|
264
|
-
this.isQrCodeModal = true;
|
|
265
|
-
break;
|
|
266
|
-
case "rss":
|
|
267
|
-
this.isRssModal = true;
|
|
268
|
-
break;
|
|
269
|
-
case "player":
|
|
270
|
-
this.isPlayerModal = true;
|
|
271
|
-
break;
|
|
272
|
-
default:
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
193
|
+
{
|
|
194
|
+
title: t("Share QR Code"),
|
|
195
|
+
icon: QrcodeIcon,
|
|
196
|
+
condition: true,
|
|
197
|
+
emitName: "qrcode",
|
|
275
198
|
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}, 500);
|
|
282
|
-
} else {
|
|
283
|
-
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
284
|
-
this.$t("Link in clipboard"),
|
|
285
|
-
);
|
|
286
|
-
}
|
|
199
|
+
{
|
|
200
|
+
title: titleRssButton.value,
|
|
201
|
+
icon: RssIcon,
|
|
202
|
+
condition: '' !== rssUrl.value && displayRss.value && !authStore.isGarRole,
|
|
203
|
+
emitName: "rss",
|
|
287
204
|
},
|
|
288
|
-
|
|
205
|
+
];
|
|
289
206
|
});
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
onBeforeMount(()=>initShareButtons())
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
//Methods
|
|
213
|
+
async function initShareButtons() {
|
|
214
|
+
if (undefined !== props.participantId) {
|
|
215
|
+
displayRss.value = await classicApi.fetchData<boolean>({
|
|
216
|
+
api: 0,
|
|
217
|
+
path: `rss/participants/allowed/${props.organisationId}`,
|
|
218
|
+
isNotAuth: true,
|
|
219
|
+
});
|
|
220
|
+
} else {
|
|
221
|
+
displayRss.value = true;
|
|
222
|
+
}
|
|
223
|
+
determinePlayerCanBeShared();
|
|
224
|
+
if (!props.organisationId) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const attributes = await saveFetchStore.getOrgaAttributes(props.organisationId);
|
|
228
|
+
noSharing.value = "true" === attributes.noSharing;
|
|
229
|
+
isLoading.value = false;
|
|
230
|
+
}
|
|
231
|
+
function determinePlayerCanBeShared() {
|
|
232
|
+
const emissionAnnot = props.podcast?.emission.annotations ?? props.emission?.annotations;
|
|
233
|
+
if (!emissionAnnot) { return }
|
|
234
|
+
if (emissionAnnot.exclusive) {
|
|
235
|
+
playerCanBeSharedOthers.value = "true" !== emissionAnnot.exclusive;
|
|
236
|
+
}
|
|
237
|
+
if (emissionAnnot.notExclusive) {
|
|
238
|
+
playerCanBeSharedAnonymous.value = "true" === emissionAnnot.notExclusive;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function clickButton(name: string) {
|
|
242
|
+
switch (name) {
|
|
243
|
+
case "link":
|
|
244
|
+
displayHelper.onCopyCode(urlPage.value, afterCopy);
|
|
245
|
+
break;
|
|
246
|
+
case "newsletter":
|
|
247
|
+
isNewsletterModal.value = true;
|
|
248
|
+
break;
|
|
249
|
+
case "qrcode":
|
|
250
|
+
isQrCodeModal.value = true;
|
|
251
|
+
break;
|
|
252
|
+
case "rss":
|
|
253
|
+
isRssModal.value = true;
|
|
254
|
+
break;
|
|
255
|
+
case "player":
|
|
256
|
+
isPlayerModal.value = true;
|
|
257
|
+
break;
|
|
258
|
+
default:
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function afterCopy(): void {
|
|
263
|
+
if (!lazyLoadingSnackbar.value) {
|
|
264
|
+
lazyLoadingSnackbar.value = true;
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
afterCopy();
|
|
267
|
+
}, 500);
|
|
268
|
+
} else {
|
|
269
|
+
(snackBarRef?.value as InstanceType<typeof SnackBar>).open(t("Link in clipboard"));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
290
272
|
</script>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="module-box">
|
|
3
3
|
<h2 class="mb-3">
|
|
4
|
-
{{
|
|
4
|
+
{{ t("Distribute") }}
|
|
5
5
|
</h2>
|
|
6
6
|
<div class="sharing-distribution-container">
|
|
7
|
-
{{
|
|
7
|
+
{{ t("Rss feed:") }}
|
|
8
8
|
<div class="text-primary hide-small-screen text-break">
|
|
9
9
|
{{ rss }}
|
|
10
10
|
</div>
|
|
11
11
|
<ClassicCopyButton
|
|
12
|
-
:text="
|
|
13
|
-
:text-after-copy="
|
|
12
|
+
:text="t('Copy')"
|
|
13
|
+
:text-after-copy="t('Copied!')"
|
|
14
14
|
:data-to-copy="rss"
|
|
15
|
-
:snackbar-text="
|
|
15
|
+
:snackbar-text="t('Link in clipboard')"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
18
|
<RssSection v-if="emission" :emission="emission" />
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</section>
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
|
-
<script lang="ts">
|
|
36
|
+
<script setup lang="ts">
|
|
37
37
|
import ClassicCopyButton from "../../form/ClassicCopyButton.vue";
|
|
38
38
|
import RadiolineIcon from "../../icons/RadiolineIcon.vue";
|
|
39
39
|
import TuninIcon from "../../icons/TuninIcon.vue";
|
|
@@ -50,126 +50,112 @@ import { useApiStore } from "../../../stores/ApiStore";
|
|
|
50
50
|
import classicApi from "../../../api/classicApi";
|
|
51
51
|
import { Emission } from "@/stores/class/general/emission";
|
|
52
52
|
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
53
|
+
import { defineAsyncComponent, ref, Ref, computed, onMounted } from "vue";
|
|
54
|
+
import { useI18n } from "vue-i18n";
|
|
55
55
|
const RssSection = defineAsyncComponent(
|
|
56
56
|
() => import("@/components/display/aggregator/RssSection.vue"),
|
|
57
57
|
);
|
|
58
|
-
export default defineComponent({
|
|
59
|
-
components: {
|
|
60
|
-
RssSection,
|
|
61
|
-
SpotifyIcon,
|
|
62
|
-
YoutubeIcon,
|
|
63
|
-
ApplePodcastIcon,
|
|
64
|
-
DeezerIcon,
|
|
65
|
-
AmazonMusicIcon,
|
|
66
|
-
IHeartIcon,
|
|
67
|
-
PlayerFmIcon,
|
|
68
|
-
PocketCastIcon,
|
|
69
|
-
PodcastAddictIcon,
|
|
70
|
-
TuninIcon,
|
|
71
|
-
RadiolineIcon,
|
|
72
|
-
ClassicCopyButton
|
|
73
|
-
},
|
|
74
|
-
props: {
|
|
75
|
-
emissionId: { default: undefined, type: Number },
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
data() {
|
|
79
|
-
return {
|
|
80
|
-
emission: undefined as Emission | undefined,
|
|
81
|
-
rss: "" as string,
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
computed: {
|
|
85
|
-
...mapState(useApiStore, ["apiUrl"]),
|
|
86
|
-
platformShare() {
|
|
87
|
-
return [
|
|
88
|
-
{
|
|
89
|
-
url: this.getUrl("amazon"),
|
|
90
|
-
icon: "AmazonMusicIcon",
|
|
91
|
-
title: "Amazon Music",
|
|
92
|
-
color: "#0c6cb3",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
url: this.getUrl("apple"),
|
|
96
|
-
icon: "ApplePodcastIcon",
|
|
97
|
-
title: "Apple Podcast / iTunes",
|
|
98
|
-
color:"#aa1dd3"
|
|
99
|
-
},
|
|
100
|
-
{ url: this.getUrl("deezer"),
|
|
101
|
-
icon: "DeezerIcon",
|
|
102
|
-
title: "Deezer",
|
|
103
|
-
color:"#a238ff" },
|
|
104
|
-
{ url: this.getUrl("iHeart"),
|
|
105
|
-
icon: "IHeartIcon",
|
|
106
|
-
title: "iHeart",
|
|
107
|
-
color:"#e11b22" },
|
|
108
|
-
{
|
|
109
|
-
url: this.getUrl("PlayerFM"),
|
|
110
|
-
icon: "PlayerFmIcon",
|
|
111
|
-
title: "PlayerFM",
|
|
112
|
-
color:"#bb202a"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
url: this.getUrl("PocketCasts"),
|
|
116
|
-
icon: "PocketCastIcon",
|
|
117
|
-
title: "Pocket Casts",
|
|
118
|
-
color:"#f43e37"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
url: this.getUrl("PodcastAddict"),
|
|
122
|
-
icon: "PodcastAddictIcon",
|
|
123
|
-
title: "Podcast Addict",
|
|
124
|
-
color:"#f4842d"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
url: this.getUrl("radioline"),
|
|
128
|
-
icon: "RadiolineIcon",
|
|
129
|
-
title: "Radioline",
|
|
130
|
-
color:"#1678bd"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
url: this.getUrl("spotify"),
|
|
134
|
-
icon: "SpotifyIcon",
|
|
135
|
-
title: "Spotify",
|
|
136
|
-
color: "#1ed760",
|
|
137
|
-
},
|
|
138
|
-
{ url: this.getUrl("tuneIn"),
|
|
139
|
-
icon: "TuninIcon",
|
|
140
|
-
title: "TuneIn",
|
|
141
|
-
color:"#36b4a7" },
|
|
142
|
-
{
|
|
143
|
-
url: this.getUrl("youtube"),
|
|
144
|
-
icon: "YoutubeIcon",
|
|
145
|
-
title: "YouTube Music",
|
|
146
|
-
color: "#fe0000",
|
|
147
|
-
},
|
|
148
|
-
];
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
58
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
59
|
+
//Props
|
|
60
|
+
const props = defineProps({
|
|
61
|
+
emissionId: { default: undefined, type: Number },
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
//Data
|
|
65
|
+
const rss = ref("");
|
|
66
|
+
const emission : Ref<Emission | undefined>= ref(undefined);
|
|
156
67
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
68
|
+
//Composables
|
|
69
|
+
const { t } = useI18n();
|
|
70
|
+
const apiStore = useApiStore();
|
|
71
|
+
|
|
72
|
+
//Computed
|
|
73
|
+
const platformShare = computed(() => {
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
url: getUrl("amazon"),
|
|
77
|
+
icon: AmazonMusicIcon,
|
|
78
|
+
title: "Amazon Music",
|
|
79
|
+
color: "#0c6cb3",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
url: getUrl("apple"),
|
|
83
|
+
icon: ApplePodcastIcon,
|
|
84
|
+
title: "Apple Podcast / iTunes",
|
|
85
|
+
color:"#aa1dd3"
|
|
86
|
+
},
|
|
87
|
+
{ url: getUrl("deezer"),
|
|
88
|
+
icon: DeezerIcon,
|
|
89
|
+
title: "Deezer",
|
|
90
|
+
color:"#a238ff" },
|
|
91
|
+
{ url: getUrl("iHeart"),
|
|
92
|
+
icon: IHeartIcon,
|
|
93
|
+
title: "iHeart",
|
|
94
|
+
color:"#e11b22" },
|
|
95
|
+
{
|
|
96
|
+
url: getUrl("PlayerFM"),
|
|
97
|
+
icon: PlayerFmIcon,
|
|
98
|
+
title: "PlayerFM",
|
|
99
|
+
color:"#bb202a"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
url: getUrl("PocketCasts"),
|
|
103
|
+
icon: PocketCastIcon,
|
|
104
|
+
title: "Pocket Casts",
|
|
105
|
+
color:"#f43e37"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
url: getUrl("PodcastAddict"),
|
|
109
|
+
icon: PodcastAddictIcon,
|
|
110
|
+
title: "Podcast Addict",
|
|
111
|
+
color:"#f4842d"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
url: getUrl("radioline"),
|
|
115
|
+
icon: RadiolineIcon,
|
|
116
|
+
title: "Radioline",
|
|
117
|
+
color:"#1678bd"
|
|
160
118
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
119
|
+
{
|
|
120
|
+
url: getUrl("spotify"),
|
|
121
|
+
icon: SpotifyIcon,
|
|
122
|
+
title: "Spotify",
|
|
123
|
+
color: "#1ed760",
|
|
166
124
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
125
|
+
{ url: getUrl("tuneIn"),
|
|
126
|
+
icon: TuninIcon,
|
|
127
|
+
title: "TuneIn",
|
|
128
|
+
color:"#36b4a7" },
|
|
129
|
+
{
|
|
130
|
+
url: getUrl("youtube"),
|
|
131
|
+
icon: YoutubeIcon,
|
|
132
|
+
title: "YouTube Music",
|
|
133
|
+
color: "#fe0000",
|
|
170
134
|
},
|
|
171
|
-
|
|
135
|
+
];
|
|
172
136
|
});
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
onMounted(()=>{
|
|
140
|
+
getEmissionDetails();
|
|
141
|
+
getRSS();
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
//Methods
|
|
146
|
+
function getUrl(platform: string): string {
|
|
147
|
+
return `/main/priv/distribution/${platform}/${props.emissionId}`;
|
|
148
|
+
}
|
|
149
|
+
async function getEmissionDetails(): Promise<void> {
|
|
150
|
+
emission.value = await classicApi.fetchData<Emission>({
|
|
151
|
+
api: 0,
|
|
152
|
+
path: "emission/" + props.emissionId,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function getRSS(): void {
|
|
156
|
+
if (!props.emissionId || props.emissionId <= 0) return;
|
|
157
|
+
rss.value = `${apiStore.apiUrl}rss/emission/${props.emissionId}.rss`;
|
|
158
|
+
}
|
|
173
159
|
</script>
|
|
174
160
|
|
|
175
161
|
<style lang="scss">
|