@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.
Files changed (36) hide show
  1. package/index.ts +7 -1
  2. package/package.json +1 -1
  3. package/plateform.conf +1 -1
  4. package/src/components/composable/player/usePlayerLive.ts +1 -1
  5. package/src/components/display/accessibility/AccessibilityModal.vue +7 -7
  6. package/src/components/display/comments/CommentSection.vue +1 -1
  7. package/src/components/display/emission/EmissionPlayerItem.vue +1 -1
  8. package/src/components/display/list/SwiperList.vue +1 -1
  9. package/src/components/display/podcasts/PodcastItemInfo.vue +1 -1
  10. package/src/components/display/podcasts/PodcastModuleBox.vue +9 -4
  11. package/src/components/display/podcasts/PodcastRawTranscript.vue +5 -18
  12. package/src/components/display/sharing/PlayerAnonymousModal.vue +54 -0
  13. package/src/components/display/sharing/QrCode.vue +26 -28
  14. package/src/components/display/sharing/ShareAnonymous.vue +291 -0
  15. package/src/components/display/sharing/ShareNewsletter.vue +216 -0
  16. package/src/components/display/sharing/ShareSocialsButtons.vue +140 -0
  17. package/src/components/display/sharing/SubscribeButtons.vue +2 -0
  18. package/src/components/misc/ClassicNav.vue +9 -3
  19. package/src/components/misc/ClassicPopover.vue +1 -1
  20. package/src/components/misc/modal/NewsletterModal.vue +14 -192
  21. package/src/components/misc/modal/QrCodeModal.vue +2 -1
  22. package/src/components/pages/EmissionPage.vue +14 -26
  23. package/src/components/pages/ParticipantPage.vue +17 -7
  24. package/src/components/pages/PlaylistPage.vue +12 -8
  25. package/src/components/pages/PodcastPage.vue +15 -38
  26. package/src/components/pages/RadioPage.vue +12 -7
  27. package/src/components/pages/VideoPage.vue +0 -2
  28. package/src/locale/de.ts +2 -2
  29. package/src/locale/en.ts +2 -2
  30. package/src/locale/es.ts +2 -2
  31. package/src/locale/fr.ts +6 -6
  32. package/src/locale/it.ts +2 -2
  33. package/src/locale/sl.ts +2 -2
  34. package/src/router/router.ts +3 -8
  35. package/src/stores/class/config/commentsConfig.ts +2 -2
  36. package/src/components/display/sharing/ShareButtons.vue +0 -351
@@ -0,0 +1,216 @@
1
+ <template>
2
+ <div class="d-flex flex-column align-items-center">
3
+ <div class="d-flex flex-grow-1">
4
+ <div class="d-flex flex-column flex-shrink-0 me-3">
5
+ <h2 class="mb-3">
6
+ {{ $t("Configure your Newsletter tile") }}
7
+ </h2>
8
+ <div
9
+ v-for="colors in arrayColors"
10
+ :key="colors.mainText"
11
+ class="d-flex align-items-center mb-3"
12
+ >
13
+ <VSwatches
14
+ v-model="colors.color"
15
+ class="c-hand me-2"
16
+ show-fallback
17
+ fallback-input-type="color"
18
+ colors="text-advanced"
19
+ popover-to="right"
20
+ :data-color="colors.color"
21
+ />
22
+ <div class="d-flex flex-column">
23
+ <div class="fw-bold">{{ colors.mainText }}</div>
24
+ <div v-if="colors.secondText" class="description-text">
25
+ {{ colors.secondText }}
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ <!-- eslint-disable vue/no-v-html -->
31
+ <div class="border p-3" v-html="newsletterHtml" />
32
+ <!-- eslint-enable -->
33
+ </div>
34
+ <button
35
+ class="btn btn-primary w-fit-content my-3"
36
+ @click="onCopyCode(newsletterHtml, afterCopy)"
37
+ >
38
+ {{ $t("Copy code") }}
39
+ </button>
40
+ <div>{{ $t("And paste it in your newsletter") }}</div>
41
+ <SnackBar ref="snackbar" position="bottom-left" />
42
+ </div>
43
+ </template>
44
+
45
+ <script lang="ts">
46
+ import SnackBar from "../../misc/SnackBar.vue";
47
+ import { VSwatches } from "vue3-swatches";
48
+ import "vue3-swatches/dist/style.css";
49
+ import displayHelper from "../../../helper/displayHelper";
50
+ import { Podcast } from "@/stores/class/general/podcast";
51
+ import { defineComponent } from "vue";
52
+ import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
53
+ import { useAuthStore } from "../../../stores/AuthStore";
54
+ import { mapState, mapActions } from "pinia";
55
+ import { Emission } from "@/stores/class/general/emission";
56
+ import { Playlist } from "@/stores/class/general/playlist";
57
+ export default defineComponent({
58
+ name: "SahreNewsletter",
59
+
60
+ components: {
61
+ SnackBar,
62
+ VSwatches,
63
+ },
64
+
65
+ props: {
66
+ podcast: { default: undefined, type: Object as () => Podcast },
67
+ emission: { default: undefined, type: Object as () => Emission },
68
+ playlist: { default: undefined, type: Object as () => Playlist },
69
+ },
70
+
71
+ emits: ["close"],
72
+
73
+ data() {
74
+ return {
75
+ arrayColors: [
76
+ {
77
+ color: "#40a372",
78
+ mainText: this.$t("Choose main color"),
79
+ secondText: this.$t("Newsletter elements"),
80
+ },
81
+ { color: "#000000", mainText: this.$t("Choose text color") },
82
+ { color: "#FFFFFF", mainText: this.$t("Choose background color") },
83
+ ],
84
+ shareUrl: window.location.href,
85
+ };
86
+ },
87
+ computed: {
88
+ ...mapState(useAuthStore, ["authOrgaId"]),
89
+ newsletterInfo() {
90
+ if (this.podcast) {
91
+ return {
92
+ imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
93
+ "Episode name image",
94
+ { name: this.podcast.title },
95
+ )}`,
96
+ title: this.podcast.title,
97
+ description: this.podcast.description ?? "",
98
+ shareText: this.$t("Listen this episode"),
99
+ emissionHtml: `<tr><td style="padding:5px 0;">
100
+ <div style="display:flex; margin-top:5px;">
101
+ <div style="font-size:20px; color:${
102
+ this.arrayColors[1].color
103
+ }; margin-right:5px;text-wrap: nowrap;">${this.$t("Emission")} :</div>
104
+ <a href="${this.shareUrl}" style="font-size: 18px;color: ${
105
+ this.arrayColors[0].color
106
+ };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${
107
+ this.podcast.emission.name
108
+ }</a>
109
+ </div></td></tr>`,
110
+ articleHtml:
111
+ !this.podcast?.article || 0 === this.podcast.article?.length
112
+ ? ``
113
+ : `<tr><td style="padding:5px 0;">
114
+ <div style="display:flex;">
115
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M7 17h7v-2H7zm0-4h10v-2H7zm0-4h10V7H7zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zM5 5v14z"/></svg>
116
+ <a href="${this.podcast.article}" style="color: ${
117
+ this.arrayColors[1].color
118
+ };margin-top:2px">${this.$t("See associated article")}</a>
119
+ </div></td></tr>
120
+ `,
121
+ colorTitle: `color:${this.arrayColors[1].color};`,
122
+ };
123
+ }
124
+ if (this.emission) {
125
+ return {
126
+ imageUrl: `${this.emission.imageUrl}" alt="${this.$t(
127
+ "Emission image",
128
+ )}`,
129
+ title: this.emission.name,
130
+ description: this.emission.description ?? "",
131
+ shareText: this.$t("Listen to all episodes"),
132
+ emissionHtml: ``,
133
+ articleHtml: ``,
134
+ colorTitle: `color:${this.arrayColors[0].color};`,
135
+ };
136
+ }
137
+ return {
138
+ imageUrl: `${this.playlist?.imageUrl}" alt="${this.$t(
139
+ "Playlist image",
140
+ )}`,
141
+ title: this.playlist?.title,
142
+ description: this.playlist?.description ?? "",
143
+ shareText: this.$t("Listen to all episodes"),
144
+ emissionHtml: ``,
145
+ articleHtml: ``,
146
+ colorTitle: `color:${this.arrayColors[0].color};`,
147
+ };
148
+ },
149
+ newsletterHtml(): string {
150
+ return `<table style="background:${this.arrayColors[2].color};color:${
151
+ this.arrayColors[1].color
152
+ };table-layout: fixed;width:100%;font-size: 14px;">
153
+ <tr>
154
+ <td valign="top" width="30%" rowspan="7" style="padding-right:5px;"><img width="100%" src="${
155
+ this.newsletterInfo.imageUrl
156
+ }" style="border-radius: 4px;"></td>
157
+ <td valign="top" width="70%" style="padding:5px 0;"><div style="margin-top:5px;font-size: 24px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight:bold;${
158
+ this.newsletterInfo.colorTitle
159
+ }">${this.newsletterInfo.title}</div></td>
160
+ </tr>${this.newsletterInfo.emissionHtml}
161
+ <tr><td style="padding:5px 0;"><div style="overflow: hidden;display: -webkit-box;-webkit-line-clamp: 6;-webkit-box-orient: vertical;word-break: break-word;">${
162
+ this.newsletterInfo.description
163
+ }</div></td></tr>
164
+ <tr><td valign="top" style="padding:5px 0;"><a href="${
165
+ this.shareUrl
166
+ }" style="color: ${this.arrayColors[0].color};">${this.$t(
167
+ "See more",
168
+ )}</a></td></tr>
169
+ <tr>${this.newsletterInfo.articleHtml}
170
+ <td width="1" style="padding:5px 0;"><a href="${
171
+ this.shareUrl
172
+ }" style="font-size: 18px;color: ${
173
+ this.arrayColors[0].color
174
+ };text-decoration: none; display:flex;"><svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 24 24"><path fill="currentColor" d="m9.5 16.5l7-4.5l-7-4.5zM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22"/></svg><div style="margin-top: 15px; color:${
175
+ this.arrayColors[1].color
176
+ };">${this.newsletterInfo.shareText}</div></a></td>
177
+ </tr>
178
+ </table>
179
+ `;
180
+ },
181
+ },
182
+ created() {
183
+ this.initData();
184
+ },
185
+ methods: {
186
+ ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
187
+ onCopyCode(link: string, callback: () => void){
188
+ displayHelper.onCopyCode(link, callback);
189
+ },
190
+ afterCopy(): void {
191
+ (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
192
+ this.$t("Data in clipboard"),
193
+ );
194
+ },
195
+ async initData(): Promise<void> {
196
+ const orgaId = this.authOrgaId;
197
+ if (!orgaId?.length) {
198
+ return;
199
+ }
200
+ const attributes = await this.getOrgaAttributes(orgaId ?? "");
201
+ if (
202
+ Object.hasOwn(attributes, "podcastmakerUrl") &&
203
+ (attributes.podcastmakerUrl as string | undefined | null)?.length
204
+ ) {
205
+ this.shareUrl =
206
+ attributes.podcastmakerUrl +
207
+ window.location.pathname +
208
+ window.location.search;
209
+ }
210
+ if (Object.hasOwn(attributes, "COLOR")) {
211
+ this.arrayColors[0].color = attributes.COLOR as string;
212
+ }
213
+ },
214
+ },
215
+ });
216
+ </script>
@@ -0,0 +1,140 @@
1
+ <template>
2
+ <section v-if="!isLoading && !isGarRole && (authOrgaId || !noSharing)" id="share-buttons-podcast-section" class="module-box">
3
+ <h3 class="mb-2">
4
+ {{ $t("Share in one click") }}
5
+ </h3>
6
+ <div class="d-flex align-items-center">
7
+ <template v-for="button in arrayShareButtons" :key="button.title">
8
+ <a
9
+ v-if="button.condition"
10
+ rel="noreferrer noopener"
11
+ target="_blank"
12
+ :href="button.url"
13
+ class="btn share-btn mb-2 text-dark me-2"
14
+ :title="$t('New window', {text: button.title})"
15
+ >
16
+ <component :is="button.icon" :size="34" />
17
+ </a>
18
+ </template>
19
+ <slot name="additional-buttons"/>
20
+ <!-- <div v-if="shareAiAuth" class="d-flex flex-column ms-4">
21
+ <h3 class="mb-2">
22
+ {{ $t("Generate a social media post (with AI)") }}
23
+ </h3>
24
+ <div class="d-flex align-items-center justify-content-center">
25
+ <router-link
26
+ class="btn share-btn mb-2 text-dark"
27
+ :title="$t('Generate a social media post (with AI)')"
28
+ :to="{
29
+ name: 'advancedShare',
30
+ params: { podcastId: podcast.podcastId },
31
+ }"
32
+ >
33
+ <CreationIcon />
34
+ </router-link>
35
+ </div>
36
+ </div> -->
37
+ </div>
38
+ </section>
39
+ </template>
40
+
41
+ <script lang="ts">
42
+ import XIcon from "../../icons/XIcon.vue";
43
+ import BlueSkyIcon from "../../icons/BlueSkyIcon.vue";
44
+ import WhatsappIcon from "vue-material-design-icons/Whatsapp.vue";
45
+ import LinkedinIcon from "vue-material-design-icons/Linkedin.vue";
46
+ import FacebookIcon from "vue-material-design-icons/Facebook.vue";
47
+ import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
48
+ import { mapActions, mapState } from "pinia";
49
+ import { useAuthStore } from "../../../stores/AuthStore";
50
+ import { defineComponent } from "vue";
51
+
52
+ export default defineComponent({
53
+ components: {
54
+ FacebookIcon,
55
+ LinkedinIcon,
56
+ WhatsappIcon,
57
+ XIcon,
58
+ BlueSkyIcon
59
+ },
60
+ props: {
61
+ organisationId: { default: undefined, type: String },
62
+ },
63
+ data() {
64
+ return {
65
+ noSharing: true as boolean,
66
+ isLoading: true as boolean,
67
+ };
68
+ },
69
+ computed: {
70
+ ...mapState(useAuthStore, [
71
+ "isGarRole",
72
+ "authOrgaId"
73
+ /* "authOrganisation",
74
+ "isRoleProduction" */
75
+ ]),
76
+ /* shareAiAuth(): boolean {
77
+ return (
78
+ !this.isPodcastmaker &&
79
+ undefined !== this.authOrgaId &&
80
+ undefined !== this.podcast &&
81
+ this.isRoleProduction &&
82
+ (this.authOrganisation.attributes?.["openAi.active"] as
83
+ | string
84
+ | undefined) === "true"
85
+ );
86
+ }, */
87
+ arrayShareButtons() {
88
+ return [
89
+ {
90
+ title: "Facebook",
91
+ icon: "FacebookIcon",
92
+ url: `https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`,
93
+ condition: true,
94
+ },
95
+ {
96
+ title: "X",
97
+ icon: "XIcon",
98
+ url: `https://twitter.com/intent/tweet?text=${this.urlPage}`,
99
+ condition: true,
100
+ },
101
+ {
102
+ title: "Linkedin",
103
+ icon: "LinkedinIcon",
104
+ url: `https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`,
105
+ condition: true,
106
+ },
107
+ {
108
+ title: "Bluesky",
109
+ icon: "BlueSkyIcon",
110
+ url: `https://bsky.app/intent/compose?text=${this.urlPage}`,
111
+ condition: true,
112
+ },
113
+ {
114
+ title: "Whatsapp",
115
+ icon: "WhatsappIcon",
116
+ url: `whatsapp://send?text=${this.urlPage}`,
117
+ condition: window.matchMedia("(hover: none)").matches,
118
+ },
119
+ ];
120
+ },
121
+ urlPage(): string {
122
+ return window.location.href;
123
+ },
124
+ },
125
+ created() {
126
+ this.initShareButtons();
127
+ },
128
+ methods: {
129
+ ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
130
+ async initShareButtons() {
131
+ if (!this.organisationId) {
132
+ return;
133
+ }
134
+ const attributes = await this.getOrgaAttributes(this.organisationId);
135
+ this.noSharing = "true" === attributes.noSharing;
136
+ this.isLoading = false;
137
+ },
138
+ },
139
+ });
140
+ </script>
@@ -116,6 +116,8 @@ export default defineComponent({
116
116
  return {
117
117
  hiddenLinks: [] as Array<Link>,
118
118
  lastWindowWidth: 420 as number,
119
+ exclusive: false as boolean,
120
+ notExclusive: false as boolean,
119
121
  };
120
122
  },
121
123
  computed: {
@@ -89,6 +89,9 @@ export default defineComponent({
89
89
  border-bottom: solid 1px var(--octopus-border-default);
90
90
  background-color: var(--octopus-background);
91
91
  }
92
+ .octopus-nav.light .octopus-tab-content{
93
+ border-top: solid 1px var(--octopus-border-default);
94
+ }
92
95
 
93
96
 
94
97
  .octopus-nav.light .octopus-nav-item {
@@ -122,10 +125,13 @@ export default defineComponent({
122
125
  }
123
126
 
124
127
  .octopus-nav.light .octopus-nav-link {
125
- border-top: 0 !important;
126
- border-right: 0 !important;
127
- border-left: 0 !important;
128
128
  font-weight: bold;
129
+ background:var(--octopus-border-default);
130
+ &:active{
131
+ border-bottom-color: var(--octopus-primary);
132
+ background: transparent;
133
+ color: var(--octopus-primary);
134
+ }
129
135
  }
130
136
 
131
137
 
@@ -245,7 +245,7 @@ export default defineComponent({
245
245
  return;
246
246
  }
247
247
  //Exception timepicker in popover
248
- var result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
248
+ const result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
249
249
  if (-1!==result) {
250
250
  return;
251
251
  }
@@ -1,52 +1,16 @@
1
1
  <template>
2
2
  <ClassicModal
3
3
  id-modal="newsletter-modal"
4
- :title-modal="newsletterInfo.titleModal"
4
+ :title-modal="modalTitle"
5
5
  :closable="false"
6
6
  @close="closePopup"
7
7
  >
8
8
  <template #body>
9
- <div class="d-flex flex-column">
10
- <div class="d-flex">
11
- <div class="d-flex flex-column flex-shrink-0 me-3">
12
- <h4 class="mb-3">
13
- {{ $t("Configure your Newsletter tile") }}
14
- </h4>
15
- <div
16
- v-for="colors in arrayColors"
17
- :key="colors.mainText"
18
- class="d-flex align-items-center mb-3"
19
- >
20
- <VSwatches
21
- v-model="colors.color"
22
- class="c-hand me-2"
23
- show-fallback
24
- fallback-input-type="color"
25
- colors="text-advanced"
26
- popover-to="right"
27
- :data-color="colors.color"
28
- />
29
- <div class="d-flex flex-column">
30
- <div class="fw-bold">{{ colors.mainText }}</div>
31
- <div v-if="colors.secondText" class="description-text">
32
- {{ colors.secondText }}
33
- </div>
34
- </div>
35
- </div>
36
- </div>
37
- <!-- eslint-disable vue/no-v-html -->
38
- <div v-html="newsletterHtml" />
39
- <!-- eslint-enable -->
40
- </div>
41
- <button
42
- class="btn d-flex justify-content-center align-items-center flex-grow-1 mt-3 fw-bold"
43
- @click="onCopyCode(newsletterHtml, afterCopy)"
44
- >
45
- <ContentCopyIcon class="me-2" />
46
- {{ $t("Copy and embed the HTML code into your email tool") }}
47
- </button>
48
- <SnackBar ref="snackbar" position="bottom-left" />
49
- </div>
9
+ <ShareNewsletter
10
+ :podcast="podcast"
11
+ :emission="emission"
12
+ :playlist="playlist"
13
+ />
50
14
  </template>
51
15
  <template #footer>
52
16
  <button class="btn btn-primary m-1" @click="closePopup">
@@ -57,27 +21,18 @@
57
21
  </template>
58
22
 
59
23
  <script lang="ts">
60
- import ContentCopyIcon from "vue-material-design-icons/ContentCopy.vue";
61
24
  import ClassicModal from "../modal/ClassicModal.vue";
62
- import SnackBar from "../../misc/SnackBar.vue";
63
- import { VSwatches } from "vue3-swatches";
64
- import "vue3-swatches/dist/style.css";
65
- import displayHelper from "../../../helper/displayHelper";
25
+ import ShareNewsletter from "../../display/sharing/ShareNewsletter.vue";
66
26
  import { Podcast } from "@/stores/class/general/podcast";
67
27
  import { defineComponent } from "vue";
68
- import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
69
- import { useAuthStore } from "../../../stores/AuthStore";
70
- import { mapState, mapActions } from "pinia";
71
28
  import { Emission } from "@/stores/class/general/emission";
72
29
  import { Playlist } from "@/stores/class/general/playlist";
73
30
  export default defineComponent({
74
31
  name: "NewsletterModal",
75
32
 
76
33
  components: {
77
- SnackBar,
78
- VSwatches,
79
- ClassicModal,
80
- ContentCopyIcon,
34
+ ShareNewsletter,
35
+ ClassicModal
81
36
  },
82
37
 
83
38
  props: {
@@ -87,154 +42,21 @@ export default defineComponent({
87
42
  },
88
43
 
89
44
  emits: ["close"],
90
-
91
- data() {
92
- return {
93
- arrayColors: [
94
- {
95
- color: "#40a372",
96
- mainText: this.$t("Choose main color"),
97
- secondText: this.$t("Newsletter elements"),
98
- },
99
- { color: "#000000", mainText: this.$t("Choose text color") },
100
- { color: "#FFFFFF", mainText: this.$t("Choose background color") },
101
- ],
102
- shareUrl: window.location.href,
103
- };
104
- },
105
- computed: {
106
- ...mapState(useAuthStore, ["authOrgaId"]),
107
- newsletterInfo() {
45
+ computed:{
46
+ modalTitle() {
108
47
  if (this.podcast) {
109
- return {
110
- titleModal: this.$t("Share the episode in your newsletter"),
111
- imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
112
- "Episode name image",
113
- { name: this.podcast.title },
114
- )}`,
115
- title: this.podcast.title,
116
- description: this.podcast.description ?? "",
117
- shareText: this.$t("Listen this episode"),
118
- emissionHtml: `<tr><td style="padding:5px 0;">
119
- <div style="display:flex; margin-top:5px;">
120
- <div style="font-size:20px; color:${
121
- this.arrayColors[1].color
122
- }; margin-right:5px;text-wrap: nowrap;">${this.$t("Emission")} :</div>
123
- <a href="${this.shareUrl}" style="font-size: 18px;color: ${
124
- this.arrayColors[0].color
125
- };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${
126
- this.podcast.emission.name
127
- }</a>
128
- </div></td></tr>`,
129
- articleHtml:
130
- !this.podcast?.article || 0 === this.podcast.article?.length
131
- ? ``
132
- : `<tr><td style="padding:5px 0;">
133
- <div style="display:flex;">
134
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M7 17h7v-2H7zm0-4h10v-2H7zm0-4h10V7H7zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zM5 5v14z"/></svg>
135
- <a href="${this.podcast.article}" style="color: ${
136
- this.arrayColors[1].color
137
- };margin-top:2px">${this.$t("See associated article")}</a>
138
- </div></td></tr>
139
- `,
140
- colorTitle: `color:${this.arrayColors[1].color};`,
141
- };
48
+ return this.$t("Share the episode in your newsletter");
142
49
  }
143
50
  if (this.emission) {
144
- return {
145
- titleModal: this.$t("Share the series in your newsletter"),
146
- imageUrl: `${this.emission.imageUrl}" alt="${this.$t(
147
- "Emission image",
148
- )}`,
149
- title: this.emission.name,
150
- description: this.emission.description ?? "",
151
- shareText: this.$t("Listen to all episodes"),
152
- emissionHtml: ``,
153
- articleHtml: ``,
154
- colorTitle: `color:${this.arrayColors[0].color};`,
155
- };
51
+ return this.$t("Share the series in your newsletter");
156
52
  }
157
- return {
158
- titleModal: this.$t("Share the playlist in your newsletter"),
159
- imageUrl: `${this.playlist?.imageUrl}" alt="${this.$t(
160
- "Playlist image",
161
- )}`,
162
- title: this.playlist?.title,
163
- description: this.playlist?.description ?? "",
164
- shareText: this.$t("Listen to all episodes"),
165
- emissionHtml: ``,
166
- articleHtml: ``,
167
- colorTitle: `color:${this.arrayColors[0].color};`,
168
- };
169
- },
170
- newsletterHtml(): string {
171
- return `<table style="background:${this.arrayColors[2].color};color:${
172
- this.arrayColors[1].color
173
- };table-layout: fixed;width:100%;font-size: 14px;">
174
- <tr>
175
- <td valign="top" width="30%" rowspan="7" style="padding-right:5px;"><img width="100%" src="${
176
- this.newsletterInfo.imageUrl
177
- }" style="border-radius: 4px;"></td>
178
- <td valign="top" width="70%" style="padding:5px 0;"><div style="margin-top:5px;font-size: 24px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight:bold;${
179
- this.newsletterInfo.colorTitle
180
- }">${this.newsletterInfo.title}</div></td>
181
- </tr>${this.newsletterInfo.emissionHtml}
182
- <tr><td style="padding:5px 0;"><div style="overflow: hidden;display: -webkit-box;-webkit-line-clamp: 6;-webkit-box-orient: vertical;word-break: break-word;">${
183
- this.newsletterInfo.description
184
- }</div></td></tr>
185
- <tr><td valign="top" style="padding:5px 0;"><a href="${
186
- this.shareUrl
187
- }" style="color: ${this.arrayColors[0].color};">${this.$t(
188
- "See more",
189
- )}</a></td></tr>
190
- <tr>${this.newsletterInfo.articleHtml}
191
- <td width="1" style="padding:5px 0;"><a href="${
192
- this.shareUrl
193
- }" style="font-size: 18px;color: ${
194
- this.arrayColors[0].color
195
- };text-decoration: none; display:flex;"><svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 24 24"><path fill="currentColor" d="m9.5 16.5l7-4.5l-7-4.5zM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22"/></svg><div style="margin-top: 15px; color:${
196
- this.arrayColors[1].color
197
- };">${this.newsletterInfo.shareText}</div></a></td>
198
- </tr>
199
- </table>
200
- `;
53
+ return this.$t("Share the playlist in your newsletter");
201
54
  },
202
55
  },
203
- created() {
204
- this.initData();
205
- },
206
56
  methods: {
207
- ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
208
- onCopyCode(link: string, callback: () => void){
209
- displayHelper.onCopyCode(link, callback);
210
- },
211
57
  closePopup(): void {
212
58
  this.$emit("close");
213
59
  },
214
- afterCopy(): void {
215
- (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
216
- this.$t("Data in clipboard"),
217
- );
218
- },
219
- async initData(): Promise<void> {
220
- const orgaId = this.authOrgaId;
221
- if (!orgaId?.length) {
222
- return;
223
- }
224
- const attributes = await this.getOrgaAttributes(orgaId ?? "");
225
- if (
226
- Object.hasOwn(attributes, "podcastmakerUrl") &&
227
- (attributes.podcastmakerUrl as string | undefined | null)?.length
228
- ) {
229
- this.shareUrl =
230
- attributes.podcastmakerUrl +
231
- window.location.pathname +
232
- window.location.search;
233
- }
234
- if (Object.hasOwn(attributes, "COLOR")) {
235
- this.arrayColors[0].color = attributes.COLOR as string;
236
- }
237
- },
238
60
  },
239
61
  });
240
62
  </script>
@@ -5,7 +5,7 @@
5
5
  @close="closePopup"
6
6
  >
7
7
  <template #body>
8
- <QrCode :url="urlPage" />
8
+ <QrCode :url="urlPage" :orga-for-color="orgaForColor" />
9
9
  </template>
10
10
  <template #footer>
11
11
  <button class="btn btn-primary m-1" @click="closePopup">
@@ -27,6 +27,7 @@ export default defineComponent({
27
27
  },
28
28
  props: {
29
29
  urlPage: { default: undefined, type: String },
30
+ orgaForColor: { default: undefined, type: String },
30
31
  },
31
32
  emits: ["close"],
32
33
  methods: {