@saooti/octopus-sdk 40.1.21 → 40.2.0-SNAPSHOT
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 +7 -1
- package/package.json +1 -1
- package/plateform.conf +1 -1
- package/src/components/composable/player/usePlayerLive.ts +1 -1
- package/src/components/display/accessibility/AccessibilityModal.vue +7 -7
- package/src/components/display/comments/CommentSection.vue +1 -1
- package/src/components/display/emission/EmissionPlayerItem.vue +1 -1
- package/src/components/display/list/SwiperList.vue +1 -1
- package/src/components/display/podcasts/PodcastItemInfo.vue +1 -1
- package/src/components/display/podcasts/PodcastModuleBox.vue +9 -4
- package/src/components/display/podcasts/PodcastRawTranscript.vue +5 -18
- package/src/components/display/sharing/PlayerAnonymousModal.vue +54 -0
- package/src/components/display/sharing/QrCode.vue +26 -28
- package/src/components/display/sharing/ShareAnonymous.vue +291 -0
- package/src/components/display/sharing/ShareNewsletter.vue +216 -0
- package/src/components/display/sharing/ShareSocialsButtons.vue +140 -0
- package/src/components/display/sharing/SubscribeButtons.vue +2 -0
- package/src/components/misc/ClassicNav.vue +9 -3
- package/src/components/misc/ClassicPopover.vue +1 -1
- package/src/components/misc/modal/NewsletterModal.vue +14 -192
- package/src/components/misc/modal/QrCodeModal.vue +2 -1
- package/src/components/pages/EmissionPage.vue +14 -26
- package/src/components/pages/ParticipantPage.vue +17 -7
- package/src/components/pages/PlaylistPage.vue +12 -8
- package/src/components/pages/PodcastPage.vue +15 -38
- package/src/components/pages/RadioPage.vue +12 -7
- package/src/components/pages/VideoPage.vue +0 -2
- package/src/locale/de.ts +2 -2
- package/src/locale/en.ts +2 -2
- package/src/locale/es.ts +2 -2
- package/src/locale/fr.ts +6 -6
- package/src/locale/it.ts +2 -2
- package/src/locale/sl.ts +2 -2
- package/src/router/router.ts +3 -8
- package/src/stores/class/config/commentsConfig.ts +2 -2
- package/src/components/display/sharing/ShareButtons.vue +0 -351
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section id="share-buttons-podcast-section" v-if="!isLoading && (authOrgaId || !noSharing)" class="module-box">
|
|
3
|
-
<div class="share-buttons-display">
|
|
4
|
-
<div v-if="!isGarRole && !noSharing" class="d-flex flex-column me-2">
|
|
5
|
-
<h3 class="mb-2">
|
|
6
|
-
{{ $t("Share in one click") }}
|
|
7
|
-
</h3>
|
|
8
|
-
<div class="d-flex align-items-center">
|
|
9
|
-
<template v-for="button in arrayShareButtons" :key="button.title">
|
|
10
|
-
<a
|
|
11
|
-
v-if="button.condition"
|
|
12
|
-
rel="noreferrer noopener"
|
|
13
|
-
target="_blank"
|
|
14
|
-
:href="button.url"
|
|
15
|
-
class="btn share-btn mb-2 text-dark me-2"
|
|
16
|
-
:title="$t('New window', {text: button.title})"
|
|
17
|
-
>
|
|
18
|
-
<component :is="button.icon" :size="34" />
|
|
19
|
-
</a>
|
|
20
|
-
</template>
|
|
21
|
-
<button
|
|
22
|
-
class="btn share-btn mb-2 text-dark"
|
|
23
|
-
:title="$t('Copy this page URL')"
|
|
24
|
-
@click="onCopyCode(urlPage, afterCopy)"
|
|
25
|
-
>
|
|
26
|
-
<LinkVariantIcon />
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="d-flex-column align-items-center">
|
|
31
|
-
<div
|
|
32
|
-
v-if="podcast || emission || playlist"
|
|
33
|
-
class="d-flex flex-column share-left-not-phone"
|
|
34
|
-
>
|
|
35
|
-
<h3 class="mb-2">
|
|
36
|
-
{{ $t("Newsletter") }}
|
|
37
|
-
</h3>
|
|
38
|
-
<button
|
|
39
|
-
class="btn share-btn mb-2 text-dark"
|
|
40
|
-
:title="$t('Share newsletter')"
|
|
41
|
-
@click="newsletter = true"
|
|
42
|
-
>
|
|
43
|
-
<EmailNewsletterIcon />
|
|
44
|
-
</button>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="d-flex flex-column share-left-not-phone">
|
|
47
|
-
<h3 class="mb-2">
|
|
48
|
-
{{ $t("QR Code") }}
|
|
49
|
-
</h3>
|
|
50
|
-
<button
|
|
51
|
-
class="btn share-btn mb-2 text-dark"
|
|
52
|
-
:title="$t('Share QR Code')"
|
|
53
|
-
@click="qrCode = true"
|
|
54
|
-
>
|
|
55
|
-
<QrcodeIcon />
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<div
|
|
59
|
-
v-if="'' !== rssUrl && displayRss && !isGarRole"
|
|
60
|
-
class="d-flex flex-column ms-4"
|
|
61
|
-
>
|
|
62
|
-
<h3 class="mb-2">
|
|
63
|
-
{{ $t("Rss feed") }}
|
|
64
|
-
</h3>
|
|
65
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
66
|
-
<a
|
|
67
|
-
rel="noreferrer noopener"
|
|
68
|
-
target="_blank"
|
|
69
|
-
class="btn share-btn mb-2 text-dark"
|
|
70
|
-
:href="rssUrl"
|
|
71
|
-
:title="$t('New window', {text: titleRssButton})"
|
|
72
|
-
@click.prevent="openPopup()"
|
|
73
|
-
>
|
|
74
|
-
<RssIcon />
|
|
75
|
-
</a>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
<div v-if="shareAiAuth" class="d-flex flex-column ms-4">
|
|
79
|
-
<h3 class="mb-2">
|
|
80
|
-
{{ $t("Generate a social media post (with AI)") }}
|
|
81
|
-
</h3>
|
|
82
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
83
|
-
<router-link
|
|
84
|
-
class="btn share-btn mb-2 text-dark"
|
|
85
|
-
:title="$t('Generate a social media post (with AI)')"
|
|
86
|
-
:to="{
|
|
87
|
-
name: 'advancedShare',
|
|
88
|
-
params: { podcastId: podcast.podcastId },
|
|
89
|
-
}"
|
|
90
|
-
>
|
|
91
|
-
<CreationIcon />
|
|
92
|
-
</router-link>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<ClipboardModal
|
|
98
|
-
v-if="dataRSSSave"
|
|
99
|
-
:link="rssUrl"
|
|
100
|
-
:emission="emission"
|
|
101
|
-
@close="dataRSSSave = false"
|
|
102
|
-
@copy="afterCopy"
|
|
103
|
-
/>
|
|
104
|
-
<NewsletterModal
|
|
105
|
-
v-if="newsletter"
|
|
106
|
-
:closable="true"
|
|
107
|
-
:podcast="podcast"
|
|
108
|
-
:emission="emission"
|
|
109
|
-
:playlist="playlist"
|
|
110
|
-
@close="newsletter = false"
|
|
111
|
-
/>
|
|
112
|
-
<QrCodeModal
|
|
113
|
-
v-if="qrCode"
|
|
114
|
-
:closable="true"
|
|
115
|
-
:url-page="urlPage"
|
|
116
|
-
@close="qrCode = false"
|
|
117
|
-
/>
|
|
118
|
-
<SnackBar
|
|
119
|
-
v-if="lazyLoadingSnackbar"
|
|
120
|
-
ref="snackbar"
|
|
121
|
-
position="bottom-left"
|
|
122
|
-
/>
|
|
123
|
-
</div>
|
|
124
|
-
</section>
|
|
125
|
-
</template>
|
|
126
|
-
|
|
127
|
-
<script lang="ts">
|
|
128
|
-
import XIcon from "../../icons/XIcon.vue";
|
|
129
|
-
import BlueSkyIcon from "../../icons/BlueSkyIcon.vue";
|
|
130
|
-
import CreationIcon from "vue-material-design-icons/Creation.vue";
|
|
131
|
-
import RssIcon from "vue-material-design-icons/Rss.vue";
|
|
132
|
-
import WhatsappIcon from "vue-material-design-icons/Whatsapp.vue";
|
|
133
|
-
import LinkedinIcon from "vue-material-design-icons/Linkedin.vue";
|
|
134
|
-
import FacebookIcon from "vue-material-design-icons/Facebook.vue";
|
|
135
|
-
import QrcodeIcon from "vue-material-design-icons/Qrcode.vue";
|
|
136
|
-
import EmailNewsletterIcon from "vue-material-design-icons/EmailNewsletter.vue";
|
|
137
|
-
import LinkVariantIcon from "vue-material-design-icons/LinkVariant.vue";
|
|
138
|
-
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
139
|
-
import { useApiStore } from "../../../stores/ApiStore";
|
|
140
|
-
import { mapActions, mapState } from "pinia";
|
|
141
|
-
import { Emission } from "@/stores/class/general/emission";
|
|
142
|
-
import { Podcast } from "@/stores/class/general/podcast";
|
|
143
|
-
import { state } from "../../../stores/ParamSdkStore";
|
|
144
|
-
import { useAuthStore } from "../../../stores/AuthStore";
|
|
145
|
-
import classicApi from "../../../api/classicApi";
|
|
146
|
-
import displayHelper from "../../../helper/displayHelper";
|
|
147
|
-
import { defineAsyncComponent, defineComponent } from "vue";
|
|
148
|
-
import { Playlist } from "@/stores/class/general/playlist";
|
|
149
|
-
const ClipboardModal = defineAsyncComponent(
|
|
150
|
-
() => import("../../misc/modal/ClipboardModal.vue"),
|
|
151
|
-
);
|
|
152
|
-
const NewsletterModal = defineAsyncComponent(
|
|
153
|
-
() => import("../../misc/modal/NewsletterModal.vue"),
|
|
154
|
-
);
|
|
155
|
-
const QrCodeModal = defineAsyncComponent(
|
|
156
|
-
() => import("../../misc/modal/QrCodeModal.vue"),
|
|
157
|
-
);
|
|
158
|
-
const SnackBar = defineAsyncComponent(() => import("../../misc/SnackBar.vue"));
|
|
159
|
-
export default defineComponent({
|
|
160
|
-
components: {
|
|
161
|
-
ClipboardModal,
|
|
162
|
-
NewsletterModal,
|
|
163
|
-
QrCodeModal,
|
|
164
|
-
SnackBar,
|
|
165
|
-
LinkVariantIcon,
|
|
166
|
-
EmailNewsletterIcon,
|
|
167
|
-
QrcodeIcon,
|
|
168
|
-
FacebookIcon,
|
|
169
|
-
LinkedinIcon,
|
|
170
|
-
WhatsappIcon,
|
|
171
|
-
RssIcon,
|
|
172
|
-
XIcon,
|
|
173
|
-
CreationIcon,
|
|
174
|
-
BlueSkyIcon
|
|
175
|
-
},
|
|
176
|
-
props: {
|
|
177
|
-
podcast: { default: undefined, type: Object as () => Podcast },
|
|
178
|
-
emission: { default: undefined, type: Object as () => Emission },
|
|
179
|
-
playlist: { default: undefined, type: Object as () => Playlist },
|
|
180
|
-
participantId: { default: undefined, type: Number },
|
|
181
|
-
organisationId: { default: undefined, type: String },
|
|
182
|
-
},
|
|
183
|
-
data() {
|
|
184
|
-
return {
|
|
185
|
-
noSharing: true as boolean,
|
|
186
|
-
isLoading: true as boolean,
|
|
187
|
-
dataRSSSave: false as boolean,
|
|
188
|
-
newsletter: false as boolean,
|
|
189
|
-
qrCode: false as boolean,
|
|
190
|
-
displayRss: false as boolean,
|
|
191
|
-
lazyLoadingSnackbar: false as boolean,
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
computed: {
|
|
195
|
-
...mapState(useAuthStore, [
|
|
196
|
-
"isGarRole",
|
|
197
|
-
"authOrganisation",
|
|
198
|
-
"isRoleProduction",
|
|
199
|
-
"authOrgaId",
|
|
200
|
-
]),
|
|
201
|
-
...mapState(useApiStore, ["apiUrl"]),
|
|
202
|
-
shareAiAuth(): boolean {
|
|
203
|
-
return (
|
|
204
|
-
!this.isPodcastmaker &&
|
|
205
|
-
undefined !== this.authOrgaId &&
|
|
206
|
-
undefined !== this.podcast &&
|
|
207
|
-
this.isRoleProduction &&
|
|
208
|
-
(this.authOrganisation.attributes?.["openAi.active"] as
|
|
209
|
-
| string
|
|
210
|
-
| undefined) === "true"
|
|
211
|
-
);
|
|
212
|
-
},
|
|
213
|
-
titleRssButton(): string {
|
|
214
|
-
if (this.participantId) {
|
|
215
|
-
return this.$t("Subscribe to this participant");
|
|
216
|
-
}
|
|
217
|
-
if (this.emission) {
|
|
218
|
-
return this.$t("Subscribe to this emission");
|
|
219
|
-
}
|
|
220
|
-
return this.$t("Subscribe to this RSS feed");
|
|
221
|
-
},
|
|
222
|
-
arrayShareButtons() {
|
|
223
|
-
return [
|
|
224
|
-
{
|
|
225
|
-
title: "Facebook",
|
|
226
|
-
icon: "FacebookIcon",
|
|
227
|
-
url: `https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`,
|
|
228
|
-
condition: true,
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
title: "X",
|
|
232
|
-
icon: "XIcon",
|
|
233
|
-
url: `https://twitter.com/intent/tweet?text=${this.urlPage}`,
|
|
234
|
-
condition: true,
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
title: "Linkedin",
|
|
238
|
-
icon: "LinkedinIcon",
|
|
239
|
-
url: `https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`,
|
|
240
|
-
condition: true,
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
title: "Bluesky",
|
|
244
|
-
icon: "BlueSkyIcon",
|
|
245
|
-
url: `https://bsky.app/intent/compose?text=${this.urlPage}`,
|
|
246
|
-
condition: true,
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
title: "Whatsapp",
|
|
250
|
-
icon: "WhatsappIcon",
|
|
251
|
-
url: `whatsapp://send?text=${this.urlPage}`,
|
|
252
|
-
condition: window.matchMedia("(hover: none)").matches,
|
|
253
|
-
},
|
|
254
|
-
];
|
|
255
|
-
},
|
|
256
|
-
urlPage(): string {
|
|
257
|
-
return window.location.href;
|
|
258
|
-
},
|
|
259
|
-
isPodcastmaker(): boolean {
|
|
260
|
-
return state.generalParameters.podcastmaker as boolean;
|
|
261
|
-
},
|
|
262
|
-
rssUrl(): string {
|
|
263
|
-
const api = this.apiUrl + "rss/";
|
|
264
|
-
if (
|
|
265
|
-
(!this.isPodcastmaker && this.playlist) ||
|
|
266
|
-
this.podcast ||
|
|
267
|
-
this.emission
|
|
268
|
-
) {
|
|
269
|
-
return "";
|
|
270
|
-
}
|
|
271
|
-
if (this.participantId) {
|
|
272
|
-
return api + "participant/" + this.participantId + ".rss";
|
|
273
|
-
}
|
|
274
|
-
if (this.playlist) {
|
|
275
|
-
return api + "playlist/" + this.playlist.playlistId + ".rss";
|
|
276
|
-
}
|
|
277
|
-
if (this.organisationId) {
|
|
278
|
-
return api + "productor/" + this.organisationId + ".rss";
|
|
279
|
-
}
|
|
280
|
-
return "";
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
created() {
|
|
284
|
-
this.initShareButtons();
|
|
285
|
-
},
|
|
286
|
-
methods: {
|
|
287
|
-
...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
|
|
288
|
-
onCopyCode(link: string, callback: () => void){
|
|
289
|
-
displayHelper.onCopyCode(link, callback);
|
|
290
|
-
},
|
|
291
|
-
async initShareButtons() {
|
|
292
|
-
if (undefined !== this.participantId) {
|
|
293
|
-
this.displayRss = await classicApi.fetchData<boolean>({
|
|
294
|
-
api: 0,
|
|
295
|
-
path: `rss/participants/allowed/${this.organisationId}`,
|
|
296
|
-
isNotAuth: true,
|
|
297
|
-
});
|
|
298
|
-
} else {
|
|
299
|
-
this.displayRss = true;
|
|
300
|
-
}
|
|
301
|
-
if (!this.organisationId) {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
const attributes = await this.getOrgaAttributes(this.organisationId);
|
|
305
|
-
this.noSharing = "true" === attributes.noSharing;
|
|
306
|
-
this.isLoading = false;
|
|
307
|
-
},
|
|
308
|
-
openPopup(): void {
|
|
309
|
-
this.dataRSSSave = !this.dataRSSSave;
|
|
310
|
-
},
|
|
311
|
-
afterCopy(): void {
|
|
312
|
-
if (!this.lazyLoadingSnackbar) {
|
|
313
|
-
this.lazyLoadingSnackbar = true;
|
|
314
|
-
setTimeout(() => {
|
|
315
|
-
this.afterCopy();
|
|
316
|
-
}, 500);
|
|
317
|
-
} else {
|
|
318
|
-
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
319
|
-
this.$t("Link in clipboard"),
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
</script>
|
|
326
|
-
<style lang="scss">
|
|
327
|
-
.octopus-app {
|
|
328
|
-
.share-buttons-display {
|
|
329
|
-
display: flex;
|
|
330
|
-
justify-content: space-between;
|
|
331
|
-
align-items: center;
|
|
332
|
-
|
|
333
|
-
@media (width <= 960px) {
|
|
334
|
-
flex-direction: column;
|
|
335
|
-
align-items: baseline;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
> .d-flex-column {
|
|
339
|
-
align-items: flex-start !important;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
@media (width >= 960px) {
|
|
344
|
-
.share-left-not-phone {
|
|
345
|
-
align-items: center;
|
|
346
|
-
justify-content: center;
|
|
347
|
-
margin-left: 1.5rem !important;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
</style>
|