@saooti/octopus-sdk 31.0.26 → 31.0.27
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 +5 -1
- package/package.json +2 -1
- package/src/components/display/podcasts/PodcastImage.vue +15 -9
- package/src/components/display/podcasts/PodcastInlineList.vue +43 -309
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +246 -0
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +158 -0
- package/src/components/display/podcasts/PodcastModuleBox.vue +3 -26
- package/src/components/display/podcasts/PodcastSwiperList.vue +209 -0
- package/src/components/display/sharing/SharePlayer.vue +42 -81
- package/src/components/display/sharing/SharePlayerColors.vue +17 -15
- package/src/components/display/sharing/SharePlayerTypes.vue +15 -32
- package/src/components/display/sharing/SubscribeButtons.vue +44 -200
- package/src/components/form/ClassicCheckbox.vue +8 -8
- package/src/components/form/ClassicRadio.vue +9 -9
- package/src/components/form/ClassicSearch.vue +29 -29
- package/src/components/form/ClassicSelect.vue +12 -15
- package/src/components/misc/ErrorMessage.vue +6 -8
- package/src/components/misc/Footer.vue +63 -95
- package/src/components/misc/LeftMenu.vue +41 -89
- package/src/components/misc/Snackbar.vue +1 -1
- package/src/components/misc/TopBar.vue +41 -82
- package/src/components/misc/modal/ClipboardModal.vue +1 -8
- package/src/components/misc/modal/MessageModal.vue +1 -2
- package/src/components/misc/modal/QrCodeModal.vue +1 -11
- package/src/components/mixins/orgaComputed.ts +15 -0
- package/src/components/pages/Emission.vue +43 -86
- package/src/components/pages/Emissions.vue +27 -73
- package/src/components/pages/Home.vue +5 -12
- package/src/components/pages/Lives.vue +1 -6
- package/src/components/pages/Participant.vue +34 -48
- package/src/components/pages/Participants.vue +10 -28
- package/src/components/pages/Playlist.vue +20 -31
- package/src/components/pages/Playlists.vue +5 -15
- package/src/components/pages/Podcast.vue +95 -115
- package/src/components/pages/Podcasts.vue +34 -93
- package/src/components/pages/Rubrique.vue +6 -17
- package/src/components/pages/Search.vue +16 -36
- package/src/store/paramStore.ts +13 -11
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="d-flex flex-column p-3"
|
|
4
|
+
>
|
|
5
|
+
<h2>{{ title }}</h2>
|
|
6
|
+
<div class="d-flex justify-content-between">
|
|
7
|
+
<div class="d-flex">
|
|
8
|
+
<button
|
|
9
|
+
class="btn btn-underline"
|
|
10
|
+
:class="{ active: !popularSort }"
|
|
11
|
+
@click="sortChrono()"
|
|
12
|
+
>
|
|
13
|
+
{{ $t('Last added') }}
|
|
14
|
+
</button>
|
|
15
|
+
<button
|
|
16
|
+
class="btn btn-underline"
|
|
17
|
+
:class="{ active: popularSort }"
|
|
18
|
+
@click="sortPopular()"
|
|
19
|
+
>
|
|
20
|
+
{{ $t('Most popular') }}
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
v-if="displayArrow"
|
|
25
|
+
class="hide-phone"
|
|
26
|
+
>
|
|
27
|
+
<button
|
|
28
|
+
class="btn admin-button m-1"
|
|
29
|
+
:class="{ disabled: !previousAvailable }"
|
|
30
|
+
:title="$t('Display previous')"
|
|
31
|
+
@click="displayPrevious()"
|
|
32
|
+
>
|
|
33
|
+
<div class="saooti-left fw-bold" />
|
|
34
|
+
</button>
|
|
35
|
+
<button
|
|
36
|
+
class="btn admin-button m-1"
|
|
37
|
+
:class="{ disabled: !nextAvailable }"
|
|
38
|
+
:title="$t('Display next')"
|
|
39
|
+
@click="displayNext()"
|
|
40
|
+
>
|
|
41
|
+
<div class="saooti-right fw-bold" />
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<slot name="list-inline" />
|
|
46
|
+
<router-link
|
|
47
|
+
class="btn btn-link align-self-center width-fit-content m-4"
|
|
48
|
+
:to="refTo"
|
|
49
|
+
@click="handleSeeMoreButton"
|
|
50
|
+
>
|
|
51
|
+
{{ buttonText }}
|
|
52
|
+
<div
|
|
53
|
+
v-if="buttonPlus"
|
|
54
|
+
class="ms-1 saooti-more"
|
|
55
|
+
/>
|
|
56
|
+
</router-link>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script lang="ts">
|
|
61
|
+
import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
|
|
62
|
+
import { defineComponent } from 'vue'
|
|
63
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
64
|
+
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
65
|
+
export default defineComponent({
|
|
66
|
+
name: 'PodcastInlineListTemplate',
|
|
67
|
+
|
|
68
|
+
components: {
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
props: {
|
|
72
|
+
displayArrow: { default: true, type: Boolean},
|
|
73
|
+
previousAvailable: { default: false, type: Boolean},
|
|
74
|
+
nextAvailable: { default: false, type: Boolean},
|
|
75
|
+
popularSort: { default: false, type: Boolean},
|
|
76
|
+
buttonText: { default: undefined, type: String},
|
|
77
|
+
buttonPlus: { default:false, type: Boolean},
|
|
78
|
+
title: { default: '', type: String},
|
|
79
|
+
href: { default: undefined, type: String},
|
|
80
|
+
iabId: { default: undefined, type: Number},
|
|
81
|
+
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
82
|
+
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
83
|
+
},
|
|
84
|
+
emits:['sortChrono','sortPopular', 'displayPrevious', 'displayNext'],
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
computed: {
|
|
91
|
+
rubriqueQueryParam(): string|undefined{
|
|
92
|
+
if(this.$store.state.filter && this.$store.state.filter.rubriqueFilter && this.$store.state.filter.rubriqueFilter.length){
|
|
93
|
+
return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
},
|
|
97
|
+
refTo(): string | RouteLocationRaw {
|
|
98
|
+
if (this.href) return this.href;
|
|
99
|
+
if(this.iabId){
|
|
100
|
+
return {
|
|
101
|
+
name: 'category',
|
|
102
|
+
params:{ 'iabId': this.iabId },
|
|
103
|
+
query: { productor: this.$store.state.filter.organisationId },
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
name: 'podcasts',
|
|
108
|
+
query: { productor: this.$store.state.filter.organisationId,
|
|
109
|
+
iabId: this.$store.state.filter.iab ? this.$store.state.filter.iab.id : undefined,
|
|
110
|
+
rubriquesId: this.rubriqueQueryParam },
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
methods: {
|
|
116
|
+
sortChrono():void{
|
|
117
|
+
this.$emit('sortChrono');
|
|
118
|
+
},
|
|
119
|
+
sortPopular():void{
|
|
120
|
+
this.$emit('sortPopular');
|
|
121
|
+
},
|
|
122
|
+
displayPrevious():void{
|
|
123
|
+
this.$emit('displayPrevious');
|
|
124
|
+
},
|
|
125
|
+
displayNext():void{
|
|
126
|
+
this.$emit('displayNext');
|
|
127
|
+
},
|
|
128
|
+
handleSeeMoreButton(event: { preventDefault: () => void; }){
|
|
129
|
+
if(!this.rubriqueId || 0===this.rubriqueId.length || this.noRubriquageId.length){
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
const rubriqueChosenId = this.rubriqueId[this.rubriqueId.length - 1];
|
|
134
|
+
let filterToAdd: RubriquageFilter = {
|
|
135
|
+
rubriquageId: 0,
|
|
136
|
+
rubriqueId: rubriqueChosenId,
|
|
137
|
+
nameRubriquage: '',
|
|
138
|
+
nameRubrique: ''
|
|
139
|
+
};
|
|
140
|
+
if(this.$store.state.filter.rubriquageArray.length){
|
|
141
|
+
const rubriqueChosen = this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
|
|
142
|
+
filterToAdd = {
|
|
143
|
+
rubriquageId: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriquageId,
|
|
144
|
+
rubriqueId: rubriqueChosenId,
|
|
145
|
+
nameRubriquage: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].title,
|
|
146
|
+
nameRubrique: rubriqueChosen.name
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
|
|
150
|
+
newFilter.push(filterToAdd);
|
|
151
|
+
this.$store.commit('filterRubrique', newFilter);
|
|
152
|
+
const queries = this.$route.query;
|
|
153
|
+
const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
|
|
154
|
+
this.$router.push({ name: 'podcasts',query: { ...queries, ...{ rubriquesId: queryString }} });
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
})
|
|
158
|
+
</script>
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="module-box">
|
|
3
3
|
<div
|
|
4
|
-
v-if="!isOuestFrance"
|
|
5
4
|
class="text-uppercase h4"
|
|
6
5
|
>
|
|
7
6
|
{{ podcast.title }}
|
|
8
7
|
</div>
|
|
9
|
-
<router-link
|
|
10
|
-
v-else
|
|
11
|
-
:to="{
|
|
12
|
-
name: 'emission',
|
|
13
|
-
params: { emissionId: podcast.emission.emissionId },
|
|
14
|
-
query: { productor: $store.state.filter.organisationId },
|
|
15
|
-
}"
|
|
16
|
-
>
|
|
17
|
-
<h1>{{ podcast.emission.name }}</h1>
|
|
18
|
-
</router-link>
|
|
19
8
|
<div class="mb-5 mt-3 d-flex">
|
|
20
9
|
<div class="w-100">
|
|
21
10
|
<PodcastImage
|
|
22
11
|
:class="[
|
|
23
|
-
|
|
12
|
+
!isLiveReadyToRecord
|
|
24
13
|
? 'shadow-element'
|
|
25
14
|
: '',
|
|
26
15
|
isLiveReadyToRecord &&
|
|
@@ -38,25 +27,16 @@
|
|
|
38
27
|
:is-animator-live="isOctopusAndAnimator"
|
|
39
28
|
@playPodcast="playPodcast"
|
|
40
29
|
/>
|
|
41
|
-
<h3 v-if="isOuestFrance">
|
|
42
|
-
{{ podcast.title }}
|
|
43
|
-
</h3>
|
|
44
30
|
<div
|
|
45
31
|
class="d-flex flex-wrap mb-3"
|
|
46
32
|
:class="isLiveReady ? 'justify-content-between' : ''"
|
|
47
33
|
>
|
|
48
34
|
<div
|
|
49
|
-
v-if="
|
|
35
|
+
v-if="0 !== date.length"
|
|
50
36
|
:class="!isLiveReady ? 'me-5' : ''"
|
|
51
37
|
>
|
|
52
38
|
{{ date }}
|
|
53
39
|
</div>
|
|
54
|
-
<div>
|
|
55
|
-
<span
|
|
56
|
-
v-if="isOuestFrance"
|
|
57
|
-
class="saooti-clock3"
|
|
58
|
-
/>{{ $t('Duration', { duration: duration }) }}
|
|
59
|
-
</div>
|
|
60
40
|
<div
|
|
61
41
|
v-if="isLiveReady"
|
|
62
42
|
class="text-danger"
|
|
@@ -72,7 +52,7 @@
|
|
|
72
52
|
<!-- eslint-enable -->
|
|
73
53
|
<div class="my-3">
|
|
74
54
|
<ParticipantDescription :participants="podcast.animators" />
|
|
75
|
-
<div
|
|
55
|
+
<div>
|
|
76
56
|
{{ $t('Emission') + ' : ' }}
|
|
77
57
|
<router-link
|
|
78
58
|
class="fw-bold"
|
|
@@ -198,9 +178,6 @@ export default defineComponent({
|
|
|
198
178
|
authenticated(): boolean {
|
|
199
179
|
return (state.generalParameters.authenticated as boolean);
|
|
200
180
|
},
|
|
201
|
-
isOuestFrance(): boolean {
|
|
202
|
-
return (state.podcastPage.ouestFranceStyle as boolean);
|
|
203
|
-
},
|
|
204
181
|
date(): string {
|
|
205
182
|
if (this.podcast && 1970 !== moment(this.podcast.pubDate).year()){
|
|
206
183
|
return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<PodcastInlineListTemplate
|
|
3
|
+
v-if="loading || (!loading && 0 !== allPodcasts.length)"
|
|
4
|
+
:display-arrow="false"
|
|
5
|
+
:popular-sort="popularSort"
|
|
6
|
+
:button-text="buttonText"
|
|
7
|
+
:button-plus="buttonPlus"
|
|
8
|
+
:title="title"
|
|
9
|
+
:href="href"
|
|
10
|
+
:iab-id="iabId"
|
|
11
|
+
:rubrique-id="rubriqueId"
|
|
12
|
+
:no-rubriquage-id="noRubriquageId"
|
|
13
|
+
@sortChrono="sortChrono"
|
|
14
|
+
@sortPopular="sortPopular"
|
|
15
|
+
>
|
|
16
|
+
<template #list-inline>
|
|
17
|
+
<ClassicLoading
|
|
18
|
+
:loading-text="loading?$t('Loading podcasts ...'):undefined"
|
|
19
|
+
/>
|
|
20
|
+
<swiper
|
|
21
|
+
v-show="loaded"
|
|
22
|
+
:slides-per-view="numberItem"
|
|
23
|
+
:space-between="10"
|
|
24
|
+
:loop="true"
|
|
25
|
+
:navigation="true"
|
|
26
|
+
:modules="modules"
|
|
27
|
+
class="mySwiper"
|
|
28
|
+
>
|
|
29
|
+
<swiper-slide
|
|
30
|
+
v-for="p in allPodcasts"
|
|
31
|
+
:key="p.podcastId"
|
|
32
|
+
>
|
|
33
|
+
<PodcastItem
|
|
34
|
+
class="flex-shrink-0 item-phone-margin"
|
|
35
|
+
:podcast="p"
|
|
36
|
+
/>
|
|
37
|
+
</swiper-slide>
|
|
38
|
+
</swiper>
|
|
39
|
+
</template>
|
|
40
|
+
</PodcastInlineListTemplate>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts">
|
|
44
|
+
import PodcastInlineListTemplate from './PodcastInlineListTemplate.vue';
|
|
45
|
+
import octopusApi from '@saooti/octopus-api';
|
|
46
|
+
import domHelper from '../../../helper/dom';
|
|
47
|
+
import PodcastItem from './PodcastItem.vue';
|
|
48
|
+
import { state } from '../../../store/paramStore';
|
|
49
|
+
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
50
|
+
import { Swiper, SwiperSlide } from "swiper/vue";
|
|
51
|
+
import { Navigation } from "swiper";
|
|
52
|
+
import "swiper/css";
|
|
53
|
+
import "swiper/css/navigation";
|
|
54
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
55
|
+
import { defineComponent } from 'vue'
|
|
56
|
+
export default defineComponent({
|
|
57
|
+
name: 'PodcastSwiperList',
|
|
58
|
+
|
|
59
|
+
components: {
|
|
60
|
+
PodcastInlineListTemplate,
|
|
61
|
+
PodcastItem,
|
|
62
|
+
ClassicLoading,
|
|
63
|
+
Swiper,
|
|
64
|
+
SwiperSlide,
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
props: {
|
|
68
|
+
organisationId: { default: undefined, type: String},
|
|
69
|
+
emissionId: { default: undefined, type: Number},
|
|
70
|
+
iabId: { default: undefined, type: Number},
|
|
71
|
+
title: { default: '', type: String},
|
|
72
|
+
href: { default: undefined, type: String},
|
|
73
|
+
buttonText: { default: undefined, type: String},
|
|
74
|
+
isArrow: { default: false, type: Boolean},
|
|
75
|
+
requirePopularSort: { default:undefined, type: Boolean},
|
|
76
|
+
buttonPlus: { default:false, type: Boolean},
|
|
77
|
+
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
78
|
+
rubriquageId:{ default: () => [], type: Array as ()=> Array<number> },
|
|
79
|
+
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
80
|
+
query: { default: undefined, type: String},
|
|
81
|
+
},
|
|
82
|
+
emits: ['update:isArrow'],
|
|
83
|
+
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
loading: true as boolean,
|
|
87
|
+
loaded: true as boolean,
|
|
88
|
+
popularSort: false as boolean,
|
|
89
|
+
allPodcasts: [] as Array<Podcast>,
|
|
90
|
+
modules: [Navigation],
|
|
91
|
+
numberItem: 5 as number
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
filterOrga(): string {
|
|
96
|
+
return this.$store.state.filter.organisationId;
|
|
97
|
+
},
|
|
98
|
+
organisation(): string|undefined {
|
|
99
|
+
if (this.organisationId) return this.organisationId;
|
|
100
|
+
if (this.filterOrga) return this.filterOrga;
|
|
101
|
+
return undefined;
|
|
102
|
+
},
|
|
103
|
+
watchVariable():string{
|
|
104
|
+
return `${this.emissionId}|${this.organisationId}|${this.filterOrga}|${this.iabId}|${this.rubriqueId}|${this.rubriquageId}|${this.query}`;
|
|
105
|
+
},
|
|
106
|
+
sizeItem(): number {
|
|
107
|
+
return state.generalParameters.podcastItem ? (state.generalParameters.podcastItem as number): 13;
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
watch: {
|
|
111
|
+
watchVariable(): void {
|
|
112
|
+
this.reset();
|
|
113
|
+
this.fetchNext();
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
created() {
|
|
118
|
+
if (undefined !== this.requirePopularSort) {
|
|
119
|
+
this.popularSort = this.requirePopularSort;
|
|
120
|
+
}
|
|
121
|
+
if (undefined !== this.isArrow) {
|
|
122
|
+
this.$emit('update:isArrow', true);
|
|
123
|
+
}
|
|
124
|
+
window.addEventListener('resize', this.handleResize);
|
|
125
|
+
},
|
|
126
|
+
unmounted() {
|
|
127
|
+
window.removeEventListener('resize', this.handleResize);
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
mounted() {
|
|
132
|
+
this.fetchNext();
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
handleResize(): void {
|
|
136
|
+
if (!this.$el) return;
|
|
137
|
+
const width = (this.$el as HTMLElement).offsetWidth;
|
|
138
|
+
const sixteen = domHelper.convertRemToPixels(this.sizeItem + 2);
|
|
139
|
+
this.numberItem = Math.floor(width / sixteen);
|
|
140
|
+
},
|
|
141
|
+
async fetchNext(): Promise<void> {
|
|
142
|
+
const data = await octopusApi.fetchPodcasts({
|
|
143
|
+
first: 0,
|
|
144
|
+
size: 10,
|
|
145
|
+
organisationId: this.organisation,
|
|
146
|
+
emissionId: this.emissionId,
|
|
147
|
+
iabId: this.iabId,
|
|
148
|
+
rubriqueId: this.rubriqueId.length ?this.rubriqueId:undefined,
|
|
149
|
+
rubriquageId: this.rubriquageId.length ?this.rubriquageId : undefined,
|
|
150
|
+
noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
|
|
151
|
+
sort: this.popularSort ? 'POPULARITY' : 'DATE',
|
|
152
|
+
query: this.query,
|
|
153
|
+
});
|
|
154
|
+
this.loading = false;
|
|
155
|
+
this.loaded = true;
|
|
156
|
+
this.allPodcasts = this.allPodcasts.concat(
|
|
157
|
+
data.result.filter((pod: Podcast|null) => null !== pod)
|
|
158
|
+
);
|
|
159
|
+
},
|
|
160
|
+
sortPopular(): void {
|
|
161
|
+
if (this.popularSort) return;
|
|
162
|
+
this.popularSort = true;
|
|
163
|
+
this.reset();
|
|
164
|
+
this.fetchNext();
|
|
165
|
+
},
|
|
166
|
+
sortChrono(): void {
|
|
167
|
+
if (!this.popularSort) return;
|
|
168
|
+
this.popularSort = false;
|
|
169
|
+
this.reset();
|
|
170
|
+
this.fetchNext();
|
|
171
|
+
},
|
|
172
|
+
reset(): void {
|
|
173
|
+
this.loading = true;
|
|
174
|
+
this.loaded = true;
|
|
175
|
+
this.allPodcasts.length = 0;
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
})
|
|
179
|
+
</script>
|
|
180
|
+
<style lang="scss">
|
|
181
|
+
@import '../../../sass/_variables.scss';
|
|
182
|
+
.swiper {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
padding: 50px 20px;
|
|
186
|
+
}
|
|
187
|
+
.swiper-button-next, .swiper-button-prev{
|
|
188
|
+
color: $octopus-primary-color !important;
|
|
189
|
+
height: 100%;
|
|
190
|
+
top: 0;
|
|
191
|
+
bottom: 0;
|
|
192
|
+
margin: 0;
|
|
193
|
+
width: 50px;
|
|
194
|
+
}
|
|
195
|
+
.swiper-button-next{
|
|
196
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%,#fafafa 50%, #fafafa 100%);
|
|
197
|
+
right: 0;
|
|
198
|
+
}
|
|
199
|
+
.swiper-button-prev{
|
|
200
|
+
background: linear-gradient(90deg, #fafafa 0%,#fafafa 50%, rgba(255, 255, 255, 0) 100%);
|
|
201
|
+
left: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.swiper-slide {
|
|
205
|
+
display: flex;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
align-items: center;
|
|
208
|
+
}
|
|
209
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:src="iFrameSrc"
|
|
17
17
|
scrolling="no"
|
|
18
18
|
frameborder="0"
|
|
19
|
-
|
|
19
|
+
width="100%"
|
|
20
20
|
:height="iFrameHeight"
|
|
21
21
|
class="max-iframe my-2"
|
|
22
22
|
/>
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
:is-visible="isVisible"
|
|
53
53
|
:chose-number-episode="displayChoiceAllEpisodes|| isLargeSuggestion"
|
|
54
54
|
:display-choice-all-episodes="displayChoiceAllEpisodes"
|
|
55
|
-
@displayArticle="
|
|
56
|
-
@episodeNumbers="
|
|
57
|
-
@proceedReading="
|
|
58
|
-
@isVisible="
|
|
59
|
-
@iFrameNumber="
|
|
55
|
+
@displayArticle="displayArticle = $event"
|
|
56
|
+
@episodeNumbers="episodeNumbers = $event"
|
|
57
|
+
@proceedReading="proceedReading = $event"
|
|
58
|
+
@isVisible="isVisible = $event"
|
|
59
|
+
@iFrameNumber="iFrameNumber = $event"
|
|
60
60
|
/>
|
|
61
61
|
</template>
|
|
62
62
|
<div v-else-if="exclusive && authenticated">
|
|
@@ -236,27 +236,18 @@ export default defineComponent({
|
|
|
236
236
|
}
|
|
237
237
|
return url.join('');
|
|
238
238
|
},
|
|
239
|
-
iFrameWidth(): string {
|
|
240
|
-
return '100%';
|
|
241
|
-
},
|
|
242
239
|
iFrameHeight(): string {
|
|
243
240
|
switch (this.iFrameModel) {
|
|
244
241
|
case 'large':
|
|
245
242
|
if (this.podcast) return '180px';
|
|
246
243
|
if ('number' === this.episodeNumbers) {
|
|
247
244
|
switch (this.iFrameNumber.toString()) {
|
|
248
|
-
case '1':
|
|
249
|
-
|
|
250
|
-
case '
|
|
251
|
-
|
|
252
|
-
case '
|
|
253
|
-
|
|
254
|
-
case '4':
|
|
255
|
-
return '420px';
|
|
256
|
-
case '5':
|
|
257
|
-
return '420px';
|
|
258
|
-
default:
|
|
259
|
-
return '420px';
|
|
245
|
+
case '1': return '270px';
|
|
246
|
+
case '2': return '320px';
|
|
247
|
+
case '3': return '360px';
|
|
248
|
+
case '4': return '420px';
|
|
249
|
+
case '5': return '420px';
|
|
250
|
+
default: return '420px';
|
|
260
251
|
}
|
|
261
252
|
}
|
|
262
253
|
return '435px';
|
|
@@ -264,28 +255,21 @@ export default defineComponent({
|
|
|
264
255
|
case 'largeSuggestion':
|
|
265
256
|
if ('number' !== this.episodeNumbers) return '510px';
|
|
266
257
|
switch (this.iFrameNumber.toString()) {
|
|
267
|
-
case '1':
|
|
268
|
-
|
|
269
|
-
case '
|
|
270
|
-
|
|
271
|
-
case '
|
|
272
|
-
|
|
273
|
-
case '4':
|
|
274
|
-
return '470px';
|
|
275
|
-
case '5':
|
|
276
|
-
return '470px';
|
|
277
|
-
default:
|
|
278
|
-
return '470px';
|
|
258
|
+
case '1':return '315px';
|
|
259
|
+
case '2':return '365px';
|
|
260
|
+
case '3':return '420px';
|
|
261
|
+
case '4':return '470px';
|
|
262
|
+
case '5':return '470px';
|
|
263
|
+
default:return '470px';
|
|
279
264
|
}
|
|
280
|
-
case 'emission':
|
|
281
|
-
return '530px';
|
|
265
|
+
case 'emission':return '530px';
|
|
282
266
|
default:
|
|
283
267
|
if (this.podcast) return '520px';
|
|
284
268
|
return '530px';
|
|
285
269
|
}
|
|
286
270
|
},
|
|
287
271
|
iFrame(): string {
|
|
288
|
-
return `<iframe src="${this.iFrameSrc}" width="
|
|
272
|
+
return `<iframe src="${this.iFrameSrc}" width="100%" height="${this.iFrameHeight}" scrolling="no" frameborder="0"></iframe>`;
|
|
289
273
|
},
|
|
290
274
|
isPodcastNotVisible(): boolean {
|
|
291
275
|
return (
|
|
@@ -321,32 +305,9 @@ export default defineComponent({
|
|
|
321
305
|
state.generalParameters.organisationId ? state.generalParameters.organisationId : ""
|
|
322
306
|
);
|
|
323
307
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
} else {
|
|
327
|
-
this.color = '#40a372';
|
|
328
|
-
}
|
|
329
|
-
if (Object.prototype.hasOwnProperty.call(data,'THEME')) {
|
|
330
|
-
this.theme = data.THEME;
|
|
331
|
-
} else {
|
|
332
|
-
this.theme = '#000000';
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
updateEpisodeNumber(value: string): void {
|
|
336
|
-
this.episodeNumbers = value;
|
|
337
|
-
},
|
|
338
|
-
updateProceedReading(value: boolean): void {
|
|
339
|
-
this.proceedReading = value;
|
|
340
|
-
},
|
|
341
|
-
updateIframeNumber(value: string): void {
|
|
342
|
-
this.iFrameNumber = value;
|
|
308
|
+
this.color = Object.prototype.hasOwnProperty.call(data,'COLOR') ? data.COLOR : '#40a372';
|
|
309
|
+
this.theme = Object.prototype.hasOwnProperty.call(data,'THEME') ? data.THEME : '#000000';
|
|
343
310
|
},
|
|
344
|
-
updateIsVisible(value: boolean): void {
|
|
345
|
-
this.isVisible = value;
|
|
346
|
-
},
|
|
347
|
-
updateDisplayArticle(value: boolean): void{
|
|
348
|
-
this.displayArticle = value;
|
|
349
|
-
}
|
|
350
311
|
},
|
|
351
312
|
})
|
|
352
313
|
</script>
|
|
@@ -354,26 +315,26 @@ export default defineComponent({
|
|
|
354
315
|
<style lang="scss">
|
|
355
316
|
@import '../../../sass/_variables.scss';
|
|
356
317
|
.octopus-app{
|
|
357
|
-
.sticker {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
318
|
+
.sticker {
|
|
319
|
+
align-self: center;
|
|
320
|
+
background: $octopus-primary-dark;
|
|
321
|
+
padding: 0.5rem;
|
|
322
|
+
transition: all 0.5s ease;
|
|
323
|
+
color: white;
|
|
324
|
+
font-weight: bold;
|
|
325
|
+
letter-spacing: 1px;
|
|
326
|
+
outline: none;
|
|
327
|
+
box-shadow: 10px 10px 34px -15px hsla(0, 0%, 0%, 0.4);
|
|
328
|
+
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
|
|
329
|
+
border: solid 2px #41403e;
|
|
330
|
+
&:hover {
|
|
331
|
+
box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, 0.3);
|
|
332
|
+
background: transparent;
|
|
333
|
+
color: $octopus-primary-dark;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
.max-iframe {
|
|
337
|
+
max-width: 300px;
|
|
373
338
|
}
|
|
374
|
-
}
|
|
375
|
-
.max-iframe {
|
|
376
|
-
max-width: 300px;
|
|
377
|
-
}
|
|
378
339
|
}
|
|
379
340
|
</style>
|
|
@@ -47,30 +47,32 @@ export default defineComponent({
|
|
|
47
47
|
};
|
|
48
48
|
},
|
|
49
49
|
watch:{
|
|
50
|
-
color(){
|
|
51
|
-
if(this.color !== this.internColor){
|
|
52
|
-
this.internColor = this.color;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
50
|
internColor(){
|
|
56
51
|
if(this.color !== this.internColor){
|
|
57
52
|
this.$emit('update:color', this.internColor);
|
|
58
53
|
}
|
|
59
54
|
},
|
|
60
|
-
theme(){
|
|
61
|
-
if(this.theme !== this.internTheme){
|
|
62
|
-
this.internTheme = this.theme;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
55
|
internTheme(){
|
|
66
56
|
if(this.theme !== this.internTheme ){
|
|
67
57
|
this.$emit('update:theme', this.internTheme);
|
|
68
58
|
}
|
|
69
|
-
}
|
|
59
|
+
},
|
|
60
|
+
theme: {
|
|
61
|
+
immediate: true,
|
|
62
|
+
handler() {
|
|
63
|
+
if(this.theme !== this.internTheme){
|
|
64
|
+
this.internTheme = this.theme;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
color: {
|
|
69
|
+
immediate: true,
|
|
70
|
+
handler() {
|
|
71
|
+
if(this.color !== this.internColor){
|
|
72
|
+
this.internColor = this.color;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
},
|
|
70
76
|
},
|
|
71
|
-
mounted(){
|
|
72
|
-
this.internColor= this.color;
|
|
73
|
-
this.internTheme= this.theme;
|
|
74
|
-
}
|
|
75
77
|
})
|
|
76
78
|
</script>
|