@saooti/octopus-sdk 37.0.6 → 37.0.8
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/README.md +2 -2
- package/index.ts +22 -22
- package/package.json +26 -22
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/transition.scss +34 -22
- package/src/components/display/aggregator/RssSection.vue +3 -3
- package/src/components/display/categories/CategoryChooser.vue +73 -60
- package/src/components/display/categories/CategoryFilter.vue +134 -90
- package/src/components/display/categories/CategoryList.vue +76 -62
- package/src/components/display/comments/AddCommentModal.vue +44 -44
- package/src/components/display/comments/CommentBasicView.vue +38 -30
- package/src/components/display/comments/CommentInput.vue +121 -106
- package/src/components/display/comments/CommentItem.vue +144 -102
- package/src/components/display/comments/CommentList.vue +117 -85
- package/src/components/display/comments/CommentParentInfo.vue +18 -15
- package/src/components/display/comments/CommentPlayer.vue +39 -41
- package/src/components/display/comments/CommentSection.vue +68 -53
- package/src/components/display/edit/EditBox.vue +7 -7
- package/src/components/display/edit/EditBoxRadio.vue +3 -4
- package/src/components/display/edit/EditCommentBox.vue +34 -36
- package/src/components/display/emission/EmissionInlineList.vue +75 -63
- package/src/components/display/emission/EmissionItem.vue +47 -35
- package/src/components/display/emission/EmissionList.vue +118 -83
- package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
- package/src/components/display/filter/AdvancedSearch.vue +81 -73
- package/src/components/display/filter/CategorySearchFilter.vue +27 -25
- package/src/components/display/filter/DateFilter.vue +38 -38
- package/src/components/display/filter/MonetizableFilter.vue +16 -14
- package/src/components/display/filter/ProductorSearch.vue +55 -47
- package/src/components/display/filter/RubriqueChoice.vue +42 -27
- package/src/components/display/filter/RubriqueFilter.vue +130 -85
- package/src/components/display/filter/SearchOrder.vue +16 -11
- package/src/components/display/list/ListPaginate.vue +72 -70
- package/src/components/display/list/PaginateParams.vue +29 -30
- package/src/components/display/list/PaginateSection.vue +210 -0
- package/src/components/display/list/SwiperList.vue +28 -32
- package/src/components/display/live/CountDown.vue +12 -14
- package/src/components/display/live/LiveHorizontalList.vue +60 -50
- package/src/components/display/live/LiveItem.vue +42 -26
- package/src/components/display/live/LiveList.vue +92 -65
- package/src/components/display/live/RadioCurrently.vue +47 -42
- package/src/components/display/live/RadioImage.vue +40 -42
- package/src/components/display/live/RadioItem.vue +15 -22
- package/src/components/display/live/RadioList.vue +24 -21
- package/src/components/display/live/RadioPlanning.vue +105 -68
- package/src/components/display/organisation/OrganisationChooser.vue +58 -42
- package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
- package/src/components/display/participant/ParticipantItem.vue +89 -77
- package/src/components/display/participant/ParticipantList.vue +90 -60
- package/src/components/display/playlist/PlaylistItem.vue +32 -35
- package/src/components/display/playlist/PlaylistList.vue +70 -52
- package/src/components/display/playlist/PodcastList.vue +61 -50
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
- package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
- package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
- package/src/components/display/podcasts/PodcastImage.vue +129 -131
- package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
- package/src/components/display/podcasts/PodcastItem.vue +96 -90
- package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
- package/src/components/display/podcasts/PodcastList.vue +115 -84
- package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
- package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
- package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
- package/src/components/display/podcasts/TagList.vue +33 -37
- package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
- package/src/components/display/rubriques/RubriqueList.vue +117 -89
- package/src/components/display/sharing/PlayerParameters.vue +45 -42
- package/src/components/display/sharing/QrCode.vue +52 -46
- package/src/components/display/sharing/ShareButtons.vue +18 -18
- package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
- package/src/components/display/sharing/ShareDistribution.vue +101 -67
- package/src/components/display/sharing/SharePlayer.vue +207 -127
- package/src/components/display/sharing/SharePlayerColors.vue +15 -15
- package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
- package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
- package/src/components/display/sharing/SubscribeButtons.vue +83 -32
- package/src/components/display/studio/RecordingItemButton.vue +3 -3
- package/src/components/form/ClassicCheckbox.vue +32 -31
- package/src/components/form/ClassicDatePicker.vue +47 -49
- package/src/components/form/ClassicInputText.vue +99 -98
- package/src/components/form/ClassicLoading.vue +11 -14
- package/src/components/form/ClassicMultiselect.vue +125 -126
- package/src/components/form/ClassicRadio.vue +15 -18
- package/src/components/form/ClassicSearch.vue +17 -23
- package/src/components/form/ClassicSelect.vue +35 -27
- package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
- package/src/components/misc/AcpmImage.vue +6 -6
- package/src/components/misc/ClassicAccordion.vue +73 -0
- package/src/components/misc/ClassicNav.vue +117 -0
- package/src/components/misc/ClassicPopover.vue +212 -0
- package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
- package/src/components/misc/ErrorMessage.vue +9 -17
- package/src/components/misc/FooterSection.vue +198 -0
- package/src/components/misc/HomeDropdown.vue +60 -60
- package/src/components/misc/LeftMenu.vue +115 -79
- package/src/components/misc/ProgressBar.vue +36 -32
- package/src/components/misc/SnackBar.vue +169 -0
- package/src/components/misc/TopBar.vue +162 -116
- package/src/components/misc/modal/ClassicModal.vue +99 -103
- package/src/components/misc/modal/ClipboardModal.vue +21 -23
- package/src/components/misc/modal/MessageModal.vue +22 -28
- package/src/components/misc/modal/NewsletterModal.vue +139 -113
- package/src/components/misc/modal/QrCodeModal.vue +14 -17
- package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
- package/src/components/misc/player/PlayerCompact.vue +47 -62
- package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
- package/src/components/misc/player/PlayerLarge.vue +62 -61
- package/src/components/misc/player/PlayerProgressBar.vue +40 -30
- package/src/components/misc/player/PlayerTimeline.vue +32 -36
- package/src/components/misc/player/radio/RadioHistory.vue +62 -59
- package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
- package/src/components/mixins/cookies.ts +11 -10
- package/src/components/mixins/displayMethods.ts +5 -4
- package/src/components/mixins/handle403.ts +9 -9
- package/src/components/mixins/imageProxy.ts +14 -7
- package/src/components/mixins/init.ts +31 -16
- package/src/components/mixins/orgaComputed.ts +7 -7
- package/src/components/mixins/organisationFilter.ts +36 -22
- package/src/components/mixins/player/playerComment.ts +46 -37
- package/src/components/mixins/player/playerDisplay.ts +122 -87
- package/src/components/mixins/player/playerLive.ts +65 -43
- package/src/components/mixins/player/playerLogic.ts +133 -88
- package/src/components/mixins/player/playerTranscript.ts +48 -30
- package/src/components/mixins/radio/fetchRadioData.ts +40 -23
- package/src/components/mixins/selenium.ts +2 -2
- package/src/components/mixins/tagOfMixins.ts +11 -11
- package/src/components/pages/CategoryPage.vue +43 -0
- package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
- package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
- package/src/components/pages/Error403Page.vue +20 -19
- package/src/components/pages/HomePage.vue +144 -0
- package/src/components/pages/LivesPage.vue +66 -0
- package/src/components/pages/PageNotFound.vue +33 -22
- package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
- package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
- package/src/components/pages/PlaylistPage.vue +175 -0
- package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
- package/src/components/pages/PodcastPage.vue +365 -0
- package/src/components/pages/PodcastsPage.vue +152 -0
- package/src/components/pages/RadioPage.vue +131 -0
- package/src/components/pages/RubriquePage.vue +45 -0
- package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +10 -4
- package/src/helper/useEventListener.ts +7 -8
- package/src/i18n.ts +31 -30
- package/src/locale/de.ts +272 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +332 -324
- package/src/locale/es.ts +334 -318
- package/src/locale/fr.ts +339 -324
- package/src/locale/it.ts +341 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +324 -319
- package/src/main.ts +28 -31
- package/src/router/router.ts +218 -198
- package/src/shims-tsx.d.ts +1 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/stores/ApiStore.ts +44 -44
- package/src/stores/AuthStore.ts +21 -15
- package/src/stores/CommentStore.ts +13 -11
- package/src/stores/FilterStore.ts +25 -15
- package/src/stores/GeneralStore.ts +15 -15
- package/src/stores/ParamSdkStore.ts +179 -137
- package/src/stores/PlayerStore.ts +139 -125
- package/src/stores/class/adserver/adserverConfig.ts +1 -1
- package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
- package/src/stores/class/cartouchier/cartouche.ts +4 -4
- package/src/stores/class/cartouchier/cartouchier.ts +2 -2
- package/src/stores/class/conference/conference.ts +10 -9
- package/src/stores/class/conference/conferenceMessage.ts +2 -2
- package/src/stores/class/conference/conferenceParticipant.ts +1 -1
- package/src/stores/class/conference/studioCall.ts +6 -6
- package/src/stores/class/contract/contractOrganisation.ts +5 -5
- package/src/stores/class/ftp/ftpEmission.ts +9 -9
- package/src/stores/class/ftp/testFtpEmission.ts +4 -4
- package/src/stores/class/general/audioView.ts +19 -19
- package/src/stores/class/general/category.ts +1 -1
- package/src/stores/class/general/classicSelectType.ts +2 -3
- package/src/stores/class/general/customPlayer.ts +8 -8
- package/src/stores/class/general/emission.ts +20 -20
- package/src/stores/class/general/fetchParam.ts +8 -2
- package/src/stores/class/general/initState.ts +31 -31
- package/src/stores/class/general/interfacePageable.ts +13 -13
- package/src/stores/class/general/ituneCategory.ts +4 -4
- package/src/stores/class/general/listReturn.ts +12 -12
- package/src/stores/class/general/media.ts +7 -7
- package/src/stores/class/general/organisation.ts +9 -9
- package/src/stores/class/general/pageable.ts +10 -10
- package/src/stores/class/general/participant.ts +7 -7
- package/src/stores/class/general/player.ts +30 -28
- package/src/stores/class/general/playlist.ts +17 -19
- package/src/stores/class/general/podcast.ts +19 -19
- package/src/stores/class/general/sortPageable.ts +4 -4
- package/src/stores/class/general/soundcastCategory.ts +7 -7
- package/src/stores/class/ouestFrance/ofTag.ts +34 -34
- package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
- package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
- package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +6 -6
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +54 -54
- package/src/stores/class/rss/rssEmission.ts +13 -13
- package/src/stores/class/rss/rssInfo.ts +7 -7
- package/src/stores/class/rubrique/rubriquage.ts +2 -2
- package/src/stores/class/rubrique/rubrique.ts +1 -1
- package/src/stores/class/stat/statArrayIncome.ts +5 -5
- package/src/stores/class/stat/statArrayObject.ts +26 -26
- package/src/stores/class/stat/statGraph.ts +6 -6
- package/src/stores/class/user/person.ts +4 -2
- package/src/stores/class/user/profile.ts +4 -2
- package/src/stores/class/user/userKeycloak.ts +4 -5
- package/src/components/display/list/Paginate.vue +0 -181
- package/src/components/misc/Accordion.vue +0 -78
- package/src/components/misc/Footer.vue +0 -169
- package/src/components/misc/Nav.vue +0 -119
- package/src/components/misc/Popover.vue +0 -193
- package/src/components/misc/Snackbar.vue +0 -168
- package/src/components/pages/Category.vue +0 -41
- package/src/components/pages/Home.vue +0 -125
- package/src/components/pages/Lives.vue +0 -64
- package/src/components/pages/Playlist.vue +0 -164
- package/src/components/pages/Podcast.vue +0 -307
- package/src/components/pages/Podcasts.vue +0 -146
- package/src/components/pages/Radio.vue +0 -122
- package/src/components/pages/Rubrique.vue +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="module-box overflow-visible">
|
|
3
3
|
<h2 class="big-h2 mb-3 height-40">
|
|
4
|
-
{{ $t(
|
|
4
|
+
{{ $t("Embed") }}
|
|
5
5
|
</h2>
|
|
6
6
|
<div class="d-flex">
|
|
7
7
|
<iframe
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
class="max-iframe mx-3 flex-grow-1"
|
|
14
14
|
/>
|
|
15
15
|
<div class="d-flex flex-column flex-grow-1 align-items-center">
|
|
16
|
-
<SharePlayerColors
|
|
17
|
-
v-model:color="color"
|
|
18
|
-
v-model:theme="theme"
|
|
19
|
-
/>
|
|
16
|
+
<SharePlayerColors v-model:color="color" v-model:theme="theme" />
|
|
20
17
|
<ShareModalPlayer
|
|
21
18
|
v-if="isShareModal"
|
|
22
19
|
:embed-link="iFrame"
|
|
@@ -27,7 +24,7 @@
|
|
|
27
24
|
class="btn btn-primary width-fit-content mt-3"
|
|
28
25
|
@click="isShareModal = true"
|
|
29
26
|
>
|
|
30
|
-
{{ $t(
|
|
27
|
+
{{ $t("Share the player") }}
|
|
31
28
|
</button>
|
|
32
29
|
</div>
|
|
33
30
|
</div>
|
|
@@ -35,68 +32,94 @@
|
|
|
35
32
|
</template>
|
|
36
33
|
|
|
37
34
|
<script lang="ts">
|
|
38
|
-
import { orgaComputed } from
|
|
39
|
-
import { state } from
|
|
40
|
-
import octopusApi from
|
|
41
|
-
import { useAuthStore } from
|
|
42
|
-
import { mapState } from
|
|
43
|
-
import { defineComponent, defineAsyncComponent } from
|
|
44
|
-
import { Canal } from
|
|
45
|
-
const ShareModalPlayer = defineAsyncComponent(
|
|
46
|
-
|
|
35
|
+
import { orgaComputed } from "../../mixins/orgaComputed";
|
|
36
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
37
|
+
import octopusApi from "@saooti/octopus-api";
|
|
38
|
+
import { useAuthStore } from "@/stores/AuthStore";
|
|
39
|
+
import { mapState } from "pinia";
|
|
40
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
41
|
+
import { Canal } from "@/stores/class/radio/canal";
|
|
42
|
+
const ShareModalPlayer = defineAsyncComponent(
|
|
43
|
+
() => import("../../misc/modal/ShareModalPlayer.vue"),
|
|
44
|
+
);
|
|
45
|
+
const SharePlayerColors = defineAsyncComponent(
|
|
46
|
+
() => import("./SharePlayerColors.vue"),
|
|
47
|
+
);
|
|
47
48
|
export default defineComponent({
|
|
48
49
|
components: {
|
|
49
50
|
ShareModalPlayer,
|
|
50
|
-
SharePlayerColors
|
|
51
|
+
SharePlayerColors,
|
|
51
52
|
},
|
|
52
|
-
mixins:[orgaComputed],
|
|
53
|
+
mixins: [orgaComputed],
|
|
53
54
|
props: {
|
|
54
|
-
canal: { default: undefined, type: Object as ()=> Canal},
|
|
55
|
-
organisationId: { default: undefined, type: String},
|
|
55
|
+
canal: { default: undefined, type: Object as () => Canal },
|
|
56
|
+
organisationId: { default: undefined, type: String },
|
|
56
57
|
},
|
|
57
58
|
|
|
58
59
|
data() {
|
|
59
60
|
return {
|
|
60
61
|
isShareModal: false as boolean,
|
|
61
|
-
color:
|
|
62
|
-
theme:
|
|
63
|
-
orgaAttributes: undefined as
|
|
62
|
+
color: "#40a372" as string,
|
|
63
|
+
theme: "#000000" as string,
|
|
64
|
+
orgaAttributes: undefined as
|
|
65
|
+
| { [key: string]: string | number | boolean | undefined }
|
|
66
|
+
| undefined,
|
|
64
67
|
};
|
|
65
68
|
},
|
|
66
|
-
|
|
69
|
+
|
|
67
70
|
computed: {
|
|
68
|
-
...mapState(useAuthStore, [
|
|
69
|
-
iFrameSrc(): string{
|
|
70
|
-
return `${state.podcastPage.MiniplayerUri}miniplayer/radio/${this.canal
|
|
71
|
+
...mapState(useAuthStore, ["authOrganisation"]),
|
|
72
|
+
iFrameSrc(): string {
|
|
73
|
+
return `${state.podcastPage.MiniplayerUri}miniplayer/radio/${this.canal
|
|
74
|
+
?.id}?distributorId=${this.organisationId}&color=${this.color.substring(
|
|
75
|
+
1,
|
|
76
|
+
)}&theme=${this.theme.substring(1)}`;
|
|
71
77
|
},
|
|
72
|
-
|
|
78
|
+
|
|
73
79
|
iFrame(): string {
|
|
74
80
|
return `<iframe src="${this.iFrameSrc}" width="100%" height="140px" scrolling="no" frameborder="0"></iframe>`;
|
|
75
81
|
},
|
|
76
|
-
|
|
77
82
|
},
|
|
78
83
|
async created() {
|
|
79
84
|
await this.fetchOrgaAttributes();
|
|
80
85
|
this.initColor();
|
|
81
86
|
},
|
|
82
87
|
methods: {
|
|
83
|
-
async fetchOrgaAttributes(): Promise<void>{
|
|
84
|
-
if
|
|
88
|
+
async fetchOrgaAttributes(): Promise<void> {
|
|
89
|
+
if (
|
|
90
|
+
"" !== this.authOrganisation.id &&
|
|
91
|
+
this.authOrganisation.attributes &&
|
|
92
|
+
Object.keys(this.authOrganisation.attributes).length > 1
|
|
93
|
+
) {
|
|
85
94
|
this.orgaAttributes = this.authOrganisation.attributes;
|
|
86
|
-
}else{
|
|
87
|
-
this.orgaAttributes= await octopusApi.fetchData<{
|
|
95
|
+
} else {
|
|
96
|
+
this.orgaAttributes = await octopusApi.fetchData<{
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
}>(0, "organisation/attributes/" + this.myOrganisationId);
|
|
88
99
|
}
|
|
89
100
|
},
|
|
90
101
|
initColor(): void {
|
|
91
|
-
if(!this.orgaAttributes){
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
if (!this.orgaAttributes) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.color = Object.prototype.hasOwnProperty.call(
|
|
106
|
+
this.orgaAttributes,
|
|
107
|
+
"COLOR",
|
|
108
|
+
)
|
|
109
|
+
? (this.orgaAttributes.COLOR as string)
|
|
110
|
+
: "#40a372";
|
|
111
|
+
this.theme = Object.prototype.hasOwnProperty.call(
|
|
112
|
+
this.orgaAttributes,
|
|
113
|
+
"THEME",
|
|
114
|
+
)
|
|
115
|
+
? (this.orgaAttributes.THEME as string)
|
|
116
|
+
: "#000000";
|
|
94
117
|
},
|
|
95
118
|
},
|
|
96
|
-
})
|
|
119
|
+
});
|
|
97
120
|
</script>
|
|
98
121
|
|
|
99
122
|
<style lang="scss">
|
|
100
|
-
@import
|
|
101
|
-
@import
|
|
102
|
-
</style>
|
|
123
|
+
@import "@scss/_variables.scss";
|
|
124
|
+
@import "../../../assets/iframe.scss";
|
|
125
|
+
</style>
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<label
|
|
3
|
-
for="iframe-select"
|
|
4
|
-
title="select miniplayer"
|
|
5
|
-
/>
|
|
2
|
+
<label for="iframe-select" title="select miniplayer" />
|
|
6
3
|
<select
|
|
7
4
|
id="iframe-select"
|
|
8
5
|
:value="iFrameModel"
|
|
9
6
|
class=""
|
|
10
|
-
@change="$emit('update:iFrameModel'
|
|
7
|
+
@change="$emit('update:iFrameModel', $event.target.value)"
|
|
11
8
|
>
|
|
12
|
-
<template
|
|
13
|
-
v-
|
|
14
|
-
:key="option.value"
|
|
15
|
-
>
|
|
16
|
-
<option
|
|
17
|
-
v-if="option.condition"
|
|
18
|
-
:value="option.value"
|
|
19
|
-
>
|
|
9
|
+
<template v-for="option in optionsSelect" :key="option.value">
|
|
10
|
+
<option v-if="option.condition" :value="option.value">
|
|
20
11
|
{{ option.name }}
|
|
21
12
|
</option>
|
|
22
13
|
</template>
|
|
@@ -25,29 +16,29 @@
|
|
|
25
16
|
:key="player.customId"
|
|
26
17
|
:value="player.customId"
|
|
27
18
|
>
|
|
28
|
-
{{ $t(
|
|
19
|
+
{{ $t("Custom version") + " «" + player.name + "»" }}
|
|
29
20
|
</option>
|
|
30
21
|
</select>
|
|
31
22
|
</template>
|
|
32
23
|
|
|
33
24
|
<script lang="ts">
|
|
34
|
-
import { state } from
|
|
35
|
-
import octopusApi from
|
|
36
|
-
import { Podcast } from
|
|
37
|
-
import { CustomPlayer } from
|
|
38
|
-
import { defineComponent } from
|
|
39
|
-
import { Emission } from
|
|
40
|
-
import { Playlist } from
|
|
41
|
-
import { InterfacePageable } from
|
|
25
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
26
|
+
import octopusApi from "@saooti/octopus-api";
|
|
27
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
28
|
+
import { CustomPlayer } from "@/stores/class/general/customPlayer";
|
|
29
|
+
import { defineComponent } from "vue";
|
|
30
|
+
import { Emission } from "@/stores/class/general/emission";
|
|
31
|
+
import { Playlist } from "@/stores/class/general/playlist";
|
|
32
|
+
import { InterfacePageable } from "@/stores/class/general/interfacePageable";
|
|
42
33
|
export default defineComponent({
|
|
43
34
|
props: {
|
|
44
|
-
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
45
|
-
emission: { default: undefined, type: Object as ()=> Emission},
|
|
46
|
-
playlist: { default: undefined, type: Object as ()=> Playlist},
|
|
47
|
-
iFrameModel: { default:
|
|
48
|
-
organisationId: { default: undefined, type: String},
|
|
35
|
+
podcast: { default: undefined, type: Object as () => Podcast },
|
|
36
|
+
emission: { default: undefined, type: Object as () => Emission },
|
|
37
|
+
playlist: { default: undefined, type: Object as () => Playlist },
|
|
38
|
+
iFrameModel: { default: "default", type: String },
|
|
39
|
+
organisationId: { default: undefined, type: String },
|
|
49
40
|
},
|
|
50
|
-
emits:[
|
|
41
|
+
emits: ["update:iFrameModel"],
|
|
51
42
|
|
|
52
43
|
data() {
|
|
53
44
|
return {
|
|
@@ -55,19 +46,38 @@ export default defineComponent({
|
|
|
55
46
|
};
|
|
56
47
|
},
|
|
57
48
|
computed: {
|
|
58
|
-
optionsSelect(){
|
|
49
|
+
optionsSelect() {
|
|
59
50
|
return [
|
|
60
|
-
{name: this.$t(
|
|
61
|
-
{name: this.$t(
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
{ name: this.$t("Default version"), value: "default", condition: true },
|
|
52
|
+
{ name: this.$t("Large version"), value: "large", condition: true },
|
|
53
|
+
{
|
|
54
|
+
name: this.$t("Emission version"),
|
|
55
|
+
value: "emission",
|
|
56
|
+
condition: this.podcast && this.podcast.podcastId,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: this.$t("Large emission version"),
|
|
60
|
+
value: "emissionLarge",
|
|
61
|
+
condition: this.podcast && this.podcast.podcastId,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: this.$t("Large suggestion version"),
|
|
65
|
+
value: "largeSuggestion",
|
|
66
|
+
condition: this.podcast && this.podcast.podcastId,
|
|
67
|
+
},
|
|
68
|
+
];
|
|
66
69
|
},
|
|
67
|
-
customPlayersDisplay(): Array<CustomPlayer>{
|
|
68
|
-
return this.customPlayers.filter((player: CustomPlayer)=>{
|
|
69
|
-
return (
|
|
70
|
-
|
|
70
|
+
customPlayersDisplay(): Array<CustomPlayer> {
|
|
71
|
+
return this.customPlayers.filter((player: CustomPlayer) => {
|
|
72
|
+
return (
|
|
73
|
+
(("EPISODE" === player.typePlayer ||
|
|
74
|
+
"SUGGESTION" === player.typePlayer) &&
|
|
75
|
+
this.podcast?.podcastId) ||
|
|
76
|
+
("EMISSION" === player.typePlayer &&
|
|
77
|
+
this.emission &&
|
|
78
|
+
!this.podcast) ||
|
|
79
|
+
("PLAYLIST" === player.typePlayer && this.playlist)
|
|
80
|
+
);
|
|
71
81
|
});
|
|
72
82
|
},
|
|
73
83
|
},
|
|
@@ -75,36 +85,64 @@ export default defineComponent({
|
|
|
75
85
|
await this.initCustomPlayers();
|
|
76
86
|
},
|
|
77
87
|
methods: {
|
|
78
|
-
async fetchCustomPlayers(
|
|
79
|
-
|
|
88
|
+
async fetchCustomPlayers(
|
|
89
|
+
type: string,
|
|
90
|
+
trySelect: boolean,
|
|
91
|
+
): Promise<boolean> {
|
|
92
|
+
let players = await octopusApi.fetchDataPublic<
|
|
93
|
+
InterfacePageable<CustomPlayer>
|
|
94
|
+
>(6, "customPlayer/type/" + this.organisationId + "/" + type);
|
|
80
95
|
let playersContent = players.content;
|
|
81
96
|
const totalCount = players.totalElements;
|
|
82
97
|
let index = 1;
|
|
83
98
|
while (totalCount > playersContent.length) {
|
|
84
|
-
players =
|
|
99
|
+
players = await octopusApi.fetchDataPublic<
|
|
100
|
+
InterfacePageable<CustomPlayer>
|
|
101
|
+
>(
|
|
102
|
+
6,
|
|
103
|
+
"customPlayer/type/" +
|
|
104
|
+
this.organisationId +
|
|
105
|
+
"/" +
|
|
106
|
+
type +
|
|
107
|
+
"?start=" +
|
|
108
|
+
index,
|
|
109
|
+
);
|
|
85
110
|
playersContent = playersContent.concat(players.content);
|
|
86
111
|
++index;
|
|
87
112
|
}
|
|
88
113
|
this.customPlayers = this.customPlayers.concat(playersContent);
|
|
89
|
-
if(
|
|
90
|
-
|
|
114
|
+
if (
|
|
115
|
+
trySelect &&
|
|
116
|
+
this.customPlayers[0] &&
|
|
117
|
+
this.customPlayers[0].selected
|
|
118
|
+
) {
|
|
119
|
+
this.$emit(
|
|
120
|
+
"update:iFrameModel",
|
|
121
|
+
this.customPlayers[0].customId.toString(),
|
|
122
|
+
);
|
|
91
123
|
return false;
|
|
92
124
|
}
|
|
93
125
|
return true;
|
|
94
126
|
},
|
|
95
127
|
async initCustomPlayers(): Promise<void> {
|
|
96
128
|
if (!state.generalParameters.authenticated) return;
|
|
97
|
-
if(this.playlist){
|
|
98
|
-
this.fetchCustomPlayers(
|
|
99
|
-
}else if(this.emission
|
|
100
|
-
this.fetchCustomPlayers(
|
|
101
|
-
}else{
|
|
129
|
+
if (this.playlist) {
|
|
130
|
+
this.fetchCustomPlayers("PLAYLIST", true);
|
|
131
|
+
} else if (this.emission && !this.podcast) {
|
|
132
|
+
this.fetchCustomPlayers("EMISSION", true);
|
|
133
|
+
} else {
|
|
102
134
|
let playerTrySelect = true;
|
|
103
|
-
playerTrySelect = await this.fetchCustomPlayers(
|
|
104
|
-
|
|
105
|
-
|
|
135
|
+
playerTrySelect = await this.fetchCustomPlayers(
|
|
136
|
+
"EPISODE",
|
|
137
|
+
playerTrySelect,
|
|
138
|
+
);
|
|
139
|
+
playerTrySelect = await this.fetchCustomPlayers(
|
|
140
|
+
"EMISSION",
|
|
141
|
+
playerTrySelect,
|
|
142
|
+
);
|
|
143
|
+
await this.fetchCustomPlayers("SUGGESTION", playerTrySelect);
|
|
106
144
|
}
|
|
107
145
|
},
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
</script>
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
</script>
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="module-box flex-grow-0">
|
|
3
3
|
<h2 class="big-h2 mb-3 height-40">
|
|
4
|
-
{{ $t(
|
|
4
|
+
{{ $t("Subscribe emission") }}
|
|
5
5
|
</h2>
|
|
6
|
-
<template
|
|
7
|
-
v-for="(sub, index) in subscriptionsDisplay"
|
|
8
|
-
:key="sub.name"
|
|
9
|
-
>
|
|
6
|
+
<template v-for="(sub, index) in subscriptionsDisplay" :key="sub.name">
|
|
10
7
|
<a
|
|
11
8
|
rel="noopener"
|
|
12
9
|
target="_blank"
|
|
13
10
|
:class="[
|
|
14
|
-
0 === index? 'first': '',
|
|
15
|
-
subscriptionsDisplay.length-1 === index? 'last': '',
|
|
11
|
+
0 === index ? 'first' : '',
|
|
12
|
+
subscriptionsDisplay.length - 1 === index ? 'last' : '',
|
|
16
13
|
]"
|
|
17
14
|
class="btn share-btn mb-2 mx-2"
|
|
18
15
|
:href="sub.url"
|
|
@@ -25,45 +22,99 @@
|
|
|
25
22
|
</template>
|
|
26
23
|
|
|
27
24
|
<script lang="ts">
|
|
28
|
-
import { Emission } from
|
|
29
|
-
import { defineComponent } from
|
|
25
|
+
import { Emission } from "@/stores/class/general/emission";
|
|
26
|
+
import { defineComponent } from "vue";
|
|
30
27
|
export default defineComponent({
|
|
31
28
|
props: {
|
|
32
|
-
emission: { default: undefined, type: Object as ()=> Emission},
|
|
33
|
-
podcastId: { default: undefined, type: Number},
|
|
29
|
+
emission: { default: undefined, type: Object as () => Emission },
|
|
30
|
+
podcastId: { default: undefined, type: Number },
|
|
34
31
|
},
|
|
35
|
-
computed:{
|
|
36
|
-
subscriptionsDisplay(){
|
|
32
|
+
computed: {
|
|
33
|
+
subscriptionsDisplay() {
|
|
37
34
|
const sub = [
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
{
|
|
36
|
+
name: "amazon",
|
|
37
|
+
icon: "saooti-amzn",
|
|
38
|
+
title: "Amazon Music | Podcasters",
|
|
39
|
+
url: this.getUrl("amazon"),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "applePodcast",
|
|
43
|
+
icon: "saooti-apple",
|
|
44
|
+
title: "Apple Podcast | iTunes",
|
|
45
|
+
url: this.getUrl("applePodcast"),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "deezer",
|
|
49
|
+
icon: "saooti-deezer",
|
|
50
|
+
title: "Deezer",
|
|
51
|
+
url: this.getUrl("deezer"),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "googlePodcasts",
|
|
55
|
+
icon: "saooti-google-podcasts",
|
|
56
|
+
title: "Google Podcasts",
|
|
57
|
+
url: this.getUrl("googlePodcasts"),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "playerFm",
|
|
61
|
+
icon: "saooti-playerfm",
|
|
62
|
+
title: "PlayerFM",
|
|
63
|
+
url: this.getUrl("playerFm"),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "pocketCasts",
|
|
67
|
+
icon: "saooti-pocket-casts",
|
|
68
|
+
title: "Pocket Casts",
|
|
69
|
+
url: this.getUrl("pocketCasts"),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "podcastAddict",
|
|
73
|
+
icon: "saooti-podcast-addict",
|
|
74
|
+
title: "Podcast Addict",
|
|
75
|
+
url: this.getUrl("podcastAddict"),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "radioline",
|
|
79
|
+
icon: "saooti-radioline",
|
|
80
|
+
title: "Radioline",
|
|
81
|
+
url: this.getUrl("radioline"),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "spotify",
|
|
85
|
+
icon: "saooti-spotify",
|
|
86
|
+
title: "Spotify",
|
|
87
|
+
url: this.getUrl("spotify"),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "tunein",
|
|
91
|
+
icon: "saooti-tunin",
|
|
92
|
+
title: "TuneIn",
|
|
93
|
+
url: this.getUrl("tunein"),
|
|
94
|
+
},
|
|
48
95
|
];
|
|
49
|
-
return sub.filter(item=> item.url);
|
|
50
|
-
}
|
|
96
|
+
return sub.filter((item) => item.url);
|
|
97
|
+
},
|
|
51
98
|
},
|
|
52
99
|
|
|
53
100
|
methods: {
|
|
54
|
-
getUrl(sub: string): string | undefined{
|
|
55
|
-
return this.externaliseLinks(
|
|
101
|
+
getUrl(sub: string): string | undefined {
|
|
102
|
+
return this.externaliseLinks(
|
|
103
|
+
this.emission?.annotations?.[sub] as string | undefined,
|
|
104
|
+
);
|
|
56
105
|
},
|
|
57
|
-
externaliseLinks(link?: string): string|undefined {
|
|
106
|
+
externaliseLinks(link?: string): string | undefined {
|
|
58
107
|
if (!link) return link;
|
|
59
108
|
link = link.trim();
|
|
60
|
-
return !link.startsWith(
|
|
109
|
+
return !link.startsWith("http") && !link.startsWith("//")
|
|
110
|
+
? "//" + link
|
|
111
|
+
: link;
|
|
61
112
|
},
|
|
62
113
|
},
|
|
63
|
-
})
|
|
114
|
+
});
|
|
64
115
|
</script>
|
|
65
116
|
<style lang="scss">
|
|
66
|
-
.height-40{
|
|
117
|
+
.height-40 {
|
|
67
118
|
height: 40px;
|
|
68
119
|
}
|
|
69
|
-
</style>
|
|
120
|
+
</style>
|
|
@@ -1,69 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex align-items-center octopus-form-item">
|
|
3
|
-
<div
|
|
4
|
-
:class="isSwitch?'octopus-form-switch me-2':''"
|
|
5
|
-
>
|
|
3
|
+
<div :class="isSwitch ? 'octopus-form-switch me-2' : ''">
|
|
6
4
|
<input
|
|
7
5
|
:id="idCheckbox"
|
|
8
6
|
:checked="textInit"
|
|
9
7
|
type="checkbox"
|
|
10
8
|
:disabled="isDisabled"
|
|
11
|
-
:title="displayLabel?'':label"
|
|
9
|
+
:title="displayLabel ? '' : label"
|
|
12
10
|
:data-selenium="selenium"
|
|
13
|
-
@input="$emit('update:textInit'
|
|
11
|
+
@input="$emit('update:textInit', !textInit)"
|
|
14
12
|
@click="emitClickAction"
|
|
15
|
-
|
|
13
|
+
/>
|
|
16
14
|
<span
|
|
17
15
|
v-if="isSwitch"
|
|
18
16
|
class="slider"
|
|
19
|
-
@click="
|
|
17
|
+
@click="
|
|
18
|
+
$emit('update:textInit', !textInit);
|
|
19
|
+
emitClickAction;
|
|
20
|
+
"
|
|
20
21
|
/>
|
|
21
22
|
</div>
|
|
22
23
|
<label
|
|
23
24
|
class="c-hand"
|
|
24
|
-
:class="displayLabel? '': 'd-none'"
|
|
25
|
+
:class="displayLabel ? '' : 'd-none'"
|
|
25
26
|
:for="idCheckbox"
|
|
26
|
-
|
|
27
|
+
>{{ label }}</label
|
|
28
|
+
>
|
|
27
29
|
</div>
|
|
28
30
|
</template>
|
|
29
31
|
|
|
30
32
|
<script lang="ts">
|
|
31
|
-
import { defineComponent } from
|
|
33
|
+
import { defineComponent } from "vue";
|
|
32
34
|
export default defineComponent({
|
|
33
|
-
name:
|
|
35
|
+
name: "ClassicCheckbox",
|
|
34
36
|
|
|
35
37
|
props: {
|
|
36
|
-
idCheckbox: { default:
|
|
37
|
-
label: { default:
|
|
38
|
+
idCheckbox: { default: "", type: String },
|
|
39
|
+
label: { default: "", type: String },
|
|
38
40
|
isDisabled: { default: false, type: Boolean },
|
|
39
41
|
textInit: { default: false, type: Boolean },
|
|
40
|
-
isSwitch:{default:false, type:Boolean},
|
|
41
|
-
displayLabel: {default:true, type: Boolean},
|
|
42
|
-
selenium: { default:
|
|
42
|
+
isSwitch: { default: false, type: Boolean },
|
|
43
|
+
displayLabel: { default: true, type: Boolean },
|
|
44
|
+
selenium: { default: "", type: String },
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:textInit", "clickAction"],
|
|
47
|
+
methods: {
|
|
48
|
+
emitClickAction(): void {
|
|
49
|
+
this.$emit("clickAction");
|
|
50
|
+
},
|
|
43
51
|
},
|
|
44
|
-
emits: ['update:textInit', 'clickAction'],
|
|
45
|
-
methods:{
|
|
46
|
-
emitClickAction():void{
|
|
47
|
-
this.$emit('clickAction');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
52
|
});
|
|
51
53
|
</script>
|
|
52
54
|
|
|
53
55
|
<style lang="scss">
|
|
54
|
-
@import
|
|
55
|
-
.octopus-app{
|
|
56
|
-
.octopus-form-switch{
|
|
56
|
+
@import "@scss/_variables.scss";
|
|
57
|
+
.octopus-app {
|
|
58
|
+
.octopus-form-switch {
|
|
57
59
|
position: relative;
|
|
58
60
|
display: inline-block;
|
|
59
61
|
width: 2rem;
|
|
60
62
|
height: 1rem;
|
|
61
|
-
input{
|
|
63
|
+
input {
|
|
62
64
|
opacity: 0;
|
|
63
65
|
width: 0;
|
|
64
66
|
height: 0;
|
|
65
67
|
}
|
|
66
|
-
.slider{
|
|
68
|
+
.slider {
|
|
67
69
|
position: absolute;
|
|
68
70
|
cursor: pointer;
|
|
69
71
|
top: 0;
|
|
@@ -71,7 +73,7 @@ export default defineComponent({
|
|
|
71
73
|
right: 0;
|
|
72
74
|
bottom: 0;
|
|
73
75
|
background-color: #ccc;
|
|
74
|
-
transition: .4s;
|
|
76
|
+
transition: 0.4s;
|
|
75
77
|
border-radius: 1rem;
|
|
76
78
|
}
|
|
77
79
|
.slider:before {
|
|
@@ -82,7 +84,7 @@ export default defineComponent({
|
|
|
82
84
|
left: 2px;
|
|
83
85
|
bottom: 2px;
|
|
84
86
|
background-color: white;
|
|
85
|
-
transition: .4s;
|
|
87
|
+
transition: 0.4s;
|
|
86
88
|
border-radius: 50%;
|
|
87
89
|
}
|
|
88
90
|
input:checked + .slider {
|
|
@@ -94,7 +96,6 @@ export default defineComponent({
|
|
|
94
96
|
input:checked + .slider:before {
|
|
95
97
|
transform: translateX(1rem);
|
|
96
98
|
}
|
|
97
|
-
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
</style>
|
|
101
|
+
</style>
|