@saooti/octopus-sdk 31.0.34 → 31.0.37
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 +6 -1
- package/index.ts +8 -2
- package/package.json +1 -1
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/src/assets/bootstrap-diff.scss +25 -24
- package/src/assets/general.scss +57 -2
- package/src/assets/modal.scss +5 -4
- package/src/assets/share.scss +2 -0
- package/src/components/display/categories/CategoryFilter.vue +12 -26
- package/src/components/display/categories/CategoryList.vue +14 -20
- package/src/components/display/comments/AddCommentModal.vue +19 -36
- package/src/components/display/comments/CommentBasicView.vue +2 -5
- package/src/components/display/comments/CommentInput.vue +8 -21
- package/src/components/display/comments/CommentItem.vue +1 -1
- package/src/components/display/comments/CommentList.vue +10 -21
- package/src/components/display/comments/CommentPlayer.vue +0 -3
- package/src/components/display/comments/CommentSection.vue +6 -14
- package/src/components/display/emission/EmissionInlineList.vue +5 -10
- package/src/components/display/emission/EmissionItem.vue +5 -10
- package/src/components/display/emission/EmissionList.vue +66 -68
- package/src/components/display/filter/AdvancedSearch.vue +19 -45
- package/src/components/display/filter/CategoryFilter.vue +11 -20
- package/src/components/display/filter/MonetizableFilter.vue +7 -14
- package/src/components/display/filter/ProductorSearch.vue +69 -78
- package/src/components/display/filter/RubriqueChoice.vue +1 -4
- package/src/components/display/filter/RubriqueFilter.vue +1 -5
- package/src/components/display/list/ListPaginate.vue +150 -0
- package/src/components/display/list/Paginate.vue +219 -0
- package/src/components/display/live/LiveHorizontalList.vue +56 -40
- package/src/components/display/organisation/OrganisationChooser.vue +7 -12
- package/src/components/display/participant/ParticipantItem.vue +6 -17
- package/src/components/display/participant/ParticipantList.vue +53 -46
- package/src/components/display/playlist/PlaylistItem.vue +1 -4
- package/src/components/display/playlist/PlaylistList.vue +60 -63
- package/src/components/display/playlist/PodcastList.vue +74 -101
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -28
- package/src/components/display/podcasts/ParticipantDescription.vue +3 -11
- package/src/components/display/podcasts/PodcastFilterList.vue +8 -16
- package/src/components/display/podcasts/PodcastImage.vue +86 -92
- package/src/components/display/podcasts/PodcastItem.vue +1 -2
- package/src/components/display/podcasts/PodcastItemInfo.vue +10 -10
- package/src/components/display/podcasts/PodcastList.vue +61 -81
- package/src/components/display/podcasts/PodcastModuleBox.vue +19 -25
- package/src/components/display/podcasts/PodcastSwiperList.vue +2 -3
- package/src/components/display/podcasts/TagList.vue +0 -2
- package/src/components/display/sharing/QrCode.vue +2 -11
- package/src/components/display/sharing/ShareButtons.vue +44 -329
- package/src/components/display/sharing/ShareButtonsIntern.vue +209 -0
- package/src/components/display/sharing/SharePlayer.vue +21 -53
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +46 -39
- package/src/components/misc/Footer.vue +1 -4
- package/src/components/misc/HomeDropdown.vue +26 -24
- package/src/components/misc/LeftMenu.vue +3 -7
- package/src/components/misc/TopBar.vue +9 -16
- package/src/components/misc/modal/ClipboardModal.vue +1 -1
- package/src/components/misc/modal/MessageModal.vue +1 -1
- package/src/components/misc/modal/QrCodeModal.vue +1 -1
- package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
- package/src/components/mixins/organisationFilter.ts +6 -0
- package/src/components/mixins/player/playerLive.ts +1 -1
- package/src/components/pages/Category.vue +1 -1
- package/src/components/pages/Emission.vue +0 -6
- package/src/components/pages/Emissions.vue +1 -1
- package/src/components/pages/Error403Page.vue +44 -8
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +0 -15
- package/src/components/pages/Participants.vue +1 -1
- package/src/components/pages/Playlist.vue +2 -2
- package/src/components/pages/Playlists.vue +1 -1
- package/src/components/pages/Podcast.vue +1 -3
- package/src/components/pages/Podcasts.vue +11 -8
- package/src/components/pages/Rubrique.vue +1 -1
- package/src/locale/de.ts +3 -0
- package/src/locale/en.ts +9 -0
- package/src/locale/es.ts +3 -0
- package/src/locale/fr.ts +10 -1
- package/src/locale/it.ts +3 -0
- package/src/locale/sl.ts +3 -0
- package/src/router/router.ts +2 -0
- package/src/sass/_variables.scss +0 -1
- package/src/store/class/general/playlist.ts +1 -1
- package/src/store/paramStore.ts +7 -11
- package/src/store/typeAppStore.ts +20 -2
|
@@ -56,18 +56,9 @@ export default defineComponent({
|
|
|
56
56
|
isNotBlack: false as boolean,
|
|
57
57
|
};
|
|
58
58
|
},
|
|
59
|
-
computed:{
|
|
60
|
-
authenticated(): boolean {
|
|
61
|
-
return (state.generalParameters.authenticated as boolean);
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
59
|
watch:{
|
|
65
60
|
isNotBlack(){
|
|
66
|
-
|
|
67
|
-
this.color = this.otherColor;
|
|
68
|
-
}else{
|
|
69
|
-
this.color = "#000000";
|
|
70
|
-
}
|
|
61
|
+
this.color = this.isNotBlack ? this.otherColor : "#000000";
|
|
71
62
|
}
|
|
72
63
|
},
|
|
73
64
|
created(){
|
|
@@ -89,7 +80,7 @@ export default defineComponent({
|
|
|
89
80
|
this.otherColor = state.generalParameters.podcastmakerColor;
|
|
90
81
|
return;
|
|
91
82
|
}
|
|
92
|
-
if (!
|
|
83
|
+
if (!state.generalParameters.authenticated) return;
|
|
93
84
|
let data;
|
|
94
85
|
if(this.$store.state.organisation && this.$store.state.organisation.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
95
86
|
data = this.$store.state.organisation.attributes;
|
|
@@ -1,238 +1,50 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="module-box text-center-mobile">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
v-if="
|
|
6
|
-
!bigRound &&
|
|
7
|
-
(authenticated || participantId || organisationId || notExclusive)
|
|
8
|
-
"
|
|
9
|
-
class="mb-0"
|
|
10
|
-
>
|
|
11
|
-
{{ $t('Share') }}
|
|
12
|
-
</h3>
|
|
13
|
-
<span
|
|
14
|
-
v-if="authenticated"
|
|
15
|
-
id="popover-share-help"
|
|
16
|
-
role="button"
|
|
17
|
-
tabindex="-1"
|
|
18
|
-
class="saooti-help ms-2"
|
|
19
|
-
:title="$t('Help')"
|
|
20
|
-
/>
|
|
21
|
-
<Popover
|
|
22
|
-
v-if="authenticated"
|
|
23
|
-
target="popover-share-help"
|
|
24
|
-
placement="right"
|
|
25
|
-
>
|
|
26
|
-
{{ $t('Share this page without edit and share blocks') }}
|
|
27
|
-
</Popover>
|
|
28
|
-
</div>
|
|
29
|
-
<div
|
|
30
|
-
class="d-flex"
|
|
31
|
-
:class="[
|
|
32
|
-
bigRound && !audioUrl ? 'justify-content-center' : '',
|
|
33
|
-
verticalDisplay ? 'd-flex-row' : '',
|
|
34
|
-
]"
|
|
3
|
+
<template
|
|
4
|
+
v-if="authenticated || participantId || organisationId || notExclusive"
|
|
35
5
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
bigRound ? 'btn btn-big-round' : 'btn share-btn mb-2',
|
|
41
|
-
verticalDisplay ? '' : 'mx-2',
|
|
42
|
-
]"
|
|
43
|
-
:title="$t('Downloading')"
|
|
44
|
-
@click="onDownload(podcast.audioUrl, podcast.title)"
|
|
45
|
-
>
|
|
46
|
-
<div class="saooti-download-bounty" />
|
|
47
|
-
</button>
|
|
48
|
-
<a
|
|
49
|
-
rel="noopener"
|
|
50
|
-
target="_blank"
|
|
51
|
-
:href="facebookURL"
|
|
52
|
-
:class="[
|
|
53
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-facebook share-btn mb-2',
|
|
54
|
-
verticalDisplay ? '' : 'mx-2',
|
|
55
|
-
]"
|
|
56
|
-
title="Facebook"
|
|
57
|
-
>
|
|
58
|
-
<span
|
|
59
|
-
v-if="!bigRound"
|
|
60
|
-
class="saooti-facebook-bounty"
|
|
61
|
-
/>
|
|
62
|
-
<div
|
|
63
|
-
v-else
|
|
64
|
-
class="saooti-facebook-bounty"
|
|
65
|
-
/>
|
|
66
|
-
</a>
|
|
67
|
-
<a
|
|
68
|
-
rel="noopener"
|
|
69
|
-
target="_blank"
|
|
70
|
-
:class="[
|
|
71
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-twitter share-btn mb-2',
|
|
72
|
-
verticalDisplay ? '' : 'mx-2',
|
|
73
|
-
]"
|
|
74
|
-
:href="twitterURL"
|
|
75
|
-
title="Twitter"
|
|
76
|
-
>
|
|
77
|
-
<span
|
|
78
|
-
v-if="!bigRound"
|
|
79
|
-
class="saooti-twitter-bounty"
|
|
80
|
-
/>
|
|
81
|
-
<div
|
|
82
|
-
v-else
|
|
83
|
-
class="saooti-twitter-bounty"
|
|
84
|
-
/>
|
|
85
|
-
</a>
|
|
86
|
-
<a
|
|
87
|
-
rel="noopener"
|
|
88
|
-
target="_blank"
|
|
89
|
-
:class="[
|
|
90
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-primaryedin share-btn mb-2',
|
|
91
|
-
verticalDisplay ? '' : 'mx-2',
|
|
92
|
-
]"
|
|
93
|
-
:href="linkedinURL"
|
|
94
|
-
title="Linkedin"
|
|
95
|
-
>
|
|
96
|
-
<span
|
|
97
|
-
v-if="!bigRound"
|
|
98
|
-
class="saooti-linkedin1"
|
|
99
|
-
/>
|
|
100
|
-
<div
|
|
101
|
-
v-else
|
|
102
|
-
class="saooti-linkedin1"
|
|
103
|
-
/>
|
|
104
|
-
</a>
|
|
105
|
-
<a
|
|
106
|
-
v-if="''!==rssUrl"
|
|
107
|
-
rel="noopener"
|
|
108
|
-
target="_blank"
|
|
109
|
-
:class="[
|
|
110
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-rss share-btn mb-2',
|
|
111
|
-
verticalDisplay ? '' : 'mx-2',
|
|
112
|
-
]"
|
|
113
|
-
:href="rssUrl"
|
|
114
|
-
:title="$t('Subscribe to this emission')"
|
|
115
|
-
@click.prevent="openPopup()"
|
|
116
|
-
>
|
|
6
|
+
<div class="d-flex mb-2">
|
|
7
|
+
<h3 class="mb-0">
|
|
8
|
+
{{ $t('Share') }}
|
|
9
|
+
</h3>
|
|
117
10
|
<span
|
|
118
|
-
v-if="
|
|
119
|
-
|
|
11
|
+
v-if="authenticated"
|
|
12
|
+
id="popover-share-help"
|
|
13
|
+
role="button"
|
|
14
|
+
tabindex="-1"
|
|
15
|
+
class="saooti-help ms-2 align-items-start"
|
|
16
|
+
:title="$t('Help')"
|
|
120
17
|
/>
|
|
121
|
-
<
|
|
122
|
-
v-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</a>
|
|
126
|
-
<a
|
|
127
|
-
rel="noopener"
|
|
128
|
-
target="_blank"
|
|
129
|
-
:class="[
|
|
130
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-rss share-btn mb-2',
|
|
131
|
-
verticalDisplay ? '' : 'mx-2',
|
|
132
|
-
]"
|
|
133
|
-
:title="$t('Copy this page URL')"
|
|
134
|
-
@click="onCopyCode(urlPage,afterCopy)"
|
|
135
|
-
>
|
|
136
|
-
<span
|
|
137
|
-
v-if="!bigRound"
|
|
138
|
-
class="saooti-link"
|
|
139
|
-
/>
|
|
140
|
-
<div
|
|
141
|
-
v-else
|
|
142
|
-
class="saooti-link"
|
|
143
|
-
/>
|
|
144
|
-
</a>
|
|
145
|
-
<a
|
|
146
|
-
v-if="podcast"
|
|
147
|
-
rel="noopener"
|
|
148
|
-
target="_blank"
|
|
149
|
-
:class="[
|
|
150
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-rss share-btn mb-2',
|
|
151
|
-
verticalDisplay ? '' : 'mx-2',
|
|
152
|
-
]"
|
|
153
|
-
:title="$t('Share newsletter')"
|
|
154
|
-
@click="newsletter = true"
|
|
155
|
-
>
|
|
156
|
-
<span
|
|
157
|
-
v-if="!bigRound"
|
|
158
|
-
class="saooti-newsletter"
|
|
159
|
-
/>
|
|
160
|
-
<div
|
|
161
|
-
v-else
|
|
162
|
-
class="saooti-newsletter"
|
|
163
|
-
/>
|
|
164
|
-
</a>
|
|
165
|
-
<a
|
|
166
|
-
rel="noopener"
|
|
167
|
-
target="_blank"
|
|
168
|
-
:class="[
|
|
169
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-rss share-btn mb-2',
|
|
170
|
-
verticalDisplay ? '' : 'mx-2',
|
|
171
|
-
]"
|
|
172
|
-
:title="$t('Share QR Code')"
|
|
173
|
-
@click="qrCode = true"
|
|
174
|
-
>
|
|
175
|
-
<span
|
|
176
|
-
v-if="!bigRound"
|
|
177
|
-
class="saooti-qrcode"
|
|
178
|
-
/>
|
|
179
|
-
<div
|
|
180
|
-
v-else
|
|
181
|
-
class="saooti-qrcode"
|
|
182
|
-
/>
|
|
183
|
-
</a>
|
|
184
|
-
<a
|
|
185
|
-
v-if="isMobile"
|
|
186
|
-
rel="noopener"
|
|
187
|
-
target="_blank"
|
|
188
|
-
:href="whatsappURL"
|
|
189
|
-
:class="[
|
|
190
|
-
bigRound ? 'btn btn-big-round' : 'btn btn-whatsapp share-btn mb-2',
|
|
191
|
-
verticalDisplay ? '' : 'mx-2',
|
|
192
|
-
]"
|
|
193
|
-
title="Whatsapp"
|
|
194
|
-
>
|
|
195
|
-
<span
|
|
196
|
-
v-if="!bigRound"
|
|
197
|
-
class="saooti-Whatsapp"
|
|
18
|
+
<Popover
|
|
19
|
+
v-if="authenticated"
|
|
20
|
+
target="popover-share-help"
|
|
21
|
+
placement="right"
|
|
198
22
|
>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
23
|
+
{{ $t('Share this page without edit and share blocks') }}
|
|
24
|
+
</Popover>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="d-flex align-items-center">
|
|
27
|
+
<ShareButtonsIntern
|
|
28
|
+
:podcast="podcast"
|
|
29
|
+
:emission="emission"
|
|
30
|
+
:participant-id="participantId"
|
|
31
|
+
:organisation-id="organisationId"
|
|
32
|
+
:not-exclusive="notExclusive"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<div
|
|
37
|
+
v-else
|
|
38
|
+
class="d-flex-row"
|
|
39
|
+
>
|
|
40
|
+
<ShareButtonsIntern
|
|
41
|
+
:podcast="podcast"
|
|
42
|
+
:emission="emission"
|
|
43
|
+
:participant-id="participantId"
|
|
44
|
+
:organisation-id="organisationId"
|
|
45
|
+
:not-exclusive="notExclusive"
|
|
46
|
+
/>
|
|
212
47
|
</div>
|
|
213
|
-
<ClipboardModal
|
|
214
|
-
v-if="dataRSSSave"
|
|
215
|
-
:link="rssUrl"
|
|
216
|
-
:emission="emission"
|
|
217
|
-
@close="dataRSSSave = false"
|
|
218
|
-
@copy="afterCopy"
|
|
219
|
-
/>
|
|
220
|
-
<NewsletterModal
|
|
221
|
-
v-if="newsletter"
|
|
222
|
-
:closable="true"
|
|
223
|
-
:podcast="podcast"
|
|
224
|
-
@close="newsletter = false"
|
|
225
|
-
/>
|
|
226
|
-
<QrCodeModal
|
|
227
|
-
v-if="qrCode"
|
|
228
|
-
:closable="true"
|
|
229
|
-
:url-page="urlPage"
|
|
230
|
-
@close="qrCode = false"
|
|
231
|
-
/>
|
|
232
|
-
<Snackbar
|
|
233
|
-
ref="snackbar"
|
|
234
|
-
position="bottom-left"
|
|
235
|
-
/>
|
|
236
48
|
</div>
|
|
237
49
|
</template>
|
|
238
50
|
|
|
@@ -240,124 +52,27 @@
|
|
|
240
52
|
import { Emission } from '@/store/class/general/emission';
|
|
241
53
|
import { Podcast } from '@/store/class/general/podcast';
|
|
242
54
|
import { state } from '../../../store/paramStore';
|
|
243
|
-
import Snackbar from '../../misc/Snackbar.vue';
|
|
244
55
|
import { displayMethods } from '../../mixins/functions';
|
|
245
56
|
import Popover from '../../misc/Popover.vue';
|
|
246
|
-
import
|
|
247
|
-
import
|
|
248
|
-
const ClipboardModal = defineAsyncComponent(() => import('../../misc/modal/ClipboardModal.vue'));
|
|
249
|
-
const NewsletterModal = defineAsyncComponent(() => import('../../misc/modal/NewsletterModal.vue'));
|
|
250
|
-
const QrCodeModal = defineAsyncComponent(() => import('../../misc/modal/QrCodeModal.vue'));
|
|
57
|
+
import ShareButtonsIntern from './ShareButtonsIntern.vue';
|
|
58
|
+
import { defineComponent } from 'vue';
|
|
251
59
|
export default defineComponent({
|
|
252
60
|
components: {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
QrCodeModal,
|
|
256
|
-
Snackbar,
|
|
257
|
-
Popover
|
|
61
|
+
ShareButtonsIntern,
|
|
62
|
+
Popover,
|
|
258
63
|
},
|
|
259
|
-
|
|
260
64
|
mixins: [displayMethods],
|
|
261
|
-
|
|
262
65
|
props: {
|
|
263
66
|
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
264
67
|
emission: { default: undefined, type: Object as ()=> Emission},
|
|
265
68
|
participantId: { default: undefined, type: Number},
|
|
266
69
|
organisationId: { default: undefined, type: String},
|
|
267
|
-
bigRound: { default: false, type: Boolean},
|
|
268
|
-
audioUrl: { default: undefined, type: String},
|
|
269
70
|
notExclusive: { default: true, type: Boolean},
|
|
270
71
|
},
|
|
271
|
-
|
|
272
|
-
data() {
|
|
273
|
-
return {
|
|
274
|
-
facebookURL: `https://www.facebook.com/sharer/sharer.php?u=${window.location.href}` as string,
|
|
275
|
-
twitterURL: `https://twitter.com/intent/tweet?text=${window.location.href}` as string,
|
|
276
|
-
linkedinURL: `https://www.linkedin.com/sharing/share-offsite/?url=${window.location.href}` as string,
|
|
277
|
-
whatsappURL: `whatsapp://send?text=${window.location.href}` as string,
|
|
278
|
-
dataRSSSave: false as boolean,
|
|
279
|
-
newsletter: false as boolean,
|
|
280
|
-
isMobile: false as boolean,
|
|
281
|
-
qrCode: false as boolean,
|
|
282
|
-
};
|
|
283
|
-
},
|
|
284
|
-
|
|
285
72
|
computed: {
|
|
286
|
-
isDownloadButton(): boolean{
|
|
287
|
-
return this.isDownloadButtonParam && undefined!==this.podcast && (!this.podcast.tags || !this.podcast.tags.includes('copyright'));
|
|
288
|
-
},
|
|
289
|
-
isDownloadButtonParam(): boolean {
|
|
290
|
-
return (state.podcastPage.downloadButton as boolean);
|
|
291
|
-
},
|
|
292
|
-
urlPage(): string{
|
|
293
|
-
return window.location.href;
|
|
294
|
-
},
|
|
295
|
-
verticalDisplay(): boolean {
|
|
296
|
-
return (
|
|
297
|
-
!this.authenticated &&
|
|
298
|
-
!this.participantId &&
|
|
299
|
-
!this.organisationId &&
|
|
300
|
-
!this.notExclusive
|
|
301
|
-
);
|
|
302
|
-
},
|
|
303
73
|
authenticated(): boolean {
|
|
304
74
|
return (state.generalParameters.authenticated as boolean);
|
|
305
75
|
},
|
|
306
|
-
rssUrl(): string {
|
|
307
|
-
if (this.emission)
|
|
308
|
-
return (
|
|
309
|
-
state.generalParameters.ApiUri +
|
|
310
|
-
'rss/emission/' +
|
|
311
|
-
this.emission.emissionId + '.rss'
|
|
312
|
-
);
|
|
313
|
-
if (this.organisationId)
|
|
314
|
-
return (
|
|
315
|
-
state.generalParameters.ApiUri +
|
|
316
|
-
'rss/productor/' +
|
|
317
|
-
this.organisationId + '.rss'
|
|
318
|
-
);
|
|
319
|
-
if (this.participantId)
|
|
320
|
-
return (
|
|
321
|
-
state.generalParameters.ApiUri +
|
|
322
|
-
'rss/participant/' +
|
|
323
|
-
this.participantId + '.rss'
|
|
324
|
-
);
|
|
325
|
-
return '';
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
created(){
|
|
330
|
-
this.isMobile = this.checkIfDeviceMobile();
|
|
331
|
-
},
|
|
332
|
-
methods: {
|
|
333
|
-
openPopup(): void {
|
|
334
|
-
this.dataRSSSave = !this.dataRSSSave;
|
|
335
|
-
},
|
|
336
|
-
afterCopy(): void{
|
|
337
|
-
(this.$refs.snackbar as InstanceType<typeof SnackbarVue>).open(this.$t('Link in clipboard'));
|
|
338
|
-
},
|
|
339
|
-
checkIfDeviceMobile(): boolean{
|
|
340
|
-
let check = false;
|
|
341
|
-
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent);
|
|
342
|
-
return check;
|
|
343
|
-
},
|
|
344
|
-
onDownload(urlToDownload: string, nameOfDownload: string): void{
|
|
345
|
-
const xhr = new XMLHttpRequest();
|
|
346
|
-
xhr.open('GET', urlToDownload, true);
|
|
347
|
-
xhr.responseType = 'blob';
|
|
348
|
-
xhr.onload = function() {
|
|
349
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
350
|
-
const imageUrl = urlCreator.createObjectURL(this.response);
|
|
351
|
-
const tag = document.createElement('a');
|
|
352
|
-
tag.href = imageUrl;
|
|
353
|
-
tag.target = '_blank';
|
|
354
|
-
tag.download = nameOfDownload.replace(/ /g, '_');
|
|
355
|
-
document.body.appendChild(tag);
|
|
356
|
-
tag.click();
|
|
357
|
-
document.body.removeChild(tag);
|
|
358
|
-
};
|
|
359
|
-
xhr.send();
|
|
360
|
-
},
|
|
361
76
|
},
|
|
362
77
|
})
|
|
363
78
|
</script>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
v-if="isDownloadButton"
|
|
4
|
+
class="text-dark"
|
|
5
|
+
:class="getClass()"
|
|
6
|
+
:title="$t('Downloading')"
|
|
7
|
+
@click="onDownload(podcast.audioUrl, podcast.title)"
|
|
8
|
+
>
|
|
9
|
+
<div class="saooti-download-bounty" />
|
|
10
|
+
</button>
|
|
11
|
+
<template
|
|
12
|
+
v-for="button in arrayShareButtons"
|
|
13
|
+
:key="button.title"
|
|
14
|
+
>
|
|
15
|
+
<a
|
|
16
|
+
v-if="button.condition"
|
|
17
|
+
rel="noopener"
|
|
18
|
+
target="_blank"
|
|
19
|
+
:href="button.url"
|
|
20
|
+
:class="getClass(button.className)"
|
|
21
|
+
:title="button.title"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
:class="button.icon"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
v-for="index in button.nbPath"
|
|
28
|
+
:key="index"
|
|
29
|
+
:class="'path'+(index+1)"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</a>
|
|
33
|
+
</template>
|
|
34
|
+
<a
|
|
35
|
+
v-if="''!==rssUrl"
|
|
36
|
+
rel="noopener"
|
|
37
|
+
target="_blank"
|
|
38
|
+
:class="getClass()"
|
|
39
|
+
:href="rssUrl"
|
|
40
|
+
:title="$t('Subscribe to this emission')"
|
|
41
|
+
@click.prevent="openPopup()"
|
|
42
|
+
>
|
|
43
|
+
<div class="saooti-rss-bounty" />
|
|
44
|
+
</a>
|
|
45
|
+
<a
|
|
46
|
+
rel="noopener"
|
|
47
|
+
target="_blank"
|
|
48
|
+
:class="getClass()"
|
|
49
|
+
:title="$t('Copy this page URL')"
|
|
50
|
+
@click="onCopyCode(urlPage,afterCopy)"
|
|
51
|
+
>
|
|
52
|
+
<div class="saooti-link" />
|
|
53
|
+
</a>
|
|
54
|
+
<a
|
|
55
|
+
v-if="podcast"
|
|
56
|
+
rel="noopener"
|
|
57
|
+
target="_blank"
|
|
58
|
+
:class="getClass()"
|
|
59
|
+
:title="$t('Share newsletter')"
|
|
60
|
+
@click="newsletter = true"
|
|
61
|
+
>
|
|
62
|
+
<div class="saooti-newsletter" />
|
|
63
|
+
</a>
|
|
64
|
+
<a
|
|
65
|
+
rel="noopener"
|
|
66
|
+
target="_blank"
|
|
67
|
+
:class="getClass()"
|
|
68
|
+
:title="$t('Share QR Code')"
|
|
69
|
+
@click="qrCode = true"
|
|
70
|
+
>
|
|
71
|
+
<div class="saooti-qrcode" />
|
|
72
|
+
</a>
|
|
73
|
+
<ClipboardModal
|
|
74
|
+
v-if="dataRSSSave"
|
|
75
|
+
:link="rssUrl"
|
|
76
|
+
:emission="emission"
|
|
77
|
+
@close="dataRSSSave = false"
|
|
78
|
+
@copy="afterCopy"
|
|
79
|
+
/>
|
|
80
|
+
<NewsletterModal
|
|
81
|
+
v-if="newsletter"
|
|
82
|
+
:closable="true"
|
|
83
|
+
:podcast="podcast"
|
|
84
|
+
@close="newsletter = false"
|
|
85
|
+
/>
|
|
86
|
+
<QrCodeModal
|
|
87
|
+
v-if="qrCode"
|
|
88
|
+
:closable="true"
|
|
89
|
+
:url-page="urlPage"
|
|
90
|
+
@close="qrCode = false"
|
|
91
|
+
/>
|
|
92
|
+
<Snackbar
|
|
93
|
+
ref="snackbar"
|
|
94
|
+
position="bottom-left"
|
|
95
|
+
/>
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
<script lang="ts">
|
|
99
|
+
import { Emission } from '@/store/class/general/emission';
|
|
100
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
101
|
+
import { state } from '../../../store/paramStore';
|
|
102
|
+
import Snackbar from '../../misc/Snackbar.vue';
|
|
103
|
+
import { displayMethods } from '../../mixins/functions';
|
|
104
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
105
|
+
import SnackbarVue from '../../misc/Snackbar.vue';
|
|
106
|
+
const ClipboardModal = defineAsyncComponent(() => import('../../misc/modal/ClipboardModal.vue'));
|
|
107
|
+
const NewsletterModal = defineAsyncComponent(() => import('../../misc/modal/NewsletterModal.vue'));
|
|
108
|
+
const QrCodeModal = defineAsyncComponent(() => import('../../misc/modal/QrCodeModal.vue'));
|
|
109
|
+
export default defineComponent({
|
|
110
|
+
components: {
|
|
111
|
+
ClipboardModal,
|
|
112
|
+
NewsletterModal,
|
|
113
|
+
QrCodeModal,
|
|
114
|
+
Snackbar,
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
mixins: [displayMethods],
|
|
118
|
+
|
|
119
|
+
props: {
|
|
120
|
+
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
121
|
+
emission: { default: undefined, type: Object as ()=> Emission},
|
|
122
|
+
participantId: { default: undefined, type: Number},
|
|
123
|
+
organisationId: { default: undefined, type: String},
|
|
124
|
+
notExclusive: { default: true, type: Boolean},
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
data() {
|
|
128
|
+
return {
|
|
129
|
+
dataRSSSave: false as boolean,
|
|
130
|
+
newsletter: false as boolean,
|
|
131
|
+
qrCode: false as boolean,
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
computed: {
|
|
135
|
+
arrayShareButtons(){
|
|
136
|
+
return [
|
|
137
|
+
{ title: 'Facebook', icon:'saooti-facebook-bounty', nbPath:0, className:'btn-facebook', url :`https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`, condition: true},
|
|
138
|
+
{ title: 'Twitter', icon:'saooti-twitter-bounty', nbPath:0, className:'btn-twitter', url :`https://twitter.com/intent/tweet?text=${this.urlPage}`, condition: true},
|
|
139
|
+
{ title: 'Linkedin', icon:'saooti-linkedin1', nbPath:0, className:'btn-linkedin', url :`https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`, condition: true},
|
|
140
|
+
{ title: 'Whatsapp', icon:'saooti-Whatsapp', nbPath:3, className:'btn-whatsapp', url :`whatsapp://send?text=${this.urlPage}`, condition: window.matchMedia('(hover: none)').matches}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
isDownloadButton(): boolean{
|
|
144
|
+
return this.isDownloadButtonParam && undefined!==this.podcast && (!this.podcast.tags || !this.podcast.tags.includes('copyright'));
|
|
145
|
+
},
|
|
146
|
+
isDownloadButtonParam(): boolean {
|
|
147
|
+
return (state.podcastPage.downloadButton as boolean);
|
|
148
|
+
},
|
|
149
|
+
urlPage(): string{
|
|
150
|
+
return window.location.href;
|
|
151
|
+
},
|
|
152
|
+
verticalDisplay(): boolean {
|
|
153
|
+
return (
|
|
154
|
+
!this.authenticated &&
|
|
155
|
+
!this.participantId &&
|
|
156
|
+
!this.organisationId &&
|
|
157
|
+
!this.notExclusive
|
|
158
|
+
);
|
|
159
|
+
},
|
|
160
|
+
authenticated(): boolean {
|
|
161
|
+
return (state.generalParameters.authenticated as boolean);
|
|
162
|
+
},
|
|
163
|
+
rssUrl(): string {
|
|
164
|
+
let api = state.generalParameters.ApiUri+ 'rss/';
|
|
165
|
+
if (this.emission){
|
|
166
|
+
return api +'emission/' + this.emission.emissionId + '.rss';
|
|
167
|
+
}
|
|
168
|
+
if (this.organisationId){
|
|
169
|
+
return api +'productor/' + this.organisationId + '.rss';
|
|
170
|
+
}
|
|
171
|
+
if (this.participantId){
|
|
172
|
+
return api +'participant/' + this.participantId + '.rss';
|
|
173
|
+
}
|
|
174
|
+
return '';
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
methods: {
|
|
179
|
+
getClass(className='btn-rss'): string{
|
|
180
|
+
let returnString = `btn ${className} share-btn mb-2`;
|
|
181
|
+
returnString+= this.verticalDisplay ? '' : ' mx-2';
|
|
182
|
+
return returnString;
|
|
183
|
+
},
|
|
184
|
+
openPopup(): void {
|
|
185
|
+
this.dataRSSSave = !this.dataRSSSave;
|
|
186
|
+
},
|
|
187
|
+
afterCopy(): void{
|
|
188
|
+
(this.$refs.snackbar as InstanceType<typeof SnackbarVue>).open(this.$t('Link in clipboard'));
|
|
189
|
+
},
|
|
190
|
+
onDownload(urlToDownload: string, nameOfDownload: string): void{
|
|
191
|
+
const xhr = new XMLHttpRequest();
|
|
192
|
+
xhr.open('GET', urlToDownload, true);
|
|
193
|
+
xhr.responseType = 'blob';
|
|
194
|
+
xhr.onload = function() {
|
|
195
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
196
|
+
const imageUrl = urlCreator.createObjectURL(this.response);
|
|
197
|
+
const tag = document.createElement('a');
|
|
198
|
+
tag.href = imageUrl;
|
|
199
|
+
tag.target = '_blank';
|
|
200
|
+
tag.download = nameOfDownload.replace(/ /g, '_');
|
|
201
|
+
document.body.appendChild(tag);
|
|
202
|
+
tag.click();
|
|
203
|
+
document.body.removeChild(tag);
|
|
204
|
+
};
|
|
205
|
+
xhr.send();
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
})
|
|
209
|
+
</script>
|