@saooti/octopus-sdk 31.0.6 → 31.0.9
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 +7 -1
- package/index.ts +5 -2
- package/package.json +3 -2
- package/src/App.vue +7 -12
- package/src/assets/general.scss +1 -0
- package/src/components/display/emission/EmissionItem.vue +3 -3
- package/src/components/display/emission/EmissionPlayerItem.vue +4 -4
- package/src/components/display/filter/ProductorSearch.vue +1 -1
- package/src/components/display/organisation/OrganisationChooser.vue +2 -2
- package/src/components/display/organisation/OrganisationChooserLight.vue +1 -1
- package/src/components/display/participant/ParticipantItem.vue +3 -3
- package/src/components/display/playlist/PlaylistItem.vue +3 -6
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +3 -3
- package/src/components/display/podcasts/AnimatorsItem.vue +1 -2
- package/src/components/display/podcasts/PodcastImage.vue +4 -1
- package/src/components/display/podcasts/PodcastInlineList.vue +29 -7
- package/src/components/display/podcasts/PodcastItem.vue +15 -173
- package/src/components/display/podcasts/PodcastItemInfo.vue +170 -0
- package/src/components/display/podcasts/PodcastList.vue +35 -34
- package/src/components/display/podcasts/PodcastModuleBox.vue +0 -11
- package/src/components/display/podcasts/PodcastPlayBar.vue +6 -6
- package/src/components/display/sharing/ShareButtons.vue +33 -9
- package/src/components/form/ClassicSelect.vue +68 -0
- package/src/components/misc/Footer.vue +28 -11
- package/src/components/misc/PlayerButtons.vue +1 -1
- package/src/components/pages/Emission.vue +2 -2
- package/src/components/pages/Participant.vue +4 -6
- package/src/components/pages/Playlist.vue +2 -2
- package/src/components/pages/Podcast.vue +1 -1
- package/src/locale/de.ts +300 -0
- package/src/locale/en.ts +2 -2
- package/src/locale/es.ts +300 -0
- package/src/locale/fr.ts +1 -1
- package/src/locale/it.ts +1 -1
- package/src/locale/messages.ts +6 -0
- package/src/locale/sl.ts +300 -0
- package/src/main.ts +14 -0
- package/src/store/class/general/organisation.ts +1 -1
- package/src/store/class/rubrique/rubriquage.ts +1 -0
- package/src/store/class/rubrique/rubrique.ts +1 -0
- package/src/store/paramStore.ts +7 -7
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-contents podcast-item-info">
|
|
3
|
+
<div class="d-flex justify-content-between flex-wrap text-secondary mb-3">
|
|
4
|
+
<div class="me-3 small-text">
|
|
5
|
+
{{ date }}
|
|
6
|
+
</div>
|
|
7
|
+
<div
|
|
8
|
+
v-if="0 !== durationString.length"
|
|
9
|
+
class="small-text"
|
|
10
|
+
>
|
|
11
|
+
{{ durationString }}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<AnimatorsItem :animators="animators" />
|
|
15
|
+
<router-link
|
|
16
|
+
:to="{
|
|
17
|
+
name: 'podcast',
|
|
18
|
+
params: { podcastId: podcastId },
|
|
19
|
+
query: { productor: $store.state.filter.organisationId },
|
|
20
|
+
}"
|
|
21
|
+
class="text-dark d-flex flex-column flex-grow-1"
|
|
22
|
+
>
|
|
23
|
+
<div class="title-podcast-item">
|
|
24
|
+
{{ title }}
|
|
25
|
+
</div>
|
|
26
|
+
</router-link>
|
|
27
|
+
<PodcastPlayBar
|
|
28
|
+
:podcast-id="podcastId"
|
|
29
|
+
:duration="duration"
|
|
30
|
+
class="mx-2"
|
|
31
|
+
/>
|
|
32
|
+
<div class="d-flex justify-content-between">
|
|
33
|
+
<router-link
|
|
34
|
+
v-if="!isPodcastmaker"
|
|
35
|
+
:to="{
|
|
36
|
+
name: 'productor',
|
|
37
|
+
params: { productorId: podcastOrganisationId },
|
|
38
|
+
query: { productor: $store.state.filter.organisationId },
|
|
39
|
+
}"
|
|
40
|
+
class="text-dark producer-podcast-item"
|
|
41
|
+
>
|
|
42
|
+
<div>{{ '© ' + podcastOrganisationName }}</div>
|
|
43
|
+
</router-link>
|
|
44
|
+
<span
|
|
45
|
+
v-if="editRight && podcastOrder && podcastOrder > 1"
|
|
46
|
+
class="saooti-star-bounty text-danger pe-2"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
import AnimatorsItem from './AnimatorsItem.vue';
|
|
54
|
+
import { state } from '../../../store/paramStore';
|
|
55
|
+
import moment from 'moment';
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
import humanizeDuration from 'humanize-duration';
|
|
58
|
+
import PodcastPlayBar from './PodcastPlayBar.vue';
|
|
59
|
+
import { defineComponent } from 'vue'
|
|
60
|
+
import { Participant } from '@/store/class/general/participant';
|
|
61
|
+
export default defineComponent({
|
|
62
|
+
name: 'PodcastItemInfo',
|
|
63
|
+
|
|
64
|
+
components: {
|
|
65
|
+
AnimatorsItem,
|
|
66
|
+
PodcastPlayBar
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
props: {
|
|
70
|
+
podcastId: { default: undefined, type: Number},
|
|
71
|
+
title: { default: "", type: String},
|
|
72
|
+
pubDate: { default: "", type: String},
|
|
73
|
+
podcastOrganisationId: { default: "", type: String},
|
|
74
|
+
podcastOrganisationName: { default: "", type: String},
|
|
75
|
+
podcastOrder: { default: undefined, type: Number},
|
|
76
|
+
duration: { default: 0, type: Number},
|
|
77
|
+
animators: { default: undefined, type: Object as ()=> Array<Participant>},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
computed: {
|
|
81
|
+
isPodcastmaker(): boolean {
|
|
82
|
+
return (state.generalParameters.podcastmaker as boolean);
|
|
83
|
+
},
|
|
84
|
+
date(): string {
|
|
85
|
+
return moment(this.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
86
|
+
},
|
|
87
|
+
organisationId(): string|undefined {
|
|
88
|
+
return state.generalParameters.organisationId;
|
|
89
|
+
},
|
|
90
|
+
authenticated(): boolean {
|
|
91
|
+
return (state.generalParameters.authenticated as boolean);
|
|
92
|
+
},
|
|
93
|
+
editRight(): boolean {
|
|
94
|
+
if (
|
|
95
|
+
(this.authenticated &&
|
|
96
|
+
this.organisationId === this.podcastOrganisationId) ||
|
|
97
|
+
state.generalParameters.isAdmin
|
|
98
|
+
)
|
|
99
|
+
return true;
|
|
100
|
+
return false;
|
|
101
|
+
},
|
|
102
|
+
durationString(): string {
|
|
103
|
+
if (this.duration <= 1) return '';
|
|
104
|
+
if (this.duration > 600000) {
|
|
105
|
+
return humanizeDuration(this.duration, {
|
|
106
|
+
language: 'short',
|
|
107
|
+
largest: 1,
|
|
108
|
+
round: true,
|
|
109
|
+
languages: {
|
|
110
|
+
short: {
|
|
111
|
+
y: () => 'years',
|
|
112
|
+
mo: () => 'months',
|
|
113
|
+
w: () => 'weeks',
|
|
114
|
+
d: () => 'days',
|
|
115
|
+
h: () => 'h',
|
|
116
|
+
m: () => 'min',
|
|
117
|
+
s: () => 'sec',
|
|
118
|
+
ms: () => 'ms',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return humanizeDuration(this.duration, {
|
|
124
|
+
language: 'short',
|
|
125
|
+
largest: 2,
|
|
126
|
+
round: true,
|
|
127
|
+
languages: {
|
|
128
|
+
short: {
|
|
129
|
+
m: () => 'min',
|
|
130
|
+
s: () => 'sec',
|
|
131
|
+
ms: () => 'ms',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style lang="scss">
|
|
141
|
+
.octopus-app{
|
|
142
|
+
.podcast-item-info {
|
|
143
|
+
.text-secondary {
|
|
144
|
+
margin: 0.5rem !important;
|
|
145
|
+
}
|
|
146
|
+
.saooti-star-bounty {
|
|
147
|
+
font-size: 22px;
|
|
148
|
+
}
|
|
149
|
+
.title-podcast-item {
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
margin: 0.25rem 0.5rem 0.5rem;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
display: -webkit-box;
|
|
154
|
+
flex-grow: 1;
|
|
155
|
+
font-size: 0.7rem;
|
|
156
|
+
-webkit-line-clamp: 3;
|
|
157
|
+
-webkit-box-orient: vertical;
|
|
158
|
+
min-height: 3rem;
|
|
159
|
+
line-height: 1rem;
|
|
160
|
+
word-break: break-word;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.producer-podcast-item {
|
|
164
|
+
margin: 0.2rem 0.5rem 0.5rem;
|
|
165
|
+
font-size: 0.55rem;
|
|
166
|
+
color: #666;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -4,38 +4,39 @@
|
|
|
4
4
|
:loading-text="loading?$t('Loading podcasts ...'):undefined"
|
|
5
5
|
:error-text="loaded && !podcasts.length?$t(`No podcast match your query`):undefined"
|
|
6
6
|
/>
|
|
7
|
-
<
|
|
8
|
-
v-if="showCount && loaded && podcasts.length > 1"
|
|
9
|
-
class="text-secondary mb-2"
|
|
10
|
-
>
|
|
11
|
-
{{ $t('Number podcasts', { nb: totalCount }) + sortText }}
|
|
12
|
-
</div>
|
|
13
|
-
<ul
|
|
14
|
-
v-show="loaded"
|
|
15
|
-
class="podcast-list"
|
|
16
|
-
>
|
|
17
|
-
<PodcastItem
|
|
18
|
-
v-for="p in podcasts"
|
|
19
|
-
:key="p.podcastId"
|
|
20
|
-
:podcast="p"
|
|
21
|
-
/>
|
|
22
|
-
</ul>
|
|
23
|
-
<button
|
|
24
|
-
v-show="!allFetched && loaded"
|
|
25
|
-
class="btn"
|
|
26
|
-
:class="buttonPlus ? 'btn-link align-self-center width-fit-content m-4' : 'btn-more'"
|
|
27
|
-
:disabled="inFetching"
|
|
28
|
-
:title="$t('See more')"
|
|
29
|
-
@click="displayMore"
|
|
30
|
-
>
|
|
31
|
-
<template v-if="buttonPlus">
|
|
32
|
-
{{ $t('See more') }}
|
|
33
|
-
</template>
|
|
7
|
+
<template v-if="loaded">
|
|
34
8
|
<div
|
|
35
|
-
|
|
36
|
-
class="
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
v-if="showCount && podcasts.length > 1"
|
|
10
|
+
class="text-secondary mb-2"
|
|
11
|
+
>
|
|
12
|
+
{{ $t('Number podcasts', { nb: totalCount }) + sortText }}
|
|
13
|
+
</div>
|
|
14
|
+
<ul
|
|
15
|
+
class="podcast-list"
|
|
16
|
+
>
|
|
17
|
+
<PodcastItem
|
|
18
|
+
v-for="p in podcasts"
|
|
19
|
+
:key="p.podcastId"
|
|
20
|
+
:podcast="p"
|
|
21
|
+
/>
|
|
22
|
+
</ul>
|
|
23
|
+
<button
|
|
24
|
+
v-show="!allFetched"
|
|
25
|
+
class="btn"
|
|
26
|
+
:class="buttonPlus ? 'btn-link align-self-center width-fit-content m-4' : 'btn-more'"
|
|
27
|
+
:disabled="inFetching"
|
|
28
|
+
:title="$t('See more')"
|
|
29
|
+
@click="displayMore"
|
|
30
|
+
>
|
|
31
|
+
<template v-if="buttonPlus">
|
|
32
|
+
{{ $t('See more') }}
|
|
33
|
+
</template>
|
|
34
|
+
<div
|
|
35
|
+
:class="buttonPlus?'ms-1':''"
|
|
36
|
+
class="saooti-more"
|
|
37
|
+
/>
|
|
38
|
+
</button>
|
|
39
|
+
</template>
|
|
39
40
|
</div>
|
|
40
41
|
</template>
|
|
41
42
|
|
|
@@ -93,7 +94,7 @@ export default defineComponent({
|
|
|
93
94
|
inFetching: false as boolean,
|
|
94
95
|
};
|
|
95
96
|
},
|
|
96
|
-
|
|
97
|
+
|
|
97
98
|
computed: {
|
|
98
99
|
allFetched(): boolean {
|
|
99
100
|
return this.dfirst >= this.totalCount;
|
|
@@ -144,8 +145,8 @@ export default defineComponent({
|
|
|
144
145
|
},
|
|
145
146
|
},
|
|
146
147
|
|
|
147
|
-
created() {
|
|
148
|
-
this.fetchContent(true);
|
|
148
|
+
async created() {
|
|
149
|
+
await this.fetchContent(true);
|
|
149
150
|
},
|
|
150
151
|
methods: {
|
|
151
152
|
async fetchContent(reset: boolean): Promise<void> {
|
|
@@ -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,7 +32,6 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script lang="ts">
|
|
35
|
-
import { Podcast } from '@/store/class/general/podcast';
|
|
36
35
|
import DurationHelper from '../../../helper/duration';
|
|
37
36
|
import { displayMethods } from '../../mixins/functions';
|
|
38
37
|
import { state } from '../../../store/paramStore';
|
|
@@ -41,21 +40,22 @@ export default defineComponent({
|
|
|
41
40
|
name: 'PodcastPlayBar',
|
|
42
41
|
mixins: [displayMethods],
|
|
43
42
|
props: {
|
|
44
|
-
|
|
43
|
+
podcastId: { default: undefined, type: Number},
|
|
44
|
+
duration: { default: 0, type: Number},
|
|
45
45
|
},
|
|
46
46
|
computed: {
|
|
47
47
|
isProgressBar(): boolean{
|
|
48
48
|
return (state.emissionsPage.progressBar as boolean);
|
|
49
49
|
},
|
|
50
50
|
percentProgress(): number{
|
|
51
|
-
if(!this.$store.state.player.podcast || this.
|
|
51
|
+
if(!this.$store.state.player.podcast || this.podcastId !== this.$store.state.player.podcast.podcastId){
|
|
52
52
|
return 0;
|
|
53
53
|
}
|
|
54
54
|
if(!this.$store.state.player.elapsed){return 0;}
|
|
55
55
|
return this.$store.state.player.elapsed * 100;
|
|
56
56
|
},
|
|
57
57
|
playedTime(): string{
|
|
58
|
-
if(this.$store.state.player.podcast && this.
|
|
58
|
+
if(this.$store.state.player.podcast && this.podcastId === this.$store.state.player.podcast.podcastId){
|
|
59
59
|
if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0) {
|
|
60
60
|
return DurationHelper.formatDuration(
|
|
61
61
|
Math.round(this.$store.state.player.elapsed * this.$store.state.player.total)
|
|
@@ -65,12 +65,12 @@ export default defineComponent({
|
|
|
65
65
|
return '00:00';
|
|
66
66
|
},
|
|
67
67
|
totalTime(): string {
|
|
68
|
-
return DurationHelper.formatDuration(Math.round(this.
|
|
68
|
+
return DurationHelper.formatDuration(Math.round(this.duration/1000));
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
methods: {
|
|
72
72
|
seekTo(event: MouseEvent): void {
|
|
73
|
-
if(!this.$store.state.player.podcast || this.
|
|
73
|
+
if(!this.$store.state.player.podcast || this.podcastId !== this.$store.state.player.podcast.podcastId){return;}
|
|
74
74
|
const rect = (event.currentTarget as Element).getBoundingClientRect();
|
|
75
75
|
const barWidth = (event.currentTarget as Element).clientWidth;
|
|
76
76
|
const x = event.clientX - rect.left;
|
|
@@ -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>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="classic-select">
|
|
3
|
+
<label
|
|
4
|
+
:for="idSelect"
|
|
5
|
+
class="form-label mt-2"
|
|
6
|
+
:class="displayLabel?'':'d-none'"
|
|
7
|
+
>{{ label }}</label>
|
|
8
|
+
<select
|
|
9
|
+
:id="idSelect"
|
|
10
|
+
v-model="textValue"
|
|
11
|
+
:disabled="isDisabled"
|
|
12
|
+
class="c-hand"
|
|
13
|
+
>
|
|
14
|
+
<option
|
|
15
|
+
v-for="option in options"
|
|
16
|
+
:key="option.title"
|
|
17
|
+
:value="option.value"
|
|
18
|
+
>
|
|
19
|
+
{{ option.title }}
|
|
20
|
+
</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { defineComponent } from 'vue';
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: 'ClassicSelect',
|
|
28
|
+
|
|
29
|
+
props: {
|
|
30
|
+
idSelect: { default: '', type: String },
|
|
31
|
+
label: { default: '', type: String },
|
|
32
|
+
displayLabel:{default: true, type: Boolean},
|
|
33
|
+
isDisabled: { default: false, type: Boolean },
|
|
34
|
+
options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined}> },
|
|
35
|
+
textInit: { default: undefined, type: String },
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
emits: ['update:textInit'],
|
|
39
|
+
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
textValue: undefined as string|undefined,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
textValue(){
|
|
47
|
+
if(this.textInit !== this.textValue){
|
|
48
|
+
this.$emit('update:textInit', this.textValue)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
textInit(){
|
|
52
|
+
if(this.textInit !== this.textValue){
|
|
53
|
+
this.textValue =this.textInit;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
mounted(){
|
|
58
|
+
this.textValue = this.textInit;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
<style lang="scss">
|
|
63
|
+
.octopus-app{
|
|
64
|
+
.classic-select select{
|
|
65
|
+
width: inherit;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -92,12 +92,18 @@
|
|
|
92
92
|
$t('Used libraries')
|
|
93
93
|
}}
|
|
94
94
|
</router-link>
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
$t('Change locale')
|
|
100
|
-
|
|
95
|
+
<ClassicSelect
|
|
96
|
+
v-model:textInit="language"
|
|
97
|
+
:display-label="false"
|
|
98
|
+
id-select="language-chooser-select"
|
|
99
|
+
:label="$t('Change locale')"
|
|
100
|
+
:options="[{title:'Deutsch', value:'de'},
|
|
101
|
+
{title:'English', value:'en'},
|
|
102
|
+
{title:'Español', value:'es'},
|
|
103
|
+
{title:'Français', value:'fr'},
|
|
104
|
+
{title:'Italiano', value:'it'},
|
|
105
|
+
{title:'Slovenščina', value:'sl'}]"
|
|
106
|
+
/>
|
|
101
107
|
</div>
|
|
102
108
|
</div>
|
|
103
109
|
<hr class="show-phone">
|
|
@@ -136,6 +142,7 @@
|
|
|
136
142
|
</template>
|
|
137
143
|
|
|
138
144
|
<script lang="ts">
|
|
145
|
+
import ClassicSelect from '../form/ClassicSelect.vue';
|
|
139
146
|
import Player from './Player.vue';
|
|
140
147
|
import { state } from '../../store/paramStore';
|
|
141
148
|
import octopusApi from '@saooti/octopus-api';
|
|
@@ -147,8 +154,16 @@ export default defineComponent({
|
|
|
147
154
|
name: 'Footer',
|
|
148
155
|
components: {
|
|
149
156
|
Player,
|
|
157
|
+
ClassicSelect
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
data() {
|
|
161
|
+
return {
|
|
162
|
+
language: this.$i18n.locale as string,
|
|
163
|
+
};
|
|
150
164
|
},
|
|
151
165
|
|
|
166
|
+
|
|
152
167
|
computed: {
|
|
153
168
|
isPodcastmaker(): boolean {
|
|
154
169
|
return (state.generalParameters.podcastmaker as boolean);
|
|
@@ -167,6 +182,12 @@ export default defineComponent({
|
|
|
167
182
|
},
|
|
168
183
|
},
|
|
169
184
|
|
|
185
|
+
watch:{
|
|
186
|
+
language(){
|
|
187
|
+
this.changeLanguage();
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
|
|
170
191
|
methods: {
|
|
171
192
|
showBlackBorder(hide: boolean): void {
|
|
172
193
|
const footerElement = document.getElementById('footer');
|
|
@@ -178,11 +199,7 @@ export default defineComponent({
|
|
|
178
199
|
}
|
|
179
200
|
},
|
|
180
201
|
changeLanguage(): void{
|
|
181
|
-
|
|
182
|
-
this.$i18n.locale= "en";
|
|
183
|
-
}else{
|
|
184
|
-
this.$i18n.locale= "fr";
|
|
185
|
-
}
|
|
202
|
+
this.$i18n.locale= this.language;
|
|
186
203
|
moment.locale(this.$i18n.locale);
|
|
187
204
|
octopusApi.fetchCategories({ lang: this.$i18n.locale }).then((data: Array<Category>) => {
|
|
188
205
|
this.$store.commit('categoriesSet', data);
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<div class="mb-5 mt-3 descriptionText">
|
|
27
27
|
<img
|
|
28
28
|
v-if="!isOuestFrance"
|
|
29
|
-
|
|
29
|
+
v-lazy="imageUrl"
|
|
30
30
|
:alt="$t('Emission name image', { name: name })"
|
|
31
31
|
class="img-box shadow-element float-start me-3 mb-3"
|
|
32
32
|
>
|
|
@@ -246,7 +246,7 @@ export default defineComponent({
|
|
|
246
246
|
try {
|
|
247
247
|
const data: Emission = await octopusApi.fetchEmission(this.emissionId);
|
|
248
248
|
this.emission = data;
|
|
249
|
-
if(this.emission.orga.
|
|
249
|
+
if("PUBLIC"!==this.emission.orga.privacy && this.filterOrga!==this.emission.orga.id){
|
|
250
250
|
this.initError();
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
<div
|
|
15
15
|
class="d-flex flex-column align-items-center mb-3"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<img
|
|
18
|
+
v-lazy="participant.imageUrl"
|
|
18
19
|
class="img-box-circle mb-3"
|
|
19
|
-
|
|
20
|
-
'background-image': 'url(\'' + participant.imageUrl + '\')',
|
|
21
|
-
}"
|
|
22
|
-
/>
|
|
20
|
+
>
|
|
23
21
|
<h2 class="text-capitalize">
|
|
24
22
|
{{ name }}
|
|
25
23
|
</h2>
|
|
@@ -186,7 +184,7 @@ export default defineComponent({
|
|
|
186
184
|
this.loaded = false;
|
|
187
185
|
try {
|
|
188
186
|
const data = await octopusApi.fetchParticipant(this.participantId ? this.participantId.toString(): "");
|
|
189
|
-
if(data && data.orga && data.orga.
|
|
187
|
+
if(data && data.orga && "PUBLIC"!==data.orga.privacy && this.filterOrga!==data.orga.id){
|
|
190
188
|
this.initError();
|
|
191
189
|
return;
|
|
192
190
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<h2>{{ name }}</h2>
|
|
16
16
|
<div class="mb-5 mt-3 descriptionText">
|
|
17
17
|
<img
|
|
18
|
-
|
|
18
|
+
v-lazy="imageUrl"
|
|
19
19
|
:alt="$t('Playlist name image', { name: name })"
|
|
20
20
|
class="img-box shadow-element float-start me-3 mb-3"
|
|
21
21
|
>
|
|
@@ -143,7 +143,7 @@ export default defineComponent({
|
|
|
143
143
|
this.error = false;
|
|
144
144
|
const data: Playlist = await octopusApi.fetchPlaylist(this.playlistId ? this.playlistId.toString(): "");
|
|
145
145
|
this.playlist = data;
|
|
146
|
-
if(this.playlist.organisation.
|
|
146
|
+
if("PUBLIC"!==this.playlist.organisation.privacy && this.filterOrga!==this.playlist.organisation.id){
|
|
147
147
|
this.initError();
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -327,7 +327,7 @@ export default defineComponent({
|
|
|
327
327
|
async getPodcastDetails(podcastId: number): Promise<void> {
|
|
328
328
|
try {
|
|
329
329
|
const data : Podcast = await octopusApi.fetchPodcast(podcastId.toString());
|
|
330
|
-
if(data.organisation.
|
|
330
|
+
if("PUBLIC"!==data.organisation.privacy && this.filterOrga!==data.organisation.id){
|
|
331
331
|
this.initError();
|
|
332
332
|
return;
|
|
333
333
|
}
|