@saooti/octopus-sdk 30.0.79 → 30.0.82

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/README.md CHANGED
@@ -575,4 +575,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
575
575
  * 30.0.76 Space
576
576
  * 30.0.77 V-Calendar bloque version
577
577
  * 30.0.78 a -> word-break
578
- * 30.0.79 DownloadId player
578
+ * 30.0.79 DownloadId player
579
+ * 30.0.80 DownloadId player
580
+ * 30.0.81 DownloadId player
581
+ * 30.0.82 Cherry pick Color Qr code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "30.0.79",
3
+ "version": "30.0.82",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -8,6 +8,13 @@
8
8
  class="myQrCode"
9
9
  :margin="2"
10
10
  />
11
+ <ClassicCheckbox
12
+ v-if="'#000000'!==otherColor"
13
+ v-model:textInit="isNotBlack"
14
+ class="flex-shrink-0"
15
+ id-checkbox="is-black-qr-code"
16
+ :label="$t('Use organization color')"
17
+ />
11
18
  <button
12
19
  class="btn m-3"
13
20
  @click="download"
@@ -22,6 +29,7 @@
22
29
  </template>
23
30
 
24
31
  <script lang="ts">
32
+ import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
25
33
  import { state } from '../../../store/paramStore';
26
34
  import octopusApi from '@saooti/octopus-api';
27
35
  import Snackbar from '../../misc/Snackbar.vue';
@@ -33,7 +41,8 @@ export default defineComponent({
33
41
 
34
42
  components: {
35
43
  Snackbar,
36
- QrcodeVue
44
+ QrcodeVue,
45
+ ClassicCheckbox
37
46
  },
38
47
  props: {
39
48
  url: { default: '', type: String},
@@ -42,7 +51,9 @@ export default defineComponent({
42
51
  data() {
43
52
  return {
44
53
  size: 200 as number,
45
- color: "#40a372" as string
54
+ color: "#000000" as string,
55
+ otherColor:"#000000" as string,
56
+ isNotBlack: false as boolean,
46
57
  };
47
58
  },
48
59
  computed:{
@@ -50,6 +61,15 @@ export default defineComponent({
50
61
  return (state.generalParameters.authenticated as boolean);
51
62
  },
52
63
  },
64
+ watch:{
65
+ isNotBlack(){
66
+ if(this.isNotBlack){
67
+ this.color = this.otherColor;
68
+ }else{
69
+ this.color = "#000000";
70
+ }
71
+ }
72
+ },
53
73
  created(){
54
74
  this.initColor();
55
75
  },
@@ -66,7 +86,7 @@ export default defineComponent({
66
86
  },
67
87
  async initColor(): Promise<void> {
68
88
  if(state.generalParameters.podcastmaker && state.generalParameters.podcastmakerColor){
69
- this.color = state.generalParameters.podcastmakerColor;
89
+ this.otherColor = state.generalParameters.podcastmakerColor;
70
90
  return;
71
91
  }
72
92
  if (!this.authenticated) return;
@@ -79,7 +99,7 @@ export default defineComponent({
79
99
  );
80
100
  }
81
101
  if (Object.prototype.hasOwnProperty.call(data,'COLOR')) {
82
- this.color = data.COLOR;
102
+ this.otherColor = data.COLOR;
83
103
  }
84
104
  },
85
105
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <div class="module-box text-center-mobile">
3
+ <div class="module-box text-center-mobile overflow-visible">
4
4
  <h3>{{ $t('Embed') }}</h3>
5
5
  <template v-if="!exclusive && (authenticated || notExclusive)">
6
6
  <div class="d-flex flex-column align-items-center">
@@ -151,7 +151,7 @@ export default defineComponent({
151
151
  'distributorId=' + this.$store.state.authentication.organisationId
152
152
  );
153
153
  }
154
- return '?' + parameters.join('&');
154
+ return this.podcast.podcastId+'.mp3?' + parameters.join('&');
155
155
  },
156
156
  organisationId(): string|undefined {
157
157
  return state.generalParameters.organisationId;
@@ -208,8 +208,7 @@ export default defineComponent({
208
208
  this.audioUrlToPlay = this.audioUrl;
209
209
  }
210
210
  if(!this.podcast){return;}
211
- const response = await octopusApi.fetchPodcastDownloadUrl("podcast/download/register/"+this.podcast.podcastId+".mp3"+ this.audioUrl);
212
- this.setCookie("player_"+this.podcast.podcastId, response.downloadId.toString(), ';domain='+this.getDomain());
211
+ const response = await octopusApi.fetchPodcastDownloadUrl("podcast/download/register/"+ this.audioUrl);
213
212
  this.setDownloadId(response.downloadId.toString());
214
213
  this.audioUrlToPlay = response.location;
215
214
  }
@@ -268,9 +267,9 @@ export default defineComponent({
268
267
  this.downloadId = newValue;
269
268
  },
270
269
  onError(): void {
271
- if (this.podcast && !this.listenError) {
270
+ if (this.podcast && ""!==this.audioUrlToPlay && !this.listenError) {
272
271
  this.listenError = true;
273
- } else if (this.podcast || this.media) {
272
+ } else if ((this.podcast && ""!==this.audioUrlToPlay ) || this.media) {
274
273
  this.playerError = true;
275
274
  }
276
275
  },
@@ -278,7 +277,7 @@ export default defineComponent({
278
277
  const mediaTarget = (event.currentTarget as HTMLMediaElement);
279
278
  if (this.podcast || this.live) {
280
279
  if (!this.getDownloadId()) {
281
- this.loadDownloadId();
280
+ return;
282
281
  }
283
282
  if (
284
283
  this.live &&
@@ -339,29 +338,17 @@ export default defineComponent({
339
338
  this.forceHide = false;
340
339
  }
341
340
  },
342
- loadDownloadId(): void {
343
- if (!this.podcast) return;
344
- const matching_cookies = document.cookie
345
- .split(';')
346
- .map(item => {
347
- const _return = item.trim().split('=');
348
- return _return.map(item => item.trim());
349
- })
350
- .filter(item => {
351
- if(!this.podcast){return '';}
352
- return 'player_' + this.podcast.podcastId === item[0];
353
- });
354
- if (1 === matching_cookies.length) {
355
- this.setDownloadId(matching_cookies[0][1]);
356
- }
357
- },
358
341
  async endListeningProgress(): Promise<void> {
359
342
  if (!this.getDownloadId()) return;
360
- await octopusApi.updatePlayerTime(
361
- this.getDownloadId(),
362
- Math.round(this.listenTime)
363
- );
364
- this.setDownloadId(null);
343
+ try {
344
+ await octopusApi.updatePlayerTime(
345
+ this.getDownloadId(),
346
+ Math.round(this.listenTime)
347
+ );
348
+ } catch{
349
+ //Do nothing
350
+ }
351
+ this.downloadId = null;
365
352
  this.notListenTime = 0;
366
353
  this.lastSend = 0;
367
354
  this.listenTime = 0;
package/src/locale/de.ts CHANGED
@@ -297,4 +297,7 @@ export default{
297
297
  'From RSS': "Aus RSS-Feed",
298
298
  "User menu":"Benutzermenü",
299
299
  'Podcast tags': "Podcast-Tags",
300
+ "Enlarge":"Vergrößern",
301
+ "Reduce":"Reduzieren",
302
+ "Use organization color":"Verwenden Sie die Organisationsfarbe",
300
303
  }
package/src/locale/en.ts CHANGED
@@ -297,4 +297,8 @@ export default{
297
297
  'From RSS': "From an RSS feed",
298
298
  "User menu":"User menu",
299
299
  'Podcast tags': 'Podcast tags',
300
+ "You do not have the right to access this page":"You do not have the right to access this page",
301
+ "Enlarge":"Enlarge",
302
+ "Reduce":"Reduce",
303
+ "Use organization color":"Use organization color",
300
304
  };
package/src/locale/es.ts CHANGED
@@ -297,4 +297,7 @@ export default{
297
297
  'From RSS': "Desde un canal RSS",
298
298
  "User menu":"Menú de usuario",
299
299
  'Podcast tags': 'Etiquetas de pódcast',
300
+ "Enlarge":"Agrandar",
301
+ "Reduce":"Reducir",
302
+ "Use organization color":"Usar el color de la organización",
300
303
  }
package/src/locale/fr.ts CHANGED
@@ -297,4 +297,8 @@ export default{
297
297
  'From RSS': "Issu d'un flux RSS",
298
298
  "User menu":"Menu utilisateur",
299
299
  'Podcast tags': "Mot-clé de l'épisode",
300
+ "You do not have the right to access this page":"Vous n’avez pas le droit d’accéder à cette page",
301
+ "Enlarge":"Agrandir",
302
+ "Reduce":"Réduire",
303
+ "Use organization color":"Utiliser la couleur de l'organisation",
300
304
  };
package/src/locale/it.ts CHANGED
@@ -295,4 +295,7 @@ export default{
295
295
  'Podcast tags': 'Tag podcast',
296
296
  "Term of use":"Termini d'uso",
297
297
  'More episodes of this category : ': "Altri episodi su questo tema : {name}",
298
+ "Enlarge":"Ingrandire",
299
+ "Reduce":"Ridurre",
300
+ "Use organization color":"Usa il colore dell'organizzazione",
298
301
  };
package/src/locale/sl.ts CHANGED
@@ -297,4 +297,7 @@ export default{
297
297
  'From RSS': "Z vira RSS",
298
298
  "User menu":"Uporabniški meni",
299
299
  'Podcast tags': 'Oznake podkastov',
300
+ "Enlarge":"Povečaj",
301
+ "Reduce":"Zmanjšaj",
302
+ "Use organization color":"Uporabite barvo organizacije",
300
303
  }