@saooti/octopus-sdk 38.3.7 → 39.0.0

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 (58) hide show
  1. package/package.json +28 -28
  2. package/sonarqube-scanner.js +4 -12
  3. package/src/App.vue +2 -2
  4. package/src/assets/bootstrap.scss +6 -0
  5. package/src/assets/progressbar.scss +9 -0
  6. package/src/assets/share.scss +22 -0
  7. package/src/components/display/comments/CommentParentInfo.vue +13 -8
  8. package/src/components/display/filter/ProductorSearch.vue +1 -1
  9. package/src/components/display/live/LiveItem.vue +1 -1
  10. package/src/components/display/playlist/PlaylistItem.vue +7 -13
  11. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +0 -3
  12. package/src/components/display/podcasts/PodcastList.vue +2 -2
  13. package/src/components/display/podcasts/TagList.vue +1 -1
  14. package/src/components/display/sharing/ShareButtons.vue +19 -17
  15. package/src/components/display/sharing/SharePlayer.vue +16 -13
  16. package/src/components/display/sharing/SharePlayerRadio.vue +10 -7
  17. package/src/components/display/sharing/SharePlayerTypes.vue +2 -2
  18. package/src/components/display/sharing/SubscribeButtons.vue +0 -3
  19. package/src/components/misc/SnackBar.vue +1 -1
  20. package/src/components/misc/modal/NewsletterModal.vue +45 -29
  21. package/src/components/misc/player/PlayerCompact.vue +26 -67
  22. package/src/components/misc/player/PlayerComponent.vue +19 -14
  23. package/src/components/misc/player/PlayerLarge.vue +40 -63
  24. package/src/components/misc/player/ads/AdsProgressBar.vue +27 -0
  25. package/src/components/misc/player/ads/AdsSkipButton.vue +54 -0
  26. package/src/components/misc/player/elements/PlayerImage.vue +97 -0
  27. package/src/components/misc/player/elements/PlayerPlayButton.vue +144 -0
  28. package/src/components/misc/player/{PlayerTimeline.vue → elements/PlayerTimeline.vue} +1 -1
  29. package/src/components/misc/player/elements/PlayerTitle.vue +127 -0
  30. package/src/components/misc/player/progressbar/PlayerProgressBar.vue +58 -0
  31. package/src/components/misc/player/{PlayerProgressBar.vue → progressbar/PodcastProgressBar.vue} +3 -3
  32. package/src/components/misc/player/radio/RadioProgressBar.vue +0 -11
  33. package/src/components/misc/player/{PlayerVideo.vue → video/PlayerVideo.vue} +3 -3
  34. package/src/components/misc/player/{PlayerVideoDigiteka.vue → video/PlayerVideoDigiteka.vue} +1 -1
  35. package/src/components/misc/player/{PlayerVideoHls.vue → video/PlayerVideoHls.vue} +1 -1
  36. package/src/components/mixins/fetchParameters.ts +16 -0
  37. package/src/components/mixins/loadScript.ts +25 -0
  38. package/src/components/mixins/player/playerDisplayTime.ts +35 -0
  39. package/src/components/mixins/player/playerLive.ts +2 -2
  40. package/src/components/mixins/player/playerLogic.ts +17 -13
  41. package/src/components/mixins/player/playerStitching.ts +168 -0
  42. package/src/components/mixins/player/playerTranscript.ts +7 -31
  43. package/src/components/mixins/player/playerVast.ts +198 -0
  44. package/src/components/mixins/radio/fetchRadioData.ts +9 -1
  45. package/src/locale/de.ts +3 -2
  46. package/src/locale/en.ts +3 -1
  47. package/src/locale/es.ts +3 -2
  48. package/src/locale/fr.ts +3 -1
  49. package/src/locale/it.ts +4 -2
  50. package/src/locale/sl.ts +3 -1
  51. package/src/stores/ParamSdkStore.ts +11 -11
  52. package/src/stores/PlayerStore.ts +30 -12
  53. package/src/stores/VastStore.ts +98 -0
  54. package/src/stores/class/adserver/adPosition.ts +6 -0
  55. package/src/stores/class/general/player.ts +2 -0
  56. package/src/components/mixins/player/playerDisplay.ts +0 -169
  57. /package/src/components/misc/player/{ChapteringModal.vue → chaptering/ChapteringModal.vue} +0 -0
  58. /package/src/components/misc/player/{PlayerChaptering.vue → chaptering/PlayerChaptering.vue} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "38.3.7",
3
+ "version": "39.0.0",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -15,53 +15,53 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@popperjs/core": "^2.11.8",
18
- "@saooti/octopus-api": "^0.36.0",
19
- "@tiptap/extension-link": "^2.1.16",
20
- "@tiptap/extension-underline": "^2.1.16",
21
- "@tiptap/pm": "^2.1.16",
22
- "@tiptap/starter-kit": "^2.1.16",
23
- "@tiptap/vue-3": "^2.1.16",
18
+ "@saooti/octopus-api": "^0.38.0",
19
+ "@tiptap/extension-link": "^2.2.4",
20
+ "@tiptap/extension-underline": "^2.2.4",
21
+ "@tiptap/pm": "^2.2.4",
22
+ "@tiptap/starter-kit": "^2.2.4",
23
+ "@tiptap/vue-3": "^2.2.4",
24
24
  "@vue/cli": "^5.0.8",
25
- "@vue/compat": "^3.4.15",
26
- "@vuepic/vue-datepicker": "^7.4.1",
27
- "@vueuse/core": "^10.7.2",
28
- "autoprefixer": "^10.4.17",
29
- "axios": "^1.6.5",
25
+ "@vue/compat": "^3.4.21",
26
+ "@vuepic/vue-datepicker": "^8.2.0",
27
+ "@vueuse/core": "^10.9.0",
28
+ "autoprefixer": "^10.4.18",
29
+ "axios": "^1.6.7",
30
30
  "dayjs": "^1.11.10",
31
31
  "eslint-config-prettier": "^9.1.0",
32
32
  "eslint-plugin-prettier": "^5.1.3",
33
- "express": "^4.18.2",
34
- "hls.js": "^1.5.1",
33
+ "express": "^4.18.3",
34
+ "hls.js": "^1.5.7",
35
35
  "humanize-duration": "^3.31.0",
36
36
  "jest": "^29.7.0",
37
37
  "pinia": "^2.1.7",
38
38
  "qrcode.vue": "^3.4.1",
39
- "sass": "^1.70.0",
39
+ "sass": "^1.71.1",
40
40
  "sonarqube-scanner": "^3.3.0",
41
- "swiper": "^11.0.5",
42
- "video.js": "^8.9.0",
41
+ "swiper": "^11.0.7",
42
+ "video.js": "^8.10.0",
43
43
  "videojs-contrib-quality-levels": "^4.0.0",
44
44
  "videojs-hls-quality-selector": "^1.1.4",
45
- "vite": "^4.5.1",
46
- "vue": "^3.4.15",
47
- "vue-i18n": "^9.9.0",
45
+ "vite": "^5.1.5",
46
+ "vue": "^3.4.21",
47
+ "vue-i18n": "^9.10.1",
48
48
  "vue-recaptcha": "^2.0.3",
49
- "vue-router": "^4.2.5",
49
+ "vue-router": "^4.3.0",
50
50
  "vue-select": "^4.0.0-beta.6",
51
51
  "vue3-lazyload": "^0.3.8",
52
- "vue3-swatches": "^1.2.3"
52
+ "vue3-swatches": "^1.2.4"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/videojs-contrib-quality-levels": "^2.0.4",
56
56
  "@types/videojs-hls-quality-selector": "^1.1.3",
57
57
  "@types/vue-select": "^3.16.8",
58
- "@typescript-eslint/eslint-plugin": "^6.19.0",
59
- "@typescript-eslint/parser": "^6.19.0",
60
- "@vitejs/plugin-vue": "^4.6.2",
61
- "@vue/compiler-sfc": "^3.4.15",
58
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
59
+ "@typescript-eslint/parser": "^7.1.1",
60
+ "@vitejs/plugin-vue": "^5.0.4",
61
+ "@vue/compiler-sfc": "^3.4.21",
62
62
  "@vue/eslint-config-typescript": "^12.0.0",
63
- "eslint": "^8.56.0",
64
- "eslint-plugin-vue": "^9.20.1",
63
+ "eslint": "^8.57.0",
64
+ "eslint-plugin-vue": "^9.22.0",
65
65
  "typescript": "^5.3.3"
66
66
  },
67
67
  "eslintConfig": {
@@ -1,18 +1,10 @@
1
1
  const scanner = require('sonarqube-scanner');
2
2
  scanner({
3
3
  options:{
4
- "sonar.exclusions":"**/*.test.tsx",
5
- "sonar.tests":"./src",
6
- "sonar.test.inclusions":"**/*.test.tsx,**/*.test.ts",
7
- "sonar.typescript.lcov.reportPaths": "coverage/lcov.info",
8
- "sonar.testExecutionReportPaths": "coverage/test-report.xml"
4
+ "sonar.sources":"./src"
9
5
  },
10
- serverUrl:"http://localhost:9000",
11
- login:"admin",
12
- password:"saooti",
13
- options:{
14
- "sonar.sources":"./src"
15
- },
6
+ serverUrl:"http://localhost:9000",
16
7
  },
17
8
  ()=>process.exit()
18
- );
9
+ );
10
+ //Login/password not working with last version sonar so give the permission with admin and then run
package/src/App.vue CHANGED
@@ -84,8 +84,8 @@ export default defineComponent({
84
84
  this.reload = !this.reload;
85
85
  },
86
86
  },
87
- async created() {
88
- await this.initApp();
87
+ created() {
88
+ this.initApp();
89
89
  setTimeout(() => {
90
90
  this.pageFullyLoad = true;
91
91
  }, 2000);
@@ -95,6 +95,12 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
95
95
  &:hover{
96
96
  background: $primaryColorMoreTransparent;
97
97
  }
98
+ &:not(.btn-underline, .btn-primary, .btn-more, .btn-on-dark, .btn-transparent, .admin-button, .share-btn):disabled
99
+ {
100
+ background-color: #dddddd;
101
+ cursor: default;
102
+ color: #616161 !important;
103
+ }
98
104
  //Button disable halo after click
99
105
  &.btn-underline{
100
106
  background: none;
@@ -60,4 +60,13 @@
60
60
  right: 0;
61
61
  }
62
62
  }
63
+ .ambiance-progress {
64
+ background-color: #d1d1d1;
65
+ .octopus-progress-bar {
66
+ background-color: #747474;
67
+ }
68
+ .no-transition {
69
+ transition: none !important;
70
+ }
71
+ }
63
72
  }
@@ -1,4 +1,25 @@
1
1
  .octopus-app{
2
+ .sticker-empty-ressource{
3
+ position: absolute;
4
+ top: 5px;
5
+ right: 5px;
6
+ align-self: center;
7
+ background: $blue-octopus;
8
+ padding: 0.5rem;
9
+ transition: all 0.5s ease;
10
+ color: white;
11
+ font-size: 0.6rem;
12
+ font-weight: bold;
13
+ letter-spacing: 1px;
14
+ box-shadow: 10px 10px 34px -15px hsla(0, 0%, 0%, 0.4);
15
+ border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
16
+ border: solid 2px #41403e;
17
+ cursor: auto;
18
+ &:hover {
19
+ box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, 0.3);
20
+ background: $octopus-primary-color;
21
+ }
22
+ }
2
23
  .category-filter-no-filter {
3
24
  position: absolute;
4
25
  top: 0;
@@ -146,6 +167,7 @@
146
167
  }
147
168
 
148
169
  .emission-item-container{
170
+ position: relative;
149
171
  list-style: none;
150
172
  background: #fff;
151
173
  border-radius: $octopus-borderradius;
@@ -36,14 +36,19 @@ export default defineComponent({
36
36
  comment: undefined as CommentPodcast | undefined,
37
37
  };
38
38
  },
39
- async created() {
40
- if (this.comId) {
41
- this.comment = await octopusApi.fetchData<CommentPodcast>(
42
- 2,
43
- `comment/${this.comId}`,
44
- );
45
- }
46
- this.loading = false;
39
+ created() {
40
+ this.fetchComment();
47
41
  },
42
+ methods:{
43
+ async fetchComment():Promise<void>{
44
+ if (this.comId) {
45
+ this.comment = await octopusApi.fetchData<CommentPodcast>(
46
+ 2,
47
+ `comment/${this.comId}`,
48
+ );
49
+ }
50
+ this.loading = false;
51
+ }
52
+ }
48
53
  });
49
54
  </script>
@@ -97,7 +97,7 @@ export default defineComponent({
97
97
  }
98
98
  },
99
99
  },
100
- async created() {
100
+ created() {
101
101
  if (!this.organisationId) return;
102
102
  if (this.filterOrgaId === this.organisationId) {
103
103
  this.keepOrganisation = true;
@@ -36,7 +36,7 @@ export default defineComponent({
36
36
  };
37
37
  },
38
38
 
39
- async created() {
39
+ created() {
40
40
  this.fetchPodcastData();
41
41
  this.watchStatus();
42
42
  },
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-if="editRight || activePlaylist" class="emission-item-container">
2
+ <div class="emission-item-container">
3
3
  <router-link
4
4
  :to="{
5
5
  name: 'playlist',
@@ -10,12 +10,13 @@
10
10
  class="d-flex flex-grow-1 text-dark"
11
11
  >
12
12
  <div class="emission-item-text">
13
+ <div
14
+ v-if="!activePlaylist"
15
+ class="sticker-empty-ressource"
16
+ >
17
+ {{ $t('Empty playlist') }}
18
+ </div>
13
19
  <div class="d-flex align-items-center emission-name">
14
- <span
15
- v-if="!activePlaylist && !isPodcastmaker"
16
- :title="$t('Playlist have not podcasts')"
17
- class="saooti-warning text-danger me-1"
18
- />
19
20
  {{ name }}
20
21
  </div>
21
22
  <div
@@ -84,13 +85,6 @@ export default defineComponent({
84
85
  organisationId(): string | undefined {
85
86
  return state.generalParameters.organisationId;
86
87
  },
87
- editRight(): boolean {
88
- return (
89
- (true === state.generalParameters.isPlaylist &&
90
- this.organisationId === this.playlist.organisation?.id) ||
91
- (state.generalParameters.isAdmin as boolean)
92
- );
93
- },
94
88
  activePlaylist(): boolean {
95
89
  return 0 !== Object.keys(this.playlist.samplingViews ?? []).length;
96
90
  },
@@ -33,9 +33,6 @@ export default defineComponent({
33
33
  <style lang="scss">
34
34
  @import "@scss/_variables.scss";
35
35
  .octopus-app {
36
- /* .page-box {
37
- position: relative;
38
- } */
39
36
  .page-element.page-element-podcastmaker {
40
37
  margin-top: 11rem;
41
38
  }
@@ -167,8 +167,8 @@ export default defineComponent({
167
167
  }
168
168
  },
169
169
  },
170
- async created() {
171
- await this.fetchContent(true);
170
+ created() {
171
+ this.fetchContent(true);
172
172
  },
173
173
  methods: {
174
174
  reloadList() {
@@ -62,7 +62,7 @@ export default defineComponent({
62
62
  computed: {
63
63
  ouestFranceMainTag(): string | undefined {
64
64
  if (this.podcastAnnotations?.["mainOfTag"]) {
65
- for (var key in this.podcastAnnotations) {
65
+ for (let key in this.podcastAnnotations) {
66
66
  if (
67
67
  this.podcastAnnotations[key] ===
68
68
  this.podcastAnnotations["mainOfTag"] &&
@@ -193,8 +193,7 @@ export default defineComponent({
193
193
  this.isProduction &&
194
194
  ((this.authOrganisation.attributes?.["openAi.active"] as
195
195
  | string
196
- | undefined) === "true" ??
197
- false)
196
+ | undefined) === "true")
198
197
  );
199
198
  },
200
199
  titleRssButton(): string {
@@ -268,24 +267,27 @@ export default defineComponent({
268
267
  return "";
269
268
  },
270
269
  },
271
- async created() {
272
- if (undefined !== this.participantId) {
273
- this.displayRss = await octopusApi.fetchDataPublic<boolean>(
274
- 0,
275
- `rss/participants/allowed/${this.organisationId}`,
276
- );
277
- } else {
278
- this.displayRss = true;
279
- }
280
- if (!this.organisationId) {
281
- return;
282
- }
283
- const attributes = await this.getOrgaAttributes(this.organisationId);
284
- this.noSharing = "true" === attributes.noSharing;
285
- this.isLoading = false;
270
+ created() {
271
+ this.initShareButtons();
286
272
  },
287
273
  methods: {
288
274
  ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
275
+ async initShareButtons(){
276
+ if (undefined !== this.participantId) {
277
+ this.displayRss = await octopusApi.fetchDataPublic<boolean>(
278
+ 0,
279
+ `rss/participants/allowed/${this.organisationId}`,
280
+ );
281
+ } else {
282
+ this.displayRss = true;
283
+ }
284
+ if (!this.organisationId) {
285
+ return;
286
+ }
287
+ const attributes = await this.getOrgaAttributes(this.organisationId);
288
+ this.noSharing = "true" === attributes.noSharing;
289
+ this.isLoading = false;
290
+ },
289
291
  getClass(className = "btn-rss"): string {
290
292
  return `btn ${className} share-btn mb-2 text-dark`;
291
293
  },
@@ -293,22 +293,25 @@ export default defineComponent({
293
293
  return 0;
294
294
  },
295
295
  },
296
- async created() {
297
- const orgaId =
298
- "" !== this.authOrganisation.id
299
- ? this.authOrganisation.id
300
- : state.generalParameters.organisationId;
301
- this.orgaAttributes = await this.getOrgaAttributes(orgaId ?? "");
302
- this.initColor();
303
- if (this.isLiveReadyToRecord) {
304
- this.iFrameModel = "large";
305
- }
306
- if("true"===this.podcast?.annotations?.["fromTTS"]){
307
- this.displayTranscript = false;
308
- }
296
+ created() {
297
+ this.initSharePlayer();
309
298
  },
310
299
  methods: {
311
300
  ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
301
+ async initSharePlayer(){
302
+ const orgaId =
303
+ "" !== this.authOrganisation.id
304
+ ? this.authOrganisation.id
305
+ : state.generalParameters.organisationId;
306
+ this.orgaAttributes = await this.getOrgaAttributes(orgaId ?? "");
307
+ this.initColor();
308
+ if (this.isLiveReadyToRecord) {
309
+ this.iFrameModel = "large";
310
+ }
311
+ if ("true" === this.podcast?.annotations?.["fromTTS"]) {
312
+ this.displayTranscript = false;
313
+ }
314
+ },
312
315
  getIframeNumber(): string {
313
316
  return this.displayChoiceAllEpisodes && "all" === this.episodeNumbers
314
317
  ? "/0"
@@ -80,16 +80,19 @@ export default defineComponent({
80
80
  return `<iframe src="${this.iFrameSrc}" width="100%" height="140px" scrolling="no" allow="clipboard-read; clipboard-write; autoplay" frameborder="0"></iframe>`;
81
81
  },
82
82
  },
83
- async created() {
84
- const orgaId =
85
- "" !== this.authOrganisation.id
86
- ? this.authOrganisation.id
87
- : state.generalParameters.organisationId;
88
- this.orgaAttributes = await this.getOrgaAttributes(orgaId ?? "");
89
- this.initColor();
83
+ created() {
84
+ this.initSharePlayer();
90
85
  },
91
86
  methods: {
92
87
  ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
88
+ async initSharePlayer(){
89
+ const orgaId =
90
+ "" !== this.authOrganisation.id
91
+ ? this.authOrganisation.id
92
+ : state.generalParameters.organisationId;
93
+ this.orgaAttributes = await this.getOrgaAttributes(orgaId ?? "");
94
+ this.initColor();
95
+ },
93
96
  initColor(): void {
94
97
  if (!this.orgaAttributes) {
95
98
  return;
@@ -110,14 +110,14 @@ export default defineComponent({
110
110
  });
111
111
  },
112
112
  },
113
- async created() {
113
+ created() {
114
114
  if (this.isVideoPodcast) {
115
115
  this.$emit("update:iFrameModel", "video");
116
116
  }
117
117
  if (this.isLive) {
118
118
  return;
119
119
  }
120
- await this.initCustomPlayers();
120
+ this.initCustomPlayers();
121
121
  },
122
122
  methods: {
123
123
  async fetchCustomPlayers(
@@ -195,7 +195,6 @@ export default defineComponent({
195
195
  this.lastWindowWidth = this.windowWidth;
196
196
  return;
197
197
  }
198
-
199
198
  const subscribeList = this.$refs.subscribeButtonsContainer as HTMLElement;
200
199
  if (
201
200
  null === subscribeList ||
@@ -255,9 +254,7 @@ export default defineComponent({
255
254
  display: inline-flex;
256
255
  justify-content: flex-start;
257
256
  overflow: hidden;
258
- //flex-grow: 1;
259
257
  width: fit-content;
260
- //width: 0;
261
258
  }
262
259
  }
263
260
  }
@@ -20,7 +20,7 @@ const getStyle = (
20
20
  wrap: {
21
21
  position: "fixed",
22
22
  left: 0,
23
- pos: pos ? pos : c(0.05),
23
+ pos: pos ?? c(0.05),
24
24
  zIndex: 9999,
25
25
  width: "100%",
26
26
  padding: `0 ${c(0.2)}`,
@@ -12,7 +12,7 @@
12
12
  <h4 class="mb-3">
13
13
  {{ $t("Configure your Newsletter tile") }}
14
14
  </h4>
15
- <div
15
+ <div
16
16
  v-for="colors in arrayColors"
17
17
  :key="colors.mainText"
18
18
  class="d-flex align-items-center mb-3"
@@ -28,11 +28,13 @@
28
28
  />
29
29
  <div class="d-flex flex-column">
30
30
  <div class="fw-bold">{{ colors.mainText }}</div>
31
- <div v-if="colors.secondText" class="descriptionText">{{ colors.secondText }}</div>
31
+ <div v-if="colors.secondText" class="descriptionText">
32
+ {{ colors.secondText }}
33
+ </div>
32
34
  </div>
33
35
  </div>
34
36
  </div>
35
- <!-- eslint-disable vue/no-v-html -->
37
+ <!-- eslint-disable vue/no-v-html -->
36
38
  <div v-html="newsletterHtml" />
37
39
  <!-- eslint-enable -->
38
40
  </div>
@@ -40,7 +42,7 @@
40
42
  class="btn flex-grow-1 mt-3 fw-bold"
41
43
  @click="onCopyCode(newsletterHtml, afterCopy)"
42
44
  >
43
- <span class="saooti-copy me-2"/>
45
+ <span class="saooti-copy me-2" />
44
46
  {{ $t("Copy and embed the HTML code into your email tool") }}
45
47
  </button>
46
48
  <SnackBar ref="snackbar" position="bottom-left" />
@@ -91,9 +93,14 @@ export default defineComponent({
91
93
  data() {
92
94
  return {
93
95
  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') }],
96
+ {
97
+ color: "#40a372",
98
+ mainText: this.$t("Choose main color"),
99
+ secondText: this.$t("Newsletter elements"),
100
+ },
101
+ { color: "#000000", mainText: this.$t("Choose text color") },
102
+ { color: "#FFFFFF", mainText: this.$t("Choose background color") },
103
+ ],
97
104
  shareUrl: window.location.href,
98
105
  };
99
106
  },
@@ -106,17 +113,19 @@ export default defineComponent({
106
113
  imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
107
114
  "Podcast image",
108
115
  )}`,
109
- title:this.podcast.title,
116
+ title: this.podcast.title,
110
117
  description: this.podcast.description ?? "",
111
118
  shareText: this.$t("Listen this episode"),
112
119
  emissionHtml: `<tr><td style="padding:5px 0;">
113
120
  <div style="display:flex; margin-top:5px;">
114
- <div style="font-size:20px; color:${this.arrayColors[1].color}; margin-right:5px;text-wrap: nowrap;">${this.$t(
115
- "Emission",
116
- )} :</div>
121
+ <div style="font-size:20px; color:${
122
+ this.arrayColors[1].color
123
+ }; margin-right:5px;text-wrap: nowrap;">${this.$t("Emission")} :</div>
117
124
  <a href="${this.shareUrl}" style="font-size: 18px;color: ${
118
125
  this.arrayColors[0].color
119
- };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${this.podcast.emission.name}</a>
126
+ };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${
127
+ this.podcast.emission.name
128
+ }</a>
120
129
  </div></td></tr>`,
121
130
  articleHtml:
122
131
  !this.podcast?.article || 0 === this.podcast.article?.length
@@ -124,11 +133,9 @@ export default defineComponent({
124
133
  : `<tr><td style="padding:5px 0;">
125
134
  <div style="display:flex;">
126
135
  <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>
127
- <a href="${
128
- this.podcast.article
129
- }" style="color: ${this.arrayColors[1].color};margin-top:2px">${this.$t(
130
- "See associated article",
131
- )}</a>
136
+ <a href="${this.podcast.article}" style="color: ${
137
+ this.arrayColors[1].color
138
+ };margin-top:2px">${this.$t("See associated article")}</a>
132
139
  </div></td></tr>
133
140
  `,
134
141
  colorTitle: `color:${this.arrayColors[1].color};`,
@@ -162,7 +169,9 @@ export default defineComponent({
162
169
  };
163
170
  },
164
171
  newsletterHtml(): string {
165
- return `<table style="background:${this.arrayColors[2].color};color:${this.arrayColors[1].color};table-layout: fixed;width:100%;font-size: 14px;">
172
+ return `<table style="background:${this.arrayColors[2].color};color:${
173
+ this.arrayColors[1].color
174
+ };table-layout: fixed;width:100%;font-size: 14px;">
166
175
  <tr>
167
176
  <td valign="top" width="30%" rowspan="7" style="padding-right:5px;"><img width="100%" src="${
168
177
  this.newsletterInfo.imageUrl
@@ -174,15 +183,19 @@ export default defineComponent({
174
183
  <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;">${
175
184
  this.newsletterInfo.description
176
185
  }</div></td></tr>
177
- <tr><td valign="top" style="padding:5px 0;"><a href="${this.shareUrl}" style="color: ${
178
- this.arrayColors[0].color
179
- };">${this.$t("See more")}</a></td></tr>
186
+ <tr><td valign="top" style="padding:5px 0;"><a href="${
187
+ this.shareUrl
188
+ }" style="color: ${this.arrayColors[0].color};">${this.$t(
189
+ "See more",
190
+ )}</a></td></tr>
180
191
  <tr>${this.newsletterInfo.articleHtml}
181
- <td width="1" style="padding:5px 0;"><a href="${this.shareUrl}" style="font-size: 18px;color: ${
192
+ <td width="1" style="padding:5px 0;"><a href="${
193
+ this.shareUrl
194
+ }" style="font-size: 18px;color: ${
182
195
  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};">${
184
- this.newsletterInfo.shareText
185
- }</div></a></td>
196
+ };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:${
197
+ this.arrayColors[1].color
198
+ };">${this.newsletterInfo.shareText}</div></a></td>
186
199
  </tr>
187
200
  </table>
188
201
  `;
@@ -206,11 +219,14 @@ export default defineComponent({
206
219
  "" !== this.authOrganisation.id
207
220
  ? this.authOrganisation.id
208
221
  : state.generalParameters.organisationId;
209
- if(!orgaId ||orgaId?.length){
222
+ if (!orgaId || orgaId?.length) {
210
223
  return;
211
224
  }
212
225
  const attributes = await this.getOrgaAttributes(orgaId ?? "");
213
- if (Object.hasOwn(attributes, "podcastmakerUrl") && (attributes.podcastmakerUrl as string|undefined|null)?.length) {
226
+ if (
227
+ Object.hasOwn(attributes, "podcastmakerUrl") &&
228
+ (attributes.podcastmakerUrl as string | undefined | null)?.length
229
+ ) {
214
230
  this.shareUrl =
215
231
  attributes.podcastmakerUrl +
216
232
  window.location.pathname +
@@ -234,9 +250,9 @@ export default defineComponent({
234
250
  <style lang="scss">
235
251
  .octopus-app {
236
252
  #newsletter-modal {
237
- .octopus-modal-body{
253
+ .octopus-modal-body {
238
254
  overflow-x: inherit;
239
- @media (max-width: 500px){
255
+ @media (max-width: 500px) {
240
256
  overflow-x: auto;
241
257
  }
242
258
  }