@saooti/octopus-sdk 40.1.21 → 40.2.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 (43) hide show
  1. package/index.ts +8 -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/live/LiveList.vue +1 -1
  10. package/src/components/display/live/RadioList.vue +1 -1
  11. package/src/components/display/podcasts/PodcastImage.vue +17 -9
  12. package/src/components/display/podcasts/PodcastItemInfo.vue +1 -1
  13. package/src/components/display/podcasts/PodcastModuleBox.vue +121 -118
  14. package/src/components/display/podcasts/PodcastRawTranscript.vue +5 -18
  15. package/src/components/display/sharing/PlayerAnonymousModal.vue +54 -0
  16. package/src/components/display/sharing/QrCode.vue +36 -35
  17. package/src/components/display/sharing/ShareAnonymous.vue +290 -0
  18. package/src/components/display/sharing/ShareDistribution.vue +8 -27
  19. package/src/components/display/sharing/ShareNewsletter.vue +205 -0
  20. package/src/components/display/sharing/ShareSocialsButtons.vue +110 -0
  21. package/src/components/display/sharing/SubscribeButtons.vue +2 -0
  22. package/src/components/form/ClassicCopyButton.vue +65 -0
  23. package/src/components/misc/ClassicNav.vue +9 -4
  24. package/src/components/misc/ClassicPopover.vue +1 -1
  25. package/src/components/misc/modal/ClipboardModal.vue +9 -11
  26. package/src/components/misc/modal/NewsletterModal.vue +14 -192
  27. package/src/components/misc/modal/QrCodeModal.vue +2 -1
  28. package/src/components/pages/EmissionPage.vue +47 -61
  29. package/src/components/pages/ParticipantPage.vue +17 -7
  30. package/src/components/pages/PlaylistPage.vue +13 -9
  31. package/src/components/pages/PodcastPage.vue +15 -38
  32. package/src/components/pages/RadioPage.vue +12 -7
  33. package/src/components/pages/VideoPage.vue +0 -3
  34. package/src/locale/de.ts +5 -2
  35. package/src/locale/en.ts +5 -2
  36. package/src/locale/es.ts +5 -2
  37. package/src/locale/fr.ts +9 -6
  38. package/src/locale/it.ts +5 -2
  39. package/src/locale/sl.ts +5 -2
  40. package/src/router/router.ts +3 -8
  41. package/src/stores/class/config/commentsConfig.ts +2 -2
  42. package/src/style/bootstrap.scss +6 -14
  43. package/src/components/display/sharing/ShareButtons.vue +0 -351
@@ -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: {
@@ -11,53 +11,56 @@
11
11
  :class="isPodcastmaker ? 'page-element-podcastmaker' : ''"
12
12
  >
13
13
  <section class="module-box">
14
- <div class="d-flex mb-2">
15
- <div class="w-100">
16
- <img
17
- v-lazy="useProxyImageUrl(emission.imageUrl, '250')"
18
- width="250"
19
- height="250"
20
- role="presentation"
21
- alt=""
22
- :title="$t('Emission name image', { name: name })"
23
- class="img-box img-box-podcast mb-3 flex-column justify-content-start align-items-start position-relative flex-shrink-0 float-start me-3"
24
- />
25
- <h2 class="mb-3">{{ name }}</h2>
26
- <!-- eslint-disable vue/no-v-html -->
27
- <p
28
- class="html-wysiwyg-content description-text"
29
- v-html="urlify(description)"
30
- />
31
- <!-- eslint-enable -->
32
- <div v-if="lastPodcast" class="d-flex align-items-center mt-3">
33
- <PodcastPlayButton
34
- :podcast="lastPodcast"
35
- :just-buttons="true"
36
- />
37
- <div class="ms-2 fw-bold">
38
- {{ $t("Listen to the latest episode") }}
39
- </div>
40
- </div>
41
- <SubscribeButtons
42
- v-if="isPodcastmaker"
43
- class="mt-4"
44
- :emission="emission"
45
- :window-width="1000"
46
- :justify-center="false"
47
- />
48
- </div>
49
- </div>
50
14
  <EditBox
51
15
  v-if="editRight && !isPodcastmaker"
52
16
  :emission="emission"
53
17
  @is-updated="getEmissionDetails"
54
18
  />
19
+ <div class="w-100 mb-2">
20
+ <img
21
+ v-lazy="useProxyImageUrl(emission.imageUrl, '250')"
22
+ width="250"
23
+ height="250"
24
+ role="presentation"
25
+ alt=""
26
+ :title="$t('Emission name image', { name: name })"
27
+ class="img-box img-box-podcast mb-3 flex-column justify-content-start align-items-start position-relative flex-shrink-0 float-start me-3"
28
+ />
29
+ <div class="d-flex align-items-center justify-content-between">
30
+ <h2>{{ name }}</h2>
31
+ <ShareAnonymous v-if="!editRight" class="d-flex justify-content-end flex-grow-1" :emission="emission" :organisation-id="emission.orga.id"/>
32
+ </div>
33
+ <!-- eslint-disable vue/no-v-html -->
34
+ <p
35
+ class="html-wysiwyg-content description-text"
36
+ v-html="urlify(description)"
37
+ />
38
+ <!-- eslint-enable -->
39
+ <div v-if="lastPodcast" class="d-flex align-items-center mt-3">
40
+ <PodcastPlayButton
41
+ :podcast="lastPodcast"
42
+ :just-buttons="true"
43
+ />
44
+ <div class="ms-2 fw-bold">
45
+ {{ $t("Listen to the latest episode") }}
46
+ </div>
47
+ </div>
48
+ <SubscribeButtons
49
+ v-if="isPodcastmaker"
50
+ class="mt-4"
51
+ :emission="emission"
52
+ :window-width="1000"
53
+ :justify-center="false"
54
+ />
55
+ </div>
55
56
  </section>
57
+ <ShareSocialsButtons
58
+ v-if="pageParameters.isShareButtons"
59
+ :organisation-id="emission.orga.id"
60
+ />
56
61
  <SharePlayer
57
- v-if="!isPodcastmaker && (undefined !== authOrgaId || notExclusive)"
62
+ v-if="!isPodcastmaker && editRight"
58
63
  :emission="emission"
59
- :exclusive="exclusive"
60
- :not-exclusive="notExclusive"
61
64
  :organisation-id="authOrgaId"
62
65
  />
63
66
  <section class="module-box">
@@ -76,11 +79,6 @@
76
79
  @fetch="podcastsFetched"
77
80
  />
78
81
  </section>
79
- <ShareButtons
80
- v-if="pageParameters.isShareButtons"
81
- :emission="emission"
82
- :organisation-id="emission.orga.id"
83
- />
84
82
  <ShareDistribution
85
83
  v-if="editRight && !isPodcastmaker && securityRight && !isGarRole"
86
84
  :emission-id="emissionId"
@@ -112,14 +110,15 @@ import { useGeneralStore } from "../../stores/GeneralStore";
112
110
  import { useFilterStore } from "../../stores/FilterStore";
113
111
  import { useApiStore } from "../../stores/ApiStore";
114
112
  import { Podcast } from "@/stores/class/general/podcast";
113
+ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
115
114
  const PodcastFilterList = defineAsyncComponent(
116
115
  () => import("../display/podcasts/PodcastFilterList.vue"),
117
116
  );
118
117
  const SharePlayer = defineAsyncComponent(
119
118
  () => import("../display/sharing/SharePlayer.vue"),
120
119
  );
121
- const ShareButtons = defineAsyncComponent(
122
- () => import("../display/sharing/ShareButtons.vue"),
120
+ const ShareSocialsButtons = defineAsyncComponent(
121
+ () => import("../display/sharing/ShareSocialsButtons.vue"),
123
122
  );
124
123
  const ShareDistribution = defineAsyncComponent(
125
124
  () => import("../display/sharing/ShareDistribution.vue"),
@@ -143,7 +142,7 @@ export default defineComponent({
143
142
  components: {
144
143
  PodcastFilterList,
145
144
  SharePlayer,
146
- ShareButtons,
145
+ ShareSocialsButtons,
147
146
  ShareDistribution,
148
147
  EditBox,
149
148
  SubscribeButtons,
@@ -151,6 +150,7 @@ export default defineComponent({
151
150
  ClassicLoading,
152
151
  PodcastPlayButton,
153
152
  PodcastmakerHeader,
153
+ ShareAnonymous
154
154
  },
155
155
  props: {
156
156
  emissionId: { default: undefined, type: Number },
@@ -170,8 +170,6 @@ export default defineComponent({
170
170
  title: "" as string,
171
171
  emission: undefined as Emission | undefined,
172
172
  error: false as boolean,
173
- exclusive: false as boolean,
174
- notExclusive: false as boolean,
175
173
  fetchLive: true as boolean,
176
174
  lastPodcast: undefined as Podcast | undefined,
177
175
  };
@@ -227,17 +225,6 @@ export default defineComponent({
227
225
  this.error = true;
228
226
  this.loaded = true;
229
227
  },
230
- handleAnnotations() {
231
- if (!this.emission?.annotations) return;
232
- if (this.emission.annotations.exclusive) {
233
- this.exclusive = "true" === this.emission.annotations.exclusive;
234
- this.exclusive =
235
- this.exclusive && this.authOrgaId !== this.emission.orga.id;
236
- }
237
- if (this.emission.annotations.notExclusive) {
238
- this.notExclusive = "true" === this.emission.annotations.notExclusive;
239
- }
240
- },
241
228
  async getEmissionDetails(): Promise<void> {
242
229
  this.loaded = false;
243
230
  this.error = false;
@@ -257,7 +244,6 @@ export default defineComponent({
257
244
  this.contentToDisplayUpdate(this.emission);
258
245
  this.updatePathParams(this.name);
259
246
  this.loaded = true;
260
- this.handleAnnotations();
261
247
  } catch (error) {
262
248
  this.handle403(error as AxiosError);
263
249
  this.initError();
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section class="page-box">
3
- <template v-if="loaded && !error">
3
+ <template v-if="loaded && !error && participant">
4
4
  <h1>
5
5
  {{ $t("Animator") }}
6
6
  </h1>
@@ -29,12 +29,20 @@
29
29
  class="w-100 justify-content-center"
30
30
  @participant-update="updateParticipant"
31
31
  />
32
- <ShareButtons
32
+ <ShareSocialsButtons
33
33
  v-if="pageParameters.isShareButtons"
34
34
  class="w-100"
35
- :participant-id="participantId"
36
35
  :organisation-id="participant.orga.id"
37
- />
36
+ >
37
+ <template #additional-buttons>
38
+ <ShareAnonymous
39
+ :participant-id="participant.participantId"
40
+ :organisation-id="participant.orga.id"
41
+ relative-class=""
42
+ btn-class="btn share-btn mb-2 text-dark me-2"
43
+ />
44
+ </template>
45
+ </ShareSocialsButtons>
38
46
  </section>
39
47
  <!-- productorId define to avoid overwrite #12817 -->
40
48
  <PodcastFilterList
@@ -68,8 +76,8 @@ import ClassicLoading from "../form/ClassicLoading.vue";
68
76
  import { defineComponent, defineAsyncComponent } from "vue";
69
77
  import { AxiosError } from "axios";
70
78
  import { mapState } from "pinia";
71
- const ShareButtons = defineAsyncComponent(
72
- () => import("../display/sharing/ShareButtons.vue"),
79
+ const ShareSocialsButtons = defineAsyncComponent(
80
+ () => import("../display/sharing/ShareSocialsButtons.vue"),
73
81
  );
74
82
  const PodcastFilterList = defineAsyncComponent(
75
83
  () => import("../display/podcasts/PodcastFilterList.vue"),
@@ -77,12 +85,14 @@ const PodcastFilterList = defineAsyncComponent(
77
85
  const EditBox = defineAsyncComponent(
78
86
  () => import("@/components/display/edit/EditBox.vue"),
79
87
  );
88
+ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
80
89
  export default defineComponent({
81
90
  components: {
82
- ShareButtons,
91
+ ShareSocialsButtons,
83
92
  PodcastFilterList,
84
93
  EditBox,
85
94
  ClassicLoading,
95
+ ShareAnonymous
86
96
  },
87
97
  props: {
88
98
  participantId: { default: undefined, type: Number },
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section class="page-box">
3
- <template v-if="loaded && !error">
3
+ <template v-if="loaded && !error && playlist">
4
4
  <PodcastmakerHeader
5
5
  v-if="isPodcastmaker"
6
6
  :page-title="pageTitle"
@@ -11,6 +11,7 @@
11
11
  :class="isPodcastmaker ? 'page-element-podcastmaker' : ''"
12
12
  >
13
13
  <section class="module-box">
14
+ <EditBox v-if="editRight && !isPodcastmaker" :playlist="playlist" />
14
15
  <div class="mb-5 mt-3 description-text">
15
16
  <img
16
17
  v-lazy="useProxyImageUrl(playlist.imageUrl, '250')"
@@ -21,21 +22,22 @@
21
22
  :title="$t('Playlist name image', { name: name })"
22
23
  class="img-box float-start me-3 mb-3"
23
24
  />
24
- <h2>{{ name }}</h2>
25
+ <div class="d-flex align-items-center justify-content-between">
26
+ <h2>{{ name }}</h2>
27
+ <ShareAnonymous v-if="!editRight" class="d-flex justify-content-end flex-grow-1" :playlist="playlist" :organisation-id="playlist.organisation?.id"/>
28
+ </div>
25
29
  <!-- eslint-disable vue/no-v-html -->
26
30
  <p class="html-wysiwyg-content" v-html="urlify(description)" />
27
31
  <!-- eslint-enable -->
28
32
  </div>
29
- <EditBox v-if="editRight && !isPodcastmaker" :playlist="playlist" />
30
33
  </section>
31
34
  <SharePlayer
32
- v-if="!isPodcastmaker && undefined !== authOrgaId"
35
+ v-if="!isPodcastmaker && editRight"
33
36
  :playlist="playlist"
34
37
  :organisation-id="authOrgaId"
35
38
  />
36
- <ShareButtons
39
+ <ShareSocialsButtons
37
40
  v-if="pageParameters.isShareButtons"
38
- :playlist="playlist"
39
41
  :organisation-id="playlist.organisation.id"
40
42
  />
41
43
  <section class="module-box">
@@ -67,8 +69,8 @@ import {useErrorHandler} from "../composable/useErrorHandler";
67
69
  import { Playlist } from "@/stores/class/general/playlist";
68
70
  import { defineComponent, defineAsyncComponent } from "vue";
69
71
  import { AxiosError } from "axios";
70
- const ShareButtons = defineAsyncComponent(
71
- () => import("../display/sharing/ShareButtons.vue"),
72
+ const ShareSocialsButtons = defineAsyncComponent(
73
+ () => import("../display/sharing/ShareSocialsButtons.vue"),
72
74
  );
73
75
  const EditBox = defineAsyncComponent(
74
76
  () => import("@/components/display/edit/EditBox.vue"),
@@ -79,14 +81,16 @@ const SharePlayer = defineAsyncComponent(
79
81
  const PodcastmakerHeader = defineAsyncComponent(
80
82
  () => import("../display/podcastmaker/PodcastmakerHeader.vue"),
81
83
  );
84
+ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
82
85
  export default defineComponent({
83
86
  components: {
84
- ShareButtons,
87
+ ShareSocialsButtons,
85
88
  EditBox,
86
89
  PodcastList,
87
90
  SharePlayer,
88
91
  ClassicLoading,
89
92
  PodcastmakerHeader,
93
+ ShareAnonymous
90
94
  },
91
95
 
92
96
  props: {
@@ -16,29 +16,23 @@
16
16
  :podcast-conference="fetchConference"
17
17
  @update-podcast="updatePodcast"
18
18
  />
19
+ <ShareSocialsButtons
20
+ v-if="pageParameters.isShareButtons"
21
+ :organisation-id="podcast.organisation.id"
22
+ />
19
23
  <SharePlayer
20
- v-if="!isPodcastmaker && (undefined !== authOrgaId || notExclusive)"
24
+ v-if="!isPodcastmaker && editRight"
21
25
  :podcast="podcast"
22
- :emission="podcast.emission"
23
- :exclusive="exclusive"
24
- :not-exclusive="notExclusive"
26
+ :emission="podcast?.emission"
25
27
  :organisation-id="authOrgaId"
26
28
  />
27
-
28
29
  <CommentSection v-if="!isPodcastmaker" :podcast="podcast" />
29
- <section class="module-box">
30
- <PodcastInlineList
31
- :emission-id="podcast.emission.emissionId"
32
- :href="'/main/pub/emission/' + podcast.emission.emissionId"
33
- :title="$t('More episodes of this emission')"
34
- :button-text="$t('All podcast emission button')"
35
- title-tag="h3"
36
- />
37
- </section>
38
- <ShareButtons
39
- v-if="pageParameters.isShareButtons"
40
- :podcast="podcast"
41
- :organisation-id="podcast.organisation.id"
30
+ <PodcastInlineList
31
+ :emission-id="podcast.emission.emissionId"
32
+ :href="'/main/pub/emission/' + podcast.emission.emissionId"
33
+ :title="$t('More episodes of this emission')"
34
+ :button-text="$t('All podcast emission button')"
35
+ title-tag="h3"
42
36
  />
43
37
  <section v-if="!hideSuggestions">
44
38
  <ClassicLazy :min-height="550">
@@ -96,8 +90,8 @@ import { useGeneralStore } from "../../stores/GeneralStore";
96
90
  import { mapState, mapActions } from "pinia";
97
91
  import { AxiosError } from "axios";
98
92
  import { useCommentStore } from "../../stores/CommentStore";
99
- const ShareButtons = defineAsyncComponent(
100
- () => import("../display/sharing/ShareButtons.vue"),
93
+ const ShareSocialsButtons = defineAsyncComponent(
94
+ () => import("../display/sharing/ShareSocialsButtons.vue"),
101
95
  );
102
96
  const SharePlayer = defineAsyncComponent(
103
97
  () => import("../display/sharing/SharePlayer.vue"),
@@ -112,7 +106,7 @@ export default defineComponent({
112
106
  name: "PodcastPage",
113
107
  components: {
114
108
  PodcastInlineList,
115
- ShareButtons,
109
+ ShareSocialsButtons,
116
110
  SharePlayer,
117
111
  CommentSection,
118
112
  PodcastModuleBox,
@@ -139,8 +133,6 @@ export default defineComponent({
139
133
  loaded: false as boolean,
140
134
  podcast: undefined as Podcast | undefined,
141
135
  error: false as boolean,
142
- exclusive: false as boolean,
143
- notExclusive: false as boolean,
144
136
  fetchConference: undefined as Conference | undefined,
145
137
  infoReload: undefined as ReturnType<typeof setTimeout> | undefined,
146
138
  };
@@ -287,20 +279,6 @@ export default defineComponent({
287
279
  this.error = true;
288
280
  this.loaded = true;
289
281
  },
290
- handleAnnotations() {
291
- if (!this.podcast) {
292
- return;
293
- }
294
- if (this.podcast.emission.annotations?.exclusive) {
295
- this.exclusive = "true" === this.podcast.emission.annotations.exclusive;
296
- this.exclusive =
297
- this.exclusive && this.authOrgaId !== this.podcast.organisation.id;
298
- }
299
- if (this.podcast.emission.annotations?.notExclusive) {
300
- this.notExclusive =
301
- "true" === this.podcast.emission.annotations.notExclusive;
302
- }
303
- },
304
282
  async getPodcastDetails(): Promise<void> {
305
283
  this.loaded = false;
306
284
  this.error = false;
@@ -319,7 +297,6 @@ export default defineComponent({
319
297
  }
320
298
  this.podcast = data;
321
299
  this.contentToDisplayUpdate(data);
322
- this.handleAnnotations();
323
300
  if (
324
301
  (!this.podcast.availability.visibility ||
325
302
  ("READY_TO_RECORD" !== this.podcast.processingStatus &&