@saooti/octopus-sdk 31.0.26 → 31.0.27

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 (38) hide show
  1. package/README.md +5 -1
  2. package/package.json +2 -1
  3. package/src/components/display/podcasts/PodcastImage.vue +15 -9
  4. package/src/components/display/podcasts/PodcastInlineList.vue +43 -309
  5. package/src/components/display/podcasts/PodcastInlineListClassic.vue +246 -0
  6. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +158 -0
  7. package/src/components/display/podcasts/PodcastModuleBox.vue +3 -26
  8. package/src/components/display/podcasts/PodcastSwiperList.vue +209 -0
  9. package/src/components/display/sharing/SharePlayer.vue +42 -81
  10. package/src/components/display/sharing/SharePlayerColors.vue +17 -15
  11. package/src/components/display/sharing/SharePlayerTypes.vue +15 -32
  12. package/src/components/display/sharing/SubscribeButtons.vue +44 -200
  13. package/src/components/form/ClassicCheckbox.vue +8 -8
  14. package/src/components/form/ClassicRadio.vue +9 -9
  15. package/src/components/form/ClassicSearch.vue +29 -29
  16. package/src/components/form/ClassicSelect.vue +12 -15
  17. package/src/components/misc/ErrorMessage.vue +6 -8
  18. package/src/components/misc/Footer.vue +63 -95
  19. package/src/components/misc/LeftMenu.vue +41 -89
  20. package/src/components/misc/Snackbar.vue +1 -1
  21. package/src/components/misc/TopBar.vue +41 -82
  22. package/src/components/misc/modal/ClipboardModal.vue +1 -8
  23. package/src/components/misc/modal/MessageModal.vue +1 -2
  24. package/src/components/misc/modal/QrCodeModal.vue +1 -11
  25. package/src/components/mixins/orgaComputed.ts +15 -0
  26. package/src/components/pages/Emission.vue +43 -86
  27. package/src/components/pages/Emissions.vue +27 -73
  28. package/src/components/pages/Home.vue +5 -12
  29. package/src/components/pages/Lives.vue +1 -6
  30. package/src/components/pages/Participant.vue +34 -48
  31. package/src/components/pages/Participants.vue +10 -28
  32. package/src/components/pages/Playlist.vue +20 -31
  33. package/src/components/pages/Playlists.vue +5 -15
  34. package/src/components/pages/Podcast.vue +95 -115
  35. package/src/components/pages/Podcasts.vue +34 -93
  36. package/src/components/pages/Rubrique.vue +6 -17
  37. package/src/components/pages/Search.vue +16 -36
  38. package/src/store/paramStore.ts +13 -11
@@ -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>
@@ -49,38 +49,38 @@ export default defineComponent({
49
49
  this.$emit('update:textInit', this.textValue)
50
50
  }
51
51
  },
52
- textInit(){
53
- if(this.textInit !== this.textValue){
54
- this.textValue =this.textInit;
55
- }
56
- }
57
- },
58
- mounted(){
59
- this.textValue = this.textInit;
60
- }
52
+ textInit: {
53
+ immediate: true,
54
+ handler() {
55
+ if(this.textInit !== this.textValue){
56
+ this.textValue =this.textInit;
57
+ }
58
+ },
59
+ },
60
+ }
61
61
  });
62
62
  </script>
63
63
  <style lang="scss">
64
64
  .octopus-app{
65
- .champs-searchPage{
66
- input {
67
- border: 2px solid #dee2e6;
68
- border-radius: 10px;
69
- margin: 0 !important;
70
- }
71
- .saooti-search-bounty,
72
- .saooti-cross {
73
- font-size: 1rem;
74
- }
75
- .search-icon-container {
76
- position: absolute;
77
- top: 0;
78
- bottom: 0;
79
- right: 0;
80
- display: flex;
81
- align-items: center;
82
- margin: 1rem;
83
- }
84
- }
65
+ .champs-searchPage{
66
+ input {
67
+ border: 2px solid #dee2e6;
68
+ border-radius: 10px;
69
+ margin: 0 !important;
70
+ }
71
+ .saooti-search-bounty,
72
+ .saooti-cross {
73
+ font-size: 1rem;
74
+ }
75
+ .search-icon-container {
76
+ position: absolute;
77
+ top: 0;
78
+ bottom: 0;
79
+ right: 0;
80
+ display: flex;
81
+ align-items: center;
82
+ margin: 1rem;
83
+ }
84
+ }
85
85
  }
86
86
  </style>
@@ -25,7 +25,6 @@
25
25
  import { defineComponent } from 'vue';
26
26
  export default defineComponent({
27
27
  name: 'ClassicSelect',
28
-
29
28
  props: {
30
29
  idSelect: { default: '', type: String },
31
30
  label: { default: '', type: String },
@@ -34,9 +33,7 @@ export default defineComponent({
34
33
  options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined}> },
35
34
  textInit: { default: undefined, type: String },
36
35
  },
37
-
38
36
  emits: ['update:textInit'],
39
-
40
37
  data() {
41
38
  return {
42
39
  textValue: undefined as string|undefined,
@@ -48,21 +45,21 @@ export default defineComponent({
48
45
  this.$emit('update:textInit', this.textValue)
49
46
  }
50
47
  },
51
- textInit(){
52
- if(this.textInit !== this.textValue){
53
- this.textValue =this.textInit;
54
- }
55
- }
56
- },
57
- mounted(){
58
- this.textValue = this.textInit;
59
- }
48
+ textInit: {
49
+ immediate: true,
50
+ handler() {
51
+ if(this.textInit !== this.textValue){
52
+ this.textValue =this.textInit;
53
+ }
54
+ },
55
+ },
56
+ }
60
57
  });
61
58
  </script>
62
59
  <style lang="scss">
63
60
  .octopus-app{
64
- .classic-select select{
65
- width: inherit;
66
- }
61
+ .classic-select select{
62
+ width: inherit;
63
+ }
67
64
  }
68
65
  </style>
@@ -17,7 +17,6 @@
17
17
  </div>
18
18
  </div>
19
19
  </template>
20
-
21
20
  <script lang="ts">
22
21
  import { defineComponent } from 'vue'
23
22
  export default defineComponent({
@@ -27,14 +26,13 @@ export default defineComponent({
27
26
  },
28
27
  })
29
28
  </script>
30
-
31
29
  <style lang="scss">
32
30
  .octopus-app{
33
- .bg-error-message {
34
- background-color: #ffd84a9c;
35
- }
36
- .alert-text{
37
- color: darkred;
38
- }
31
+ .bg-error-message {
32
+ background-color: #ffd84a9c;
33
+ }
34
+ .alert-text{
35
+ color: darkred;
36
+ }
39
37
  }
40
38
  </style>