@saooti/octopus-sdk 38.1.16 → 38.1.18
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/package.json +1 -1
- package/src/components/display/sharing/ShareButtons.vue +236 -31
- package/src/locale/de.ts +2 -3
- package/src/locale/en.ts +2 -3
- package/src/locale/es.ts +2 -3
- package/src/locale/fr.ts +2 -3
- package/src/locale/it.ts +2 -3
- package/src/locale/sl.ts +2 -3
- package/src/components/display/sharing/ShareButtonsIntern.vue +0 -273
package/package.json
CHANGED
|
@@ -1,51 +1,151 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="!isLoading && (authenticated || !noSharing)" class="module-box">
|
|
3
|
-
<div class="d-flex align-items-center
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
4
|
+
<div v-if="!isGarStudent && !noSharing" class="d-flex flex-column me-2">
|
|
5
|
+
<div class="h4 mb-2">
|
|
6
|
+
{{ $t("Share in one click") }}
|
|
7
|
+
</div>
|
|
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="noopener"
|
|
13
|
+
target="_blank"
|
|
14
|
+
:href="button.url"
|
|
15
|
+
:class="getClass(button.className)"
|
|
16
|
+
class="me-2"
|
|
17
|
+
:title="button.title"
|
|
18
|
+
>
|
|
19
|
+
<div :class="button.icon" />
|
|
20
|
+
</a>
|
|
21
|
+
</template>
|
|
22
|
+
<button
|
|
23
|
+
:class="getClass()"
|
|
24
|
+
class="saooti-link"
|
|
25
|
+
:title="$t('Copy this page URL')"
|
|
26
|
+
@click="onCopyCode(urlPage, afterCopy)"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div v-if="podcast || emission || playlist" class="d-flex flex-column me-2">
|
|
31
|
+
<div class="h4 mb-2">
|
|
32
|
+
{{ $t("Newsletter") }}
|
|
33
|
+
</div>
|
|
34
|
+
<div class="d-flex align-items-center justify-content-center">
|
|
35
|
+
<button
|
|
36
|
+
:class="getClass()"
|
|
37
|
+
class="saooti-newsletter"
|
|
38
|
+
:title="$t('Share newsletter')"
|
|
39
|
+
@click="newsletter = true"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="d-flex flex-column me-2">
|
|
44
|
+
<div class="h4 mb-2">
|
|
45
|
+
{{ $t("QR Code") }}
|
|
46
|
+
</div>
|
|
47
|
+
<div class="d-flex align-items-center justify-content-center">
|
|
48
|
+
<button
|
|
49
|
+
:class="getClass()"
|
|
50
|
+
:title="$t('Share QR Code')"
|
|
51
|
+
class="saooti-qrcode"
|
|
52
|
+
@click="qrCode = true"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div v-if="'' !== rssUrl && displayRss" class="d-flex flex-column me-2">
|
|
57
|
+
<div class="h4 mb-2">
|
|
58
|
+
{{ $t("Rss feed") }}
|
|
59
|
+
</div>
|
|
60
|
+
<div class="d-flex align-items-center justify-content-center">
|
|
61
|
+
<a
|
|
62
|
+
rel="noopener"
|
|
63
|
+
target="_blank"
|
|
64
|
+
class="saooti-rss"
|
|
65
|
+
:class="getClass()"
|
|
66
|
+
:href="rssUrl"
|
|
67
|
+
:title="titleRssButton"
|
|
68
|
+
@click.prevent="openPopup()"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div v-if="shareAiAuth" class="d-flex flex-column me-2">
|
|
73
|
+
<div class="h4 mb-2">
|
|
74
|
+
{{ $t("Generate a social media post (with AI)") }}
|
|
75
|
+
</div>
|
|
76
|
+
<div class="d-flex align-items-center justify-content-center">
|
|
77
|
+
<router-link
|
|
78
|
+
:class="getClass()"
|
|
79
|
+
:title="$t('Generate a social media post (with AI)')"
|
|
80
|
+
:to="{
|
|
81
|
+
name: 'advancedShare',
|
|
82
|
+
params: { podcastId: podcast.podcastId },
|
|
83
|
+
}"
|
|
84
|
+
>
|
|
85
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-stars" viewBox="0 0 16 16">
|
|
86
|
+
<path d="M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828l.645-1.937zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.734 1.734 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.734 1.734 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.734 1.734 0 0 0 3.407 2.31l.387-1.162zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L10.863.1z"/>
|
|
87
|
+
</svg>
|
|
88
|
+
</router-link>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<ClipboardModal
|
|
93
|
+
v-if="dataRSSSave"
|
|
94
|
+
:link="rssUrl"
|
|
95
|
+
:emission="emission"
|
|
96
|
+
@close="dataRSSSave = false"
|
|
97
|
+
@copy="afterCopy"
|
|
98
|
+
/>
|
|
99
|
+
<NewsletterModal
|
|
100
|
+
v-if="newsletter"
|
|
101
|
+
:closable="true"
|
|
102
|
+
:podcast="podcast"
|
|
103
|
+
:emission="emission"
|
|
104
|
+
:playlist="playlist"
|
|
105
|
+
@close="newsletter = false"
|
|
14
106
|
/>
|
|
15
|
-
<
|
|
16
|
-
v-if="
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
107
|
+
<QrCodeModal
|
|
108
|
+
v-if="qrCode"
|
|
109
|
+
:closable="true"
|
|
110
|
+
:url-page="urlPage"
|
|
111
|
+
@close="qrCode = false"
|
|
112
|
+
/>
|
|
113
|
+
<SnackBar
|
|
114
|
+
v-if="lazyLoadingSnackbar"
|
|
115
|
+
ref="snackbar"
|
|
116
|
+
position="bottom-left"
|
|
21
117
|
/>
|
|
22
118
|
</div>
|
|
23
|
-
<ShareButtonsIntern
|
|
24
|
-
:no-sharing="noSharing"
|
|
25
|
-
:podcast="podcast"
|
|
26
|
-
:emission="emission"
|
|
27
|
-
:playlist="playlist"
|
|
28
|
-
:participant-id="participantId"
|
|
29
|
-
:organisation-id="organisationId"
|
|
30
|
-
/>
|
|
31
119
|
</div>
|
|
32
120
|
</template>
|
|
33
121
|
|
|
34
122
|
<script lang="ts">
|
|
35
123
|
import { useSaveFetchStore } from "@/stores/SaveFetchStore";
|
|
36
|
-
import { mapActions } from "pinia";
|
|
124
|
+
import { mapActions, mapState } from "pinia";
|
|
37
125
|
import { Emission } from "@/stores/class/general/emission";
|
|
38
126
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
39
127
|
import { state } from "../../../stores/ParamSdkStore";
|
|
128
|
+
import octopusApi from "@saooti/octopus-api";
|
|
40
129
|
import displayMethods from "../../mixins/displayMethods";
|
|
41
|
-
import
|
|
42
|
-
import ShareButtonsIntern from "./ShareButtonsIntern.vue";
|
|
43
|
-
import { defineComponent } from "vue";
|
|
130
|
+
import { defineAsyncComponent, defineComponent } from "vue";
|
|
44
131
|
import { Playlist } from "@/stores/class/general/playlist";
|
|
132
|
+
import { useAuthStore } from "@/stores/AuthStore";
|
|
133
|
+
const ClipboardModal = defineAsyncComponent(
|
|
134
|
+
() => import("../../misc/modal/ClipboardModal.vue"),
|
|
135
|
+
);
|
|
136
|
+
const NewsletterModal = defineAsyncComponent(
|
|
137
|
+
() => import("../../misc/modal/NewsletterModal.vue"),
|
|
138
|
+
);
|
|
139
|
+
const QrCodeModal = defineAsyncComponent(
|
|
140
|
+
() => import("../../misc/modal/QrCodeModal.vue"),
|
|
141
|
+
);
|
|
142
|
+
const SnackBar = defineAsyncComponent(() => import("../../misc/SnackBar.vue"));
|
|
45
143
|
export default defineComponent({
|
|
46
144
|
components: {
|
|
47
|
-
|
|
48
|
-
|
|
145
|
+
ClipboardModal,
|
|
146
|
+
NewsletterModal,
|
|
147
|
+
QrCodeModal,
|
|
148
|
+
SnackBar,
|
|
49
149
|
},
|
|
50
150
|
mixins: [displayMethods],
|
|
51
151
|
props: {
|
|
@@ -59,14 +159,101 @@ export default defineComponent({
|
|
|
59
159
|
return {
|
|
60
160
|
noSharing: true as boolean,
|
|
61
161
|
isLoading: true as boolean,
|
|
162
|
+
dataRSSSave: false as boolean,
|
|
163
|
+
newsletter: false as boolean,
|
|
164
|
+
qrCode: false as boolean,
|
|
165
|
+
displayRss: false as boolean,
|
|
166
|
+
lazyLoadingSnackbar: false as boolean,
|
|
62
167
|
};
|
|
63
168
|
},
|
|
64
169
|
computed: {
|
|
170
|
+
...mapState(useAuthStore, ["isGarStudent", "authOrganisation"]),
|
|
65
171
|
authenticated(): boolean {
|
|
66
172
|
return state.generalParameters.authenticated as boolean;
|
|
67
173
|
},
|
|
174
|
+
shareAiAuth(): boolean{
|
|
175
|
+
return !this.isPodcastmaker && this.authenticated && undefined!==this.podcast && this.isProduction &&
|
|
176
|
+
((this.authOrganisation.attributes?.["openAi"] as
|
|
177
|
+
| string
|
|
178
|
+
| undefined) === "true" ?? false
|
|
179
|
+
);
|
|
180
|
+
},
|
|
181
|
+
titleRssButton(): string {
|
|
182
|
+
if (this.participantId) {
|
|
183
|
+
return this.$t("Subscribe to this participant");
|
|
184
|
+
}
|
|
185
|
+
if (this.emission) {
|
|
186
|
+
return this.$t("Subscribe to this emission");
|
|
187
|
+
}
|
|
188
|
+
return this.$t("Subscribe to this RSS feed");
|
|
189
|
+
},
|
|
190
|
+
arrayShareButtons() {
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
title: "Facebook",
|
|
194
|
+
icon: "saooti-facebook",
|
|
195
|
+
className: "btn-facebook",
|
|
196
|
+
url: `https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`,
|
|
197
|
+
condition: true,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
title: "X",
|
|
201
|
+
icon: "saooti-twitter",
|
|
202
|
+
className: "btn-twitter",
|
|
203
|
+
url: `https://twitter.com/intent/tweet?text=${this.urlPage}`,
|
|
204
|
+
condition: true,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
title: "Linkedin",
|
|
208
|
+
icon: "saooti-linkedin",
|
|
209
|
+
className: "btn-linkedin",
|
|
210
|
+
url: `https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`,
|
|
211
|
+
condition: true,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
title: "Whatsapp",
|
|
215
|
+
icon: "saooti-Whatsapp",
|
|
216
|
+
className: "btn-whatsapp",
|
|
217
|
+
url: `whatsapp://send?text=${this.urlPage}`,
|
|
218
|
+
condition: window.matchMedia("(hover: none)").matches,
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
},
|
|
222
|
+
urlPage(): string {
|
|
223
|
+
return window.location.href;
|
|
224
|
+
},
|
|
225
|
+
isProduction(): boolean {
|
|
226
|
+
return state.generalParameters.isProduction as boolean;
|
|
227
|
+
},
|
|
228
|
+
isPodcastmaker(): boolean {
|
|
229
|
+
return state.generalParameters.podcastmaker as boolean;
|
|
230
|
+
},
|
|
231
|
+
rssUrl(): string {
|
|
232
|
+
let api = state.generalParameters.ApiUri + "rss/";
|
|
233
|
+
if (this.emission) {
|
|
234
|
+
return api + "emission/" + this.emission.emissionId + ".rss";
|
|
235
|
+
}
|
|
236
|
+
if (this.participantId) {
|
|
237
|
+
return api + "participant/" + this.participantId + ".rss";
|
|
238
|
+
}
|
|
239
|
+
if (this.playlist) {
|
|
240
|
+
return api + "playlist/" + this.playlist.playlistId + ".rss";
|
|
241
|
+
}
|
|
242
|
+
if (this.organisationId) {
|
|
243
|
+
return api + "productor/" + this.organisationId + ".rss";
|
|
244
|
+
}
|
|
245
|
+
return "";
|
|
246
|
+
},
|
|
68
247
|
},
|
|
69
248
|
async created() {
|
|
249
|
+
if (undefined !== this.participantId) {
|
|
250
|
+
this.displayRss = await octopusApi.fetchDataPublic<boolean>(
|
|
251
|
+
0,
|
|
252
|
+
`rss/participants/allowed/${this.organisationId}`,
|
|
253
|
+
);
|
|
254
|
+
} else {
|
|
255
|
+
this.displayRss = true;
|
|
256
|
+
}
|
|
70
257
|
if (!this.organisationId) {
|
|
71
258
|
return;
|
|
72
259
|
}
|
|
@@ -76,6 +263,24 @@ export default defineComponent({
|
|
|
76
263
|
},
|
|
77
264
|
methods: {
|
|
78
265
|
...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
|
|
266
|
+
getClass(className = "btn-rss"): string {
|
|
267
|
+
return `btn ${className} share-btn mb-2 text-dark`;
|
|
268
|
+
},
|
|
269
|
+
openPopup(): void {
|
|
270
|
+
this.dataRSSSave = !this.dataRSSSave;
|
|
271
|
+
},
|
|
272
|
+
afterCopy(): void {
|
|
273
|
+
if (!this.lazyLoadingSnackbar) {
|
|
274
|
+
this.lazyLoadingSnackbar = true;
|
|
275
|
+
setTimeout(() => {
|
|
276
|
+
this.afterCopy();
|
|
277
|
+
}, 500);
|
|
278
|
+
} else {
|
|
279
|
+
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
280
|
+
this.$t("Link in clipboard"),
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
},
|
|
79
284
|
},
|
|
80
285
|
});
|
|
81
286
|
</script>
|
package/src/locale/de.ts
CHANGED
|
@@ -182,8 +182,6 @@ export default {
|
|
|
182
182
|
"Beim Abspielen des Podcasts ist ein Fehler aufgetreten.",
|
|
183
183
|
"More episodes": "Mehr Folgen",
|
|
184
184
|
Stop: "Anhalten",
|
|
185
|
-
"Share this page without edit and share blocks":
|
|
186
|
-
"Diese Seite ohne Bearbeitungsblöcke teilen",
|
|
187
185
|
"Podcast in cancelled status": "Dieser Podcast wurde gestrichen",
|
|
188
186
|
"Show every episode": "Alle Folgen anzeigen",
|
|
189
187
|
"Subscribe emission": "Reihe abonnieren",
|
|
@@ -350,6 +348,7 @@ export default {
|
|
|
350
348
|
"Chronological":"Chronologisch",
|
|
351
349
|
"Trigger automatic reading if this is possible":"Wenn möglich, automatisches Auslesen auslösen",
|
|
352
350
|
"High version":"Hohe Version",
|
|
353
|
-
"
|
|
351
|
+
"Generate a social media post (with AI)":"Einen Social-Media-Beitrag erstellen (mit KI)",
|
|
352
|
+
"Share in one click":"Mit einem Klick teilen",
|
|
354
353
|
"Chaptering":"Kapitelaufteilung",
|
|
355
354
|
}
|
package/src/locale/en.ts
CHANGED
|
@@ -180,8 +180,6 @@ export default {
|
|
|
180
180
|
"Podcast play error": "An error occured while playing Podcast",
|
|
181
181
|
"More episodes": "More episodes",
|
|
182
182
|
Stop: "Stop",
|
|
183
|
-
"Share this page without edit and share blocks":
|
|
184
|
-
"Share this page without edit and share blocks",
|
|
185
183
|
"Podcast in cancelled status": "Podcast has a cancelled status",
|
|
186
184
|
"Show every episode": "Show every episode",
|
|
187
185
|
"Subscribe emission": "Subscribe to the series",
|
|
@@ -350,6 +348,7 @@ export default {
|
|
|
350
348
|
"Chronological":"Chronological",
|
|
351
349
|
"Trigger automatic reading if this is possible":"Trigger automatic reading if this is possible",
|
|
352
350
|
"High version":"High version",
|
|
353
|
-
"
|
|
351
|
+
"Generate a social media post (with AI)":"Generate a social media post (with AI)",
|
|
352
|
+
"Share in one click":"Share in one click",
|
|
354
353
|
"Chaptering":"Chaptering",
|
|
355
354
|
};
|
package/src/locale/es.ts
CHANGED
|
@@ -181,8 +181,6 @@ export default {
|
|
|
181
181
|
"Podcast play error": "Se ha producido un error al reproducir el pódcast",
|
|
182
182
|
"More episodes": "Más episodios",
|
|
183
183
|
Stop: "Detener",
|
|
184
|
-
"Share this page without edit and share blocks":
|
|
185
|
-
"Compartir esta página sin editar y compartir bloques",
|
|
186
184
|
"Podcast in cancelled status": "Pódcast cancelado",
|
|
187
185
|
"Show every episode": "Mostrar cada episodio",
|
|
188
186
|
"Subscribe emission": "Subscribir el programa",
|
|
@@ -351,6 +349,7 @@ export default {
|
|
|
351
349
|
"Chronological":"Cronológico",
|
|
352
350
|
"Trigger automatic reading if this is possible":"Activar la lectura automática si esto es posible",
|
|
353
351
|
"High version":"Versión alta",
|
|
354
|
-
"
|
|
352
|
+
"Generate a social media post (with AI)":"Generar una publicación en las redes sociales (con IA)",
|
|
353
|
+
"Share in one click":"Comparte en un clic",
|
|
355
354
|
"Chaptering":"Capítulos",
|
|
356
355
|
}
|
package/src/locale/fr.ts
CHANGED
|
@@ -182,8 +182,6 @@ export default {
|
|
|
182
182
|
"Podcast play error": "Erreur à la lecture de cette ressource",
|
|
183
183
|
"More episodes": "Plus d’épisodes",
|
|
184
184
|
Stop: "Stop",
|
|
185
|
-
"Share this page without edit and share blocks":
|
|
186
|
-
"Partager cette page sans afficher les blocs d'édition et d'intégration du player",
|
|
187
185
|
"Podcast in cancelled status": "Épisode avec un traitement qui a été annulé",
|
|
188
186
|
"Show every episode": "Afficher tous les épisodes",
|
|
189
187
|
"Subscribe emission": "Écouter sur une plateforme de streaming",
|
|
@@ -357,6 +355,7 @@ export default {
|
|
|
357
355
|
"Chronological":"Chronologique",
|
|
358
356
|
"Trigger automatic reading if this is possible":"Déclencher la lecture automatique si celle ci est possible",
|
|
359
357
|
"High version":"Version en hauteur",
|
|
360
|
-
"
|
|
358
|
+
"Generate a social media post (with AI)":"Générer un post réseaux sociaux (avec IA)",
|
|
359
|
+
"Share in one click":"Partager en un clic",
|
|
361
360
|
"Chaptering":"Chapitrage",
|
|
362
361
|
};
|
package/src/locale/it.ts
CHANGED
|
@@ -177,8 +177,6 @@ export default{
|
|
|
177
177
|
'Podcast play error': 'Si è verificato un errore durante la riproduzione del podcast',
|
|
178
178
|
'More episodes': 'Altri episodi',
|
|
179
179
|
Stop: 'Stop',
|
|
180
|
-
'Share this page without edit and share blocks':
|
|
181
|
-
"Condividi questa pagina senza modificare",
|
|
182
180
|
'Podcast in cancelled status': 'Podcast contrassegnato come eliminato',
|
|
183
181
|
'Show every episode': 'Mostra tutti gli episodi',
|
|
184
182
|
'Subscribe emission': "Iscriviti alla serie",
|
|
@@ -343,6 +341,7 @@ export default{
|
|
|
343
341
|
"Chronological":"Cronologico",
|
|
344
342
|
"Trigger automatic reading if this is possible":"Attivare la lettura automatica, se possibile",
|
|
345
343
|
"High version":"Versione alta",
|
|
346
|
-
"
|
|
344
|
+
"Generate a social media post (with AI)":"Genera un post sui social media (con AI)",
|
|
345
|
+
"Share in one click":"Condividi con un clic",
|
|
347
346
|
"Chaptering":"Capitolazione",
|
|
348
347
|
};
|
package/src/locale/sl.ts
CHANGED
|
@@ -176,8 +176,6 @@ export default {
|
|
|
176
176
|
"Podcast play error": "Pri predvajanju podkasta je prišlo do napake",
|
|
177
177
|
"More episodes": "Več epizod",
|
|
178
178
|
Stop: "Stop",
|
|
179
|
-
"Share this page without edit and share blocks":
|
|
180
|
-
"Deli stran brez možnosti za urejanje in deljenje",
|
|
181
179
|
"Podcast in cancelled status": "Podkast ima status „odpovedan“",
|
|
182
180
|
"Show every episode": "Prikaži vse epizode",
|
|
183
181
|
"Subscribe emission": "Naroči se na oddajo",
|
|
@@ -340,6 +338,7 @@ export default {
|
|
|
340
338
|
"Chronological":"Kronološko",
|
|
341
339
|
"Trigger automatic reading if this is possible":"Sprožite samodejno branje, če je to mogoče",
|
|
342
340
|
"High version":"Visoka različica",
|
|
343
|
-
"
|
|
341
|
+
"Generate a social media post (with AI)":"Ustvarite objavo v družabnem omrežju (z AI)",
|
|
342
|
+
"Share in one click":"Delite z enim klikom",
|
|
344
343
|
"Chaptering":"Poglavje",
|
|
345
344
|
}
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="d-flex align-items-center justify-content-between">
|
|
3
|
-
<div v-if="!isGarStudent && !noSharing" class="d-flex flex-column me-2">
|
|
4
|
-
<div class="h4 mb-2">
|
|
5
|
-
{{ $t("Social networks") }}
|
|
6
|
-
</div>
|
|
7
|
-
<div class="d-flex align-items-center">
|
|
8
|
-
<template v-for="button in arrayShareButtons" :key="button.title">
|
|
9
|
-
<a
|
|
10
|
-
v-if="button.condition"
|
|
11
|
-
rel="noopener"
|
|
12
|
-
target="_blank"
|
|
13
|
-
:href="button.url"
|
|
14
|
-
:class="getClass(button.className)"
|
|
15
|
-
class="me-2"
|
|
16
|
-
:title="button.title"
|
|
17
|
-
>
|
|
18
|
-
<div :class="button.icon" />
|
|
19
|
-
</a>
|
|
20
|
-
</template>
|
|
21
|
-
<!-- <router-link
|
|
22
|
-
v-if="!isPodcastmaker && authenticated && podcast && isProduction"
|
|
23
|
-
:class="getClass('saooti-share')"
|
|
24
|
-
:title="$t('Advanced sharing')"
|
|
25
|
-
:to="{
|
|
26
|
-
name: 'advancedShare',
|
|
27
|
-
params: { podcastId: podcast.podcastId },
|
|
28
|
-
}"
|
|
29
|
-
/> -->
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div v-if="podcast || emission || playlist" class="d-flex flex-column me-2">
|
|
33
|
-
<div class="h4 mb-2">
|
|
34
|
-
{{ $t("Newsletter") }}
|
|
35
|
-
</div>
|
|
36
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
37
|
-
<button
|
|
38
|
-
:class="getClass()"
|
|
39
|
-
class="saooti-newsletter"
|
|
40
|
-
:title="$t('Share newsletter')"
|
|
41
|
-
@click="newsletter = true"
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="d-flex flex-column me-2">
|
|
47
|
-
<div class="h4 mb-2">
|
|
48
|
-
{{ $t("QR Code") }}
|
|
49
|
-
</div>
|
|
50
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
51
|
-
<button
|
|
52
|
-
:class="getClass()"
|
|
53
|
-
:title="$t('Share QR Code')"
|
|
54
|
-
class="saooti-qrcode"
|
|
55
|
-
@click="qrCode = true"
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div class="d-flex flex-column me-2">
|
|
61
|
-
<div class="h4 mb-2">
|
|
62
|
-
{{ $t("Copy this page URL") }}
|
|
63
|
-
</div>
|
|
64
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
65
|
-
<button
|
|
66
|
-
:class="getClass()"
|
|
67
|
-
class="saooti-link"
|
|
68
|
-
:title="$t('Copy this page URL')"
|
|
69
|
-
@click="onCopyCode(urlPage, afterCopy)"
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div v-if="'' !== rssUrl && displayRss" class="d-flex flex-column me-2">
|
|
75
|
-
<div class="h4 mb-2">
|
|
76
|
-
{{ $t("Rss feed") }}
|
|
77
|
-
</div>
|
|
78
|
-
<div class="d-flex align-items-center justify-content-center">
|
|
79
|
-
<a
|
|
80
|
-
rel="noopener"
|
|
81
|
-
target="_blank"
|
|
82
|
-
class="saooti-rss"
|
|
83
|
-
:class="getClass()"
|
|
84
|
-
:href="rssUrl"
|
|
85
|
-
:title="titleRssButton"
|
|
86
|
-
@click.prevent="openPopup()"
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<ClipboardModal
|
|
92
|
-
v-if="dataRSSSave"
|
|
93
|
-
:link="rssUrl"
|
|
94
|
-
:emission="emission"
|
|
95
|
-
@close="dataRSSSave = false"
|
|
96
|
-
@copy="afterCopy"
|
|
97
|
-
/>
|
|
98
|
-
<NewsletterModal
|
|
99
|
-
v-if="newsletter"
|
|
100
|
-
:closable="true"
|
|
101
|
-
:podcast="podcast"
|
|
102
|
-
:emission="emission"
|
|
103
|
-
:playlist="playlist"
|
|
104
|
-
@close="newsletter = false"
|
|
105
|
-
/>
|
|
106
|
-
<QrCodeModal
|
|
107
|
-
v-if="qrCode"
|
|
108
|
-
:closable="true"
|
|
109
|
-
:url-page="urlPage"
|
|
110
|
-
@close="qrCode = false"
|
|
111
|
-
/>
|
|
112
|
-
<SnackBar
|
|
113
|
-
v-if="lazyLoadingSnackbar"
|
|
114
|
-
ref="snackbar"
|
|
115
|
-
position="bottom-left"
|
|
116
|
-
/>
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|
|
119
|
-
|
|
120
|
-
<script lang="ts">
|
|
121
|
-
import { useAuthStore } from "@/stores/AuthStore";
|
|
122
|
-
import { mapState } from "pinia";
|
|
123
|
-
import octopusApi from "@saooti/octopus-api";
|
|
124
|
-
import { Emission } from "@/stores/class/general/emission";
|
|
125
|
-
import { Podcast } from "@/stores/class/general/podcast";
|
|
126
|
-
import { state } from "../../../stores/ParamSdkStore";
|
|
127
|
-
import displayMethods from "../../mixins/displayMethods";
|
|
128
|
-
import { defineComponent, defineAsyncComponent } from "vue";
|
|
129
|
-
import { Playlist } from "@/stores/class/general/playlist";
|
|
130
|
-
const ClipboardModal = defineAsyncComponent(
|
|
131
|
-
() => import("../../misc/modal/ClipboardModal.vue"),
|
|
132
|
-
);
|
|
133
|
-
const NewsletterModal = defineAsyncComponent(
|
|
134
|
-
() => import("../../misc/modal/NewsletterModal.vue"),
|
|
135
|
-
);
|
|
136
|
-
const QrCodeModal = defineAsyncComponent(
|
|
137
|
-
() => import("../../misc/modal/QrCodeModal.vue"),
|
|
138
|
-
);
|
|
139
|
-
const SnackBar = defineAsyncComponent(() => import("../../misc/SnackBar.vue"));
|
|
140
|
-
export default defineComponent({
|
|
141
|
-
components: {
|
|
142
|
-
ClipboardModal,
|
|
143
|
-
NewsletterModal,
|
|
144
|
-
QrCodeModal,
|
|
145
|
-
SnackBar,
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
mixins: [displayMethods],
|
|
149
|
-
|
|
150
|
-
props: {
|
|
151
|
-
noSharing: { default: false, type: Boolean },
|
|
152
|
-
podcast: { default: undefined, type: Object as () => Podcast },
|
|
153
|
-
emission: { default: undefined, type: Object as () => Emission },
|
|
154
|
-
playlist: { default: undefined, type: Object as () => Playlist },
|
|
155
|
-
participantId: { default: undefined, type: Number },
|
|
156
|
-
organisationId: { default: undefined, type: String },
|
|
157
|
-
isVertical: { default: false, type: Boolean },
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
data() {
|
|
161
|
-
return {
|
|
162
|
-
dataRSSSave: false as boolean,
|
|
163
|
-
newsletter: false as boolean,
|
|
164
|
-
qrCode: false as boolean,
|
|
165
|
-
displayRss: false as boolean,
|
|
166
|
-
lazyLoadingSnackbar: false as boolean,
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
computed: {
|
|
170
|
-
...mapState(useAuthStore, ["isGarStudent"]),
|
|
171
|
-
titleRssButton(): string {
|
|
172
|
-
if (this.participantId) {
|
|
173
|
-
return this.$t("Subscribe to this participant");
|
|
174
|
-
}
|
|
175
|
-
if (this.emission) {
|
|
176
|
-
return this.$t("Subscribe to this emission");
|
|
177
|
-
}
|
|
178
|
-
return this.$t("Subscribe to this RSS feed");
|
|
179
|
-
},
|
|
180
|
-
arrayShareButtons() {
|
|
181
|
-
return [
|
|
182
|
-
{
|
|
183
|
-
title: "Facebook",
|
|
184
|
-
icon: "saooti-facebook",
|
|
185
|
-
className: "btn-facebook",
|
|
186
|
-
url: `https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`,
|
|
187
|
-
condition: true,
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
title: "X",
|
|
191
|
-
icon: "saooti-twitter",
|
|
192
|
-
className: "btn-twitter",
|
|
193
|
-
url: `https://twitter.com/intent/tweet?text=${this.urlPage}`,
|
|
194
|
-
condition: true,
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
title: "Linkedin",
|
|
198
|
-
icon: "saooti-linkedin",
|
|
199
|
-
className: "btn-linkedin",
|
|
200
|
-
url: `https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`,
|
|
201
|
-
condition: true,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
title: "Whatsapp",
|
|
205
|
-
icon: "saooti-Whatsapp",
|
|
206
|
-
className: "btn-whatsapp",
|
|
207
|
-
url: `whatsapp://send?text=${this.urlPage}`,
|
|
208
|
-
condition: window.matchMedia("(hover: none)").matches,
|
|
209
|
-
},
|
|
210
|
-
];
|
|
211
|
-
},
|
|
212
|
-
urlPage(): string {
|
|
213
|
-
return window.location.href;
|
|
214
|
-
},
|
|
215
|
-
authenticated(): boolean {
|
|
216
|
-
return state.generalParameters.authenticated as boolean;
|
|
217
|
-
},
|
|
218
|
-
isProduction(): boolean {
|
|
219
|
-
return state.generalParameters.isProduction as boolean;
|
|
220
|
-
},
|
|
221
|
-
isPodcastmaker(): boolean {
|
|
222
|
-
return state.generalParameters.podcastmaker as boolean;
|
|
223
|
-
},
|
|
224
|
-
rssUrl(): string {
|
|
225
|
-
let api = state.generalParameters.ApiUri + "rss/";
|
|
226
|
-
if (this.emission) {
|
|
227
|
-
return api + "emission/" + this.emission.emissionId + ".rss";
|
|
228
|
-
}
|
|
229
|
-
if (this.participantId) {
|
|
230
|
-
return api + "participant/" + this.participantId + ".rss";
|
|
231
|
-
}
|
|
232
|
-
if (this.playlist) {
|
|
233
|
-
return api + "playlist/" + this.playlist.playlistId + ".rss";
|
|
234
|
-
}
|
|
235
|
-
if (this.organisationId) {
|
|
236
|
-
return api + "productor/" + this.organisationId + ".rss";
|
|
237
|
-
}
|
|
238
|
-
return "";
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
async created() {
|
|
242
|
-
if (undefined !== this.participantId) {
|
|
243
|
-
this.displayRss = await octopusApi.fetchDataPublic<boolean>(
|
|
244
|
-
0,
|
|
245
|
-
`rss/participants/allowed/${this.organisationId}`,
|
|
246
|
-
);
|
|
247
|
-
} else {
|
|
248
|
-
this.displayRss = true;
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
methods: {
|
|
253
|
-
getClass(className = "btn-rss"): string {
|
|
254
|
-
return `btn ${className} share-btn mb-2 text-dark`;
|
|
255
|
-
},
|
|
256
|
-
openPopup(): void {
|
|
257
|
-
this.dataRSSSave = !this.dataRSSSave;
|
|
258
|
-
},
|
|
259
|
-
afterCopy(): void {
|
|
260
|
-
if (!this.lazyLoadingSnackbar) {
|
|
261
|
-
this.lazyLoadingSnackbar = true;
|
|
262
|
-
setTimeout(() => {
|
|
263
|
-
this.afterCopy();
|
|
264
|
-
}, 500);
|
|
265
|
-
} else {
|
|
266
|
-
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
267
|
-
this.$t("Link in clipboard"),
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
});
|
|
273
|
-
</script>
|