@saooti/octopus-sdk 40.2.4 → 40.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "40.2.4",
3
+ "version": "40.2.5",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -47,6 +47,7 @@ import "vue3-swatches/dist/style.css";
47
47
  import { Podcast } from "@/stores/class/general/podcast";
48
48
  import { defineComponent } from "vue";
49
49
  import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
50
+ import { useFilterStore } from "../../../stores/FilterStore";
50
51
  import { useAuthStore } from "../../../stores/AuthStore";
51
52
  import { mapState, mapActions } from "pinia";
52
53
  import { Emission } from "@/stores/class/general/emission";
@@ -78,11 +79,25 @@ export default defineComponent({
78
79
  { color: "#000000", mainText: this.$t("Choose text color") },
79
80
  { color: "#FFFFFF", mainText: this.$t("Choose background color") },
80
81
  ],
81
- shareUrl: window.location.href,
82
+ shareUrl: window.location.origin,
82
83
  };
83
84
  },
84
85
  computed: {
86
+ ...mapState(useFilterStore, ["filterOrgaId"]),
85
87
  ...mapState(useAuthStore, ["authOrgaId"]),
88
+ pathShare(){
89
+ const orga = this.filterOrgaId ? "?productor="+this.filterOrgaId : "";
90
+ if(this.podcast){
91
+ return "/main/pub/podcast/"+ this.podcast.podcastId + orga
92
+ }
93
+ if(this.emission){
94
+ return "/main/pub/emission/"+ this.emission.emissionId + orga
95
+ }
96
+ if(this.playlist){
97
+ return "/main/pub/playlist/"+ this.playlist.playlistId + orga
98
+ }
99
+ return "";
100
+ },
86
101
  newsletterInfo() {
87
102
  if (this.podcast) {
88
103
  return {
@@ -98,7 +113,7 @@ export default defineComponent({
98
113
  <div style="font-size:16px; color:${
99
114
  this.arrayColors[1].color
100
115
  }; margin-right:5px;text-wrap: nowrap;">${this.$t("Emission")} :</div>
101
- <a href="${this.shareUrl}" style="font-size: 16px;color: ${
116
+ <a href="${this.shareUrl+this.pathShare}" style="font-size: 16px;color: ${
102
117
  this.arrayColors[0].color
103
118
  };overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${
104
119
  this.podcast.emission.name
@@ -159,13 +174,13 @@ export default defineComponent({
159
174
  this.newsletterInfo.description
160
175
  }</div></td></tr>
161
176
  <tr><td valign="top" style="padding:5px 0;"><a href="${
162
- this.shareUrl
177
+ this.shareUrl+this.pathShare
163
178
  }" style="color: ${this.arrayColors[0].color};">${this.$t(
164
179
  "See more",
165
180
  )}</a></td></tr>
166
181
  <tr>${this.newsletterInfo.articleHtml}
167
182
  <td width="1" style="padding:5px 0;"><a href="${
168
- this.shareUrl
183
+ this.shareUrl+this.pathShare
169
184
  }" style="font-size: 18px;color: ${
170
185
  this.arrayColors[0].color
171
186
  };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:${
@@ -191,10 +206,7 @@ export default defineComponent({
191
206
  Object.hasOwn(attributes, "podcastmakerUrl") &&
192
207
  (attributes.podcastmakerUrl as string | undefined | null)?.length
193
208
  ) {
194
- this.shareUrl =
195
- attributes.podcastmakerUrl +
196
- window.location.pathname +
197
- window.location.search;
209
+ this.shareUrl = attributes.podcastmakerUrl?.toString() ?? window.location.origin;
198
210
  }
199
211
  if (Object.hasOwn(attributes, "COLOR")) {
200
212
  this.arrayColors[0].color = attributes.COLOR as string;