@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
package/README.md
CHANGED
|
@@ -543,5 +543,28 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
|
543
543
|
* 30.0.44 ProgressBar pour le soir
|
|
544
544
|
* 30.0.45 ProgressBar pour le soir
|
|
545
545
|
* 30.0.46 Param pour le soir
|
|
546
|
+
* 30.0.47 Live error
|
|
547
|
+
* 30.0.48 Podcastmaker ScrollOverflow PodcastInlineList
|
|
548
|
+
* 30.0.49 Podcastmaker ProgressBar
|
|
549
|
+
* 30.0.50 Commentaires live
|
|
550
|
+
* 30.0.51 Commentaires live
|
|
551
|
+
* 30.0.52 Ajout rubriqueIdFilter
|
|
552
|
+
* 30.0.53 Commentaires live
|
|
553
|
+
* 30.0.54 Multiselect not reload on close
|
|
554
|
+
* 30.0.55 Align participant img
|
|
555
|
+
* 30.0.56 Popover title
|
|
556
|
+
* 30.0.57 podcastmaker Le soir améliorations
|
|
557
|
+
* 30.0.58 Prefix css dans component par octopus-app
|
|
558
|
+
* 30.0.59 Pb productorChooser
|
|
559
|
+
* 30.0.60 PlaylistPodcastInlineList
|
|
560
|
+
* 30.0.61 Page podcast -> init recherche
|
|
561
|
+
* 30.0.62 Italian translation
|
|
562
|
+
* 30.0.63 Italian translation
|
|
563
|
+
* 30.0.64 Modif Le soir
|
|
564
|
+
* 30.0.65 OAuthType
|
|
546
565
|
|
|
547
566
|
* 31.0.0 Passage en 31
|
|
567
|
+
* 31.0.1 Ajout pocket casts
|
|
568
|
+
* 31.0.2 Gestion des 403
|
|
569
|
+
* 31.0.3 Merge 30
|
|
570
|
+
|
package/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ import EmissionChooser from "./src/components/display/emission/EmissionChooser.v
|
|
|
32
32
|
import EmissionList from "./src/components/display/emission/EmissionList.vue";
|
|
33
33
|
/*import MonetizableFilter from "./src/components/display/filter/MonetizableFilter.vue";
|
|
34
34
|
import ProductorSearch from "./src/components/display/filter/ProductorSearch.vue";*/
|
|
35
|
+
import AdvancedSearch from "./src/components/display/filter/AdvancedSearch.vue";
|
|
35
36
|
import OrganisationChooser from "./src/components/display/organisation/OrganisationChooser.vue";
|
|
36
37
|
/*import ParticipantItem from "./src/components/display/participant/ParticipantItem.vue";
|
|
37
38
|
import ParticipantList from "./src/components/display/participant/ParticipantList.vue";
|
|
@@ -48,6 +49,7 @@ import EmissionInlineList from "./src/components/display/emission/EmissionInline
|
|
|
48
49
|
import RubriqueChooser from "./src/components/display/rubriques/RubriqueChooser.vue";
|
|
49
50
|
import CommentList from "./src/components/display/comments/CommentList.vue";
|
|
50
51
|
import CommentInput from "./src/components/display/comments/CommentInput.vue";
|
|
52
|
+
import PodcastPlaylistInlineList from "./src/components/display/playlist/PodcastPlaylistInlineList.vue";
|
|
51
53
|
|
|
52
54
|
//form
|
|
53
55
|
import ClassicSearch from "./src/components/form/ClassicSearch.vue";
|
|
@@ -110,7 +112,9 @@ const components = {
|
|
|
110
112
|
ClassicSearch,
|
|
111
113
|
ClassicCheckbox,
|
|
112
114
|
ClassicRadio,
|
|
113
|
-
ClassicLoading
|
|
115
|
+
ClassicLoading,
|
|
116
|
+
AdvancedSearch,
|
|
117
|
+
PodcastPlaylistInlineList
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
export default components;
|
|
@@ -162,5 +166,7 @@ export {
|
|
|
162
166
|
ClassicSearch,
|
|
163
167
|
ClassicCheckbox,
|
|
164
168
|
ClassicRadio,
|
|
165
|
-
ClassicLoading
|
|
169
|
+
ClassicLoading,
|
|
170
|
+
AdvancedSearch,
|
|
171
|
+
PodcastPlaylistInlineList
|
|
166
172
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.3",
|
|
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",
|
|
@@ -79,7 +79,8 @@
|
|
|
79
79
|
"no-console": "off",
|
|
80
80
|
"no-debugger": "off",
|
|
81
81
|
"@typescript-eslint/ban-ts-ignore": "off",
|
|
82
|
-
"@typescript-eslint/ban-ts-comment": "off"
|
|
82
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
83
|
+
"no-async-promise-executor": "off"
|
|
83
84
|
},
|
|
84
85
|
"parserOptions": {
|
|
85
86
|
"parser": "@typescript-eslint/parser"
|
package/src/assets/general.scss
CHANGED
|
@@ -212,6 +212,7 @@ body{
|
|
|
212
212
|
border-radius: 50%;
|
|
213
213
|
background-size: cover;
|
|
214
214
|
box-shadow: 0px 8px 26px 6px rgba(64, 163, 114, 0.3);
|
|
215
|
+
margin: auto;
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
.comma {
|
|
@@ -237,6 +238,13 @@ body{
|
|
|
237
238
|
.c-hand-auto {
|
|
238
239
|
cursor: auto;
|
|
239
240
|
}
|
|
241
|
+
.two-line-clamp{
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
display: -webkit-box;
|
|
244
|
+
-webkit-line-clamp: 2;
|
|
245
|
+
-webkit-box-orient: vertical;
|
|
246
|
+
word-break: break-word;
|
|
247
|
+
}
|
|
240
248
|
|
|
241
249
|
.html-wysiwyg-content{
|
|
242
250
|
h3,h4{
|
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%;
|
|
@@ -66,6 +80,25 @@
|
|
|
66
80
|
}
|
|
67
81
|
}
|
|
68
82
|
}
|
|
83
|
+
.element-list-inline.overflowScroll {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
-webkit-overflow-scrolling: touch;
|
|
87
|
+
scroll-behavior: smooth;
|
|
88
|
+
padding-bottom: 1rem;
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 80vh;
|
|
91
|
+
overflow-y: auto;
|
|
92
|
+
grid-gap: inherit;
|
|
93
|
+
@media (max-width: 960px) {
|
|
94
|
+
overflow-x: hidden;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
flex-wrap: nowrap;
|
|
97
|
+
}
|
|
98
|
+
.item-phone-margin {
|
|
99
|
+
margin: 1rem 0.5rem !important;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
69
102
|
|
|
70
103
|
.emission-list {
|
|
71
104
|
align-self: stretch;
|
|
@@ -194,4 +227,11 @@
|
|
|
194
227
|
left: 0.7rem;
|
|
195
228
|
}
|
|
196
229
|
}
|
|
230
|
+
|
|
231
|
+
.logo-octopus{
|
|
232
|
+
width: 350px;
|
|
233
|
+
@media (max-width: 960px) {
|
|
234
|
+
width: 200px;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
197
237
|
}
|
|
@@ -28,9 +28,8 @@
|
|
|
28
28
|
:show-no-results="true"
|
|
29
29
|
:hide-selected="true"
|
|
30
30
|
:show-labels="false"
|
|
31
|
-
@open="
|
|
31
|
+
@open="onOpen"
|
|
32
32
|
@search-change="onSearchCategory"
|
|
33
|
-
@close="onClose"
|
|
34
33
|
@select="onCategorySelected"
|
|
35
34
|
>
|
|
36
35
|
<template #singleLabel="{ option }">
|
|
@@ -169,14 +168,11 @@ export default defineComponent({
|
|
|
169
168
|
}
|
|
170
169
|
},
|
|
171
170
|
methods: {
|
|
172
|
-
|
|
171
|
+
onOpen(): void {
|
|
173
172
|
(this.$refs.multiselectRef as VueMultiselect).$refs.search.setAttribute(
|
|
174
173
|
'autocomplete',
|
|
175
174
|
'off'
|
|
176
175
|
);
|
|
177
|
-
if (undefined === this.categoryArray) {
|
|
178
|
-
this.category = undefined;
|
|
179
|
-
}
|
|
180
176
|
if (
|
|
181
177
|
undefined !== this.categorySelected ||
|
|
182
178
|
undefined !== this.categoryArray ||
|
|
@@ -199,14 +195,6 @@ export default defineComponent({
|
|
|
199
195
|
this.categories = this.totalCategories;
|
|
200
196
|
}
|
|
201
197
|
},
|
|
202
|
-
onClose(): void {
|
|
203
|
-
if (!this.category && undefined === this.categoryArray) {
|
|
204
|
-
this.category = getDefaultCategory(this.defaultanswer);
|
|
205
|
-
if(this.category){
|
|
206
|
-
this.onCategorySelected(this.category);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
198
|
onSearchCategory(query: string): void {
|
|
211
199
|
this.isLoading = true;
|
|
212
200
|
const categoryDefault = getDefaultCategory(this.defaultanswer);
|
|
@@ -162,13 +162,15 @@ export default defineComponent({
|
|
|
162
162
|
})
|
|
163
163
|
</script>
|
|
164
164
|
<style lang="scss">
|
|
165
|
-
.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
.octopus-app{
|
|
166
|
+
.categary-filter-no-filter{
|
|
167
|
+
position: absolute;
|
|
168
|
+
top: 0;
|
|
169
|
+
bottom: 0;
|
|
170
|
+
right: 0;
|
|
171
|
+
left: 0;
|
|
172
|
+
background: white;
|
|
173
|
+
z-index: -1;
|
|
174
|
+
}
|
|
173
175
|
}
|
|
174
176
|
</style>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
class="dropdown btn-group"
|
|
23
23
|
>
|
|
24
24
|
<button
|
|
25
|
-
class="btn dropdown-toggle admin-button dropdown-toggle-no-caret saooti-
|
|
25
|
+
class="btn dropdown-toggle admin-button dropdown-toggle-no-caret saooti-more"
|
|
26
26
|
data-bs-toggle="dropdown"
|
|
27
27
|
aria-expanded="false"
|
|
28
28
|
:title="$t('See more')"
|
|
@@ -178,29 +178,31 @@ export default defineComponent({
|
|
|
178
178
|
</script>
|
|
179
179
|
<style lang="scss">
|
|
180
180
|
@import '../../../sass/_variables.scss';
|
|
181
|
-
.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
181
|
+
.octopus-app{
|
|
182
|
+
.category-list-container {
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
justify-content: flex-start;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
flex-grow: 1;
|
|
187
|
+
width: 0;
|
|
188
|
+
padding: 0 4rem;
|
|
189
|
+
}
|
|
190
|
+
.category-item {
|
|
191
|
+
font-size: 0.6rem;
|
|
192
|
+
margin: 0.2rem;
|
|
193
|
+
padding: 0.5rem;
|
|
194
|
+
display: block;
|
|
195
|
+
height: 1.5rem;
|
|
196
|
+
border-radius: 1.5rem;
|
|
197
|
+
border: 0;
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
flex-shrink: 0;
|
|
203
|
+
.router-link-active,&:hover {
|
|
204
|
+
background: $octopus-secondary-color !important;
|
|
205
|
+
}
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
</style>
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script lang="ts">
|
|
69
|
-
import { IReCaptchaComposition, useReCaptcha } from 'vue-recaptcha-v3';
|
|
70
69
|
import Constants from '../../../../public/config';
|
|
71
70
|
import { state } from '../../../store/paramStore';
|
|
72
71
|
import api from '@/api/initialize';
|
|
@@ -130,11 +129,9 @@ export default defineComponent({
|
|
|
130
129
|
this.sendComment();
|
|
131
130
|
return;
|
|
132
131
|
}
|
|
133
|
-
const iRecaptcha: IReCaptchaComposition|undefined = useReCaptcha();
|
|
134
|
-
if(!iRecaptcha){return;}
|
|
135
|
-
await iRecaptcha.recaptchaLoaded();
|
|
136
|
-
const token = await iRecaptcha.executeRecaptcha('login');
|
|
137
132
|
try {
|
|
133
|
+
await this.$recaptchaLoaded()
|
|
134
|
+
const token = await this.$recaptcha('login');
|
|
138
135
|
this.sendError = false;
|
|
139
136
|
const ok = await api.checkToken(token);
|
|
140
137
|
if (!ok) {
|
|
@@ -320,25 +320,27 @@ export default defineComponent({
|
|
|
320
320
|
|
|
321
321
|
<style lang="scss">
|
|
322
322
|
@import '../../../sass/_variables.scss';
|
|
323
|
-
.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
323
|
+
.octopus-app{
|
|
324
|
+
.comment-input-container {
|
|
325
|
+
textarea::placeholder {
|
|
326
|
+
color: $octopus-primary-dark;
|
|
327
|
+
}
|
|
328
|
+
textarea:focus::placeholder {
|
|
329
|
+
color: black;
|
|
330
|
+
}
|
|
331
|
+
textarea {
|
|
332
|
+
outline-width: 0 !important;
|
|
333
|
+
border-top: 0;
|
|
334
|
+
border-right: 0;
|
|
335
|
+
border-left: 0;
|
|
336
|
+
border-bottom: 0.1rem solid #ddd !important;
|
|
337
|
+
overflow: hidden !important;
|
|
338
|
+
box-shadow: unset !important;
|
|
339
|
+
background: transparent !important;
|
|
340
|
+
height: 50px;
|
|
341
|
+
&.short{
|
|
342
|
+
max-height: 38px;
|
|
343
|
+
}
|
|
342
344
|
}
|
|
343
345
|
}
|
|
344
346
|
}
|
|
@@ -248,6 +248,7 @@ export default defineComponent({
|
|
|
248
248
|
|
|
249
249
|
<style lang="scss">
|
|
250
250
|
@import '../../../sass/_variables.scss';
|
|
251
|
+
.octopus-app{
|
|
251
252
|
.my-transition-list-comments {
|
|
252
253
|
position: relative;
|
|
253
254
|
.comment-list-enter-active,
|
|
@@ -284,4 +285,5 @@ export default defineComponent({
|
|
|
284
285
|
background-color: $primaryColorReallyTransparent;
|
|
285
286
|
}
|
|
286
287
|
}
|
|
288
|
+
}
|
|
287
289
|
</style>
|
|
@@ -75,6 +75,7 @@ export default defineComponent({
|
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
77
|
<style lang="scss">
|
|
78
|
+
.octopus-app{
|
|
78
79
|
.comment-player-container {
|
|
79
80
|
position: relative;
|
|
80
81
|
width: 100%;
|
|
@@ -96,4 +97,5 @@ export default defineComponent({
|
|
|
96
97
|
position: absolute;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
100
|
+
}
|
|
99
101
|
</style>
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
:show-labels="false"
|
|
30
30
|
@search-change="onSearchEmission"
|
|
31
31
|
@open="onOpen"
|
|
32
|
-
@close="onClose"
|
|
33
32
|
@select="onEmissionSelected"
|
|
34
33
|
>
|
|
35
34
|
<template #clear="{ props }">
|
|
@@ -152,16 +151,8 @@ export default defineComponent({
|
|
|
152
151
|
'autocomplete',
|
|
153
152
|
'off'
|
|
154
153
|
);
|
|
155
|
-
this.clearAll();
|
|
156
154
|
this.onSearchEmission();
|
|
157
155
|
},
|
|
158
|
-
onClose(): void {
|
|
159
|
-
if (this.emission) return;
|
|
160
|
-
this.emission = this.defaultanswer
|
|
161
|
-
? getDefaultEmission(this.defaultanswer)
|
|
162
|
-
: undefined;
|
|
163
|
-
this.$emit('selected', this.emission);
|
|
164
|
-
},
|
|
165
156
|
onEmissionSelected(emission: Emission): void {
|
|
166
157
|
this.$emit('selected', emission);
|
|
167
158
|
},
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
alignLeft ? 'justify-content-start' : '',
|
|
44
44
|
overflowScroll ? 'overflowScroll' : '',
|
|
45
45
|
]"
|
|
46
|
+
:css="isInlineAnimation"
|
|
46
47
|
>
|
|
47
48
|
<EmissionPlayerItem
|
|
48
49
|
v-for="e in emissions"
|
|
@@ -55,7 +56,6 @@
|
|
|
55
56
|
/>
|
|
56
57
|
</transition-group>
|
|
57
58
|
<router-link
|
|
58
|
-
v-if="!overflowScroll"
|
|
59
59
|
:to="href"
|
|
60
60
|
class="btn btn-link align-self-center width-fit-content m-4"
|
|
61
61
|
>
|
|
@@ -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},
|
|
@@ -128,7 +132,10 @@ export default defineComponent({
|
|
|
128
132
|
},
|
|
129
133
|
transitionName(): string {
|
|
130
134
|
return this.direction > 0 ? 'out-left' : 'out-right';
|
|
131
|
-
}
|
|
135
|
+
},
|
|
136
|
+
isInlineAnimation(): boolean {
|
|
137
|
+
return (state.generalParameters.isInlineAnimation as boolean);
|
|
138
|
+
},
|
|
132
139
|
},
|
|
133
140
|
|
|
134
141
|
watch: {
|
|
@@ -154,35 +161,30 @@ export default defineComponent({
|
|
|
154
161
|
},
|
|
155
162
|
methods: {
|
|
156
163
|
async fetchNext(): Promise<void> {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
this.loading = false;
|
|
166
|
-
this.loaded = true;
|
|
167
|
-
this.totalCount = data.count;
|
|
168
|
-
/* if(this.first === 0 && this.displayRubriquage && state.emissionsPage.mainRubrique){
|
|
169
|
-
data.result.sort((a, b)=>{
|
|
170
|
-
if (a.rubriqueIds[0] === state.emissionsPage.mainRubrique)
|
|
171
|
-
return 1;
|
|
172
|
-
if (b.rubriqueIds[0] === state.emissionsPage.mainRubrique)
|
|
173
|
-
return -1;
|
|
174
|
-
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',
|
|
175
172
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
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));
|
|
180
187
|
}
|
|
181
|
-
this.allEmissions = this.allEmissions.concat(data.result);
|
|
182
|
-
if (this.allEmissions.length <= 3) {
|
|
183
|
-
this.alignLeft = true;
|
|
184
|
-
}
|
|
185
|
-
this.first += this.size;
|
|
186
188
|
},
|
|
187
189
|
displayPrevious(): void {
|
|
188
190
|
this.direction = -1;
|
|
@@ -203,14 +205,14 @@ export default defineComponent({
|
|
|
203
205
|
},
|
|
204
206
|
handleResize(): void {
|
|
205
207
|
if (!this.$el) return;
|
|
206
|
-
if (window.innerWidth <= PHONE_WIDTH) {
|
|
207
|
-
this.size = 10;
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
208
|
if (this.overflowScroll) {
|
|
211
209
|
this.size = 20;
|
|
212
210
|
return;
|
|
213
211
|
}
|
|
212
|
+
if (window.innerWidth <= PHONE_WIDTH) {
|
|
213
|
+
this.size = 10;
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
214
216
|
const width = (this.$el as HTMLElement).offsetWidth;
|
|
215
217
|
const sixteen = domHelper.convertRemToPixels(this.itemSize + 0.7);
|
|
216
218
|
this.size = Math.floor(width / sixteen);
|
|
@@ -270,24 +272,5 @@ export default defineComponent({
|
|
|
270
272
|
margin-bottom: 1rem;
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
|
-
.element-list-inline.overflowScroll {
|
|
274
|
-
display: flex;
|
|
275
|
-
flex-wrap: wrap;
|
|
276
|
-
-webkit-overflow-scrolling: touch;
|
|
277
|
-
scroll-behavior: smooth;
|
|
278
|
-
padding-bottom: 1rem;
|
|
279
|
-
width: 100%;
|
|
280
|
-
height: 80vh;
|
|
281
|
-
overflow-y: auto;
|
|
282
|
-
grid-gap: inherit;
|
|
283
|
-
@media (max-width: 960px) {
|
|
284
|
-
overflow-x: hidden;
|
|
285
|
-
flex-direction: column;
|
|
286
|
-
flex-wrap: nowrap;
|
|
287
|
-
}
|
|
288
|
-
.item-phone-margin {
|
|
289
|
-
margin: 1rem 0.5rem !important;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
275
|
}
|
|
293
276
|
</style>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</template>
|
|
52
52
|
<div
|
|
53
53
|
:class="buttonPlus?'ms-1':''"
|
|
54
|
-
class="saooti-
|
|
54
|
+
class="saooti-more"
|
|
55
55
|
/>
|
|
56
56
|
</button>
|
|
57
57
|
</template>
|
|
@@ -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) {
|
|
@@ -234,6 +240,4 @@ export default defineComponent({
|
|
|
234
240
|
},
|
|
235
241
|
},
|
|
236
242
|
})
|
|
237
|
-
</script>
|
|
238
|
-
|
|
239
|
-
<style lang="scss"></style>
|
|
243
|
+
</script>
|