@saooti/octopus-sdk 38.2.18 → 38.2.20

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "38.2.18",
3
+ "version": "38.2.20",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -63,6 +63,7 @@
63
63
  color: white;
64
64
  font-weight: bold;
65
65
  font-size: 1rem;
66
+ text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
66
67
  }
67
68
  }
68
69
  .podcast-list {
@@ -7,50 +7,42 @@
7
7
  >
8
8
  <template #body>
9
9
  <div class="d-flex flex-column">
10
- <h4 class="mb-3">
11
- {{ $t("Configure your Newsletter tile") }}
12
- </h4>
13
- <div class="d-flex align-items-center mb-3">
14
- <VSwatches
15
- v-model="color"
16
- class="c-hand me-2"
17
- show-fallback
18
- fallback-input-type="color"
19
- colors="text-advanced"
20
- popover-to="right"
21
- :data-color="color"
22
- />
23
- <div class="d-flex flex-column">
24
- <div class="fw-bold">{{ $t("Choose main color") }}</div>
25
- <div>{{ $t("Newsletter elements") }}</div>
26
- </div>
27
- </div>
28
10
  <div class="d-flex">
29
- <!-- eslint-disable vue/no-v-html -->
30
- <div class="flex-grow-1 me-3" v-html="newsletterHtml" />
31
- <!-- eslint-enable -->
32
- <div class="d-flex flex-column">
33
- <h4 class="mb-2">
34
- {{ $t("Copy and embed the HTML code into your email tool") }}
11
+ <div class="d-flex flex-column flex-shrink-0 me-3">
12
+ <h4 class="mb-3">
13
+ {{ $t("Configure your Newsletter tile") }}
35
14
  </h4>
36
- <textarea
37
- id="newsletter_code_textarea"
38
- v-model="newsletterHtml"
39
- readonly
40
- @click="selectAll"
41
- />
42
- <label
43
- for="newsletter_code_textarea"
44
- :title="$t('Copy and embed the HTML code into your email tool')"
45
- />
46
- <button
47
- class="btn btn-primary width-fit-content mt-2"
48
- @click="onCopyCode(newsletterHtml, afterCopy)"
15
+ <div
16
+ v-for="colors in arrayColors"
17
+ :key="colors.mainText"
18
+ class="d-flex align-items-center mb-3"
49
19
  >
50
- {{ $t("Copy") }}
51
- </button>
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="descriptionText">{{ colors.secondText }}</div>
32
+ </div>
33
+ </div>
52
34
  </div>
35
+ <!-- eslint-disable vue/no-v-html -->
36
+ <div v-html="newsletterHtml" />
37
+ <!-- eslint-enable -->
53
38
  </div>
39
+ <button
40
+ class="btn flex-grow-1 mt-3 fw-bold"
41
+ @click="onCopyCode(newsletterHtml, afterCopy)"
42
+ >
43
+ <span class="saooti-copy me-2"/>
44
+ {{ $t("Copy and embed the HTML code into your email tool") }}
45
+ </button>
54
46
  <SnackBar ref="snackbar" position="bottom-left" />
55
47
  </div>
56
48
  </template>
@@ -98,11 +90,13 @@ export default defineComponent({
98
90
 
99
91
  data() {
100
92
  return {
101
- color: "#40a372" as string,
93
+ arrayColors: [
94
+ {color:"#40a372", mainText: this.$t('Choose main color'),secondText: this.$t('Newsletter elements') },
95
+ {color:"#000000", mainText: this.$t('Choose text color') },
96
+ {color:"#FFFFFF", mainText: this.$t('Choose background color') }],
102
97
  shareUrl: window.location.href,
103
98
  };
104
99
  },
105
-
106
100
  computed: {
107
101
  ...mapState(useAuthStore, ["authOrganisation"]),
108
102
  newsletterInfo() {
@@ -112,33 +106,32 @@ export default defineComponent({
112
106
  imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
113
107
  "Podcast image",
114
108
  )}`,
115
- title:
116
- "Un super podcast de camille !Un super podcast de camille !Un super podcast de camille !!Un super podcast de camille ", //this.podcast.title,
109
+ title:this.podcast.title,
117
110
  description: this.podcast.description ?? "",
118
111
  shareText: this.$t("Listen this episode"),
119
- emissionHtml: `<tr><td>
112
+ emissionHtml: `<tr><td style="padding:5px 0;">
120
113
  <div style="display:flex; margin-top:5px;">
121
- <div style="font-size:20px; color:gray; margin-right:5px;">${this.$t(
114
+ <div style="font-size:20px; color:${this.arrayColors[1].color}; margin-right:5px;">${this.$t(
122
115
  "Emission",
123
116
  )} :</div>
124
117
  <a href="${this.shareUrl}" style="font-size: 18px;color: ${
125
- this.color
118
+ this.arrayColors[0].color
126
119
  };">${this.podcast.emission.name}</a>
127
120
  </div></td></tr>`,
128
121
  articleHtml:
129
122
  !this.podcast?.article || 0 === this.podcast.article?.length
130
123
  ? ``
131
- : `<tr><td>
124
+ : `<tr><td style="padding:5px 0;">
132
125
  <div style="display:flex;">
133
126
  <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>
134
127
  <a href="${
135
128
  this.podcast.article
136
- }" style="color: black;margin-top:2px">${this.$t(
129
+ }" style="color: ${this.arrayColors[1].color};margin-top:2px">${this.$t(
137
130
  "See associated article",
138
131
  )}</a>
139
132
  </div></td></tr>
140
133
  `,
141
- colorTitle: `color:black;`,
134
+ colorTitle: `color:${this.arrayColors[1].color};`,
142
135
  };
143
136
  }
144
137
  if (this.emission) {
@@ -152,7 +145,7 @@ export default defineComponent({
152
145
  shareText: this.$t("Listen to all episodes"),
153
146
  emissionHtml: ``,
154
147
  articleHtml: ``,
155
- colorTitle: `color:${this.color};`,
148
+ colorTitle: `color:${this.arrayColors[0].color};`,
156
149
  };
157
150
  }
158
151
  return {
@@ -165,29 +158,29 @@ export default defineComponent({
165
158
  shareText: this.$t("Listen to all episodes"),
166
159
  emissionHtml: ``,
167
160
  articleHtml: ``,
168
- colorTitle: `color:${this.color};`,
161
+ colorTitle: `color:${this.arrayColors[0].color};`,
169
162
  };
170
163
  },
171
164
  newsletterHtml(): string {
172
- return `<table style=" table-layout: fixed;width:100%;font-family: Arial,sans-serif;font-size: 14px;line-height: 20px; border:1px solid gray;">
165
+ return `<table style="background:${this.arrayColors[2].color};color:${this.arrayColors[1].color};table-layout: fixed;width:100%;font-size: 14px;line-height: 20px;">
173
166
  <tr>
174
- <td valign="top" width="30%" rowspan="7"><img width="100%" src="${
167
+ <td valign="top" width="30%" rowspan="7" style="padding-right:5px;"><img width="100%" src="${
175
168
  this.newsletterInfo.imageUrl
176
- }" style="border-radius: 4px; padding-right:5px;"></td>
177
- <td valign="top" width="70%"><div style="margin-top:5px;font-size: 24px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight:bold;${
169
+ }" style="border-radius: 4px;"></td>
170
+ <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;${
178
171
  this.newsletterInfo.colorTitle
179
172
  }">${this.newsletterInfo.title}</div></td>
180
173
  </tr>${this.newsletterInfo.emissionHtml}
181
- <tr><td><div style="overflow: hidden;display: -webkit-box;-webkit-line-clamp: 6;-webkit-box-orient: vertical;word-break: break-word;">${
174
+ <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;">${
182
175
  this.newsletterInfo.description
183
176
  }</div></td></tr>
184
- <tr><td valign="top"><a href="${this.shareUrl}" style="font-size: 18px;color: ${
185
- this.color
177
+ <tr><td valign="top" style="padding:5px 0;"><a href="${this.shareUrl}" style="color: ${
178
+ this.arrayColors[0].color
186
179
  };">${this.$t("See more")}</a></td></tr>
187
180
  <tr>${this.newsletterInfo.articleHtml}
188
- <td width="1"><a href="${this.shareUrl}" style="font-size: 18px;color: ${
189
- this.color
190
- };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:black;">${
181
+ <td width="1" style="padding:5px 0;"><a href="${this.shareUrl}" style="font-size: 18px;color: ${
182
+ this.arrayColors[0].color
183
+ };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:${this.arrayColors[1].color};">${
191
184
  this.newsletterInfo.shareText
192
185
  }</div></a></td>
193
186
  </tr>
@@ -203,13 +196,6 @@ export default defineComponent({
203
196
  closePopup(): void {
204
197
  this.$emit("close");
205
198
  },
206
- selectAll(element: Event): void {
207
- const target = element.target;
208
- if (null !== target) {
209
- (target as HTMLInputElement).focus();
210
- (target as HTMLInputElement).select();
211
- }
212
- },
213
199
  afterCopy(): void {
214
200
  (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
215
201
  this.$t("Data in clipboard"),
@@ -231,11 +217,11 @@ export default defineComponent({
231
217
  state.generalParameters.podcastmaker &&
232
218
  state.generalParameters.podcastmakerColor
233
219
  ) {
234
- this.color = state.generalParameters.podcastmakerColor;
220
+ this.arrayColors[0].color = state.generalParameters.podcastmakerColor;
235
221
  return;
236
222
  }
237
223
  if (Object.hasOwn(attributes, "COLOR")) {
238
- this.color = attributes.COLOR as string;
224
+ this.arrayColors[0].color = attributes.COLOR as string;
239
225
  }
240
226
  },
241
227
  },
@@ -245,10 +231,8 @@ export default defineComponent({
245
231
  <style lang="scss">
246
232
  .octopus-app {
247
233
  #newsletter-modal {
248
- textarea {
249
- border: 2px solid #eee;
250
- height: 200px;
251
- padding: 1em;
234
+ .octopus-modal-body{
235
+ overflow-x: inherit;
252
236
  }
253
237
  .octopus-modal-dialog {
254
238
  max-width: 80%;
package/src/locale/de.ts CHANGED
@@ -354,4 +354,6 @@ export default {
354
354
  "Share the playlist in your newsletter": "Teilen Sie die Playlist in Ihrem Newsletter",
355
355
  "Listen to all episodes":"Hören Sie sich alle Folgen an",
356
356
  "Newsletter elements":"Piktogramm abspielen, Name der Show, Mehr anzeigen",
357
+ "Choose text color":"Wählen Sie Textfarbe",
358
+ "Choose background color":"Wählen Sie die Hintergrundfarbe",
357
359
  }
package/src/locale/en.ts CHANGED
@@ -354,4 +354,6 @@ export default {
354
354
  "Share the playlist in your newsletter": "Share the playlist in your newsletter",
355
355
  "Listen to all episodes":"Listen to all episodes",
356
356
  "Newsletter elements":"Play pictogram, name of the show, See more",
357
+ "Choose text color":"Choose text color",
358
+ "Choose background color":"Choose background color",
357
359
  };
package/src/locale/es.ts CHANGED
@@ -355,4 +355,6 @@ export default {
355
355
  "Share the playlist in your newsletter": "Comparte la lista de reproducción en tu newsletter",
356
356
  "Listen to all episodes":"Escuche todos los episodios",
357
357
  "Newsletter elements":"Pictograma de reproducción, nombre del programa, Ver más",
358
+ "Choose text color":"Elige el color del texto",
359
+ "Choose background color":"Elige el color de fondo",
358
360
  }
package/src/locale/fr.ts CHANGED
@@ -205,7 +205,7 @@ export default {
205
205
  "Configure your Newsletter tile": "Configurez votre vignette Newsletter",
206
206
  "Copy and embed the HTML code into your email tool": "Copiez et intégrez le code HTML dans votre outil d'e-mailing",
207
207
  "Listen this episode": "Écouter ce podcast",
208
- "Choose main color": "Choisir la couleur des éléments du module newsletter",
208
+ "Choose main color": "Choisir la couleur des éléments du module",
209
209
  "Octopus is ACPM Podcast accredited": "Octopus est accrédité ACPM Podcasts",
210
210
  "Live episode": "Épisode en live",
211
211
  "This live will start": "Ce live débutera",
@@ -361,4 +361,6 @@ export default {
361
361
  "Share the playlist in your newsletter": "Partagez la playlist dans votre newsletter",
362
362
  "Listen to all episodes":"Écouter tous les épisodes",
363
363
  "Newsletter elements":"Pictogramme Play, nom de l'émission, Voir plus",
364
+ "Choose text color":"Choisir la couleur du texte",
365
+ "Choose background color":"Choisir la couleur du fond",
364
366
  };
package/src/locale/it.ts CHANGED
@@ -347,4 +347,6 @@ export default{
347
347
  "Share the playlist in your newsletter": "Condividi la playlist nella tua newsletter",
348
348
  "Listen to all episodes":"Ascolta tutti gli episodi",
349
349
  "Newsletter elements":"Riproduci pittogramma, nome dello spettacolo, vedi altro",
350
- };
350
+ "Choose text color":"Scegli il colore del testo",
351
+ "Choose background color":"Scegli il colore dello sfondo",
352
+ };
package/src/locale/sl.ts CHANGED
@@ -344,4 +344,6 @@ export default {
344
344
  "Share the playlist in your newsletter": "Delite seznam predvajanja v svojem glasilu",
345
345
  "Listen to all episodes":"Poslušaj vse epizode",
346
346
  "Newsletter elements":"Predvajaj piktogram, ime oddaje, Poglej več",
347
+ "Choose text color":"Izberite barvo besedila",
348
+ "Choose background color":"Izberite barvo ozadja",
347
349
  }