@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
|
@@ -50,11 +50,23 @@
|
|
|
50
50
|
<div
|
|
51
51
|
v-for="p in podcasts"
|
|
52
52
|
:key="p.podcastId"
|
|
53
|
-
class="border-top emission-item-border-color p-2 secondary-bg d-flex"
|
|
53
|
+
class="border-top emission-item-border-color p-2 secondary-bg d-flex flex-column"
|
|
54
54
|
>
|
|
55
|
+
<router-link
|
|
56
|
+
v-if="isProgressBar"
|
|
57
|
+
:to="{
|
|
58
|
+
name: 'podcast',
|
|
59
|
+
params: { podcastId: p.podcastId },
|
|
60
|
+
query: { productor: $store.state.filter.organisationId },
|
|
61
|
+
}"
|
|
62
|
+
class="text-dark fw-bold two-line-clamp"
|
|
63
|
+
>
|
|
64
|
+
{{ p.title }}
|
|
65
|
+
</router-link>
|
|
55
66
|
<div class="d-flex justify-content-between flex-grow-1">
|
|
56
67
|
<div class="d-flex flex-column">
|
|
57
68
|
<router-link
|
|
69
|
+
v-if="!isProgressBar"
|
|
58
70
|
:to="{
|
|
59
71
|
name: 'podcast',
|
|
60
72
|
params: { podcastId: p.podcastId },
|
|
@@ -153,6 +165,9 @@ export default defineComponent({
|
|
|
153
165
|
},
|
|
154
166
|
|
|
155
167
|
computed: {
|
|
168
|
+
isProgressBar(): boolean{
|
|
169
|
+
return (state.emissionsPage.progressBar as boolean);
|
|
170
|
+
},
|
|
156
171
|
buttonMore(): boolean {
|
|
157
172
|
return (state.emissionsPage.buttonMore as boolean);
|
|
158
173
|
},
|
|
@@ -330,6 +330,7 @@ export default defineComponent({
|
|
|
330
330
|
</script>
|
|
331
331
|
|
|
332
332
|
<style lang="scss">
|
|
333
|
+
.octopus-app{
|
|
333
334
|
.advanced-search-container {
|
|
334
335
|
background: #fff;
|
|
335
336
|
border-radius: 0.8rem;
|
|
@@ -360,4 +361,5 @@ export default defineComponent({
|
|
|
360
361
|
padding-right: 40px;
|
|
361
362
|
}
|
|
362
363
|
}
|
|
364
|
+
}
|
|
363
365
|
</style>
|
|
@@ -86,6 +86,7 @@ export default defineComponent({
|
|
|
86
86
|
},
|
|
87
87
|
watch: {
|
|
88
88
|
queryIntern(): void {
|
|
89
|
+
if(this.queryIntern !== this.searchPattern)
|
|
89
90
|
this.$emit('updateSearchPattern', this.queryIntern);
|
|
90
91
|
},
|
|
91
92
|
filterOrga(): void {
|
|
@@ -98,6 +99,9 @@ export default defineComponent({
|
|
|
98
99
|
},
|
|
99
100
|
},
|
|
100
101
|
async created() {
|
|
102
|
+
if(this.searchPattern){
|
|
103
|
+
this.queryIntern=this.searchPattern;
|
|
104
|
+
}
|
|
101
105
|
if (!this.organisationId) return;
|
|
102
106
|
if(this.$store.state.filter.organisationId === this.organisationId){
|
|
103
107
|
this.keepOrganisation = true;
|
|
@@ -143,7 +147,7 @@ export default defineComponent({
|
|
|
143
147
|
|
|
144
148
|
<style lang="scss">
|
|
145
149
|
@import '../../../sass/_variables.scss';
|
|
146
|
-
|
|
150
|
+
.octopus-app{
|
|
147
151
|
.filter-speech-bubble {
|
|
148
152
|
position: absolute;
|
|
149
153
|
background: $octopus-primary-dark;
|
|
@@ -208,4 +212,5 @@ export default defineComponent({
|
|
|
208
212
|
margin-right: 0;
|
|
209
213
|
}
|
|
210
214
|
}
|
|
215
|
+
}
|
|
211
216
|
</style>
|
|
@@ -273,6 +273,7 @@ export default defineComponent({
|
|
|
273
273
|
</script>
|
|
274
274
|
|
|
275
275
|
<style lang="scss">
|
|
276
|
+
.octopus-app{
|
|
276
277
|
.live-date-box {
|
|
277
278
|
width: 200px;
|
|
278
279
|
display: flex;
|
|
@@ -304,5 +305,5 @@ export default defineComponent({
|
|
|
304
305
|
width: 0;
|
|
305
306
|
flex-grow: 1;
|
|
306
307
|
}
|
|
307
|
-
|
|
308
|
+
}
|
|
308
309
|
</style>
|
|
@@ -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
|
},
|
|
@@ -238,9 +246,11 @@ export default defineComponent({
|
|
|
238
246
|
</script>
|
|
239
247
|
|
|
240
248
|
<style lang="scss">
|
|
249
|
+
.octopus-app{
|
|
241
250
|
.live-list-category {
|
|
242
251
|
align-self: flex-start;
|
|
243
252
|
text-transform: uppercase;
|
|
244
253
|
font-weight: bold;
|
|
245
254
|
}
|
|
255
|
+
}
|
|
246
256
|
</style>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
ref="multiselectRef"
|
|
15
15
|
v-model="organisation"
|
|
16
16
|
label="name"
|
|
17
|
-
track-by="
|
|
17
|
+
track-by="id"
|
|
18
18
|
:placeholder="$t('Type string to filter by organisation')"
|
|
19
19
|
:options="organisations"
|
|
20
20
|
:multiple="false"
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
:class="{ 'multiselect-transparent': light }"
|
|
32
32
|
@search-change="onSearchOrganisation"
|
|
33
33
|
@open="onOpen"
|
|
34
|
-
@close="onClose"
|
|
35
34
|
@select="onOrganisationSelected"
|
|
36
35
|
>
|
|
37
36
|
<template #clear="{ props }">
|
|
@@ -207,16 +206,8 @@ export default defineComponent({
|
|
|
207
206
|
'autocomplete',
|
|
208
207
|
'off'
|
|
209
208
|
);
|
|
210
|
-
this.clearAll();
|
|
211
209
|
this.onSearchOrganisation();
|
|
212
210
|
},
|
|
213
|
-
onClose(): void {
|
|
214
|
-
if (this.organisation) return;
|
|
215
|
-
this.organisation = this.defaultanswer
|
|
216
|
-
? getDefaultOrganistion(this.defaultanswer)
|
|
217
|
-
: undefined;
|
|
218
|
-
this.$emit('selected', this.organisation);
|
|
219
|
-
},
|
|
220
211
|
onOrganisationSelected(organisation: Organisation|undefined): void {
|
|
221
212
|
this.$emit('selected', organisation);
|
|
222
213
|
},
|
|
@@ -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
|
},
|
|
@@ -83,9 +90,11 @@ export default defineComponent({
|
|
|
83
90
|
</script>
|
|
84
91
|
|
|
85
92
|
<style lang="scss">
|
|
93
|
+
.octopus-app{
|
|
86
94
|
.organisation-chooser-light select {
|
|
87
95
|
-webkit-appearance: none;
|
|
88
96
|
-moz-appearance: none;
|
|
89
97
|
appearance: none;
|
|
90
98
|
}
|
|
99
|
+
}
|
|
91
100
|
</style>
|
|
@@ -134,6 +134,7 @@ export default defineComponent({
|
|
|
134
134
|
})
|
|
135
135
|
</script>
|
|
136
136
|
<style lang="scss">
|
|
137
|
+
.octopus-app{
|
|
137
138
|
.participant-item-container {
|
|
138
139
|
list-style: none;
|
|
139
140
|
border-radius: 2rem;
|
|
@@ -184,4 +185,5 @@ export default defineComponent({
|
|
|
184
185
|
margin: 1rem 0 0;
|
|
185
186
|
}
|
|
186
187
|
}
|
|
188
|
+
}
|
|
187
189
|
</style>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</ul>
|
|
24
24
|
<button
|
|
25
25
|
v-show="!allFetched"
|
|
26
|
-
class="btn btn-more saooti-
|
|
26
|
+
class="btn btn-more saooti-more"
|
|
27
27
|
:title="$t('See more')"
|
|
28
28
|
:disabled="loading"
|
|
29
29
|
@click="fetchContent(false)"
|
|
@@ -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
|
},
|
|
@@ -125,6 +134,7 @@ export default defineComponent({
|
|
|
125
134
|
</script>
|
|
126
135
|
|
|
127
136
|
<style lang="scss">
|
|
137
|
+
.octopus-app{
|
|
128
138
|
.participant-list {
|
|
129
139
|
align-self: stretch;
|
|
130
140
|
flex-grow: 1;
|
|
@@ -147,4 +157,5 @@ export default defineComponent({
|
|
|
147
157
|
grid-gap: 0;
|
|
148
158
|
}
|
|
149
159
|
}
|
|
160
|
+
}
|
|
150
161
|
</style>
|
|
@@ -29,19 +29,21 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
<div
|
|
31
31
|
:class="buttonPlus?'ms-1':''"
|
|
32
|
-
class="saooti-
|
|
32
|
+
class="saooti-more"
|
|
33
33
|
/>
|
|
34
34
|
</button>
|
|
35
35
|
</div>
|
|
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) {
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
<div
|
|
51
51
|
:class="buttonPlus?'ms-1':''"
|
|
52
|
-
class="saooti-
|
|
52
|
+
class="saooti-more"
|
|
53
53
|
/>
|
|
54
54
|
</button>
|
|
55
55
|
</div>
|
|
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
|
},
|
|
@@ -173,10 +181,12 @@ export default defineComponent({
|
|
|
173
181
|
|
|
174
182
|
|
|
175
183
|
<style lang="scss">
|
|
184
|
+
.octopus-app{
|
|
176
185
|
.width-600 {
|
|
177
186
|
width: 600px;
|
|
178
187
|
@media (max-width: 600px) {
|
|
179
188
|
width: 100%;
|
|
180
189
|
}
|
|
181
190
|
}
|
|
191
|
+
}
|
|
182
192
|
</style>
|