@saooti/octopus-sdk 40.1.21 → 40.2.1-SNAPSHOT

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/index.ts +7 -1
  2. package/package.json +1 -1
  3. package/plateform.conf +1 -1
  4. package/src/components/composable/player/usePlayerLive.ts +1 -1
  5. package/src/components/display/accessibility/AccessibilityModal.vue +7 -7
  6. package/src/components/display/comments/CommentSection.vue +1 -1
  7. package/src/components/display/emission/EmissionPlayerItem.vue +1 -1
  8. package/src/components/display/list/SwiperList.vue +1 -1
  9. package/src/components/display/podcasts/PodcastItemInfo.vue +1 -1
  10. package/src/components/display/podcasts/PodcastModuleBox.vue +121 -118
  11. package/src/components/display/podcasts/PodcastRawTranscript.vue +5 -18
  12. package/src/components/display/sharing/PlayerAnonymousModal.vue +54 -0
  13. package/src/components/display/sharing/QrCode.vue +26 -28
  14. package/src/components/display/sharing/ShareAnonymous.vue +291 -0
  15. package/src/components/display/sharing/ShareNewsletter.vue +216 -0
  16. package/src/components/display/sharing/ShareSocialsButtons.vue +110 -0
  17. package/src/components/display/sharing/SubscribeButtons.vue +2 -0
  18. package/src/components/misc/ClassicNav.vue +9 -3
  19. package/src/components/misc/ClassicPopover.vue +1 -1
  20. package/src/components/misc/modal/NewsletterModal.vue +14 -192
  21. package/src/components/misc/modal/QrCodeModal.vue +2 -1
  22. package/src/components/pages/EmissionPage.vue +47 -61
  23. package/src/components/pages/ParticipantPage.vue +17 -7
  24. package/src/components/pages/PlaylistPage.vue +13 -9
  25. package/src/components/pages/PodcastPage.vue +15 -38
  26. package/src/components/pages/RadioPage.vue +12 -7
  27. package/src/components/pages/VideoPage.vue +0 -2
  28. package/src/locale/de.ts +2 -2
  29. package/src/locale/en.ts +2 -2
  30. package/src/locale/es.ts +2 -2
  31. package/src/locale/fr.ts +6 -6
  32. package/src/locale/it.ts +2 -2
  33. package/src/locale/sl.ts +2 -2
  34. package/src/router/router.ts +3 -8
  35. package/src/stores/class/config/commentsConfig.ts +2 -2
  36. package/src/components/display/sharing/ShareButtons.vue +0 -351
@@ -0,0 +1,291 @@
1
+ <template>
2
+ <div v-if="!isLoading && !noSharing">
3
+ <button
4
+ id="anonymous-share-button"
5
+ :class="btnClass"
6
+ :title="$t('Share')"
7
+ >
8
+ <DotsHorizontalIcon />
9
+ </button>
10
+ <ClassicPopover
11
+ target="anonymous-share-button"
12
+ :relative-class="relativeClass"
13
+ :is-fixed="true"
14
+ :left-pos="true"
15
+ :only-click="true"
16
+ >
17
+ <div
18
+ v-for="button in dropdownButtons"
19
+ :key="button.icon"
20
+ class="d-flex flex-column"
21
+ >
22
+ <button
23
+ v-if="button.condition"
24
+ :key="button.title"
25
+ class="btn-transparent d-flex flex-nowrap justify-content-start align-items-center octopus-dropdown-item py-2"
26
+ :title="button.title"
27
+ @mousedown="clickButton(button.emitName)"
28
+ @keydown.enter="clickButton(button.emitName)"
29
+ >
30
+ <component :is="button.icon" />
31
+ <div class="ms-1">{{ button.title }}</div>
32
+ </button>
33
+ </div>
34
+ </ClassicPopover>
35
+ <QrCodeModal
36
+ v-if="isQrCodeModal"
37
+ :url-page="urlPage"
38
+ :orga-for-color="organisationId"
39
+ @close="isQrCodeModal = false"
40
+ />
41
+ <PlayerAnonymousModal
42
+ v-if="isPlayerModal"
43
+ :podcast="podcast"
44
+ :emission="emission ?? podcast?.emission"
45
+ :exclusive="!playerCanBeSharedOthers"
46
+ :not-exclusive="playerCanBeSharedAnonymous"
47
+ @close="isPlayerModal = false"
48
+ />
49
+ <NewsletterModal
50
+ v-if="isNewsletterModal"
51
+ :closable="true"
52
+ :podcast="podcast"
53
+ :emission="emission"
54
+ :playlist="playlist"
55
+ @close="isNewsletterModal = false"
56
+ />
57
+ <ClipboardModal
58
+ v-if="isRssModal"
59
+ :link="rssUrl"
60
+ @close="isRssModal = false"
61
+ @copy="afterCopy"
62
+ />
63
+ <SnackBar
64
+ v-if="lazyLoadingSnackbar"
65
+ ref="snackbar"
66
+ position="bottom-left"
67
+ />
68
+ </div>
69
+ </template>
70
+
71
+ <script lang="ts">
72
+ import QrcodeIcon from "vue-material-design-icons/Qrcode.vue";
73
+ import LinkVariantIcon from "vue-material-design-icons/LinkVariant.vue";
74
+ import DotsHorizontalIcon from "vue-material-design-icons/DotsHorizontal.vue";
75
+ import ClassicPopover from "../../misc/ClassicPopover.vue";
76
+ import displayHelper from "../../../helper/displayHelper";
77
+ import { defineAsyncComponent, defineComponent } from "vue";
78
+ import { useApiStore } from "../../../stores/ApiStore";
79
+ import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
80
+ import { useAuthStore } from "../../../stores/AuthStore";
81
+ import { Podcast } from "@/stores/class/general/podcast";
82
+ import { Emission } from "@/stores/class/general/emission";
83
+ import { Playlist } from "@/stores/class/general/playlist";
84
+ import { mapActions, mapState } from "pinia";
85
+ import { state } from "../../../stores/ParamSdkStore";
86
+ import classicApi from "../../../api/classicApi";
87
+ const SnackBar = defineAsyncComponent(() => import("../../misc/SnackBar.vue"));
88
+ const NewsletterModal = defineAsyncComponent(
89
+ () => import("../../misc/modal/NewsletterModal.vue"),
90
+ );
91
+ const QrCodeModal = defineAsyncComponent(
92
+ () => import("../../misc/modal/QrCodeModal.vue"),
93
+ );
94
+ const ClipboardModal = defineAsyncComponent(
95
+ () => import("../../misc/modal/ClipboardModal.vue"),
96
+ );
97
+ const PlayerAnonymousModal = defineAsyncComponent(
98
+ () => import("../sharing/PlayerAnonymousModal.vue"),
99
+ );
100
+ const CodeTagsIcon = defineAsyncComponent(
101
+ () => import("vue-material-design-icons/CodeTags.vue"),
102
+ );
103
+ const EmailNewsletterIcon = defineAsyncComponent(
104
+ () => import("vue-material-design-icons/EmailNewsletter.vue"),
105
+ );
106
+ const RssIcon = defineAsyncComponent(
107
+ () => import("vue-material-design-icons/Rss.vue"),
108
+ );
109
+ export default defineComponent({
110
+ name: "PodcastShareAnonymous",
111
+ components: {
112
+ ClassicPopover,
113
+ DotsHorizontalIcon,
114
+ LinkVariantIcon,
115
+ EmailNewsletterIcon,
116
+ QrcodeIcon,
117
+ CodeTagsIcon,
118
+ RssIcon,
119
+ SnackBar,
120
+ NewsletterModal,
121
+ QrCodeModal,
122
+ ClipboardModal,
123
+ PlayerAnonymousModal
124
+ },
125
+
126
+ props: {
127
+ podcast: { default: undefined, type: Object as () => Podcast },
128
+ emission: { default: undefined, type: Object as () => Emission },
129
+ playlist: { default: undefined, type: Object as () => Playlist },
130
+ participantId: { default: undefined, type: Number },
131
+ organisationId: { default: undefined, type: String },
132
+ relativeClass: { default: "page-element", type: String },
133
+ btnClass: { default: "btn btn-transparent", type: String },
134
+ },
135
+
136
+ data() {
137
+ return {
138
+ lazyLoadingSnackbar: false as boolean,
139
+ isNewsletterModal: false as boolean,
140
+ isQrCodeModal: false as boolean,
141
+ displayRss: false as boolean,
142
+ noSharing: true as boolean,
143
+ playerCanBeSharedAnonymous: false as boolean,
144
+ playerCanBeSharedOthers: false as boolean,
145
+ isLoading: true as boolean,
146
+ isRssModal: false as boolean,
147
+ isPlayerModal: false as boolean
148
+ };
149
+ },
150
+ computed:{
151
+ ...mapState(useAuthStore, ["isGarRole","authOrgaId"]),
152
+ ...mapState(useApiStore, ["apiUrl"]),
153
+ urlPage(): string {
154
+ return window.location.href;
155
+ },
156
+ isPodcastmaker(): boolean {
157
+ return state.generalParameters.podcastmaker as boolean;
158
+ },
159
+ rssUrl(): string {
160
+ const api = this.apiUrl + "rss/";
161
+ if (
162
+ (!this.isPodcastmaker && this.playlist) ||
163
+ this.podcast ||
164
+ this.emission
165
+ ) {
166
+ return "";
167
+ }
168
+ if (this.participantId) {
169
+ return api + "participant/" + this.participantId + ".rss";
170
+ }
171
+ if (this.playlist) {
172
+ return api + "playlist/" + this.playlist.playlistId + ".rss";
173
+ }
174
+ if (this.organisationId) {
175
+ return api + "productor/" + this.organisationId + ".rss";
176
+ }
177
+ return "";
178
+ },
179
+ titleRssButton(): string {
180
+ if (this.participantId) {
181
+ return this.$t("Subscribe to this participant");
182
+ }
183
+ if (this.emission) {
184
+ return this.$t("Subscribe to this emission");
185
+ }
186
+ return this.$t("Subscribe to this RSS feed");
187
+ },
188
+ dropdownButtons() {
189
+ return [
190
+ {
191
+ title: this.$t("Copy this page URL"),
192
+ icon: "LinkVariantIcon",
193
+ condition:true,
194
+ emitName: "link",
195
+ },
196
+ {
197
+ title: this.$t("Share the player"),
198
+ icon: "CodeTagsIcon",
199
+ condition: !this.isPodcastmaker && (this.playerCanBeSharedAnonymous || (this.playerCanBeSharedOthers && this.authOrgaId)),
200
+ emitName: "player",
201
+ },
202
+ {
203
+ title: this.$t("Share newsletter"),
204
+ icon: "EmailNewsletterIcon",
205
+ condition: this.podcast || this.emission || this.playlist,
206
+ emitName: "newsletter",
207
+ },
208
+ {
209
+ title: this.$t("Share QR Code"),
210
+ icon: "QrcodeIcon",
211
+ condition: true,
212
+ emitName: "qrcode",
213
+ },
214
+ {
215
+ title: this.titleRssButton,
216
+ icon: "RssIcon",
217
+ condition: '' !== this.rssUrl && this.displayRss && !this.isGarRole,
218
+ emitName: "rss",
219
+ },
220
+ ];
221
+ },
222
+ },
223
+ created() {
224
+ this.initShareButtons();
225
+ },
226
+ methods:{
227
+ ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
228
+ async initShareButtons() {
229
+ if (undefined !== this.participantId) {
230
+ this.displayRss = await classicApi.fetchData<boolean>({
231
+ api: 0,
232
+ path: `rss/participants/allowed/${this.organisationId}`,
233
+ isNotAuth: true,
234
+ });
235
+ } else {
236
+ this.displayRss = true;
237
+ }
238
+ this.determinePlayerCanBeShared();
239
+ if (!this.organisationId) {
240
+ return;
241
+ }
242
+ const attributes = await this.getOrgaAttributes(this.organisationId);
243
+ this.noSharing = "true" === attributes.noSharing;
244
+ this.isLoading = false;
245
+ },
246
+ determinePlayerCanBeShared() {
247
+ const emissionAnnot = this.podcast?.emission.annotations ?? this.emission?.annotations;
248
+ if (!emissionAnnot) { return }
249
+ if (emissionAnnot.exclusive) {
250
+ this.playerCanBeSharedOthers = "true" !== emissionAnnot.exclusive;
251
+ }
252
+ if (emissionAnnot.notExclusive) {
253
+ this.playerCanBeSharedAnonymous = "true" === emissionAnnot.notExclusive;
254
+ }
255
+ },
256
+ clickButton(name: string) {
257
+ switch (name) {
258
+ case "link":
259
+ displayHelper.onCopyCode(this.urlPage, this.afterCopy);
260
+ break;
261
+ case "newsletter":
262
+ this.isNewsletterModal = true;
263
+ break;
264
+ case "qrcode":
265
+ this.isQrCodeModal = true;
266
+ break;
267
+ case "rss":
268
+ this.isRssModal = true;
269
+ break;
270
+ case "player":
271
+ this.isPlayerModal = true;
272
+ break;
273
+ default:
274
+ break;
275
+ }
276
+ },
277
+ afterCopy(): void {
278
+ if (!this.lazyLoadingSnackbar) {
279
+ this.lazyLoadingSnackbar = true;
280
+ setTimeout(() => {
281
+ this.afterCopy();
282
+ }, 500);
283
+ } else {
284
+ (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
285
+ this.$t("Link in clipboard"),
286
+ );
287
+ }
288
+ },
289
+ }
290
+ });
291
+ </script>
@@ -0,0 +1,216 @@
1
+ <template>
2
+ <div class="d-flex flex-column align-items-center">
3
+ <div class="d-flex flex-grow-1">
4
+ <div class="d-flex flex-column flex-shrink-0 me-3">
5
+ <h2 class="mb-3">
6
+ {{ $t("Configure your Newsletter tile") }}
7
+ </h2>
8
+ <div
9
+ v-for="colors in arrayColors"
10
+ :key="colors.mainText"
11
+ class="d-flex align-items-center mb-3"
12
+ >
13
+ <VSwatches
14
+ v-model="colors.color"
15
+ class="c-hand me-2"
16
+ show-fallback
17
+ fallback-input-type="color"
18
+ colors="text-advanced"
19
+ popover-to="right"
20
+ :data-color="colors.color"
21
+ />
22
+ <div class="d-flex flex-column">
23
+ <div class="fw-bold">{{ colors.mainText }}</div>
24
+ <div v-if="colors.secondText" class="description-text">
25
+ {{ colors.secondText }}
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ <!-- eslint-disable vue/no-v-html -->
31
+ <div class="border p-3" v-html="newsletterHtml" />
32
+ <!-- eslint-enable -->
33
+ </div>
34
+ <button
35
+ class="btn btn-primary w-fit-content my-3"
36
+ @click="onCopyCode(newsletterHtml, afterCopy)"
37
+ >
38
+ {{ $t("Copy code") }}
39
+ </button>
40
+ <div>{{ $t("And paste it in your newsletter") }}</div>
41
+ <SnackBar ref="snackbar" position="bottom-left" />
42
+ </div>
43
+ </template>
44
+
45
+ <script lang="ts">
46
+ import SnackBar from "../../misc/SnackBar.vue";
47
+ import { VSwatches } from "vue3-swatches";
48
+ import "vue3-swatches/dist/style.css";
49
+ import displayHelper from "../../../helper/displayHelper";
50
+ import { Podcast } from "@/stores/class/general/podcast";
51
+ import { defineComponent } from "vue";
52
+ import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
53
+ import { useAuthStore } from "../../../stores/AuthStore";
54
+ import { mapState, mapActions } from "pinia";
55
+ import { Emission } from "@/stores/class/general/emission";
56
+ import { Playlist } from "@/stores/class/general/playlist";
57
+ export default defineComponent({
58
+ name: "SahreNewsletter",
59
+
60
+ components: {
61
+ SnackBar,
62
+ VSwatches,
63
+ },
64
+
65
+ props: {
66
+ podcast: { default: undefined, type: Object as () => Podcast },
67
+ emission: { default: undefined, type: Object as () => Emission },
68
+ playlist: { default: undefined, type: Object as () => Playlist },
69
+ },
70
+
71
+ emits: ["close"],
72
+
73
+ data() {
74
+ return {
75
+ arrayColors: [
76
+ {
77
+ color: "#40a372",
78
+ mainText: this.$t("Choose main color"),
79
+ secondText: this.$t("Newsletter elements"),
80
+ },
81
+ { color: "#000000", mainText: this.$t("Choose text color") },
82
+ { color: "#FFFFFF", mainText: this.$t("Choose background color") },
83
+ ],
84
+ shareUrl: window.location.href,
85
+ };
86
+ },
87
+ computed: {
88
+ ...mapState(useAuthStore, ["authOrgaId"]),
89
+ newsletterInfo() {
90
+ if (this.podcast) {
91
+ return {
92
+ imageUrl: `${this.podcast.imageUrl}" alt="${this.$t(
93
+ "Episode name image",
94
+ { name: this.podcast.title },
95
+ )}`,
96
+ title: this.podcast.title,
97
+ description: this.podcast.description ?? "",
98
+ shareText: this.$t("Listen this episode"),
99
+ emissionHtml: `<tr><td style="padding:5px 0;">
100
+ <div style="display:flex; margin-top:5px;">
101
+ <div style="font-size:20px; color:${
102
+ this.arrayColors[1].color
103
+ }; margin-right:5px;text-wrap: nowrap;">${this.$t("Emission")} :</div>
104
+ <a href="${this.shareUrl}" style="font-size: 18px;color: ${
105
+ this.arrayColors[0].color
106
+ };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${
107
+ this.podcast.emission.name
108
+ }</a>
109
+ </div></td></tr>`,
110
+ articleHtml:
111
+ !this.podcast?.article || 0 === this.podcast.article?.length
112
+ ? ``
113
+ : `<tr><td style="padding:5px 0;">
114
+ <div style="display:flex;">
115
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M7 17h7v-2H7zm0-4h10v-2H7zm0-4h10V7H7zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zM5 5v14z"/></svg>
116
+ <a href="${this.podcast.article}" style="color: ${
117
+ this.arrayColors[1].color
118
+ };margin-top:2px">${this.$t("See associated article")}</a>
119
+ </div></td></tr>
120
+ `,
121
+ colorTitle: `color:${this.arrayColors[1].color};`,
122
+ };
123
+ }
124
+ if (this.emission) {
125
+ return {
126
+ imageUrl: `${this.emission.imageUrl}" alt="${this.$t(
127
+ "Emission image",
128
+ )}`,
129
+ title: this.emission.name,
130
+ description: this.emission.description ?? "",
131
+ shareText: this.$t("Listen to all episodes"),
132
+ emissionHtml: ``,
133
+ articleHtml: ``,
134
+ colorTitle: `color:${this.arrayColors[0].color};`,
135
+ };
136
+ }
137
+ return {
138
+ imageUrl: `${this.playlist?.imageUrl}" alt="${this.$t(
139
+ "Playlist image",
140
+ )}`,
141
+ title: this.playlist?.title,
142
+ description: this.playlist?.description ?? "",
143
+ shareText: this.$t("Listen to all episodes"),
144
+ emissionHtml: ``,
145
+ articleHtml: ``,
146
+ colorTitle: `color:${this.arrayColors[0].color};`,
147
+ };
148
+ },
149
+ newsletterHtml(): string {
150
+ return `<table style="background:${this.arrayColors[2].color};color:${
151
+ this.arrayColors[1].color
152
+ };table-layout: fixed;width:100%;font-size: 14px;">
153
+ <tr>
154
+ <td valign="top" width="30%" rowspan="7" style="padding-right:5px;"><img width="100%" src="${
155
+ this.newsletterInfo.imageUrl
156
+ }" style="border-radius: 4px;"></td>
157
+ <td valign="top" width="70%" style="padding:5px 0;"><div style="margin-top:5px;font-size: 24px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight:bold;${
158
+ this.newsletterInfo.colorTitle
159
+ }">${this.newsletterInfo.title}</div></td>
160
+ </tr>${this.newsletterInfo.emissionHtml}
161
+ <tr><td style="padding:5px 0;"><div style="overflow: hidden;display: -webkit-box;-webkit-line-clamp: 6;-webkit-box-orient: vertical;word-break: break-word;">${
162
+ this.newsletterInfo.description
163
+ }</div></td></tr>
164
+ <tr><td valign="top" style="padding:5px 0;"><a href="${
165
+ this.shareUrl
166
+ }" style="color: ${this.arrayColors[0].color};">${this.$t(
167
+ "See more",
168
+ )}</a></td></tr>
169
+ <tr>${this.newsletterInfo.articleHtml}
170
+ <td width="1" style="padding:5px 0;"><a href="${
171
+ this.shareUrl
172
+ }" style="font-size: 18px;color: ${
173
+ this.arrayColors[0].color
174
+ };text-decoration: none; display:flex;"><svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 24 24"><path fill="currentColor" d="m9.5 16.5l7-4.5l-7-4.5zM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22"/></svg><div style="margin-top: 15px; color:${
175
+ this.arrayColors[1].color
176
+ };">${this.newsletterInfo.shareText}</div></a></td>
177
+ </tr>
178
+ </table>
179
+ `;
180
+ },
181
+ },
182
+ created() {
183
+ this.initData();
184
+ },
185
+ methods: {
186
+ ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
187
+ onCopyCode(link: string, callback: () => void){
188
+ displayHelper.onCopyCode(link, callback);
189
+ },
190
+ afterCopy(): void {
191
+ (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
192
+ this.$t("Data in clipboard"),
193
+ );
194
+ },
195
+ async initData(): Promise<void> {
196
+ const orgaId = this.authOrgaId;
197
+ if (!orgaId?.length) {
198
+ return;
199
+ }
200
+ const attributes = await this.getOrgaAttributes(orgaId ?? "");
201
+ if (
202
+ Object.hasOwn(attributes, "podcastmakerUrl") &&
203
+ (attributes.podcastmakerUrl as string | undefined | null)?.length
204
+ ) {
205
+ this.shareUrl =
206
+ attributes.podcastmakerUrl +
207
+ window.location.pathname +
208
+ window.location.search;
209
+ }
210
+ if (Object.hasOwn(attributes, "COLOR")) {
211
+ this.arrayColors[0].color = attributes.COLOR as string;
212
+ }
213
+ },
214
+ },
215
+ });
216
+ </script>
@@ -0,0 +1,110 @@
1
+ <template>
2
+ <section v-if="!isLoading && !isGarRole && (authOrgaId || !noSharing)" id="share-buttons-podcast-section" class="module-box">
3
+ <h3 class="mb-2">
4
+ {{ $t("Share in one click") }}
5
+ </h3>
6
+ <div class="d-flex align-items-center">
7
+ <template v-for="button in arrayShareButtons" :key="button.title">
8
+ <a
9
+ v-if="button.condition"
10
+ rel="noreferrer noopener"
11
+ target="_blank"
12
+ :href="button.url"
13
+ class="btn share-btn mb-2 text-dark me-2"
14
+ :title="$t('New window', {text: button.title})"
15
+ >
16
+ <component :is="button.icon" :size="34" />
17
+ </a>
18
+ </template>
19
+ <slot name="additional-buttons"/>
20
+ </div>
21
+ </section>
22
+ </template>
23
+
24
+ <script lang="ts">
25
+ import XIcon from "../../icons/XIcon.vue";
26
+ import BlueSkyIcon from "../../icons/BlueSkyIcon.vue";
27
+ import WhatsappIcon from "vue-material-design-icons/Whatsapp.vue";
28
+ import LinkedinIcon from "vue-material-design-icons/Linkedin.vue";
29
+ import FacebookIcon from "vue-material-design-icons/Facebook.vue";
30
+ import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
31
+ import { mapActions, mapState } from "pinia";
32
+ import { useAuthStore } from "../../../stores/AuthStore";
33
+ import { defineComponent } from "vue";
34
+
35
+ export default defineComponent({
36
+ components: {
37
+ FacebookIcon,
38
+ LinkedinIcon,
39
+ WhatsappIcon,
40
+ XIcon,
41
+ BlueSkyIcon
42
+ },
43
+ props: {
44
+ organisationId: { default: undefined, type: String },
45
+ },
46
+ data() {
47
+ return {
48
+ noSharing: true as boolean,
49
+ isLoading: true as boolean,
50
+ };
51
+ },
52
+ computed: {
53
+ ...mapState(useAuthStore, [
54
+ "isGarRole",
55
+ "authOrgaId"
56
+ ]),
57
+ arrayShareButtons() {
58
+ return [
59
+ {
60
+ title: "Facebook",
61
+ icon: "FacebookIcon",
62
+ url: `https://www.facebook.com/sharer/sharer.php?u=${this.urlPage}`,
63
+ condition: true,
64
+ },
65
+ {
66
+ title: "X",
67
+ icon: "XIcon",
68
+ url: `https://twitter.com/intent/tweet?text=${this.urlPage}`,
69
+ condition: true,
70
+ },
71
+ {
72
+ title: "Linkedin",
73
+ icon: "LinkedinIcon",
74
+ url: `https://www.linkedin.com/sharing/share-offsite/?url=${this.urlPage}`,
75
+ condition: true,
76
+ },
77
+ {
78
+ title: "Bluesky",
79
+ icon: "BlueSkyIcon",
80
+ url: `https://bsky.app/intent/compose?text=${this.urlPage}`,
81
+ condition: true,
82
+ },
83
+ {
84
+ title: "Whatsapp",
85
+ icon: "WhatsappIcon",
86
+ url: `whatsapp://send?text=${this.urlPage}`,
87
+ condition: window.matchMedia("(hover: none)").matches,
88
+ },
89
+ ];
90
+ },
91
+ urlPage(): string {
92
+ return window.location.href;
93
+ },
94
+ },
95
+ created() {
96
+ this.initShareButtons();
97
+ },
98
+ methods: {
99
+ ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
100
+ async initShareButtons() {
101
+ if (!this.organisationId) {
102
+ return;
103
+ }
104
+ const attributes = await this.getOrgaAttributes(this.organisationId);
105
+ this.noSharing = "true" === attributes.noSharing;
106
+ this.isLoading = false;
107
+ },
108
+ },
109
+ });
110
+ </script>
@@ -116,6 +116,8 @@ export default defineComponent({
116
116
  return {
117
117
  hiddenLinks: [] as Array<Link>,
118
118
  lastWindowWidth: 420 as number,
119
+ exclusive: false as boolean,
120
+ notExclusive: false as boolean,
119
121
  };
120
122
  },
121
123
  computed: {
@@ -89,6 +89,9 @@ export default defineComponent({
89
89
  border-bottom: solid 1px var(--octopus-border-default);
90
90
  background-color: var(--octopus-background);
91
91
  }
92
+ .octopus-nav.light .octopus-tab-content{
93
+ border-top: solid 1px var(--octopus-border-default);
94
+ }
92
95
 
93
96
 
94
97
  .octopus-nav.light .octopus-nav-item {
@@ -122,10 +125,13 @@ export default defineComponent({
122
125
  }
123
126
 
124
127
  .octopus-nav.light .octopus-nav-link {
125
- border-top: 0 !important;
126
- border-right: 0 !important;
127
- border-left: 0 !important;
128
128
  font-weight: bold;
129
+ background:var(--octopus-border-default);
130
+ &.active{
131
+ border-bottom-color: var(--octopus-primary);
132
+ background: transparent;
133
+ color: var(--octopus-primary);
134
+ }
129
135
  }
130
136
 
131
137
 
@@ -245,7 +245,7 @@ export default defineComponent({
245
245
  return;
246
246
  }
247
247
  //Exception timepicker in popover
248
- var result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
248
+ const result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
249
249
  if (-1!==result) {
250
250
  return;
251
251
  }