@saooti/octopus-sdk 30.0.70 → 30.0.71
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 +1 -0
- package/package.json +1 -1
- package/src/components/display/podcasts/PodcastInlineList.vue +29 -7
- package/src/components/display/podcasts/PodcastModuleBox.vue +0 -11
- package/src/components/display/sharing/ShareButtons.vue +33 -9
- package/src/locale/en.ts +1 -1
- package/src/store/paramStore.ts +7 -7
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
<div class="d-flex">
|
|
9
9
|
<button
|
|
10
10
|
class="btn btn-underline"
|
|
11
|
-
:class="{ active: popularSort }"
|
|
12
|
-
@click="
|
|
11
|
+
:class="{ active: !popularSort }"
|
|
12
|
+
@click="sortChrono()"
|
|
13
13
|
>
|
|
14
|
-
{{ $t('
|
|
14
|
+
{{ $t('Last added') }}
|
|
15
15
|
</button>
|
|
16
16
|
<button
|
|
17
17
|
class="btn btn-underline"
|
|
18
|
-
:class="{ active:
|
|
19
|
-
@click="
|
|
18
|
+
:class="{ active: popularSort }"
|
|
19
|
+
@click="sortPopular()"
|
|
20
20
|
>
|
|
21
|
-
{{ $t('
|
|
21
|
+
{{ $t('Most popular') }}
|
|
22
22
|
</button>
|
|
23
23
|
</div>
|
|
24
24
|
<div
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
</transition-group>
|
|
68
68
|
<router-link
|
|
69
69
|
class="btn btn-link align-self-center width-fit-content m-4"
|
|
70
|
+
@click="handleSeeMoreButton"
|
|
70
71
|
:to="refTo"
|
|
71
72
|
>
|
|
72
73
|
{{ buttonText }}
|
|
@@ -89,6 +90,7 @@ import { Podcast } from '@/store/class/general/podcast';
|
|
|
89
90
|
import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
|
|
90
91
|
import { defineComponent } from 'vue'
|
|
91
92
|
import { RouteLocationRaw } from 'vue-router';
|
|
93
|
+
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
92
94
|
export default defineComponent({
|
|
93
95
|
name: 'PodcastInlineList',
|
|
94
96
|
|
|
@@ -122,7 +124,7 @@ export default defineComponent({
|
|
|
122
124
|
first: 0 as number,
|
|
123
125
|
size: 5 as number,
|
|
124
126
|
totalCount: 0 as number,
|
|
125
|
-
popularSort:
|
|
127
|
+
popularSort: false as boolean,
|
|
126
128
|
allPodcasts: [] as Array<Podcast>,
|
|
127
129
|
direction: 1 as number,
|
|
128
130
|
alignLeft: false as boolean,
|
|
@@ -210,6 +212,26 @@ export default defineComponent({
|
|
|
210
212
|
this.fetchNext();
|
|
211
213
|
},
|
|
212
214
|
methods: {
|
|
215
|
+
handleSeeMoreButton(event: { preventDefault: () => void; }){
|
|
216
|
+
if(!this.rubriqueId || this.noRubriquageId.length){
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
event.preventDefault();
|
|
220
|
+
const rubriqueChosenId = this.rubriqueId[this.rubriqueId.length - 1];
|
|
221
|
+
const rubriqueChosen = this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
|
|
222
|
+
const filterToAdd = {
|
|
223
|
+
rubriquageId: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriquageId,
|
|
224
|
+
rubriqueId: rubriqueChosenId,
|
|
225
|
+
nameRubriquage: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].title,
|
|
226
|
+
nameRubrique: rubriqueChosen.name
|
|
227
|
+
};
|
|
228
|
+
const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
|
|
229
|
+
newFilter.push(filterToAdd);
|
|
230
|
+
this.$store.commit('filterRubrique', newFilter);
|
|
231
|
+
const queries = this.$route.query;
|
|
232
|
+
const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
|
|
233
|
+
this.$router.push({ name: 'podcasts',query: { ...queries, ...{ rubriquesId: queryString }} });
|
|
234
|
+
},
|
|
213
235
|
async fetchNext(): Promise<void> {
|
|
214
236
|
const data = await octopusApi.fetchPodcasts({
|
|
215
237
|
first: this.first,
|
|
@@ -139,12 +139,6 @@
|
|
|
139
139
|
:message="$t('Podcast not validated')"
|
|
140
140
|
/>
|
|
141
141
|
</div>
|
|
142
|
-
<ShareButtons
|
|
143
|
-
v-if="isDownloadButton"
|
|
144
|
-
:podcast="podcast"
|
|
145
|
-
:big-round="true"
|
|
146
|
-
:audio-url="podcast.audioUrl"
|
|
147
|
-
/>
|
|
148
142
|
</div>
|
|
149
143
|
</div>
|
|
150
144
|
</div>
|
|
@@ -168,14 +162,12 @@ import { Podcast } from '@/store/class/general/podcast';
|
|
|
168
162
|
import { Conference } from '@/store/class/conference/conference';
|
|
169
163
|
|
|
170
164
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
171
|
-
const ShareButtons = defineAsyncComponent(() => import('../sharing/ShareButtons.vue'));
|
|
172
165
|
const ErrorMessage = defineAsyncComponent(() => import('../../misc/ErrorMessage.vue'));
|
|
173
166
|
export default defineComponent({
|
|
174
167
|
name: "PodcastModuleBox",
|
|
175
168
|
components: {
|
|
176
169
|
PodcastImage,
|
|
177
170
|
ParticipantDescription,
|
|
178
|
-
ShareButtons,
|
|
179
171
|
TagList,
|
|
180
172
|
ErrorMessage,
|
|
181
173
|
PodcastPlayBar
|
|
@@ -209,9 +201,6 @@ export default defineComponent({
|
|
|
209
201
|
isOuestFrance(): boolean {
|
|
210
202
|
return (state.podcastPage.ouestFranceStyle as boolean);
|
|
211
203
|
},
|
|
212
|
-
isDownloadButton(): boolean {
|
|
213
|
-
return (state.podcastPage.downloadButton as boolean);
|
|
214
|
-
},
|
|
215
204
|
date(): string {
|
|
216
205
|
if (this.podcast && 1970 !== moment(this.podcast.pubDate).year()){
|
|
217
206
|
return moment(this.podcast.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
@@ -32,17 +32,18 @@
|
|
|
32
32
|
verticalDisplay ? 'd-flex-row' : '',
|
|
33
33
|
]"
|
|
34
34
|
>
|
|
35
|
-
<
|
|
36
|
-
v-if="
|
|
37
|
-
class="
|
|
35
|
+
<button
|
|
36
|
+
v-if="isDownloadButton"
|
|
37
|
+
class="text-dark"
|
|
38
|
+
:class="[
|
|
39
|
+
bigRound ? 'btn btn-big-round' : 'btn share-btn mb-2',
|
|
40
|
+
verticalDisplay ? '' : 'mx-2',
|
|
41
|
+
]"
|
|
38
42
|
:title="$t('Downloading')"
|
|
39
|
-
|
|
40
|
-
rel="noopener"
|
|
41
|
-
target="_blank"
|
|
42
|
-
download
|
|
43
|
+
@click="onDownload(podcast.audioUrl, podcast.title)"
|
|
43
44
|
>
|
|
44
45
|
<div class="saooti-download-bounty" />
|
|
45
|
-
</
|
|
46
|
+
</button>
|
|
46
47
|
<a
|
|
47
48
|
rel="noopener"
|
|
48
49
|
target="_blank"
|
|
@@ -283,6 +284,12 @@ export default defineComponent({
|
|
|
283
284
|
},
|
|
284
285
|
|
|
285
286
|
computed: {
|
|
287
|
+
isDownloadButton(): boolean{
|
|
288
|
+
return this.isDownloadButtonParam && undefined!==this.podcast && (!this.podcast.tags || !this.podcast.tags.includes('copyright'));
|
|
289
|
+
},
|
|
290
|
+
isDownloadButtonParam(): boolean {
|
|
291
|
+
return (state.podcastPage.downloadButton as boolean);
|
|
292
|
+
},
|
|
286
293
|
urlPage(): string{
|
|
287
294
|
return window.location.href;
|
|
288
295
|
},
|
|
@@ -334,7 +341,24 @@ export default defineComponent({
|
|
|
334
341
|
let check = false;
|
|
335
342
|
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent);
|
|
336
343
|
return check;
|
|
337
|
-
}
|
|
344
|
+
},
|
|
345
|
+
onDownload(urlToDownload: string, nameOfDownload: string): void{
|
|
346
|
+
const xhr = new XMLHttpRequest();
|
|
347
|
+
xhr.open('GET', urlToDownload, true);
|
|
348
|
+
xhr.responseType = 'blob';
|
|
349
|
+
xhr.onload = function() {
|
|
350
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
351
|
+
const imageUrl = urlCreator.createObjectURL(this.response);
|
|
352
|
+
const tag = document.createElement('a');
|
|
353
|
+
tag.href = imageUrl;
|
|
354
|
+
tag.target = '_blank';
|
|
355
|
+
tag.download = nameOfDownload.replace(/ /g, '_');
|
|
356
|
+
document.body.appendChild(tag);
|
|
357
|
+
tag.click();
|
|
358
|
+
document.body.removeChild(tag);
|
|
359
|
+
};
|
|
360
|
+
xhr.send();
|
|
361
|
+
},
|
|
338
362
|
},
|
|
339
363
|
})
|
|
340
364
|
</script>
|
package/src/locale/en.ts
CHANGED
|
@@ -41,7 +41,7 @@ export default{
|
|
|
41
41
|
Cancel: 'Cancel',
|
|
42
42
|
'Most popular': 'Most popular',
|
|
43
43
|
'Last added': 'Last added',
|
|
44
|
-
'All podcast button': 'All the
|
|
44
|
+
'All podcast button': 'All the podcasts of "{name}"',
|
|
45
45
|
'Podcast search': 'Search in the podcasts',
|
|
46
46
|
'No podcast match your query':
|
|
47
47
|
'No podcast matches your query',
|
package/src/store/paramStore.ts
CHANGED
|
@@ -12,7 +12,7 @@ const state:paramStore = {
|
|
|
12
12
|
isPlaylist: false,
|
|
13
13
|
isProduction: true,
|
|
14
14
|
isContribution: true,
|
|
15
|
-
ApiUri: 'https://api.
|
|
15
|
+
ApiUri: 'https://api.staging.saooti.org/',
|
|
16
16
|
podcastmaker: false,
|
|
17
17
|
buttonPlus: true,
|
|
18
18
|
allCategories: [],
|
|
@@ -26,10 +26,10 @@ const state:paramStore = {
|
|
|
26
26
|
SharePlayer: true,
|
|
27
27
|
ShareButtons: true,
|
|
28
28
|
ShareDistribution: true,
|
|
29
|
-
MiniplayerUri: 'https://playerbeta.
|
|
29
|
+
MiniplayerUri: 'https://playerbeta.staging.saooti.org/',
|
|
30
30
|
ouestFranceStyle: false,
|
|
31
31
|
downloadButton: false,
|
|
32
|
-
hlsUri: 'https://hls.
|
|
32
|
+
hlsUri: 'https://hls.staging.saooti.org/',
|
|
33
33
|
mainRubrique: 0,
|
|
34
34
|
resourceUrl: undefined
|
|
35
35
|
},
|
|
@@ -85,10 +85,10 @@ const state:paramStore = {
|
|
|
85
85
|
userName: '',
|
|
86
86
|
},
|
|
87
87
|
octopusApi: {
|
|
88
|
-
url: 'http://api.
|
|
89
|
-
commentsUrl: 'http://comments.
|
|
90
|
-
studioUrl: 'http://studio.
|
|
91
|
-
playerUrl: 'https://playerbeta.
|
|
88
|
+
url: 'http://api.staging.saooti.org/',
|
|
89
|
+
commentsUrl: 'http://comments.staging.saooti.org/',
|
|
90
|
+
studioUrl: 'http://studio.staging.saooti.org/',
|
|
91
|
+
playerUrl: 'https://playerbeta.staging.saooti.org/',
|
|
92
92
|
organisationId: undefined,
|
|
93
93
|
rubriqueIdFilter: undefined,
|
|
94
94
|
},
|