@saooti/octopus-sdk 30.0.64 → 31.0.2
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 +5 -1
- package/package.json +2 -2
- package/src/assets/share.scss +25 -0
- package/src/components/display/emission/EmissionInlineList.vue +27 -28
- package/src/components/display/emission/EmissionList.vue +10 -4
- package/src/components/display/live/LiveList.vue +49 -41
- package/src/components/display/organisation/OrganisationChooserLight.vue +26 -19
- package/src/components/display/participant/ParticipantList.vue +27 -18
- package/src/components/display/playlist/PlaylistList.vue +11 -2
- package/src/components/display/playlist/PodcastList.vue +23 -15
- package/src/components/display/podcasts/PodcastInlineList.vue +35 -27
- package/src/components/display/podcasts/PodcastList.vue +10 -2
- package/src/components/display/sharing/ShareDistribution.vue +21 -0
- package/src/components/display/sharing/SubscribeButtons.vue +38 -0
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/pages/Emission.vue +19 -4
- package/src/components/pages/Error403Page.vue +24 -0
- package/src/components/pages/Participant.vue +17 -4
- package/src/components/pages/Playlist.vue +17 -3
- package/src/components/pages/Podcast.vue +20 -4
- package/src/locale/en.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/main.ts +1 -1
- package/src/router/router.ts +6 -0
- package/src/store/class/general/organisation.ts +1 -0
- package/src/store/paramStore.ts +7 -7
package/README.md
CHANGED
|
@@ -560,4 +560,8 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
|
560
560
|
* 30.0.61 Page podcast -> init recherche
|
|
561
561
|
* 30.0.62 Italian translation
|
|
562
562
|
* 30.0.63 Italian translation
|
|
563
|
-
* 30.0.64 Modif Le soir
|
|
563
|
+
* 30.0.64 Modif Le soir
|
|
564
|
+
|
|
565
|
+
* 31.0.0 Passage en 31
|
|
566
|
+
* 31.0.1 Ajout pocket casts
|
|
567
|
+
* 31.0.2 Gestion des 403
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"main": "./dist/octopus.common.js",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@popperjs/core": "^2.11.0",
|
|
18
|
-
"@saooti/octopus-api": "^0.
|
|
18
|
+
"@saooti/octopus-api": "^0.31.0",
|
|
19
19
|
"@vue/cli": "^5.0.0-rc.1",
|
|
20
20
|
"@vue/compat": "^3.2.26",
|
|
21
21
|
"axios": "^0.24.0",
|
package/src/assets/share.scss
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
@import '../sass/_variables.scss';
|
|
2
2
|
.octopus-app{
|
|
3
|
+
.page-box-absolute{
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
height: max-content;
|
|
9
|
+
min-height: 100%;
|
|
10
|
+
z-index: 11;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
&.page-box-player{
|
|
14
|
+
padding-bottom: 120px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
3
17
|
.saooti-help {
|
|
4
18
|
font-size: 1.5rem;
|
|
5
19
|
border-radius: 50%;
|
|
@@ -208,5 +222,16 @@
|
|
|
208
222
|
top: -0.5rem;
|
|
209
223
|
left: 0.8rem;
|
|
210
224
|
}
|
|
225
|
+
.saooti-google-podcasts{
|
|
226
|
+
top: -0.6rem;
|
|
227
|
+
left: 0.7rem;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.logo-octopus{
|
|
232
|
+
width: 350px;
|
|
233
|
+
@media (max-width: 960px) {
|
|
234
|
+
width: 200px;
|
|
235
|
+
}
|
|
211
236
|
}
|
|
212
237
|
}
|
|
@@ -71,18 +71,22 @@ import octopusApi from '@saooti/octopus-api';
|
|
|
71
71
|
import domHelper from '../../../helper/dom';
|
|
72
72
|
import EmissionPlayerItem from './EmissionPlayerItem.vue';
|
|
73
73
|
import { state } from '../../../store/paramStore';
|
|
74
|
-
|
|
74
|
+
import { handle403 } from '../../mixins/handle403';
|
|
75
75
|
const PHONE_WIDTH = 960;
|
|
76
76
|
|
|
77
77
|
import { Emission } from '@/store/class/general/emission';
|
|
78
78
|
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
79
79
|
import { defineComponent } from 'vue'
|
|
80
|
+
import { AxiosError } from 'axios';
|
|
80
81
|
export default defineComponent({
|
|
81
82
|
name: 'EmissionInlineList',
|
|
82
83
|
|
|
83
84
|
components: {
|
|
84
85
|
EmissionPlayerItem,
|
|
85
86
|
},
|
|
87
|
+
|
|
88
|
+
mixins: [handle403],
|
|
89
|
+
|
|
86
90
|
props: {
|
|
87
91
|
organisationId: { default: undefined, type: String},
|
|
88
92
|
href: { default: undefined, type: String},
|
|
@@ -157,35 +161,30 @@ export default defineComponent({
|
|
|
157
161
|
},
|
|
158
162
|
methods: {
|
|
159
163
|
async fetchNext(): Promise<void> {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this.loading = false;
|
|
169
|
-
this.loaded = true;
|
|
170
|
-
this.totalCount = data.count;
|
|
171
|
-
/* if(this.first === 0 && this.displayRubriquage && state.emissionsPage.mainRubrique){
|
|
172
|
-
data.result.sort((a, b)=>{
|
|
173
|
-
if (a.rubriqueIds[0] === state.emissionsPage.mainRubrique)
|
|
174
|
-
return 1;
|
|
175
|
-
if (b.rubriqueIds[0] === state.emissionsPage.mainRubrique)
|
|
176
|
-
return -1;
|
|
177
|
-
return 0;
|
|
164
|
+
try {
|
|
165
|
+
const data = await octopusApi.fetchEmissions({
|
|
166
|
+
first: this.first,
|
|
167
|
+
size: this.size + 1,
|
|
168
|
+
organisationId: this.organisationId,
|
|
169
|
+
rubriqueId: this.rubriqueId ? [this.rubriqueId] : [],
|
|
170
|
+
rubriquageId: this.rubriquageId ? [this.rubriquageId] : [],
|
|
171
|
+
sort: 'LAST_PODCAST_DESC',
|
|
178
172
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
this.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
173
|
+
this.loading = false;
|
|
174
|
+
this.loaded = true;
|
|
175
|
+
this.totalCount = data.count;
|
|
176
|
+
if (this.allEmissions.length + data.result.length < this.totalCount) {
|
|
177
|
+
const nexEl = data.result.pop() as Emission;
|
|
178
|
+
this.preloadImage(nexEl.imageUrl ? nexEl.imageUrl : "");
|
|
179
|
+
}
|
|
180
|
+
this.allEmissions = this.allEmissions.concat(data.result);
|
|
181
|
+
if (this.allEmissions.length <= 3) {
|
|
182
|
+
this.alignLeft = true;
|
|
183
|
+
}
|
|
184
|
+
this.first += this.size;
|
|
185
|
+
} catch (error) {
|
|
186
|
+
this.handle403((error as AxiosError));
|
|
187
187
|
}
|
|
188
|
-
this.first += this.size;
|
|
189
188
|
},
|
|
190
189
|
displayPrevious(): void {
|
|
191
190
|
this.direction = -1;
|
|
@@ -60,12 +60,14 @@
|
|
|
60
60
|
|
|
61
61
|
<script lang="ts">
|
|
62
62
|
import octopusApi from '@saooti/octopus-api';
|
|
63
|
+
import { handle403 } from '../../mixins/handle403';
|
|
63
64
|
import { state } from '../../../store/paramStore';
|
|
64
65
|
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
65
66
|
import { Emission } from '@/store/class/general/emission';
|
|
66
67
|
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
67
68
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
68
69
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
70
|
+
import { AxiosError } from 'axios';
|
|
69
71
|
const EmissionItem = defineAsyncComponent(() => import('./EmissionItem.vue'));
|
|
70
72
|
const EmissionPlayerItem = defineAsyncComponent(() => import('./EmissionPlayerItem.vue'));
|
|
71
73
|
export default defineComponent({
|
|
@@ -77,6 +79,8 @@ export default defineComponent({
|
|
|
77
79
|
ClassicLoading
|
|
78
80
|
},
|
|
79
81
|
|
|
82
|
+
mixins: [handle403],
|
|
83
|
+
|
|
80
84
|
props: {
|
|
81
85
|
first: { default: 0, type: Number },
|
|
82
86
|
size: { default: 12, type: Number },
|
|
@@ -156,8 +160,6 @@ export default defineComponent({
|
|
|
156
160
|
},
|
|
157
161
|
},
|
|
158
162
|
|
|
159
|
-
|
|
160
|
-
|
|
161
163
|
mounted() {
|
|
162
164
|
this.fetchContent(true);
|
|
163
165
|
if (this.displayRubriquage) {
|
|
@@ -185,8 +187,12 @@ export default defineComponent({
|
|
|
185
187
|
rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
|
|
186
188
|
includeHidden:this.includeHidden,
|
|
187
189
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
try {
|
|
191
|
+
const data = await octopusApi.fetchEmissions(param);
|
|
192
|
+
this.afterFetching(reset, data);
|
|
193
|
+
} catch (error) {
|
|
194
|
+
this.handle403((error as AxiosError));
|
|
195
|
+
}
|
|
190
196
|
},
|
|
191
197
|
afterFetching(reset: boolean, data: {count: number, result: Array<Emission>, sort: string}): void {
|
|
192
198
|
if (reset) {
|
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
<script lang="ts">
|
|
38
38
|
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
39
39
|
import LiveItem from './LiveItem.vue';
|
|
40
|
+
import { handle403 } from '../../mixins/handle403';
|
|
40
41
|
import octopusApi from '@saooti/octopus-api';
|
|
41
42
|
import moment from 'moment';
|
|
42
43
|
import { state } from '../../../store/paramStore';
|
|
43
44
|
import { Conference } from '@/store/class/conference/conference';
|
|
44
45
|
import { defineComponent } from 'vue'
|
|
46
|
+
import { AxiosError } from 'axios';
|
|
45
47
|
export default defineComponent({
|
|
46
48
|
name: 'LiveList',
|
|
47
49
|
components: {
|
|
@@ -49,6 +51,8 @@ export default defineComponent({
|
|
|
49
51
|
ClassicLoading
|
|
50
52
|
},
|
|
51
53
|
|
|
54
|
+
mixins: [handle403],
|
|
55
|
+
|
|
52
56
|
props: {
|
|
53
57
|
conferenceWatched: { default: () => [], type: Array as ()=>Array<Conference>},
|
|
54
58
|
organisationId: { default: undefined, type: String},
|
|
@@ -153,51 +157,55 @@ export default defineComponent({
|
|
|
153
157
|
}
|
|
154
158
|
},
|
|
155
159
|
async fetchContent(): Promise<void> {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.loading = true;
|
|
163
|
-
this.loaded = false;
|
|
164
|
-
let indexPast = 0;
|
|
165
|
-
let dataLivesToBe: Array<Conference> = [];
|
|
166
|
-
for (let i = 0, len = this.livesArray.length; i < len; i++) {
|
|
167
|
-
if (!this.organisationRight &&
|
|
168
|
-
("DEBRIEFING"===this.livesArray[i].status ||"ERROR"===this.livesArray[i].status ||"PUBLISHING"===this.livesArray[i].status)) {
|
|
169
|
-
continue;
|
|
160
|
+
try {
|
|
161
|
+
this.initArrays();
|
|
162
|
+
if (!this.filterOrgaUsed) {
|
|
163
|
+
this.loading = false;
|
|
164
|
+
this.loaded = true;
|
|
165
|
+
return;
|
|
170
166
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
this.livesArray[i].
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
167
|
+
this.loading = true;
|
|
168
|
+
this.loaded = false;
|
|
169
|
+
let indexPast = 0;
|
|
170
|
+
let dataLivesToBe: Array<Conference> = [];
|
|
171
|
+
for (let i = 0, len = this.livesArray.length; i < len; i++) {
|
|
172
|
+
if (!this.organisationRight &&
|
|
173
|
+
("DEBRIEFING"===this.livesArray[i].status ||"ERROR"===this.livesArray[i].status ||"PUBLISHING"===this.livesArray[i].status)) {
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
const dataLives = await octopusApi.listConferences(
|
|
177
|
+
this.filterOrgaUsed,
|
|
178
|
+
true,
|
|
179
|
+
this.livesArray[i].status
|
|
180
|
+
);
|
|
181
|
+
if("PLANNED"!==this.livesArray[i].status && "PENDING"!==this.livesArray[i].status){
|
|
182
|
+
this.livesArray[i].lives = dataLives.filter((p: Conference | null) => {
|
|
183
|
+
return null !== p;
|
|
184
|
+
});
|
|
185
|
+
}else if("PENDING"===this.livesArray[i].status){
|
|
186
|
+
dataLivesToBe = dataLives;
|
|
187
|
+
for (let index = 0, len = dataLives.length; index < len; index++) {
|
|
188
|
+
if (moment(dataLives[index].date).isBefore(moment())) {
|
|
189
|
+
this.livesArray[i].lives.push(dataLives[index]);
|
|
190
|
+
indexPast = index + 1;
|
|
191
|
+
} else {break;}
|
|
192
|
+
}
|
|
193
|
+
}else{
|
|
194
|
+
this.livesArray[i].lives = dataLivesToBe
|
|
195
|
+
.slice(indexPast)
|
|
196
|
+
.concat(dataLives)
|
|
197
|
+
.filter((p: Conference | null) => {
|
|
198
|
+
return null !== p;
|
|
199
|
+
});
|
|
187
200
|
}
|
|
188
|
-
}else{
|
|
189
|
-
this.livesArray[i].lives = dataLivesToBe
|
|
190
|
-
.slice(indexPast)
|
|
191
|
-
.concat(dataLives)
|
|
192
|
-
.filter((p: Conference | null) => {
|
|
193
|
-
return null !== p;
|
|
194
|
-
});
|
|
195
201
|
}
|
|
202
|
+
const listIds = this.livesArray[0].lives
|
|
203
|
+
.concat(this.livesArray[1].lives)
|
|
204
|
+
.concat(this.livesArray[2].lives);
|
|
205
|
+
this.$emit('initConferenceIds', listIds);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
this.handle403((error as AxiosError));
|
|
196
208
|
}
|
|
197
|
-
const listIds = this.livesArray[0].lives
|
|
198
|
-
.concat(this.livesArray[1].lives)
|
|
199
|
-
.concat(this.livesArray[2].lives);
|
|
200
|
-
this.$emit('initConferenceIds', listIds);
|
|
201
209
|
this.loading = false;
|
|
202
210
|
this.loaded = true;
|
|
203
211
|
},
|
|
@@ -4,30 +4,35 @@
|
|
|
4
4
|
class="default-multiselect-width organisation-chooser-light"
|
|
5
5
|
:style="{ width: width }"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
<template v-if="!privateOrganisation">
|
|
8
|
+
<select
|
|
9
|
+
:id="'organisation_chooser_light' + page"
|
|
10
|
+
v-model="actual"
|
|
11
|
+
class="mb-0 c-hand border-0"
|
|
12
|
+
@change="onOrganisationSelected"
|
|
13
|
+
>
|
|
14
|
+
<option :value="organisation.id">
|
|
15
|
+
{{ organisation.name }}
|
|
16
|
+
</option>
|
|
17
|
+
<option :value="-1">
|
|
18
|
+
{{ $t('No organisation filter') }}
|
|
19
|
+
</option>
|
|
20
|
+
</select>
|
|
21
|
+
<label
|
|
22
|
+
:for="'organisation_chooser_light' + page"
|
|
23
|
+
class="d-inline"
|
|
24
|
+
:title="$t('select productor')"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
27
|
+
<template v-else>
|
|
28
|
+
{{ organisation.name }}
|
|
29
|
+
</template>
|
|
25
30
|
</div>
|
|
26
31
|
</template>
|
|
27
32
|
|
|
28
33
|
<script lang="ts">
|
|
29
|
-
import octopusApi from '@saooti/octopus-api';
|
|
30
34
|
import { Organisation } from '@/store/class/general/organisation';
|
|
35
|
+
import octopusApi from '@saooti/octopus-api';
|
|
31
36
|
import { defineComponent } from 'vue'
|
|
32
37
|
export default defineComponent({
|
|
33
38
|
props: {
|
|
@@ -43,6 +48,7 @@ export default defineComponent({
|
|
|
43
48
|
actual: -1 as number|string,
|
|
44
49
|
organisation: undefined as Organisation|undefined,
|
|
45
50
|
init: false as boolean,
|
|
51
|
+
privateOrganisation: false as boolean
|
|
46
52
|
};
|
|
47
53
|
},
|
|
48
54
|
|
|
@@ -76,6 +82,7 @@ export default defineComponent({
|
|
|
76
82
|
const data = await octopusApi.fetchOrganisation(this.value);
|
|
77
83
|
this.organisation = data;
|
|
78
84
|
this.actual = data.id;
|
|
85
|
+
this.privateOrganisation = data.private??false;
|
|
79
86
|
this.init = true;
|
|
80
87
|
},
|
|
81
88
|
},
|
|
@@ -33,11 +33,13 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script lang="ts">
|
|
36
|
+
import { handle403 } from '../../mixins/handle403';
|
|
36
37
|
import octopusApi from '@saooti/octopus-api';
|
|
37
38
|
import ParticipantItem from './ParticipantItem.vue';
|
|
38
39
|
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
39
40
|
import { Participant } from '@/store/class/general/participant';
|
|
40
41
|
import { defineComponent } from 'vue'
|
|
42
|
+
import { AxiosError } from 'axios';
|
|
41
43
|
export default defineComponent({
|
|
42
44
|
name: 'ParticipantList',
|
|
43
45
|
|
|
@@ -45,6 +47,9 @@ export default defineComponent({
|
|
|
45
47
|
ParticipantItem,
|
|
46
48
|
ClassicLoading
|
|
47
49
|
},
|
|
50
|
+
|
|
51
|
+
mixins: [handle403],
|
|
52
|
+
|
|
48
53
|
props: {
|
|
49
54
|
first: { default: 0, type: Number },
|
|
50
55
|
size: { default: 12, type: Number },
|
|
@@ -99,25 +104,29 @@ export default defineComponent({
|
|
|
99
104
|
if (reset) {
|
|
100
105
|
this.dfirst = 0;
|
|
101
106
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this.displayCount = data.count;
|
|
113
|
-
this.participants = this.participants.concat(data.result).filter((p: Participant | null) => {
|
|
114
|
-
if (null === p) {
|
|
115
|
-
this.displayCount--;
|
|
107
|
+
try {
|
|
108
|
+
const data = await octopusApi.fetchParticipants({
|
|
109
|
+
first: this.dfirst,
|
|
110
|
+
size: this.dsize,
|
|
111
|
+
query: this.query,
|
|
112
|
+
organisationId: this.organisation,
|
|
113
|
+
});
|
|
114
|
+
if (reset) {
|
|
115
|
+
this.participants.length = 0;
|
|
116
|
+
this.dfirst = 0;
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
this.displayCount = data.count;
|
|
119
|
+
this.participants = this.participants.concat(data.result).filter((p: Participant | null) => {
|
|
120
|
+
if (null === p) {
|
|
121
|
+
this.displayCount--;
|
|
122
|
+
}
|
|
123
|
+
return null !== p;
|
|
124
|
+
});
|
|
125
|
+
this.dfirst += this.dsize;
|
|
126
|
+
this.totalCount = data.count;
|
|
127
|
+
} catch (error) {
|
|
128
|
+
this.handle403((error as AxiosError));
|
|
129
|
+
}
|
|
121
130
|
this.loading = false;
|
|
122
131
|
},
|
|
123
132
|
},
|
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script lang="ts">
|
|
39
|
+
import { handle403 } from '../../mixins/handle403';
|
|
39
40
|
import octopusApi from '@saooti/octopus-api';
|
|
40
41
|
import PlaylistItem from './PlaylistItem.vue';
|
|
41
42
|
import { state } from '../../../store/paramStore';
|
|
42
43
|
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
43
44
|
import { Playlist } from '@/store/class/general/playlist';
|
|
44
45
|
import { defineComponent } from 'vue'
|
|
46
|
+
import { AxiosError } from 'axios';
|
|
45
47
|
export default defineComponent({
|
|
46
48
|
name: 'PlaylistList',
|
|
47
49
|
|
|
@@ -49,6 +51,9 @@ export default defineComponent({
|
|
|
49
51
|
PlaylistItem,
|
|
50
52
|
ClassicLoading
|
|
51
53
|
},
|
|
54
|
+
|
|
55
|
+
mixins: [handle403],
|
|
56
|
+
|
|
52
57
|
props: {
|
|
53
58
|
first: { default: 0, type: Number },
|
|
54
59
|
size: { default: 12, type: Number },
|
|
@@ -117,8 +122,12 @@ export default defineComponent({
|
|
|
117
122
|
organisationId: this.organisation,
|
|
118
123
|
sort: this.sort,
|
|
119
124
|
};
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
try {
|
|
126
|
+
const data = await octopusApi.fetchPlaylists(param);
|
|
127
|
+
this.afterFetching(reset, data);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
this.handle403((error as AxiosError));
|
|
130
|
+
}
|
|
122
131
|
},
|
|
123
132
|
afterFetching(reset: boolean, data: {count: number, result: Array<Playlist>, sort: string}): void {
|
|
124
133
|
if (reset) {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<script lang="ts">
|
|
59
|
+
import { handle403 } from '../../mixins/handle403';
|
|
59
60
|
import octopusApi from '@saooti/octopus-api';
|
|
60
61
|
import PodcastItem from '../podcasts/PodcastItem.vue';
|
|
61
62
|
import { state } from '../../../store/paramStore';
|
|
@@ -64,6 +65,7 @@ import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
|
64
65
|
import { Podcast } from '@/store/class/general/podcast';
|
|
65
66
|
import { Playlist } from '@/store/class/general/playlist';
|
|
66
67
|
import { defineComponent } from 'vue'
|
|
68
|
+
import { AxiosError } from 'axios';
|
|
67
69
|
export default defineComponent({
|
|
68
70
|
name: 'PodcastList',
|
|
69
71
|
|
|
@@ -73,6 +75,8 @@ export default defineComponent({
|
|
|
73
75
|
ClassicLoading
|
|
74
76
|
},
|
|
75
77
|
|
|
78
|
+
mixins: [handle403],
|
|
79
|
+
|
|
76
80
|
props: {
|
|
77
81
|
playlist: { default: ()=>({}), type: Object as ()=>Playlist},
|
|
78
82
|
},
|
|
@@ -144,22 +148,26 @@ export default defineComponent({
|
|
|
144
148
|
this.podcasts.length = 0;
|
|
145
149
|
this.loading = true;
|
|
146
150
|
this.loaded = false;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
151
|
+
try {
|
|
152
|
+
const content = await octopusApi.fetchPlaylistContent(
|
|
153
|
+
this.playlist.playlistId.toString()
|
|
154
|
+
);
|
|
155
|
+
for (let index = 0, len = content.length; index < len; index++) {
|
|
156
|
+
content[index].order = this.playlist.podcasts[content[index].podcastId];
|
|
157
|
+
}
|
|
158
|
+
this.podcasts = content;
|
|
159
|
+
if (!this.editRight) {
|
|
160
|
+
this.podcasts = this.podcasts.filter((p: Podcast|null) => {
|
|
161
|
+
return (
|
|
162
|
+
null !== p &&
|
|
163
|
+
(!p.availability || true === p.availability.visibility)
|
|
164
|
+
);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
this.podcastsQuery = this.podcasts;
|
|
168
|
+
} catch (error) {
|
|
169
|
+
this.handle403((error as AxiosError));
|
|
161
170
|
}
|
|
162
|
-
this.podcastsQuery = this.podcasts;
|
|
163
171
|
this.loading = false;
|
|
164
172
|
this.loaded = true;
|
|
165
173
|
},
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
</template>
|
|
80
80
|
|
|
81
81
|
<script lang="ts">
|
|
82
|
+
import { handle403 } from '../../mixins/handle403';
|
|
82
83
|
import octopusApi from '@saooti/octopus-api';
|
|
83
84
|
import domHelper from '../../../helper/dom';
|
|
84
85
|
import PodcastItem from './PodcastItem.vue';
|
|
@@ -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 { AxiosError } from 'axios';
|
|
92
94
|
export default defineComponent({
|
|
93
95
|
name: 'PodcastInlineList',
|
|
94
96
|
|
|
@@ -97,6 +99,8 @@ export default defineComponent({
|
|
|
97
99
|
ClassicLoading
|
|
98
100
|
},
|
|
99
101
|
|
|
102
|
+
mixins: [handle403],
|
|
103
|
+
|
|
100
104
|
props: {
|
|
101
105
|
organisationId: { default: undefined, type: String},
|
|
102
106
|
emissionId: { default: undefined, type: Number},
|
|
@@ -211,34 +215,38 @@ export default defineComponent({
|
|
|
211
215
|
},
|
|
212
216
|
methods: {
|
|
213
217
|
async fetchNext(): Promise<void> {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
this.
|
|
238
|
-
|
|
239
|
-
|
|
218
|
+
try {
|
|
219
|
+
const data = await octopusApi.fetchPodcasts({
|
|
220
|
+
first: this.first,
|
|
221
|
+
size: this.size + 1,
|
|
222
|
+
organisationId: this.organisation,
|
|
223
|
+
emissionId: this.emissionId,
|
|
224
|
+
iabId: this.iabId,
|
|
225
|
+
rubriqueId: this.rubriqueId.length ?this.rubriqueId:undefined,
|
|
226
|
+
rubriquageId: this.rubriquageId.length ?this.rubriquageId : undefined,
|
|
227
|
+
noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
|
|
228
|
+
sort: this.popularSort ? 'POPULARITY' : 'DATE',
|
|
229
|
+
query: this.query,
|
|
230
|
+
});
|
|
231
|
+
this.loading = false;
|
|
232
|
+
this.loaded = true;
|
|
233
|
+
this.totalCount = data.count;
|
|
234
|
+
if (this.allPodcasts.length + data.result.length < this.totalCount) {
|
|
235
|
+
const nexEl = data.result.pop() as Podcast;
|
|
236
|
+
this.preloadImage(nexEl.imageUrl?nexEl.imageUrl:'');
|
|
237
|
+
}
|
|
238
|
+
this.allPodcasts = this.allPodcasts.concat(
|
|
239
|
+
data.result.filter((pod: Podcast|null) => null !== pod)
|
|
240
|
+
);
|
|
241
|
+
if (this.allPodcasts.length <= 3) {
|
|
242
|
+
this.alignLeft = true;
|
|
243
|
+
} else {
|
|
244
|
+
this.alignLeft = false;
|
|
245
|
+
}
|
|
246
|
+
this.first += this.size;
|
|
247
|
+
} catch (error) {
|
|
248
|
+
this.handle403((error as AxiosError));
|
|
240
249
|
}
|
|
241
|
-
this.first += this.size;
|
|
242
250
|
},
|
|
243
251
|
displayPrevious(): void {
|
|
244
252
|
this.direction = -1;
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script lang="ts">
|
|
43
|
+
import { handle403 } from '../../mixins/handle403';
|
|
43
44
|
import octopusApi from '@saooti/octopus-api';
|
|
44
45
|
import PodcastItem from './PodcastItem.vue';
|
|
45
46
|
import { state } from '../../../store/paramStore';
|
|
@@ -47,6 +48,7 @@ import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
|
47
48
|
import { Podcast } from '@/store/class/general/podcast';
|
|
48
49
|
import { defineComponent } from 'vue'
|
|
49
50
|
import { FetchParam } from '@/store/class/general/fetchParam';
|
|
51
|
+
import { AxiosError } from 'axios';
|
|
50
52
|
export default defineComponent({
|
|
51
53
|
name: 'PodcastList',
|
|
52
54
|
|
|
@@ -55,6 +57,8 @@ export default defineComponent({
|
|
|
55
57
|
ClassicLoading
|
|
56
58
|
},
|
|
57
59
|
|
|
60
|
+
mixins: [handle403],
|
|
61
|
+
|
|
58
62
|
props: {
|
|
59
63
|
first: { default: 0, type: Number},
|
|
60
64
|
size: { default: 12, type: Number},
|
|
@@ -174,8 +178,12 @@ export default defineComponent({
|
|
|
174
178
|
if (this.notValid && !this.isProduction) {
|
|
175
179
|
param.publisherId = this.$store.state.profile.userId;
|
|
176
180
|
}
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
try {
|
|
182
|
+
const data = await octopusApi.fetchPodcasts(param);
|
|
183
|
+
this.afterFetching(reset, data);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
this.handle403((error as AxiosError));
|
|
186
|
+
}
|
|
179
187
|
},
|
|
180
188
|
afterFetching(reset: boolean, data: {count: number, result: Array<Podcast>, sort: string}): void {
|
|
181
189
|
if (reset) {
|
|
@@ -39,6 +39,20 @@
|
|
|
39
39
|
>
|
|
40
40
|
<span class="saooti-deezer" />Deezer
|
|
41
41
|
</router-link>
|
|
42
|
+
<router-link
|
|
43
|
+
:to="'/main/priv/distribution/googlePodcasts/' + emissionId"
|
|
44
|
+
class="text-dark"
|
|
45
|
+
>
|
|
46
|
+
<span class="saooti-google-podcasts">
|
|
47
|
+
<div class="path1" />
|
|
48
|
+
<div class="path2" />
|
|
49
|
+
<div class="path3" />
|
|
50
|
+
<div class="path4" />
|
|
51
|
+
<div class="path5" />
|
|
52
|
+
<div class="path6" />
|
|
53
|
+
<div class="path7" />
|
|
54
|
+
</span> Google Podcasts
|
|
55
|
+
</router-link>
|
|
42
56
|
<router-link
|
|
43
57
|
:to="'/main/priv/distribution/PlayerFM/' + emissionId"
|
|
44
58
|
class="text-dark"
|
|
@@ -174,6 +188,13 @@ export default defineComponent({
|
|
|
174
188
|
right: 0;
|
|
175
189
|
}
|
|
176
190
|
}
|
|
191
|
+
.saooti-google-podcasts {
|
|
192
|
+
width: 15px;
|
|
193
|
+
height: 20px;
|
|
194
|
+
div {
|
|
195
|
+
right: 0;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
177
198
|
a {
|
|
178
199
|
display: flex;
|
|
179
200
|
align-items: center;
|
|
@@ -38,6 +38,24 @@
|
|
|
38
38
|
>
|
|
39
39
|
<span class="saooti-deezer" />
|
|
40
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>
|
|
41
59
|
<a
|
|
42
60
|
v-if="playerFm"
|
|
43
61
|
rel="noopener"
|
|
@@ -48,6 +66,16 @@
|
|
|
48
66
|
>
|
|
49
67
|
<span class="saooti-playerfm" />
|
|
50
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>
|
|
51
79
|
<a
|
|
52
80
|
v-if="podcastAddict"
|
|
53
81
|
rel="noopener"
|
|
@@ -167,6 +195,14 @@ export default defineComponent({
|
|
|
167
195
|
(this.emission && this.emission.annotations
|
|
168
196
|
? this.emission.annotations.amazon
|
|
169
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,
|
|
170
206
|
};
|
|
171
207
|
},
|
|
172
208
|
|
|
@@ -182,6 +218,8 @@ export default defineComponent({
|
|
|
182
218
|
this.playerFm = this.externaliseLinks(this.playerFm);
|
|
183
219
|
this.stitcher = this.externaliseLinks(this.stitcher);
|
|
184
220
|
this.amazon = this.externaliseLinks(this.amazon);
|
|
221
|
+
this.googlePodcasts = this.externaliseLinks(this.googlePodcasts);
|
|
222
|
+
this.pocketCasts = this.externaliseLinks(this.pocketCasts);
|
|
185
223
|
},
|
|
186
224
|
|
|
187
225
|
methods: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
import { defineComponent } from 'vue';
|
|
3
|
+
export const handle403 = defineComponent({
|
|
4
|
+
methods: {
|
|
5
|
+
handle403(error: AxiosError): void {
|
|
6
|
+
if (403 === error.response?.status) {
|
|
7
|
+
if(!this.$store.state.authentication.isAuthenticated){
|
|
8
|
+
this.$router.push("/sso/login");
|
|
9
|
+
}else{
|
|
10
|
+
this.$router.push({
|
|
11
|
+
path: '/main/pub/error'
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -103,9 +103,11 @@
|
|
|
103
103
|
import octopusApi from '@saooti/octopus-api';
|
|
104
104
|
import { state } from '../../store/paramStore';
|
|
105
105
|
import { displayMethods } from '../mixins/functions';
|
|
106
|
+
import { handle403 } from '../mixins/handle403';
|
|
106
107
|
import { Emission } from '@/store/class/general/emission';
|
|
107
108
|
import ClassicLoading from '../form/ClassicLoading.vue';
|
|
108
109
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
110
|
+
import { AxiosError } from 'axios';
|
|
109
111
|
const PodcastFilterList = defineAsyncComponent(() => import('../display/podcasts/PodcastFilterList.vue'));
|
|
110
112
|
const SharePlayer = defineAsyncComponent(() => import('../display/sharing/SharePlayer.vue'));
|
|
111
113
|
const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
|
|
@@ -126,7 +128,7 @@ export default defineComponent({
|
|
|
126
128
|
LiveHorizontalList,
|
|
127
129
|
ClassicLoading
|
|
128
130
|
},
|
|
129
|
-
mixins: [displayMethods],
|
|
131
|
+
mixins: [displayMethods, handle403],
|
|
130
132
|
props: {
|
|
131
133
|
emissionId: { default: undefined, type: Number},
|
|
132
134
|
isEducation: { default: false, type: Boolean},
|
|
@@ -209,15 +211,20 @@ export default defineComponent({
|
|
|
209
211
|
if (undefined !== this.emission.annotations.amazon) count++;
|
|
210
212
|
if (undefined !== this.emission.annotations.applePodcast) count++;
|
|
211
213
|
if (undefined !== this.emission.annotations.deezer) count++;
|
|
214
|
+
if (undefined !== this.emission.annotations.googlePodcasts) count++;
|
|
212
215
|
if (undefined !== this.emission.annotations.spotify) count++;
|
|
213
216
|
if (undefined !== this.emission.annotations.tunein) count++;
|
|
214
217
|
if (undefined !== this.emission.annotations.radioline) count++;
|
|
215
218
|
if (undefined !== this.emission.annotations.podcastAddict) count++;
|
|
216
219
|
if (undefined !== this.emission.annotations.playerFm) count++;
|
|
217
220
|
if (undefined !== this.emission.annotations.stitcher) count++;
|
|
221
|
+
if (undefined !== this.emission.annotations.pocketCasts) count++;
|
|
218
222
|
}
|
|
219
223
|
return count;
|
|
220
224
|
},
|
|
225
|
+
filterOrga(): string {
|
|
226
|
+
return this.$store.state.filter.organisationId;
|
|
227
|
+
},
|
|
221
228
|
},
|
|
222
229
|
watch: {
|
|
223
230
|
emissionId(): void {
|
|
@@ -229,12 +236,20 @@ export default defineComponent({
|
|
|
229
236
|
this.getEmissionDetails();
|
|
230
237
|
},
|
|
231
238
|
methods: {
|
|
239
|
+
initError():void{
|
|
240
|
+
this.error = true;
|
|
241
|
+
this.loaded = true;
|
|
242
|
+
},
|
|
232
243
|
async getEmissionDetails(): Promise<void> {
|
|
233
244
|
this.loaded = false;
|
|
234
245
|
this.error = false;
|
|
235
246
|
try {
|
|
236
247
|
const data: Emission = await octopusApi.fetchEmission(this.emissionId);
|
|
237
248
|
this.emission = data;
|
|
249
|
+
if(this.emission.orga.private && this.filterOrga!==this.emission.orga.id){
|
|
250
|
+
this.initError();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
238
253
|
this.$emit('emissionTitle', this.name);
|
|
239
254
|
this.loaded = true;
|
|
240
255
|
if (!this.emission.annotations) return;
|
|
@@ -250,9 +265,9 @@ export default defineComponent({
|
|
|
250
265
|
this.notExclusive =
|
|
251
266
|
'true' === this.emission.annotations.notExclusive ? true : false;
|
|
252
267
|
}
|
|
253
|
-
} catch {
|
|
254
|
-
this.error
|
|
255
|
-
this.
|
|
268
|
+
} catch(error) {
|
|
269
|
+
this.handle403((error as AxiosError));
|
|
270
|
+
this.initError();
|
|
256
271
|
}
|
|
257
272
|
},
|
|
258
273
|
fetch(/* podcasts */) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-box page-box-absolute bg-white justify-content-evenly">
|
|
3
|
+
<img
|
|
4
|
+
class="logo-octopus"
|
|
5
|
+
src="/img/logo_octopus_final.svg"
|
|
6
|
+
:alt="$t('Logo of main page')"
|
|
7
|
+
>
|
|
8
|
+
<h2>{{ $t('You do not have the right to access this page' ) }}</h2>
|
|
9
|
+
<a
|
|
10
|
+
class="btn btn-link"
|
|
11
|
+
href="/sso/logout"
|
|
12
|
+
>{{ $t('Logout') }}</a>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { defineComponent } from 'vue';
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
name: 'Error403Page',
|
|
20
|
+
mounted() {
|
|
21
|
+
document.title = this.$store.state.general.metaTitle;
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
@@ -82,9 +82,11 @@
|
|
|
82
82
|
import octopusApi from '@saooti/octopus-api';
|
|
83
83
|
import { state } from '../../store/paramStore';
|
|
84
84
|
import { displayMethods } from '../mixins/functions';
|
|
85
|
+
import { handle403 } from '../mixins/handle403';
|
|
85
86
|
import { Participant } from '@/store/class/general/participant';
|
|
86
87
|
import ClassicLoading from '../form/ClassicLoading.vue';
|
|
87
88
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
89
|
+
import { AxiosError } from 'axios';
|
|
88
90
|
const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
|
|
89
91
|
const PodcastFilterList = defineAsyncComponent(() => import('../display/podcasts/PodcastFilterList.vue'));
|
|
90
92
|
const EditBox = defineAsyncComponent(() => import('@/components/display/edit/EditBox.vue'));
|
|
@@ -97,7 +99,7 @@ export default defineComponent({
|
|
|
97
99
|
PodcastList,
|
|
98
100
|
ClassicLoading
|
|
99
101
|
},
|
|
100
|
-
mixins: [displayMethods],
|
|
102
|
+
mixins: [displayMethods, handle403],
|
|
101
103
|
props: {
|
|
102
104
|
participantId: { default: undefined, type: Number},
|
|
103
105
|
},
|
|
@@ -160,6 +162,9 @@ export default defineComponent({
|
|
|
160
162
|
}
|
|
161
163
|
return false;
|
|
162
164
|
},
|
|
165
|
+
filterOrga(): string {
|
|
166
|
+
return this.$store.state.filter.organisationId;
|
|
167
|
+
},
|
|
163
168
|
},
|
|
164
169
|
watch: {
|
|
165
170
|
participant: {
|
|
@@ -173,16 +178,24 @@ export default defineComponent({
|
|
|
173
178
|
this.getParticipantDetails();
|
|
174
179
|
},
|
|
175
180
|
methods: {
|
|
181
|
+
initError():void{
|
|
182
|
+
this.error = true;
|
|
183
|
+
this.loaded = true;
|
|
184
|
+
},
|
|
176
185
|
async getParticipantDetails(): Promise<void> {
|
|
177
186
|
this.loaded = false;
|
|
178
187
|
try {
|
|
179
188
|
const data = await octopusApi.fetchParticipant(this.participantId ? this.participantId.toString(): "");
|
|
189
|
+
if(data && data.orga && data.orga.private && this.filterOrga!==data.orga.id){
|
|
190
|
+
this.initError();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
180
193
|
this.participant = data;
|
|
181
194
|
this.$emit('participantTitle', this.name);
|
|
182
195
|
this.loaded = true;
|
|
183
|
-
} catch {
|
|
184
|
-
this.error
|
|
185
|
-
this.
|
|
196
|
+
} catch(error) {
|
|
197
|
+
this.handle403((error as AxiosError));
|
|
198
|
+
this.initError();
|
|
186
199
|
}
|
|
187
200
|
},
|
|
188
201
|
updateParticipant(participant: Participant): void {
|
|
@@ -53,8 +53,10 @@ import PodcastList from '../display/playlist/PodcastList.vue';
|
|
|
53
53
|
import octopusApi from '@saooti/octopus-api';
|
|
54
54
|
import { state } from '../../store/paramStore';
|
|
55
55
|
import { displayMethods } from '../mixins/functions';
|
|
56
|
+
import { handle403 } from '../mixins/handle403';
|
|
56
57
|
import { Playlist } from '@/store/class/general/playlist';
|
|
57
58
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
59
|
+
import { AxiosError } from 'axios';
|
|
58
60
|
const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
|
|
59
61
|
const EditBox = defineAsyncComponent(() => import('@/components/display/edit/EditBox.vue'));
|
|
60
62
|
const SharePlayer = defineAsyncComponent(() => import('../display/sharing/SharePlayer.vue'));
|
|
@@ -66,7 +68,7 @@ export default defineComponent({
|
|
|
66
68
|
SharePlayer,
|
|
67
69
|
ClassicLoading
|
|
68
70
|
},
|
|
69
|
-
mixins:[displayMethods],
|
|
71
|
+
mixins:[displayMethods, handle403],
|
|
70
72
|
props: {
|
|
71
73
|
playlistId: { default: undefined, type: Number},
|
|
72
74
|
isEducation: { default: false, type: Boolean},
|
|
@@ -117,6 +119,9 @@ export default defineComponent({
|
|
|
117
119
|
}
|
|
118
120
|
return false;
|
|
119
121
|
},
|
|
122
|
+
filterOrga(): string {
|
|
123
|
+
return this.$store.state.filter.organisationId;
|
|
124
|
+
},
|
|
120
125
|
},
|
|
121
126
|
watch: {
|
|
122
127
|
playlistId() {
|
|
@@ -128,15 +133,24 @@ export default defineComponent({
|
|
|
128
133
|
this.getPlaylistDetails();
|
|
129
134
|
},
|
|
130
135
|
methods: {
|
|
136
|
+
initError():void{
|
|
137
|
+
this.error = true;
|
|
138
|
+
this.loaded = true;
|
|
139
|
+
},
|
|
131
140
|
async getPlaylistDetails(): Promise<void> {
|
|
132
141
|
try {
|
|
133
142
|
this.loaded = false;
|
|
134
143
|
this.error = false;
|
|
135
144
|
const data: Playlist = await octopusApi.fetchPlaylist(this.playlistId ? this.playlistId.toString(): "");
|
|
136
145
|
this.playlist = data;
|
|
146
|
+
if(this.playlist.organisation.private && this.filterOrga!==this.playlist.organisation.id){
|
|
147
|
+
this.initError();
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
137
150
|
this.$emit('playlistTitle', this.playlist.title);
|
|
138
|
-
} catch {
|
|
139
|
-
this.error
|
|
151
|
+
} catch(error) {
|
|
152
|
+
this.handle403((error as AxiosError));
|
|
153
|
+
this.initError();
|
|
140
154
|
}
|
|
141
155
|
this.loaded = true;
|
|
142
156
|
},
|
|
@@ -103,11 +103,12 @@ import { state } from '../../store/paramStore';
|
|
|
103
103
|
import moment from 'moment';
|
|
104
104
|
import { Podcast } from '@/store/class/general/podcast';
|
|
105
105
|
import { Conference } from '@/store/class/conference/conference';
|
|
106
|
-
|
|
106
|
+
import { handle403 } from '../mixins/handle403';
|
|
107
107
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
108
108
|
import CommentSectionVue from '../display/comments/CommentSection.vue';
|
|
109
109
|
import { CommentPodcast } from '@/store/class/general/comment';
|
|
110
110
|
import { Category } from '@/store/class/general/category';
|
|
111
|
+
import { AxiosError } from 'axios';
|
|
111
112
|
const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
|
|
112
113
|
const SharePlayer = defineAsyncComponent(() => import('../display/sharing/SharePlayer.vue'));
|
|
113
114
|
const EditBox = defineAsyncComponent(() => import('@/components/display/edit/EditBox.vue'));
|
|
@@ -130,6 +131,8 @@ export default defineComponent({
|
|
|
130
131
|
ClassicLoading
|
|
131
132
|
},
|
|
132
133
|
|
|
134
|
+
mixins: [handle403],
|
|
135
|
+
|
|
133
136
|
props: {
|
|
134
137
|
updateStatus: { default: undefined, type: String},
|
|
135
138
|
playingPodcast: { default: undefined, type: Object as ()=> Podcast},
|
|
@@ -219,6 +222,7 @@ export default defineComponent({
|
|
|
219
222
|
let count = 0;
|
|
220
223
|
if (this.podcast && this.podcast.emission && this.podcast.emission.annotations) {
|
|
221
224
|
if (undefined !== this.podcast.emission.annotations.amazon) count++;
|
|
225
|
+
if (undefined !== this.podcast.emission.annotations.googlePodcasts) count++;
|
|
222
226
|
if (undefined !== this.podcast.emission.annotations.applePodcast)
|
|
223
227
|
count++;
|
|
224
228
|
if (undefined !== this.podcast.emission.annotations.deezer) count++;
|
|
@@ -228,6 +232,7 @@ export default defineComponent({
|
|
|
228
232
|
if (undefined !== this.podcast.emission.annotations.podcastAddict) count++;
|
|
229
233
|
if (undefined !== this.podcast.emission.annotations.playerFm) count++;
|
|
230
234
|
if (undefined !== this.podcast.emission.annotations.stitcher) count++;
|
|
235
|
+
if (undefined !== this.podcast.emission.annotations.pocketCasts) count++;
|
|
231
236
|
}
|
|
232
237
|
return count;
|
|
233
238
|
},
|
|
@@ -264,6 +269,9 @@ export default defineComponent({
|
|
|
264
269
|
if(!this.podcast){return "";}
|
|
265
270
|
return moment(this.podcast.pubDate).diff(moment(), 'seconds').toString();
|
|
266
271
|
},
|
|
272
|
+
filterOrga(): string {
|
|
273
|
+
return this.$store.state.filter.organisationId;
|
|
274
|
+
},
|
|
267
275
|
},
|
|
268
276
|
watch: {
|
|
269
277
|
updateStatus(): void {
|
|
@@ -312,9 +320,17 @@ export default defineComponent({
|
|
|
312
320
|
updatePodcast(podcastUpdated: Podcast): void {
|
|
313
321
|
this.podcast = podcastUpdated;
|
|
314
322
|
},
|
|
323
|
+
initError():void{
|
|
324
|
+
this.error = true;
|
|
325
|
+
this.loaded = true;
|
|
326
|
+
},
|
|
315
327
|
async getPodcastDetails(podcastId: number): Promise<void> {
|
|
316
328
|
try {
|
|
317
329
|
const data : Podcast = await octopusApi.fetchPodcast(podcastId.toString());
|
|
330
|
+
if(data.organisation.private && this.filterOrga!==data.organisation.id){
|
|
331
|
+
this.initError();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
318
334
|
this.podcast = data;
|
|
319
335
|
this.$emit('podcastTitle', this.podcast.title);
|
|
320
336
|
if (
|
|
@@ -348,9 +364,9 @@ export default defineComponent({
|
|
|
348
364
|
this.error = true;
|
|
349
365
|
}
|
|
350
366
|
this.loaded = true;
|
|
351
|
-
} catch {
|
|
352
|
-
this.error
|
|
353
|
-
this.
|
|
367
|
+
} catch(error) {
|
|
368
|
+
this.handle403((error as AxiosError));
|
|
369
|
+
this.initError();
|
|
354
370
|
}
|
|
355
371
|
},
|
|
356
372
|
removeDeleted(): void {
|
package/src/locale/en.ts
CHANGED
package/src/locale/fr.ts
CHANGED
package/src/main.ts
CHANGED
package/src/router/router.ts
CHANGED
|
@@ -17,6 +17,7 @@ const RubriquePage = () => import('@/components/pages/Rubrique.vue');
|
|
|
17
17
|
const LivesPage = () => import('@/components/pages/Lives.vue');
|
|
18
18
|
const PlaylistPage = () => import('@/components/pages/Playlist.vue');
|
|
19
19
|
const PlaylistsPage = () => import('@/components/pages/Playlists.vue');
|
|
20
|
+
const error403Page = () => import('@/components/pages/Error403Page.vue');
|
|
20
21
|
|
|
21
22
|
const routes: Array<RouteRecordRaw> = [
|
|
22
23
|
/*--------------------------------------------------------------------------
|
|
@@ -27,6 +28,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
27
28
|
name: '',
|
|
28
29
|
component: Home,
|
|
29
30
|
},
|
|
31
|
+
{
|
|
32
|
+
path: '/main/pub/error',
|
|
33
|
+
name: 'error',
|
|
34
|
+
component: error403Page,
|
|
35
|
+
},
|
|
30
36
|
{
|
|
31
37
|
path: '/main/pub/home:productor?:iabId?:rubriquesId?',
|
|
32
38
|
name: 'home',
|
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
|
},
|