@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.
- package/package.json +28 -28
- package/sonarqube-scanner.js +4 -12
- package/src/App.vue +2 -2
- package/src/assets/bootstrap.scss +6 -0
- package/src/assets/progressbar.scss +9 -0
- package/src/assets/share.scss +22 -0
- package/src/components/display/comments/CommentParentInfo.vue +13 -8
- package/src/components/display/filter/ProductorSearch.vue +1 -1
- package/src/components/display/live/LiveItem.vue +1 -1
- package/src/components/display/playlist/PlaylistItem.vue +7 -13
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +0 -3
- package/src/components/display/podcasts/PodcastList.vue +2 -2
- package/src/components/display/podcasts/TagList.vue +1 -1
- package/src/components/display/sharing/ShareButtons.vue +19 -17
- package/src/components/display/sharing/SharePlayer.vue +16 -13
- package/src/components/display/sharing/SharePlayerRadio.vue +10 -7
- package/src/components/display/sharing/SharePlayerTypes.vue +2 -2
- package/src/components/display/sharing/SubscribeButtons.vue +0 -3
- package/src/components/misc/SnackBar.vue +1 -1
- package/src/components/misc/modal/NewsletterModal.vue +45 -29
- package/src/components/misc/player/PlayerCompact.vue +26 -67
- package/src/components/misc/player/PlayerComponent.vue +19 -14
- package/src/components/misc/player/PlayerLarge.vue +40 -63
- package/src/components/misc/player/ads/AdsProgressBar.vue +27 -0
- package/src/components/misc/player/ads/AdsSkipButton.vue +54 -0
- package/src/components/misc/player/elements/PlayerImage.vue +97 -0
- package/src/components/misc/player/elements/PlayerPlayButton.vue +144 -0
- package/src/components/misc/player/{PlayerTimeline.vue → elements/PlayerTimeline.vue} +1 -1
- package/src/components/misc/player/elements/PlayerTitle.vue +127 -0
- package/src/components/misc/player/progressbar/PlayerProgressBar.vue +58 -0
- package/src/components/misc/player/{PlayerProgressBar.vue → progressbar/PodcastProgressBar.vue} +3 -3
- package/src/components/misc/player/radio/RadioProgressBar.vue +0 -11
- package/src/components/misc/player/{PlayerVideo.vue → video/PlayerVideo.vue} +3 -3
- package/src/components/misc/player/{PlayerVideoDigiteka.vue → video/PlayerVideoDigiteka.vue} +1 -1
- package/src/components/misc/player/{PlayerVideoHls.vue → video/PlayerVideoHls.vue} +1 -1
- package/src/components/mixins/fetchParameters.ts +16 -0
- package/src/components/mixins/loadScript.ts +25 -0
- package/src/components/mixins/player/playerDisplayTime.ts +35 -0
- package/src/components/mixins/player/playerLive.ts +2 -2
- package/src/components/mixins/player/playerLogic.ts +17 -13
- package/src/components/mixins/player/playerStitching.ts +168 -0
- package/src/components/mixins/player/playerTranscript.ts +7 -31
- package/src/components/mixins/player/playerVast.ts +198 -0
- package/src/components/mixins/radio/fetchRadioData.ts +9 -1
- package/src/locale/de.ts +3 -2
- package/src/locale/en.ts +3 -1
- package/src/locale/es.ts +3 -2
- package/src/locale/fr.ts +3 -1
- package/src/locale/it.ts +4 -2
- package/src/locale/sl.ts +3 -1
- package/src/stores/ParamSdkStore.ts +11 -11
- package/src/stores/PlayerStore.ts +30 -12
- package/src/stores/VastStore.ts +98 -0
- package/src/stores/class/adserver/adPosition.ts +6 -0
- package/src/stores/class/general/player.ts +2 -0
- package/src/components/mixins/player/playerDisplay.ts +0 -169
- /package/src/components/misc/player/{ChapteringModal.vue → chaptering/ChapteringModal.vue} +0 -0
- /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": "
|
|
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.
|
|
19
|
-
"@tiptap/extension-link": "^2.
|
|
20
|
-
"@tiptap/extension-underline": "^2.
|
|
21
|
-
"@tiptap/pm": "^2.
|
|
22
|
-
"@tiptap/starter-kit": "^2.
|
|
23
|
-
"@tiptap/vue-3": "^2.
|
|
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.
|
|
26
|
-
"@vuepic/vue-datepicker": "^
|
|
27
|
-
"@vueuse/core": "^10.
|
|
28
|
-
"autoprefixer": "^10.4.
|
|
29
|
-
"axios": "^1.6.
|
|
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.
|
|
34
|
-
"hls.js": "^1.5.
|
|
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.
|
|
39
|
+
"sass": "^1.71.1",
|
|
40
40
|
"sonarqube-scanner": "^3.3.0",
|
|
41
|
-
"swiper": "^11.0.
|
|
42
|
-
"video.js": "^8.
|
|
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": "^
|
|
46
|
-
"vue": "^3.4.
|
|
47
|
-
"vue-i18n": "^9.
|
|
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.
|
|
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.
|
|
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": "^
|
|
59
|
-
"@typescript-eslint/parser": "^
|
|
60
|
-
"@vitejs/plugin-vue": "^
|
|
61
|
-
"@vue/compiler-sfc": "^3.4.
|
|
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.
|
|
64
|
-
"eslint-plugin-vue": "^9.
|
|
63
|
+
"eslint": "^8.57.0",
|
|
64
|
+
"eslint-plugin-vue": "^9.22.0",
|
|
65
65
|
"typescript": "^5.3.3"
|
|
66
66
|
},
|
|
67
67
|
"eslintConfig": {
|
package/sonarqube-scanner.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
const scanner = require('sonarqube-scanner');
|
|
2
2
|
scanner({
|
|
3
3
|
options:{
|
|
4
|
-
"sonar.
|
|
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
|
@@ -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;
|
package/src/assets/share.scss
CHANGED
|
@@ -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
|
-
|
|
40
|
-
|
|
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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
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
|
},
|
|
@@ -62,7 +62,7 @@ export default defineComponent({
|
|
|
62
62
|
computed: {
|
|
63
63
|
ouestFranceMainTag(): string | undefined {
|
|
64
64
|
if (this.podcastAnnotations?.["mainOfTag"]) {
|
|
65
|
-
for (
|
|
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
|
-
|
|
272
|
-
|
|
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
|
-
|
|
297
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|
|
@@ -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">
|
|
31
|
+
<div v-if="colors.secondText" class="descriptionText">
|
|
32
|
+
{{ colors.secondText }}
|
|
33
|
+
</div>
|
|
32
34
|
</div>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
|
-
|
|
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
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
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:${
|
|
115
|
-
|
|
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;">${
|
|
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.
|
|
129
|
-
}
|
|
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:${
|
|
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="${
|
|
178
|
-
this.
|
|
179
|
-
};">${this.$t(
|
|
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="${
|
|
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:${
|
|
184
|
-
this.
|
|
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 (
|
|
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
|
}
|