@saooti/octopus-sdk 31.0.0 → 31.0.3
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 +23 -0
- package/index.ts +8 -2
- package/package.json +4 -3
- package/src/assets/general.scss +8 -0
- package/src/assets/share.scss +40 -0
- package/src/components/display/categories/CategoryChooser.vue +2 -14
- package/src/components/display/categories/CategoryFilter.vue +10 -8
- package/src/components/display/categories/CategoryList.vue +26 -24
- package/src/components/display/comments/AddCommentModal.vue +2 -5
- package/src/components/display/comments/CommentBasicView.vue +1 -1
- package/src/components/display/comments/CommentInput.vue +21 -19
- package/src/components/display/comments/CommentList.vue +2 -0
- package/src/components/display/comments/CommentPlayer.vue +2 -0
- package/src/components/display/emission/EmissionChooser.vue +0 -9
- package/src/components/display/emission/EmissionInlineList.vue +36 -53
- package/src/components/display/emission/EmissionList.vue +12 -8
- package/src/components/display/emission/EmissionPlayerItem.vue +16 -1
- package/src/components/display/filter/AdvancedSearch.vue +2 -0
- package/src/components/display/filter/ProductorSearch.vue +6 -1
- package/src/components/display/live/LiveHorizontalList.vue +1 -1
- package/src/components/display/live/LiveItem.vue +2 -1
- package/src/components/display/live/LiveList.vue +51 -41
- package/src/components/display/organisation/OrganisationChooser.vue +1 -10
- package/src/components/display/organisation/OrganisationChooserLight.vue +28 -19
- package/src/components/display/participant/ParticipantItem.vue +2 -0
- package/src/components/display/participant/ParticipantList.vue +30 -19
- package/src/components/display/playlist/PlaylistList.vue +12 -3
- package/src/components/display/playlist/PodcastList.vue +26 -16
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +204 -0
- package/src/components/display/podcasts/AnimatorsItem.vue +2 -0
- package/src/components/display/podcasts/ParticipantDescription.vue +1 -5
- package/src/components/display/podcasts/PodcastImage.vue +2 -1
- package/src/components/display/podcasts/PodcastInlineList.vue +52 -30
- package/src/components/display/podcasts/PodcastItem.vue +12 -0
- package/src/components/display/podcasts/PodcastList.vue +11 -3
- package/src/components/display/podcasts/PodcastPlayBar.vue +5 -3
- package/src/components/display/podcasts/TagList.vue +2 -0
- package/src/components/display/rubriques/RubriqueChooser.vue +2 -6
- package/src/components/display/rubriques/RubriqueList.vue +3 -1
- package/src/components/display/sharing/PlayerParameters.vue +2 -0
- package/src/components/display/sharing/QrCode.vue +7 -0
- package/src/components/display/sharing/ShareDistribution.vue +2 -0
- package/src/components/display/sharing/SharePlayer.vue +2 -0
- package/src/components/display/sharing/SubscribeButtons.vue +15 -0
- package/src/components/form/ClassicSearch.vue +2 -0
- package/src/components/misc/ErrorMessage.vue +2 -0
- package/src/components/misc/Footer.vue +2 -0
- package/src/components/misc/LeftMenu.vue +2 -0
- package/src/components/misc/Player.vue +58 -40
- package/src/components/misc/PlayerButtons.vue +6 -14
- package/src/components/misc/PlayerClockAndTimeline.vue +2 -0
- package/src/components/misc/PlayerProgressBar.vue +2 -0
- package/src/components/misc/Popover.vue +5 -0
- package/src/components/misc/Snackbar.vue +2 -0
- package/src/components/misc/TopBar.vue +2 -0
- package/src/components/misc/modal/NewsletterModal.vue +11 -3
- package/src/components/misc/modal/ShareModalPlayer.vue +2 -0
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/pages/Emission.vue +18 -4
- package/src/components/pages/Error403Page.vue +24 -0
- package/src/components/pages/Participant.vue +19 -4
- package/src/components/pages/Playlist.vue +17 -3
- package/src/components/pages/Podcast.vue +29 -12
- package/src/components/pages/Podcasts.vue +4 -0
- package/src/locale/en.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/locale/it.ts +298 -0
- package/src/locale/messages.ts +2 -0
- package/src/main.ts +18 -1
- package/src/router/router.ts +6 -0
- package/src/store/class/general/organisation.ts +1 -0
- package/src/store/paramStore.ts +19 -14
- package/src/store/typeAppStore.ts +0 -4
|
@@ -61,6 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
});
|
|
62
62
|
</script>
|
|
63
63
|
<style lang="scss">
|
|
64
|
+
.octopus-app{
|
|
64
65
|
.champs-searchPage{
|
|
65
66
|
input {
|
|
66
67
|
border: 2px solid #dee2e6;
|
|
@@ -81,4 +82,5 @@ export default defineComponent({
|
|
|
81
82
|
margin: 1rem;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
85
|
+
}
|
|
84
86
|
</style>
|
|
@@ -201,6 +201,7 @@ export default defineComponent({
|
|
|
201
201
|
</script>
|
|
202
202
|
|
|
203
203
|
<style lang="scss">
|
|
204
|
+
.octopus-app{
|
|
204
205
|
#footer{
|
|
205
206
|
font-size: 0.7rem;
|
|
206
207
|
.acpm_image {
|
|
@@ -221,4 +222,5 @@ export default defineComponent({
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
}
|
|
225
|
+
}
|
|
224
226
|
</style>
|
|
@@ -195,6 +195,7 @@ export default defineComponent({
|
|
|
195
195
|
</script>
|
|
196
196
|
|
|
197
197
|
<style lang="scss">
|
|
198
|
+
.octopus-app{
|
|
198
199
|
.left-menu-container {
|
|
199
200
|
position: fixed;
|
|
200
201
|
top: 3rem;
|
|
@@ -225,4 +226,5 @@ export default defineComponent({
|
|
|
225
226
|
width: 94%;
|
|
226
227
|
}
|
|
227
228
|
}
|
|
229
|
+
}
|
|
228
230
|
</style>
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
class="d-flex align-items-center flex-grow-1 px-5"
|
|
29
29
|
>
|
|
30
30
|
<audio
|
|
31
|
-
v-if="!live"
|
|
32
31
|
id="audio-player"
|
|
33
32
|
:src="!live? audioUrl: undefined"
|
|
34
33
|
autoplay
|
|
@@ -52,6 +51,15 @@
|
|
|
52
51
|
:player-error="playerError"
|
|
53
52
|
:listen-time="listenTime"
|
|
54
53
|
/>
|
|
54
|
+
<div
|
|
55
|
+
class="play-button-box primary-bg text-light"
|
|
56
|
+
@click="stopPlayer"
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
class="saooti-cross"
|
|
60
|
+
:title="$t('Close')"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
55
63
|
<PlayerClockAndTimeline
|
|
56
64
|
v-model:showTimeline="showTimeline"
|
|
57
65
|
:comments="comments"
|
|
@@ -194,6 +202,9 @@ export default defineComponent({
|
|
|
194
202
|
commentsLoaded(): void {
|
|
195
203
|
this.initComments(true);
|
|
196
204
|
},
|
|
205
|
+
audioUrl(): void{
|
|
206
|
+
this.playerError = false;
|
|
207
|
+
}
|
|
197
208
|
},
|
|
198
209
|
|
|
199
210
|
mounted() {
|
|
@@ -202,6 +213,9 @@ export default defineComponent({
|
|
|
202
213
|
},
|
|
203
214
|
|
|
204
215
|
methods: {
|
|
216
|
+
stopPlayer(): void {
|
|
217
|
+
this.$store.commit('playerPlayPodcast');
|
|
218
|
+
},
|
|
205
219
|
getListenerId(): string{
|
|
206
220
|
let listenerId = this.getCookie("octopus_listenerId");
|
|
207
221
|
if(!listenerId){
|
|
@@ -342,47 +356,49 @@ export default defineComponent({
|
|
|
342
356
|
this.listenTime = 0;
|
|
343
357
|
},
|
|
344
358
|
async initHls(hlsStreamUrl: string): Promise<void> {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
if (!Hls.isSupported()) {
|
|
355
|
-
throw 'Hls is not supported ! ';
|
|
356
|
-
}
|
|
357
|
-
const hls = new Hls();
|
|
358
|
-
hls.on(Hls.Events.MANIFEST_PARSED, async () => {
|
|
359
|
-
if(!this.live){ return; }
|
|
360
|
-
let downloadId = null;
|
|
361
|
-
try {
|
|
362
|
-
downloadId = await octopusApi.requestLiveDownloadId(
|
|
363
|
-
this.live.livePodcastId
|
|
364
|
-
);
|
|
365
|
-
await octopusApi.markPlayingLive(
|
|
366
|
-
this.live.livePodcastId,
|
|
367
|
-
downloadId,
|
|
368
|
-
'octopus',
|
|
369
|
-
this.$store.state.authentication.organisationId
|
|
370
|
-
);
|
|
371
|
-
this.setDownloadId(downloadId);
|
|
372
|
-
} catch (error) {
|
|
373
|
-
console.log('ERROR downloadId');
|
|
359
|
+
return new Promise<void>(async(resolve, reject) => {
|
|
360
|
+
if(null === Hls){
|
|
361
|
+
//TODO -> Version light min quand ce sera possible
|
|
362
|
+
await import('hls.js/dist/hls.js').then((hlsLibrary) => {
|
|
363
|
+
Hls = hlsLibrary.default;
|
|
364
|
+
})
|
|
365
|
+
await import('hls.js').then((hlsLibrary) => {
|
|
366
|
+
Hls = hlsLibrary.default;
|
|
367
|
+
})
|
|
374
368
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
369
|
+
if (!Hls.isSupported()) {
|
|
370
|
+
reject('Hls is not supported ! ');
|
|
371
|
+
}
|
|
372
|
+
const hls = new Hls();
|
|
373
|
+
hls.on(Hls.Events.MANIFEST_PARSED, async () => {
|
|
374
|
+
if(!this.live){ return; }
|
|
375
|
+
let downloadId = null;
|
|
376
|
+
try {
|
|
377
|
+
downloadId = await octopusApi.requestLiveDownloadId(
|
|
378
|
+
this.live.livePodcastId
|
|
379
|
+
);
|
|
380
|
+
await octopusApi.markPlayingLive(
|
|
381
|
+
this.live.livePodcastId,
|
|
382
|
+
downloadId,
|
|
383
|
+
'octopus',
|
|
384
|
+
this.$store.state.authentication.organisationId
|
|
385
|
+
);
|
|
386
|
+
this.setDownloadId(downloadId);
|
|
387
|
+
} catch (error) {
|
|
388
|
+
console.log('ERROR downloadId');
|
|
389
|
+
}
|
|
390
|
+
this.hlsReady = true;
|
|
391
|
+
const audio: HTMLElement|null = document.getElementById('audio-player');
|
|
392
|
+
hls.attachMedia((audio as HTMLAudioElement));
|
|
393
|
+
await (audio as HTMLAudioElement).play();
|
|
394
|
+
this.onPlay();
|
|
395
|
+
resolve();
|
|
396
|
+
});
|
|
397
|
+
hls.on(Hls.Events.ERROR, async() => {
|
|
398
|
+
reject('There is an error while reading media content');
|
|
399
|
+
});
|
|
400
|
+
hls.loadSource(hlsStreamUrl);
|
|
384
401
|
});
|
|
385
|
-
hls.loadSource(hlsStreamUrl);
|
|
386
402
|
},
|
|
387
403
|
async playLive(): Promise<void> {
|
|
388
404
|
if (!this.live) return;
|
|
@@ -469,6 +485,7 @@ export default defineComponent({
|
|
|
469
485
|
</script>
|
|
470
486
|
|
|
471
487
|
<style lang="scss">
|
|
488
|
+
.octopus-app{
|
|
472
489
|
.player-container {
|
|
473
490
|
position: fixed;
|
|
474
491
|
overflow: hidden;
|
|
@@ -493,4 +510,5 @@ export default defineComponent({
|
|
|
493
510
|
}
|
|
494
511
|
}
|
|
495
512
|
}
|
|
513
|
+
}
|
|
496
514
|
</style>
|
|
@@ -19,19 +19,10 @@
|
|
|
19
19
|
:class="{
|
|
20
20
|
'saooti-play2-bounty': isPaused,
|
|
21
21
|
'saooti-pause-bounty': isPlaying,
|
|
22
|
+
'spinner-border':!isPaused&&!isPlaying
|
|
22
23
|
}"
|
|
23
24
|
/>
|
|
24
25
|
</div>
|
|
25
|
-
<div
|
|
26
|
-
v-if="isPlaying || isPaused"
|
|
27
|
-
class="play-button-box primary-bg text-light"
|
|
28
|
-
@click="stopPlayer"
|
|
29
|
-
>
|
|
30
|
-
<div
|
|
31
|
-
class="saooti-stop-bounty"
|
|
32
|
-
:title="$t('Stop')"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
26
|
</template>
|
|
36
27
|
|
|
37
28
|
<script lang="ts">
|
|
@@ -88,6 +79,9 @@ export default defineComponent({
|
|
|
88
79
|
|
|
89
80
|
methods: {
|
|
90
81
|
addKeyboardControl(event: KeyboardEvent): void{
|
|
82
|
+
if(!event || null ===event){return;}
|
|
83
|
+
const element = event.target as HTMLElement;
|
|
84
|
+
if (!element || 'INPUT' == element.tagName.toUpperCase() || 'TEXTAREA' == element.tagName.toUpperCase()){return;}
|
|
91
85
|
if (' ' === event.key || 'Spacebar' === event.key) {
|
|
92
86
|
event.preventDefault();
|
|
93
87
|
this.switchPausePlay();
|
|
@@ -110,9 +104,6 @@ export default defineComponent({
|
|
|
110
104
|
this.onPause();
|
|
111
105
|
}
|
|
112
106
|
},
|
|
113
|
-
stopPlayer(): void {
|
|
114
|
-
this.$store.commit('playerPlayPodcast');
|
|
115
|
-
},
|
|
116
107
|
onPlay(): void {
|
|
117
108
|
this.$store.commit('playerPause', false);
|
|
118
109
|
},
|
|
@@ -124,6 +115,7 @@ export default defineComponent({
|
|
|
124
115
|
</script>
|
|
125
116
|
|
|
126
117
|
<style lang="scss">
|
|
118
|
+
.octopus-app{
|
|
127
119
|
.player-image {
|
|
128
120
|
border-radius: 0.2rem;
|
|
129
121
|
height: 2.4rem;
|
|
@@ -147,5 +139,5 @@ export default defineComponent({
|
|
|
147
139
|
flex-shrink: 0;
|
|
148
140
|
cursor: pointer;
|
|
149
141
|
}
|
|
150
|
-
|
|
142
|
+
}
|
|
151
143
|
</style>
|
|
@@ -61,6 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
</script>
|
|
62
62
|
<style lang="scss">
|
|
63
63
|
@import '../../sass/_variables.scss';
|
|
64
|
+
.octopus-app{
|
|
64
65
|
.player-container {
|
|
65
66
|
.timeline-button {
|
|
66
67
|
background: black;
|
|
@@ -82,4 +83,5 @@ export default defineComponent({
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
}
|
|
85
87
|
</style>
|
|
@@ -146,6 +146,7 @@ export default defineComponent({
|
|
|
146
146
|
</script>
|
|
147
147
|
|
|
148
148
|
<style lang="scss">
|
|
149
|
+
.octopus-app{
|
|
149
150
|
.player-grow-content {
|
|
150
151
|
display: flex;
|
|
151
152
|
flex-direction: column;
|
|
@@ -165,4 +166,5 @@ export default defineComponent({
|
|
|
165
166
|
position: absolute;
|
|
166
167
|
}
|
|
167
168
|
}
|
|
169
|
+
}
|
|
168
170
|
</style>
|
|
@@ -257,6 +257,7 @@ export default defineComponent({
|
|
|
257
257
|
</script>
|
|
258
258
|
|
|
259
259
|
<style lang="scss">
|
|
260
|
+
.octopus-app{
|
|
260
261
|
.top-bar-container {
|
|
261
262
|
position: sticky;
|
|
262
263
|
top: 0;
|
|
@@ -336,4 +337,5 @@ export default defineComponent({
|
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
}
|
|
340
|
+
}
|
|
339
341
|
</style>
|
|
@@ -242,9 +242,7 @@ export default defineComponent({
|
|
|
242
242
|
`" title="` +
|
|
243
243
|
this.$t('Listen this episode') +
|
|
244
244
|
`">
|
|
245
|
-
<img width="44" height="44" style="display: inline-block;vertical-align: middle" src="
|
|
246
|
-
this.resourcesUrl +
|
|
247
|
-
`/img/play-podcast.png">
|
|
245
|
+
<img width="44" height="44" style="display: inline-block;vertical-align: middle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAAxElEQVRIie3WMWpCURBG4Q8FSRrtbC2SPhvICmzchVuwtXQLbsE2pVUIkjqQHVgqNmIj6EvxGHhFQAIvcxt/OPVhhrlzh3sKZ4MvTLLFVYNPvJYQB294LiGucMYSw2xxcMQcj9niYIsputni4BvjEuJgjZcS4goXrDDKFgcnLDDIFgd7zNDLFgfvTUHnL23ISJuV7iS3Ooarn1VxkeeUvkDSV2b6J3FQT+pDW8Jb4vRD4Kqe1Kf/Ev4mTj32PhQ6b+9pPT+XHgysHrPM6QAAAABJRU5ErkJggg=="/>
|
|
248
246
|
</a>
|
|
249
247
|
<a style="color: #000;text-decoration: none; margin-right:8px" href="` +
|
|
250
248
|
window.location.href +
|
|
@@ -283,6 +281,9 @@ export default defineComponent({
|
|
|
283
281
|
});
|
|
284
282
|
},
|
|
285
283
|
},
|
|
284
|
+
created(){
|
|
285
|
+
this.initColor();
|
|
286
|
+
},
|
|
286
287
|
methods: {
|
|
287
288
|
closePopup(event: { preventDefault: () => void }): void {
|
|
288
289
|
event.preventDefault();
|
|
@@ -302,12 +303,18 @@ export default defineComponent({
|
|
|
302
303
|
},
|
|
303
304
|
afterCopy(): void{
|
|
304
305
|
(this.$refs.snackbar as InstanceType<typeof SnackbarVue>).open(this.$t('Data in clipboard'));
|
|
306
|
+
},
|
|
307
|
+
initColor(): void {
|
|
308
|
+
if(state.generalParameters.podcastmaker && state.generalParameters.podcastmakerColor){
|
|
309
|
+
this.color = state.generalParameters.podcastmakerColor;
|
|
310
|
+
}
|
|
305
311
|
}
|
|
306
312
|
},
|
|
307
313
|
})
|
|
308
314
|
</script>
|
|
309
315
|
|
|
310
316
|
<style lang="scss">
|
|
317
|
+
.octopus-app{
|
|
311
318
|
#newsletter-modal {
|
|
312
319
|
textarea {
|
|
313
320
|
border: 2px solid #eee;
|
|
@@ -323,4 +330,5 @@ export default defineComponent({
|
|
|
323
330
|
max-width: 60%;
|
|
324
331
|
}
|
|
325
332
|
}
|
|
333
|
+
}
|
|
326
334
|
</style>
|
|
@@ -139,6 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
</script>
|
|
140
140
|
|
|
141
141
|
<style lang="scss">
|
|
142
|
+
.octopus-app{
|
|
142
143
|
.share-modal-border {
|
|
143
144
|
border-right: solid 1px rgb(222, 226, 230);
|
|
144
145
|
border-left: solid 1px rgb(222, 226, 230);
|
|
@@ -178,4 +179,5 @@ export default defineComponent({
|
|
|
178
179
|
align-self: center;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
182
|
+
}
|
|
181
183
|
</style>
|
|
@@ -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},
|
|
@@ -216,9 +218,13 @@ export default defineComponent({
|
|
|
216
218
|
if (undefined !== this.emission.annotations.podcastAddict) count++;
|
|
217
219
|
if (undefined !== this.emission.annotations.playerFm) count++;
|
|
218
220
|
if (undefined !== this.emission.annotations.stitcher) count++;
|
|
221
|
+
if (undefined !== this.emission.annotations.pocketCasts) count++;
|
|
219
222
|
}
|
|
220
223
|
return count;
|
|
221
224
|
},
|
|
225
|
+
filterOrga(): string {
|
|
226
|
+
return this.$store.state.filter.organisationId;
|
|
227
|
+
},
|
|
222
228
|
},
|
|
223
229
|
watch: {
|
|
224
230
|
emissionId(): void {
|
|
@@ -230,12 +236,20 @@ export default defineComponent({
|
|
|
230
236
|
this.getEmissionDetails();
|
|
231
237
|
},
|
|
232
238
|
methods: {
|
|
239
|
+
initError():void{
|
|
240
|
+
this.error = true;
|
|
241
|
+
this.loaded = true;
|
|
242
|
+
},
|
|
233
243
|
async getEmissionDetails(): Promise<void> {
|
|
234
244
|
this.loaded = false;
|
|
235
245
|
this.error = false;
|
|
236
246
|
try {
|
|
237
247
|
const data: Emission = await octopusApi.fetchEmission(this.emissionId);
|
|
238
248
|
this.emission = data;
|
|
249
|
+
if(this.emission.orga.private && this.filterOrga!==this.emission.orga.id){
|
|
250
|
+
this.initError();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
239
253
|
this.$emit('emissionTitle', this.name);
|
|
240
254
|
this.loaded = true;
|
|
241
255
|
if (!this.emission.annotations) return;
|
|
@@ -251,9 +265,9 @@ export default defineComponent({
|
|
|
251
265
|
this.notExclusive =
|
|
252
266
|
'true' === this.emission.annotations.notExclusive ? true : false;
|
|
253
267
|
}
|
|
254
|
-
} catch {
|
|
255
|
-
this.error
|
|
256
|
-
this.
|
|
268
|
+
} catch(error) {
|
|
269
|
+
this.handle403((error as AxiosError));
|
|
270
|
+
this.initError();
|
|
257
271
|
}
|
|
258
272
|
},
|
|
259
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 {
|
|
@@ -194,10 +207,12 @@ export default defineComponent({
|
|
|
194
207
|
</script>
|
|
195
208
|
|
|
196
209
|
<style lang="scss">
|
|
210
|
+
.octopus-app{
|
|
197
211
|
@media (min-width: 950px) {
|
|
198
212
|
.participant-desc {
|
|
199
213
|
max-width: 50%;
|
|
200
214
|
line-height: 1.5em;
|
|
201
215
|
}
|
|
202
216
|
}
|
|
217
|
+
}
|
|
203
218
|
</style>
|
|
@@ -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
|
},
|