@saooti/octopus-sdk 31.0.26 → 31.0.29

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 (59) hide show
  1. package/README.md +7 -1
  2. package/package.json +2 -1
  3. package/src/assets/bootstrap-diff.scss +3 -34
  4. package/src/assets/general.scss +0 -1
  5. package/src/assets/share.scss +3 -0
  6. package/src/components/display/comments/AddCommentModal.vue +1 -1
  7. package/src/components/display/comments/CommentInput.vue +2 -2
  8. package/src/components/display/comments/CommentItem.vue +1 -1
  9. package/src/components/display/comments/CommentList.vue +1 -1
  10. package/src/components/display/emission/EmissionInlineList.vue +1 -1
  11. package/src/components/display/emission/EmissionList.vue +1 -1
  12. package/src/components/display/live/LiveHorizontalList.vue +1 -1
  13. package/src/components/display/playlist/PlaylistList.vue +1 -1
  14. package/src/components/display/playlist/PodcastList.vue +1 -1
  15. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
  16. package/src/components/display/podcasts/PodcastImage.vue +15 -9
  17. package/src/components/display/podcasts/PodcastInlineList.vue +43 -309
  18. package/src/components/display/podcasts/PodcastInlineListClassic.vue +246 -0
  19. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +158 -0
  20. package/src/components/display/podcasts/PodcastList.vue +1 -1
  21. package/src/components/display/podcasts/PodcastModuleBox.vue +3 -26
  22. package/src/components/display/podcasts/PodcastSwiperList.vue +209 -0
  23. package/src/components/display/sharing/ShareButtons.vue +1 -1
  24. package/src/components/display/sharing/ShareDistribution.vue +1 -1
  25. package/src/components/display/sharing/SharePlayer.vue +58 -97
  26. package/src/components/display/sharing/SharePlayerColors.vue +17 -15
  27. package/src/components/display/sharing/SharePlayerTypes.vue +15 -32
  28. package/src/components/display/sharing/SubscribeButtons.vue +44 -200
  29. package/src/components/form/ClassicCheckbox.vue +8 -8
  30. package/src/components/form/ClassicRadio.vue +9 -9
  31. package/src/components/form/ClassicSearch.vue +29 -29
  32. package/src/components/form/ClassicSelect.vue +12 -15
  33. package/src/components/misc/ErrorMessage.vue +6 -8
  34. package/src/components/misc/Footer.vue +63 -95
  35. package/src/components/misc/LeftMenu.vue +41 -89
  36. package/src/components/misc/Snackbar.vue +1 -1
  37. package/src/components/misc/TopBar.vue +41 -82
  38. package/src/components/misc/modal/ClipboardModal.vue +2 -9
  39. package/src/components/misc/modal/MessageModal.vue +3 -4
  40. package/src/components/misc/modal/NewsletterModal.vue +1 -1
  41. package/src/components/misc/modal/QrCodeModal.vue +2 -12
  42. package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
  43. package/src/components/misc/player/PlayerCompact.vue +3 -3
  44. package/src/components/mixins/orgaComputed.ts +15 -0
  45. package/src/components/pages/Emission.vue +43 -86
  46. package/src/components/pages/Emissions.vue +27 -73
  47. package/src/components/pages/Error403Page.vue +1 -1
  48. package/src/components/pages/Home.vue +5 -12
  49. package/src/components/pages/Lives.vue +1 -6
  50. package/src/components/pages/Participant.vue +34 -48
  51. package/src/components/pages/Participants.vue +10 -28
  52. package/src/components/pages/Playlist.vue +20 -31
  53. package/src/components/pages/Playlists.vue +5 -15
  54. package/src/components/pages/Podcast.vue +95 -116
  55. package/src/components/pages/Podcasts.vue +34 -93
  56. package/src/components/pages/Rubrique.vue +6 -17
  57. package/src/components/pages/Search.vue +16 -36
  58. package/src/sass/_variables.scss +1 -1
  59. package/src/store/paramStore.ts +13 -11
@@ -7,7 +7,7 @@
7
7
  <input
8
8
  type="button"
9
9
  :value="$t('Copy')"
10
- class="btn btn-link"
10
+ class="btn btn-primary"
11
11
  :title="$t('Copy')"
12
12
  @click="onCopyCode(rss, afterCopy)"
13
13
  >
@@ -16,26 +16,18 @@
16
16
  :src="iFrameSrc"
17
17
  scrolling="no"
18
18
  frameborder="0"
19
- :width="iFrameWidth"
19
+ width="100%"
20
20
  :height="iFrameHeight"
21
21
  class="max-iframe my-2"
22
22
  />
23
- <div class="d-flex flex-column">
24
- <button
25
- class="btn mb-3"
26
- @click="isShareModal = true"
27
- >
28
- {{ $t('Share the player') }}
29
- </button>
30
- <SharePlayerTypes
31
- v-if="!isLiveReadyToRecord"
32
- v-model:iFrameModel="iFrameModel"
33
- :podcast="podcast"
34
- :emission="emission"
35
- :playlist="playlist"
36
- :organisation-id="organisationId"
37
- />
38
- </div>
23
+ <SharePlayerTypes
24
+ v-if="!isLiveReadyToRecord"
25
+ v-model:iFrameModel="iFrameModel"
26
+ :podcast="podcast"
27
+ :emission="emission"
28
+ :playlist="playlist"
29
+ :organisation-id="organisationId"
30
+ />
39
31
  <SharePlayerColors
40
32
  v-model:color="color"
41
33
  v-model:theme="theme"
@@ -52,12 +44,20 @@
52
44
  :is-visible="isVisible"
53
45
  :chose-number-episode="displayChoiceAllEpisodes|| isLargeSuggestion"
54
46
  :display-choice-all-episodes="displayChoiceAllEpisodes"
55
- @displayArticle="updateDisplayArticle"
56
- @episodeNumbers="updateEpisodeNumber"
57
- @proceedReading="updateProceedReading"
58
- @isVisible="updateIsVisible"
59
- @iFrameNumber="updateIframeNumber"
47
+ @displayArticle="displayArticle = $event"
48
+ @episodeNumbers="episodeNumbers = $event"
49
+ @proceedReading="proceedReading = $event"
50
+ @isVisible="isVisible = $event"
51
+ @iFrameNumber="iFrameNumber = $event"
60
52
  />
53
+ <div class="d-flex flex-column align-items-center mt-3">
54
+ <button
55
+ class="btn btn-primary mb-3"
56
+ @click="isShareModal = true"
57
+ >
58
+ {{ $t('Share the player') }}
59
+ </button>
60
+ </div>
61
61
  </template>
62
62
  <div v-else-if="exclusive && authenticated">
63
63
  {{ $t('Only organisation members can share the content') }}
@@ -236,27 +236,18 @@ export default defineComponent({
236
236
  }
237
237
  return url.join('');
238
238
  },
239
- iFrameWidth(): string {
240
- return '100%';
241
- },
242
239
  iFrameHeight(): string {
243
240
  switch (this.iFrameModel) {
244
241
  case 'large':
245
242
  if (this.podcast) return '180px';
246
243
  if ('number' === this.episodeNumbers) {
247
244
  switch (this.iFrameNumber.toString()) {
248
- case '1':
249
- return '270px';
250
- case '2':
251
- return '320px';
252
- case '3':
253
- return '360px';
254
- case '4':
255
- return '420px';
256
- case '5':
257
- return '420px';
258
- default:
259
- return '420px';
245
+ case '1': return '270px';
246
+ case '2': return '320px';
247
+ case '3': return '360px';
248
+ case '4': return '420px';
249
+ case '5': return '420px';
250
+ default: return '420px';
260
251
  }
261
252
  }
262
253
  return '435px';
@@ -264,28 +255,21 @@ export default defineComponent({
264
255
  case 'largeSuggestion':
265
256
  if ('number' !== this.episodeNumbers) return '510px';
266
257
  switch (this.iFrameNumber.toString()) {
267
- case '1':
268
- return '315px';
269
- case '2':
270
- return '365px';
271
- case '3':
272
- return '420px';
273
- case '4':
274
- return '470px';
275
- case '5':
276
- return '470px';
277
- default:
278
- return '470px';
258
+ case '1':return '315px';
259
+ case '2':return '365px';
260
+ case '3':return '420px';
261
+ case '4':return '470px';
262
+ case '5':return '470px';
263
+ default:return '470px';
279
264
  }
280
- case 'emission':
281
- return '530px';
265
+ case 'emission':return '530px';
282
266
  default:
283
267
  if (this.podcast) return '520px';
284
268
  return '530px';
285
269
  }
286
270
  },
287
271
  iFrame(): string {
288
- return `<iframe src="${this.iFrameSrc}" width="${this.iFrameWidth}" height="${this.iFrameHeight}" scrolling="no" frameborder="0"></iframe>`;
272
+ return `<iframe src="${this.iFrameSrc}" width="100%" height="${this.iFrameHeight}" scrolling="no" frameborder="0"></iframe>`;
289
273
  },
290
274
  isPodcastNotVisible(): boolean {
291
275
  return (
@@ -321,32 +305,9 @@ export default defineComponent({
321
305
  state.generalParameters.organisationId ? state.generalParameters.organisationId : ""
322
306
  );
323
307
  }
324
- if (Object.prototype.hasOwnProperty.call(data,'COLOR')) {
325
- this.color = data.COLOR;
326
- } else {
327
- this.color = '#40a372';
328
- }
329
- if (Object.prototype.hasOwnProperty.call(data,'THEME')) {
330
- this.theme = data.THEME;
331
- } else {
332
- this.theme = '#000000';
333
- }
334
- },
335
- updateEpisodeNumber(value: string): void {
336
- this.episodeNumbers = value;
308
+ this.color = Object.prototype.hasOwnProperty.call(data,'COLOR') ? data.COLOR : '#40a372';
309
+ this.theme = Object.prototype.hasOwnProperty.call(data,'THEME') ? data.THEME : '#000000';
337
310
  },
338
- updateProceedReading(value: boolean): void {
339
- this.proceedReading = value;
340
- },
341
- updateIframeNumber(value: string): void {
342
- this.iFrameNumber = value;
343
- },
344
- updateIsVisible(value: boolean): void {
345
- this.isVisible = value;
346
- },
347
- updateDisplayArticle(value: boolean): void{
348
- this.displayArticle = value;
349
- }
350
311
  },
351
312
  })
352
313
  </script>
@@ -354,26 +315,26 @@ export default defineComponent({
354
315
  <style lang="scss">
355
316
  @import '../../../sass/_variables.scss';
356
317
  .octopus-app{
357
- .sticker {
358
- align-self: center;
359
- background: $octopus-primary-dark;
360
- padding: 0.5rem;
361
- transition: all 0.5s ease;
362
- color: white;
363
- font-weight: bold;
364
- letter-spacing: 1px;
365
- outline: none;
366
- box-shadow: 10px 10px 34px -15px hsla(0, 0%, 0%, 0.4);
367
- border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
368
- border: solid 2px #41403e;
369
- &:hover {
370
- box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, 0.3);
371
- background: transparent;
372
- color: $octopus-primary-dark;
318
+ .sticker {
319
+ align-self: center;
320
+ background: $octopus-primary-dark;
321
+ padding: 0.5rem;
322
+ transition: all 0.5s ease;
323
+ color: white;
324
+ font-weight: bold;
325
+ letter-spacing: 1px;
326
+ outline: none;
327
+ box-shadow: 10px 10px 34px -15px hsla(0, 0%, 0%, 0.4);
328
+ border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
329
+ border: solid 2px #41403e;
330
+ &:hover {
331
+ box-shadow: 2px 8px 4px -6px hsla(0, 0%, 0%, 0.3);
332
+ background: transparent;
333
+ color: $octopus-primary-dark;
334
+ }
335
+ }
336
+ .max-iframe {
337
+ max-width: 300px;
373
338
  }
374
- }
375
- .max-iframe {
376
- max-width: 300px;
377
- }
378
339
  }
379
340
  </style>
@@ -47,30 +47,32 @@ export default defineComponent({
47
47
  };
48
48
  },
49
49
  watch:{
50
- color(){
51
- if(this.color !== this.internColor){
52
- this.internColor = this.color;
53
- }
54
- },
55
50
  internColor(){
56
51
  if(this.color !== this.internColor){
57
52
  this.$emit('update:color', this.internColor);
58
53
  }
59
54
  },
60
- theme(){
61
- if(this.theme !== this.internTheme){
62
- this.internTheme = this.theme;
63
- }
64
- },
65
55
  internTheme(){
66
56
  if(this.theme !== this.internTheme ){
67
57
  this.$emit('update:theme', this.internTheme);
68
58
  }
69
- }
59
+ },
60
+ theme: {
61
+ immediate: true,
62
+ handler() {
63
+ if(this.theme !== this.internTheme){
64
+ this.internTheme = this.theme;
65
+ }
66
+ },
67
+ },
68
+ color: {
69
+ immediate: true,
70
+ handler() {
71
+ if(this.color !== this.internColor){
72
+ this.internColor = this.color;
73
+ }
74
+ },
75
+ },
70
76
  },
71
- mounted(){
72
- this.internColor= this.color;
73
- this.internTheme= this.theme;
74
- }
75
77
  })
76
78
  </script>
@@ -10,12 +10,11 @@
10
10
  class="input-no-outline"
11
11
  @change="$emit('update:iFrameModel',$event.target.value)"
12
12
  >
13
- <option value="default">
14
- {{ $t('Default version') }}
15
- </option>
16
- <option value="large">
17
- {{ $t('Large version') }}
18
- </option>
13
+ <template v-for="option in optionsSelect" :key="option.value">
14
+ <option v-if="option.condition" :value="option.value">
15
+ {{ option.name }}
16
+ </option>
17
+ </template>
19
18
  <option
20
19
  v-for="player in customPlayersDisplay"
21
20
  :key="player.customId"
@@ -23,26 +22,6 @@
23
22
  >
24
23
  {{ $t('Custom version') + " «" +player.name+"»" }}
25
24
  </option>
26
- <option
27
- v-if="podcast && podcast.podcastId"
28
- value="emission"
29
- >
30
- {{
31
- $t('Emission version')
32
- }}
33
- </option>
34
- <option
35
- v-if="podcast && podcast.podcastId"
36
- value="emissionLarge"
37
- >
38
- {{ $t('Large emission version') }}
39
- </option>
40
- <option
41
- v-if="podcast && podcast.podcastId"
42
- value="largeSuggestion"
43
- >
44
- {{ $t('Large suggestion version') }}
45
- </option>
46
25
  </select>
47
26
  </div>
48
27
  </template>
@@ -70,10 +49,15 @@ export default defineComponent({
70
49
  customPlayers: [] as Array<CustomPlayer>,
71
50
  };
72
51
  },
73
-
74
52
  computed: {
75
- authenticated(): boolean {
76
- return (state.generalParameters.authenticated as boolean);
53
+ optionsSelect(){
54
+ return [
55
+ {name: this.$t('Default version'), value: 'default', condition: true},
56
+ {name: this.$t('Large version'), value: 'large', condition: true},
57
+ {name: this.$t('Emission version'), value: 'emission', condition: this.podcast && this.podcast.podcastId},
58
+ {name: this.$t('Large emission version'), value: 'emissionLarge', condition: this.podcast && this.podcast.podcastId},
59
+ {name: this.$t('Large suggestion version'), value: 'largeSuggestion', condition: this.podcast && this.podcast.podcastId}
60
+ ]
77
61
  },
78
62
  customPlayersDisplay(): Array<CustomPlayer>{
79
63
  return this.customPlayers.filter((player: CustomPlayer)=>{
@@ -82,10 +66,9 @@ export default defineComponent({
82
66
  });
83
67
  },
84
68
  },
85
- async created() {
69
+ async created() {
86
70
  await this.initCustomPlayers();
87
71
  },
88
-
89
72
  methods: {
90
73
  async fetchCustomPlayers(type:string, trySelect: boolean): Promise<boolean>{
91
74
  let players = await octopusApi.fetchCustomPlayer('customPlayer/type/'+ this.organisationId+'/'+type);
@@ -105,7 +88,7 @@ export default defineComponent({
105
88
  return true;
106
89
  },
107
90
  async initCustomPlayers(): Promise<void> {
108
- if (!this.authenticated) return;
91
+ if (!state.generalParameters.authenticated) return;
109
92
  if(this.playlist){
110
93
  this.fetchCustomPlayers('PLAYLIST', true);
111
94
  }else if(this.emission && !this.podcast){
@@ -4,153 +4,34 @@
4
4
  {{ $t('Subscribe emission') }}
5
5
  </h3>
6
6
  <div class="d-flex flex-wrap">
7
- <a
8
- v-if="amazon"
9
- rel="noopener"
10
- target="_blank"
11
- class="btn me-3 mb-2 share-btn"
12
- :href="amazon"
13
- title="amazon"
7
+ <template
8
+ v-for="sub in subscriptions"
9
+ :key="sub.name"
14
10
  >
15
- <span class="saooti-amazon">
16
- <div class="path1" />
17
- <div class="path2" />
18
- <div class="path3" />
19
- </span>
20
- </a>
21
- <a
22
- v-if="applePodcast"
23
- rel="noopener"
24
- target="_blank"
25
- class="btn me-3 mb-2 share-btn"
26
- :href="applePodcast"
27
- title="Apple"
28
- >
29
- <span class="saooti-apple" />
30
- </a>
31
- <a
32
- v-if="deezer"
33
- rel="noopener"
34
- target="_blank"
35
- class="btn me-3 mb-2 share-btn"
36
- :href="deezer"
37
- title="Deezer"
38
- >
39
- <span class="saooti-deezer" />
40
- </a>
41
- <a
42
- v-if="googlePodcasts"
43
- rel="noopener"
44
- target="_blank"
45
- class="btn me-3 mb-2 share-btn"
46
- :href="googlePodcasts"
47
- title="googlePodcasts"
48
- >
49
- <span class="saooti-google-podcasts">
50
- <div class="path1" />
51
- <div class="path2" />
52
- <div class="path3" />
53
- <div class="path4" />
54
- <div class="path5" />
55
- <div class="path6" />
56
- <div class="path7" />
57
- </span>
58
- </a>
59
- <a
60
- v-if="playerFm"
61
- rel="noopener"
62
- target="_blank"
63
- class="btn me-3 mb-2 share-btn"
64
- :href="playerFm"
65
- title="playerFm"
66
- >
67
- <span class="saooti-playerfm" />
68
- </a>
69
- <a
70
- v-if="pocketCasts"
71
- rel="noopener"
72
- target="_blank"
73
- class="btn me-3 mb-2 share-btn"
74
- :href="pocketCasts"
75
- title="pocketCasts"
76
- >
77
- <span class="saooti-pocket-casts" />
78
- </a>
79
- <a
80
- v-if="podcastAddict"
81
- rel="noopener"
82
- target="_blank"
83
- class="btn me-3 mb-2 share-btn"
84
- :href="podcastAddict"
85
- title="podcastAddict"
86
- >
87
- <span class="saooti-podcast-addict" />
88
- </a>
89
- <a
90
- v-if="radioline"
91
- rel="noopener"
92
- target="_blank"
93
- class="btn me-3 mb-2 btn-radioline share-btn"
94
- :href="radioline"
95
- title="Radioline"
96
- >
97
- <span class="saooti-radioline" />
98
- </a>
99
- <a
100
- v-if="spotify"
101
- rel="noopener"
102
- target="_blank"
103
- class="btn me-3 mb-2 share-btn"
104
- :href="spotify"
105
- title="Spotify"
106
- >
107
- <span class="saooti-spotify" />
108
- </a>
109
- <a
110
- v-if="stitcher"
111
- rel="noopener"
112
- target="_blank"
113
- class="btn me-3 mb-2 share-btn"
114
- :href="stitcher"
115
- title="stitcher"
116
- >
117
- <span class="saooti-stitcher-logo">
118
- <div class="path1" />
119
- <div class="path2" />
120
- <div class="path3" />
121
- <div class="path4" />
122
- <div class="path5" />
123
- <div class="path6" />
124
- <div class="path7" />
125
- <div class="path8" />
126
- <div class="path9" />
127
- <div class="path10" />
128
- <div class="path11" />
129
- <div class="path12" />
130
- <div class="path13" />
131
- <div class="path14" />
132
- <div class="path15" />
133
- <div class="path16" />
134
- <div class="path17" />
135
- <div class="path18" /> </span>
136
- </a>
137
- <a
138
- v-if="tunein"
139
- rel="noopener"
140
- target="_blank"
141
- class="btn me-3 mb-2 share-btn"
142
- :href="tunein"
143
- title="Tunin"
144
- >
145
- <span class="saooti-tunin" />
146
- </a>
11
+ <a
12
+ v-if="getUrl(sub.name)"
13
+ rel="noopener"
14
+ target="_blank"
15
+ class="btn me-3 mb-2 share-btn"
16
+ :href="getUrl(sub.name)"
17
+ :title="sub.name"
18
+ >
19
+ <span :class="sub.icon">
20
+ <div
21
+ v-for="index in getPathNumber(sub.name)"
22
+ :key="index"
23
+ :class="'path'+(index+1)"
24
+ />
25
+ </span>
26
+ </a>
27
+ </template>
147
28
  </div>
148
29
  </div>
149
30
  </template>
150
31
 
151
32
  <script lang="ts">
152
33
  import { Emission } from '@/store/class/general/emission';
153
- import { defineComponent } from 'vue'
34
+ import { defineComponent } from 'vue';
154
35
  export default defineComponent({
155
36
  props: {
156
37
  emission: { default: undefined, type: Object as ()=> Emission},
@@ -159,70 +40,33 @@ export default defineComponent({
159
40
 
160
41
  data() {
161
42
  return {
162
- applePodcast:
163
- (this.emission && this.emission.annotations
164
- ? this.emission.annotations.applePodcast
165
- : undefined) as string | undefined,
166
- deezer:
167
- (this.emission && this.emission.annotations
168
- ? this.emission.annotations.deezer
169
- : undefined) as string | undefined,
170
- spotify:
171
- (this.emission && this.emission.annotations
172
- ? this.emission.annotations.spotify
173
- : undefined) as string | undefined,
174
- tunein:
175
- (this.emission && this.emission.annotations
176
- ? this.emission.annotations.tunein
177
- : undefined) as string | undefined,
178
- radioline:
179
- (this.emission && this.emission.annotations
180
- ? this.emission.annotations.radioline
181
- : undefined) as string | undefined,
182
- podcastAddict:
183
- (this.emission && this.emission.annotations
184
- ? this.emission.annotations.podcastAddict
185
- : undefined) as string | undefined,
186
- playerFm:
187
- (this.emission && this.emission.annotations
188
- ? this.emission.annotations.playerFm
189
- : undefined) as string | undefined,
190
- stitcher:
191
- (this.emission && this.emission.annotations
192
- ? this.emission.annotations.stitcher
193
- : undefined) as string | undefined,
194
- amazon:
195
- (this.emission && this.emission.annotations
196
- ? this.emission.annotations.amazon
197
- : undefined) as string | undefined,
198
- googlePodcasts:
199
- (this.emission && this.emission.annotations
200
- ? this.emission.annotations.googlePodcasts
201
- : undefined) as string | undefined,
202
- pocketCasts:
203
- (this.emission && this.emission.annotations
204
- ? this.emission.annotations.pocketCasts
205
- : undefined) as string | undefined,
43
+ subscriptions : [
44
+ {name : 'amazon', icon : 'saooti-amazon'},
45
+ {name:'applePodcast', icon:'saooti-apple'},
46
+ {name:'deezer', icon:'saooti-deezer'},
47
+ {name:'googlePodcasts', icon:"saooti-google-podcasts"},
48
+ {name:'playerFm', icon: 'saooti-saooti-playerfm'},
49
+ {name:'pocketCasts', icon:'saooti-pocket-casts'},
50
+ {name:'podcastAddict', icon: 'saooti-podcast-addict'},
51
+ {name:'radioline', icon:'saooti-radioline'},
52
+ {name:'spotify', icon:'saooti-spotify'},
53
+ {name:'stitcher', icon:'saooti-stitcher-logo'},
54
+ {name:'tunein', icon:'saooti-tunin'}] as Array<{name:string, icon:string}>,
206
55
  };
207
56
  },
208
57
 
209
- computed: {},
210
-
211
- mounted() {
212
- this.applePodcast = this.externaliseLinks(this.applePodcast);
213
- this.deezer = this.externaliseLinks(this.deezer);
214
- this.spotify = this.externaliseLinks(this.spotify);
215
- this.tunein = this.externaliseLinks(this.tunein);
216
- this.radioline = this.externaliseLinks(this.radioline);
217
- this.podcastAddict = this.externaliseLinks(this.podcastAddict);
218
- this.playerFm = this.externaliseLinks(this.playerFm);
219
- this.stitcher = this.externaliseLinks(this.stitcher);
220
- this.amazon = this.externaliseLinks(this.amazon);
221
- this.googlePodcasts = this.externaliseLinks(this.googlePodcasts);
222
- this.pocketCasts = this.externaliseLinks(this.pocketCasts);
223
- },
224
-
225
58
  methods: {
59
+ getPathNumber(sub: string): number{
60
+ switch (sub) {
61
+ case 'amazon': return 3;
62
+ case 'googlePodcasts': return 7;
63
+ case 'stitcher': return 18;
64
+ default: return 0;
65
+ }
66
+ },
67
+ getUrl(sub: string): string | undefined{
68
+ return this.externaliseLinks(this.emission && this.emission.annotations? (this.emission.annotations[sub] as string): undefined);
69
+ },
226
70
  externaliseLinks(link?: string): string|undefined {
227
71
  if (!link) return link;
228
72
  link = link.trim();
@@ -48,15 +48,15 @@ export default defineComponent({
48
48
  this.$emit('update:textInit', this.textValue)
49
49
  }
50
50
  },
51
- textInit(){
52
- if(this.textInit !== this.textValue){
53
- this.textValue =this.textInit;
54
- }
55
- }
51
+ textInit: {
52
+ immediate: true,
53
+ handler() {
54
+ if(this.textInit !== this.textValue){
55
+ this.textValue =this.textInit;
56
+ }
57
+ },
58
+ },
56
59
  },
57
- mounted(){
58
- this.textValue = this.textInit;
59
- },
60
60
  methods:{
61
61
  emitClickAction():void{
62
62
  this.$emit('clickAction');
@@ -53,14 +53,14 @@ export default defineComponent({
53
53
  this.$emit('update:textInit', this.textValue)
54
54
  }
55
55
  },
56
- textInit(){
57
- if(this.textInit !== this.textValue){
58
- this.textValue =this.textInit;
59
- }
60
- }
61
- },
62
- mounted(){
63
- this.textValue = this.textInit;
64
- }
56
+ textInit: {
57
+ immediate: true,
58
+ handler() {
59
+ if(this.textInit !== this.textValue){
60
+ this.textValue =this.textInit;
61
+ }
62
+ },
63
+ },
64
+ }
65
65
  });
66
66
  </script>