@saooti/octopus-sdk 1.0.0 → 29.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/index.d.ts +4 -0
- package/index.ts +12 -0
- package/package.json +61 -39
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +30 -19
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/style.css +48 -5
- package/public/img/ACPM.png +0 -0
- package/public/img/article.png +0 -0
- package/src/App.vue +97 -31
- package/src/api/comments.ts +3 -1
- package/src/api/emissions.ts +5 -2
- package/src/api/initialize.ts +3 -2
- package/src/api/podcasts.ts +5 -2
- package/src/api/profile.ts +4 -2
- package/src/api/studio.ts +12 -1
- package/src/assets/bootstrap-diff.scss +265 -0
- package/src/assets/form.scss +23 -0
- package/src/assets/general.scss +47 -20
- package/src/assets/modal.scss +9 -10
- package/src/assets/multiselect.scss +19 -2
- package/src/assets/octopus-library.scss +16 -4
- package/src/assets/share.scss +343 -0
- package/src/components/display/aggregator/RssSection.vue +4 -4
- package/src/components/display/categories/CategoryChooser.vue +152 -105
- package/src/components/display/categories/CategoryFilter.vue +108 -0
- package/src/components/display/categories/CategoryList.vue +138 -109
- package/src/components/display/comments/AddCommentModal.vue +104 -87
- package/src/components/display/comments/CommentInput.vue +137 -118
- package/src/components/display/comments/CommentItem.vue +155 -137
- package/src/components/display/comments/CommentList.vue +142 -120
- package/src/components/display/comments/CommentParentInfo.vue +39 -35
- package/src/components/display/comments/CommentPlayer.vue +54 -48
- package/src/components/display/comments/CommentSection.vue +57 -58
- package/src/components/display/edit/EditBox.vue +4 -4
- package/src/components/display/edit/EditCommentBox.vue +25 -31
- package/src/components/display/emission/EmissionChooser.vue +82 -80
- package/src/components/display/emission/EmissionInlineList.vue +118 -105
- package/src/components/display/emission/EmissionItem.vue +66 -167
- package/src/components/display/emission/EmissionList.vue +96 -122
- package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
- package/src/components/display/filter/AdvancedSearch.vue +306 -372
- package/src/components/display/filter/CategoryFilter.vue +117 -0
- package/src/components/display/filter/MonetizableFilter.vue +24 -10
- package/src/components/display/filter/ProductorSearch.vue +131 -135
- package/src/components/display/filter/RubriqueChoice.vue +104 -0
- package/src/components/display/filter/RubriqueFilter.vue +235 -0
- package/src/components/display/live/CountDown.vue +30 -29
- package/src/components/display/live/LiveHorizontalList.vue +40 -34
- package/src/components/display/live/LiveItem.vue +146 -158
- package/src/components/display/live/LiveList.vue +167 -154
- package/src/components/display/organisation/OrganisationChooser.vue +125 -124
- package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
- package/src/components/display/participant/ParticipantItem.vue +92 -108
- package/src/components/display/participant/ParticipantList.vue +76 -69
- package/src/components/display/playlist/PlaylistItem.vue +45 -56
- package/src/components/display/playlist/PlaylistList.vue +57 -48
- package/src/components/display/playlist/PodcastList.vue +94 -70
- package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
- package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
- package/src/components/display/podcasts/PodcastImage.vue +244 -208
- package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
- package/src/components/display/podcasts/PodcastItem.vue +150 -132
- package/src/components/display/podcasts/PodcastList.vue +89 -110
- package/src/components/display/podcasts/TagList.vue +23 -16
- package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
- package/src/components/display/rubriques/RubriqueList.vue +227 -0
- package/src/components/display/sharing/PlayerParameters.vue +154 -106
- package/src/components/display/sharing/QrCode.vue +58 -0
- package/src/components/display/sharing/ShareButtons.vue +214 -92
- package/src/components/display/sharing/ShareDistribution.vue +110 -121
- package/src/components/display/sharing/SharePlayer.vue +245 -190
- package/src/components/display/sharing/SubscribeButtons.vue +130 -66
- package/src/components/display/studio/RecordingItemButton.vue +4 -4
- package/src/components/misc/ErrorMessage.vue +21 -16
- package/src/components/misc/Footer.vue +131 -66
- package/src/components/misc/HomeDropdown.vue +166 -123
- package/src/components/misc/LeftMenu.vue +151 -134
- package/src/components/misc/Player.vue +332 -328
- package/src/components/misc/Snackbar.vue +27 -29
- package/src/components/misc/TopBar.vue +204 -174
- package/src/components/misc/modal/ClipboardModal.vue +46 -26
- package/src/components/misc/modal/MessageModal.vue +67 -51
- package/src/components/misc/modal/NewsletterModal.vue +179 -136
- package/src/components/misc/modal/QrCodeModal.vue +83 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/organisationFilter.ts +24 -0
- package/src/components/pages/Category.vue +26 -26
- package/src/components/pages/Emission.vue +120 -92
- package/src/components/pages/Emissions.vue +109 -86
- package/src/components/pages/Home.vue +70 -16
- package/src/components/pages/Lives.vue +57 -47
- package/src/components/pages/Participant.vue +93 -77
- package/src/components/pages/Participants.vue +44 -31
- package/src/components/pages/Playlist.vue +63 -52
- package/src/components/pages/Playlists.vue +41 -39
- package/src/components/pages/Podcast.vue +265 -251
- package/src/components/pages/Podcasts.vue +135 -104
- package/src/components/pages/Rubrique.vue +25 -19
- package/src/components/pages/Search.vue +71 -67
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +299 -1
- package/src/locale/fr.ts +25 -10
- package/src/locale/messages.ts +3 -2
- package/src/main.ts +54 -32
- package/src/router/router.ts +184 -159
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +36 -171
- package/src/store/class/category.ts +8 -0
- package/src/store/class/comment.ts +17 -0
- package/src/store/class/conference.ts +27 -0
- package/src/store/class/customPlayer.ts +8 -0
- package/src/store/class/emission.ts +20 -0
- package/src/store/class/fetchParam.ts +16 -0
- package/src/store/class/media.ts +13 -0
- package/src/store/class/organisation.ts +19 -0
- package/src/store/class/participant.ts +12 -0
- package/src/store/class/person.ts +13 -0
- package/src/store/class/player.ts +12 -0
- package/src/store/class/playlist.ts +15 -0
- package/src/store/class/podcast.ts +37 -0
- package/src/store/class/rubriquage.ts +9 -0
- package/src/store/class/rubriquageFilter.ts +5 -0
- package/src/store/class/rubrique.ts +8 -0
- package/src/store/paramStore.ts +70 -29
- package/src/store/typeAppStore.ts +171 -237
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +14 -0
- package/public/img/ACPM.PNG +0 -0
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -1,101 +1,118 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column align-items-center">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="loading"
|
|
5
|
+
class="d-flex justify-content-center"
|
|
6
|
+
>
|
|
7
|
+
<div class="spinner-border me-3" />
|
|
8
|
+
<h3 class="mt-2">
|
|
9
|
+
{{ $t('Loading content ...') }}
|
|
10
|
+
</h3>
|
|
6
11
|
</div>
|
|
7
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
v-if="loaded && playlists.length > 1"
|
|
14
|
+
class="text-secondary mb-2"
|
|
15
|
+
>
|
|
8
16
|
{{ $t('Number playlists', { nb: displayCount }) + $t('sort by score') }}
|
|
9
17
|
</div>
|
|
10
18
|
<ul class="emission-list twoEmissions">
|
|
11
19
|
<PlaylistItem
|
|
12
|
-
v-bind:playlist="p"
|
|
13
20
|
v-for="p in playlists"
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
:key="p.playlistId"
|
|
22
|
+
:playlist="p"
|
|
16
23
|
/>
|
|
17
24
|
</ul>
|
|
18
25
|
<button
|
|
26
|
+
v-show="!allFetched && loaded"
|
|
19
27
|
class="btn"
|
|
20
28
|
:class="buttonPlus ? 'btn-linkPlus' : 'btn-more'"
|
|
21
|
-
@click="displayMore"
|
|
22
|
-
v-show="!allFetched && loaded"
|
|
23
29
|
:disabled="inFetching"
|
|
24
30
|
:aria-label="$t('See more')"
|
|
31
|
+
@click="displayMore"
|
|
25
32
|
>
|
|
26
|
-
<template v-if="buttonPlus">
|
|
27
|
-
|
|
33
|
+
<template v-if="buttonPlus">
|
|
34
|
+
{{ $t('See more') }}
|
|
35
|
+
</template>
|
|
36
|
+
<div class="saooti-plus" />
|
|
28
37
|
</button>
|
|
29
38
|
</div>
|
|
30
39
|
</template>
|
|
31
40
|
|
|
32
|
-
<style lang="scss"></style>
|
|
33
|
-
|
|
34
41
|
<script lang="ts">
|
|
35
42
|
const octopusApi = require('@saooti/octopus-api');
|
|
36
43
|
import PlaylistItem from './PlaylistItem.vue';
|
|
37
44
|
import { state } from '../../../store/paramStore';
|
|
38
45
|
|
|
46
|
+
import { Playlist } from '@/store/class/playlist';
|
|
39
47
|
import { defineComponent } from 'vue'
|
|
40
48
|
export default defineComponent({
|
|
41
49
|
name: 'PlaylistList',
|
|
42
50
|
|
|
43
|
-
props: ['first', 'size', 'query', 'organisationId'],
|
|
44
|
-
|
|
45
51
|
components: {
|
|
46
52
|
PlaylistItem,
|
|
47
53
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
props: {
|
|
55
|
+
first: { default: 0, type: Number },
|
|
56
|
+
size: { default: 12, type: Number },
|
|
57
|
+
query: { default: undefined, type: String},
|
|
58
|
+
organisationId: { default: undefined, type: String},
|
|
51
59
|
},
|
|
52
60
|
|
|
53
61
|
data() {
|
|
54
62
|
return {
|
|
55
|
-
loading: true,
|
|
56
|
-
loaded: true,
|
|
57
|
-
dfirst: this
|
|
58
|
-
dsize: this
|
|
59
|
-
totalCount: 0,
|
|
60
|
-
displayCount: 0,
|
|
61
|
-
playlists: [] as
|
|
62
|
-
inFetching: false,
|
|
63
|
+
loading: true as boolean,
|
|
64
|
+
loaded: true as boolean,
|
|
65
|
+
dfirst: this.first as number,
|
|
66
|
+
dsize: this.size as number,
|
|
67
|
+
totalCount: 0 as number,
|
|
68
|
+
displayCount: 0 as number,
|
|
69
|
+
playlists: [] as Array<Playlist>,
|
|
70
|
+
inFetching: false as boolean,
|
|
63
71
|
};
|
|
64
72
|
},
|
|
65
73
|
|
|
74
|
+
|
|
66
75
|
computed: {
|
|
67
|
-
allFetched():boolean {
|
|
76
|
+
allFetched(): boolean {
|
|
68
77
|
return this.dfirst >= this.totalCount;
|
|
69
78
|
},
|
|
70
|
-
buttonPlus() {
|
|
79
|
+
buttonPlus(): boolean {
|
|
71
80
|
return state.generalParameters.buttonPlus;
|
|
72
81
|
},
|
|
73
|
-
changed():
|
|
82
|
+
changed(): string {
|
|
74
83
|
return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
|
|
75
84
|
},
|
|
76
|
-
filterOrga():
|
|
85
|
+
filterOrga(): string {
|
|
77
86
|
return this.$store.state.filter.organisationId;
|
|
78
87
|
},
|
|
79
|
-
sort() {
|
|
88
|
+
sort(): string {
|
|
80
89
|
if (!this.query) return 'NAME';
|
|
81
90
|
return 'SCORE';
|
|
82
91
|
},
|
|
83
|
-
organisation():
|
|
92
|
+
organisation(): string|undefined {
|
|
84
93
|
if (this.organisationId) return this.organisationId;
|
|
85
94
|
if (this.filterOrga) return this.filterOrga;
|
|
86
95
|
return undefined;
|
|
87
96
|
},
|
|
88
97
|
},
|
|
98
|
+
watch: {
|
|
99
|
+
changed(): void {
|
|
100
|
+
this.fetchContent(true);
|
|
101
|
+
},
|
|
102
|
+
},
|
|
89
103
|
|
|
104
|
+
mounted() {
|
|
105
|
+
this.fetchContent(true);
|
|
106
|
+
},
|
|
90
107
|
methods: {
|
|
91
|
-
async fetchContent(reset: boolean) {
|
|
108
|
+
async fetchContent(reset: boolean): Promise<void> {
|
|
92
109
|
this.inFetching = true;
|
|
93
110
|
if (reset) {
|
|
94
111
|
this.dfirst = 0;
|
|
95
112
|
this.loading = true;
|
|
96
113
|
this.loaded = false;
|
|
97
114
|
}
|
|
98
|
-
|
|
115
|
+
const param = {
|
|
99
116
|
first: this.dfirst,
|
|
100
117
|
size: this.dsize,
|
|
101
118
|
query: this.query,
|
|
@@ -105,8 +122,7 @@ export default defineComponent({
|
|
|
105
122
|
const data = await octopusApi.fetchPlaylists(param);
|
|
106
123
|
this.afterFetching(reset, data);
|
|
107
124
|
},
|
|
108
|
-
|
|
109
|
-
afterFetching(reset: any, data:any) {
|
|
125
|
+
afterFetching(reset: boolean, data: any): void {
|
|
110
126
|
if (reset) {
|
|
111
127
|
this.playlists.length = 0;
|
|
112
128
|
this.dfirst = 0;
|
|
@@ -114,7 +130,7 @@ export default defineComponent({
|
|
|
114
130
|
this.loading = false;
|
|
115
131
|
this.loaded = true;
|
|
116
132
|
this.displayCount = data.count;
|
|
117
|
-
this.playlists = this.playlists.concat(data.result).filter((e: null) => {
|
|
133
|
+
this.playlists = this.playlists.concat(data.result).filter((e: Playlist | null) => {
|
|
118
134
|
if (null === e) {
|
|
119
135
|
this.displayCount--;
|
|
120
136
|
}
|
|
@@ -124,19 +140,12 @@ export default defineComponent({
|
|
|
124
140
|
this.totalCount = data.count;
|
|
125
141
|
this.inFetching = false;
|
|
126
142
|
},
|
|
127
|
-
|
|
128
|
-
displayMore(event: { preventDefault: () => void; }) {
|
|
143
|
+
displayMore(event: { preventDefault: () => void }): void {
|
|
129
144
|
event.preventDefault();
|
|
130
145
|
this.fetchContent(false);
|
|
131
146
|
},
|
|
132
147
|
},
|
|
133
|
-
|
|
134
|
-
watch: {
|
|
135
|
-
changed: {
|
|
136
|
-
handler() {
|
|
137
|
-
this.fetchContent(true);
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
});
|
|
148
|
+
})
|
|
142
149
|
</script>
|
|
150
|
+
|
|
151
|
+
<style lang="scss"></style>
|
|
@@ -1,121 +1,129 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column align-items-center">
|
|
3
|
-
<h2
|
|
3
|
+
<h2
|
|
4
|
+
v-if="notEmptyPlaylist"
|
|
5
|
+
class="mt-3 align-self-baseline"
|
|
6
|
+
>
|
|
4
7
|
{{ $t('Podcasts in the playlist') }}
|
|
5
8
|
</h2>
|
|
6
|
-
<h2
|
|
9
|
+
<h2
|
|
10
|
+
v-else
|
|
11
|
+
class="mt-3 align-self-baseline"
|
|
12
|
+
>
|
|
7
13
|
{{ $t('No podcasts in the playlist') }}
|
|
8
14
|
</h2>
|
|
9
|
-
<div
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
<div
|
|
16
|
+
v-if="loading"
|
|
17
|
+
class="d-flex justify-content-center"
|
|
18
|
+
>
|
|
19
|
+
<div class="spinner-border me-3" />
|
|
20
|
+
<h3 class="mt-2">
|
|
21
|
+
{{ $t('Loading podcasts ...') }}
|
|
22
|
+
</h3>
|
|
12
23
|
</div>
|
|
13
24
|
<div v-if="loaded && !podcasts.length && notEmptyPlaylist">
|
|
14
25
|
<p>{{ $t('No podcast match your query') }}</p>
|
|
15
26
|
</div>
|
|
16
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
v-if="loaded && podcasts.length > 1"
|
|
29
|
+
class="text-secondary mb-4"
|
|
30
|
+
>
|
|
17
31
|
{{ $t('Number podcasts', { nb: podcasts.length }) + $t('sort by score') }}
|
|
18
32
|
</div>
|
|
19
33
|
<div
|
|
20
|
-
class="d-flex position-relative width-600 align-self-baseline"
|
|
21
34
|
v-if="notEmptyPlaylist"
|
|
35
|
+
class="d-flex position-relative width-600 align-self-baseline"
|
|
22
36
|
>
|
|
23
|
-
<label
|
|
37
|
+
<label
|
|
38
|
+
for="search"
|
|
39
|
+
class="d-inline"
|
|
40
|
+
:aria-label="$t('Search')"
|
|
41
|
+
/>
|
|
24
42
|
<input
|
|
25
|
-
|
|
43
|
+
id="search"
|
|
26
44
|
v-model="searchPattern"
|
|
45
|
+
:placeholder="$t('Search')"
|
|
27
46
|
class="filter-search-input input-no-outline flex-grow"
|
|
28
|
-
|
|
29
|
-
/>
|
|
47
|
+
>
|
|
30
48
|
<div
|
|
31
49
|
class="saooti-search-bounty filter-list-search-icon search-icon-container"
|
|
32
|
-
|
|
50
|
+
/>
|
|
33
51
|
</div>
|
|
34
|
-
<ul
|
|
52
|
+
<ul
|
|
53
|
+
v-show="loaded"
|
|
54
|
+
class="podcast-list"
|
|
55
|
+
>
|
|
35
56
|
<PodcastItem
|
|
36
|
-
:podcast="p"
|
|
37
57
|
v-for="p in podcastsDisplay"
|
|
38
58
|
:key="p.podcastId"
|
|
59
|
+
:podcast="p"
|
|
39
60
|
/>
|
|
40
61
|
</ul>
|
|
41
62
|
<button
|
|
63
|
+
v-show="size < podcasts.length && loaded"
|
|
42
64
|
class="btn"
|
|
43
65
|
:class="buttonPlus ? 'btn-linkPlus mt-3' : 'btn-more'"
|
|
44
|
-
@click="displayMore"
|
|
45
|
-
v-show="size < podcasts.length && loaded"
|
|
46
66
|
:aria-label="$t('See more')"
|
|
67
|
+
@click="displayMore"
|
|
47
68
|
>
|
|
48
|
-
<template v-if="buttonPlus">
|
|
49
|
-
|
|
69
|
+
<template v-if="buttonPlus">
|
|
70
|
+
{{ $t('See more') }}
|
|
71
|
+
</template>
|
|
72
|
+
<div class="saooti-plus" />
|
|
50
73
|
</button>
|
|
51
74
|
</div>
|
|
52
75
|
</template>
|
|
53
76
|
|
|
54
|
-
<style lang="scss">
|
|
55
|
-
.width-600 {
|
|
56
|
-
width: 600px;
|
|
57
|
-
@media (max-width: 600px) {
|
|
58
|
-
width: 100%;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
62
|
-
|
|
63
77
|
<script lang="ts">
|
|
64
78
|
const octopusApi = require('@saooti/octopus-api');
|
|
65
79
|
import PodcastItem from '../podcasts/PodcastItem.vue';
|
|
66
80
|
import { state } from '../../../store/paramStore';
|
|
67
81
|
|
|
82
|
+
import { Podcast } from '@/store/class/podcast';
|
|
83
|
+
import { Playlist } from '@/store/class/playlist';
|
|
68
84
|
import { defineComponent } from 'vue'
|
|
69
85
|
export default defineComponent({
|
|
70
86
|
name: 'PodcastList',
|
|
71
87
|
|
|
72
|
-
props: ['playlist'],
|
|
73
|
-
|
|
74
88
|
components: {
|
|
75
89
|
PodcastItem,
|
|
76
90
|
},
|
|
77
91
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.fetchContent();
|
|
81
|
-
} else {
|
|
82
|
-
this.loading = false;
|
|
83
|
-
this.loaded = true;
|
|
84
|
-
}
|
|
92
|
+
props: {
|
|
93
|
+
playlist: { default: ()=>({}), type: Object as ()=>Playlist},
|
|
85
94
|
},
|
|
86
95
|
|
|
87
96
|
data() {
|
|
88
97
|
return {
|
|
89
|
-
loading: true,
|
|
90
|
-
loaded: true,
|
|
91
|
-
podcasts: [] as
|
|
92
|
-
podcastsQuery: [] as
|
|
93
|
-
size: 12,
|
|
94
|
-
searchPattern: '',
|
|
98
|
+
loading: true as boolean,
|
|
99
|
+
loaded: true as boolean,
|
|
100
|
+
podcasts: [] as Array<Podcast>,
|
|
101
|
+
podcastsQuery: [] as Array<Podcast>,
|
|
102
|
+
size: 12 as number,
|
|
103
|
+
searchPattern: '' as string,
|
|
95
104
|
};
|
|
96
105
|
},
|
|
97
106
|
|
|
107
|
+
|
|
98
108
|
computed: {
|
|
99
|
-
notEmptyPlaylist():boolean {
|
|
109
|
+
notEmptyPlaylist(): boolean {
|
|
100
110
|
return 0 !== Object.keys(this.playlist.podcasts).length;
|
|
101
111
|
},
|
|
102
|
-
podcastsDisplay():
|
|
112
|
+
podcastsDisplay(): Array<Podcast> {
|
|
103
113
|
if (this.size < this.podcastsQuery.length)
|
|
104
114
|
return this.podcastsQuery.slice(0, this.size);
|
|
105
115
|
return this.podcastsQuery.slice(0, this.podcasts.length);
|
|
106
116
|
},
|
|
107
|
-
buttonPlus() {
|
|
117
|
+
buttonPlus(): boolean {
|
|
108
118
|
return state.generalParameters.buttonPlus;
|
|
109
119
|
},
|
|
110
|
-
organisationId() {
|
|
120
|
+
organisationId(): string {
|
|
111
121
|
return state.generalParameters.organisationId;
|
|
112
122
|
},
|
|
113
|
-
|
|
114
|
-
authenticated():boolean {
|
|
123
|
+
authenticated(): boolean {
|
|
115
124
|
return state.generalParameters.authenticated;
|
|
116
125
|
},
|
|
117
|
-
|
|
118
|
-
editRight() {
|
|
126
|
+
editRight(): boolean {
|
|
119
127
|
if (
|
|
120
128
|
(this.authenticated &&
|
|
121
129
|
this.organisationId === this.playlist.organisation.id) ||
|
|
@@ -125,13 +133,34 @@ export default defineComponent({
|
|
|
125
133
|
return false;
|
|
126
134
|
},
|
|
127
135
|
},
|
|
136
|
+
watch: {
|
|
137
|
+
searchPattern(): void {
|
|
138
|
+
if ('' !== this.searchPattern) {
|
|
139
|
+
this.podcastsQuery = this.podcasts.filter((el: Podcast) => {
|
|
140
|
+
return el.title
|
|
141
|
+
.toLowerCase()
|
|
142
|
+
.includes(this.searchPattern.toLowerCase());
|
|
143
|
+
});
|
|
144
|
+
} else {
|
|
145
|
+
this.podcastsQuery = this.podcasts;
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
},
|
|
128
149
|
|
|
150
|
+
created() {
|
|
151
|
+
if (this.notEmptyPlaylist) {
|
|
152
|
+
this.fetchContent();
|
|
153
|
+
} else {
|
|
154
|
+
this.loading = false;
|
|
155
|
+
this.loaded = true;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
129
158
|
methods: {
|
|
130
|
-
async fetchContent() {
|
|
159
|
+
async fetchContent(): Promise<void> {
|
|
131
160
|
this.podcasts.length = 0;
|
|
132
161
|
this.loading = true;
|
|
133
162
|
this.loaded = false;
|
|
134
|
-
|
|
163
|
+
const content = await octopusApi.fetchPlaylistContent(
|
|
135
164
|
this.playlist.playlistId
|
|
136
165
|
);
|
|
137
166
|
for (let index = 0, len = content.length; index < len; index++) {
|
|
@@ -139,36 +168,31 @@ export default defineComponent({
|
|
|
139
168
|
}
|
|
140
169
|
this.podcasts = content;
|
|
141
170
|
if (!this.editRight) {
|
|
142
|
-
this.podcasts = this.podcasts.filter((p:
|
|
171
|
+
this.podcasts = this.podcasts.filter((p: Podcast|null) => {
|
|
143
172
|
return (
|
|
144
173
|
null !== p &&
|
|
145
174
|
(!p.availability || true === p.availability.visibility)
|
|
146
175
|
);
|
|
147
176
|
});
|
|
148
177
|
}
|
|
149
|
-
|
|
150
178
|
this.podcastsQuery = this.podcasts;
|
|
151
179
|
this.loading = false;
|
|
152
180
|
this.loaded = true;
|
|
153
181
|
},
|
|
154
|
-
|
|
155
|
-
displayMore(event: { preventDefault: () => void; }) {
|
|
182
|
+
displayMore(event: { preventDefault: () => void }): void {
|
|
156
183
|
event.preventDefault();
|
|
157
184
|
this.size += 12;
|
|
158
185
|
},
|
|
159
186
|
},
|
|
160
|
-
|
|
161
|
-
searchPattern() {
|
|
162
|
-
if ('' !== this.searchPattern) {
|
|
163
|
-
this.podcastsQuery = this.podcasts.filter((el:any) => {
|
|
164
|
-
return el.title
|
|
165
|
-
.toLowerCase()
|
|
166
|
-
.includes(this.searchPattern.toLowerCase());
|
|
167
|
-
});
|
|
168
|
-
} else {
|
|
169
|
-
this.podcastsQuery = this.podcasts;
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
});
|
|
187
|
+
})
|
|
174
188
|
</script>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
<style lang="scss">
|
|
192
|
+
.width-600 {
|
|
193
|
+
width: 600px;
|
|
194
|
+
@media (max-width: 600px) {
|
|
195
|
+
width: 100%;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</style>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="d-flex align-items-center justify-content-start"
|
|
4
3
|
v-if="animators && 0 !== animators.length"
|
|
4
|
+
class="d-flex align-items-center justify-content-start"
|
|
5
5
|
>
|
|
6
6
|
<router-link
|
|
7
|
+
v-for="(animator, index) in animators"
|
|
8
|
+
v-show="index === visibleIndex"
|
|
9
|
+
:key="animator.participantId"
|
|
7
10
|
:to="{
|
|
8
11
|
name: 'participant',
|
|
9
12
|
params: { participantId: animator.participantId },
|
|
10
|
-
query: { productor:
|
|
13
|
+
query: { productor: $store.state.filter.organisationId },
|
|
11
14
|
}"
|
|
12
15
|
class="animator-item"
|
|
13
|
-
v-for="(animator, index) in animators"
|
|
14
|
-
v-bind:key="animator.participantId"
|
|
15
|
-
v-show="index === visibleIndex"
|
|
16
16
|
:aria-label="$t('Participant')"
|
|
17
17
|
>
|
|
18
18
|
<div class="podcast-item-animator text-dark">
|
|
@@ -22,38 +22,41 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
|
-
<style lang="scss">
|
|
26
|
-
.podcast-item-animator {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: flex-start;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
|
|
31
|
-
font-size: 0.55rem;
|
|
32
|
-
font-weight: 300;
|
|
33
|
-
text-transform: capitalize;
|
|
34
|
-
margin: 00.25rem 0.5rem 0;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
37
|
-
|
|
38
25
|
<script lang="ts">
|
|
26
|
+
import { Participant } from '@/store/class/participant';
|
|
39
27
|
import { defineComponent } from 'vue'
|
|
40
28
|
export default defineComponent({
|
|
41
29
|
name: 'AnimatorsItem',
|
|
42
30
|
|
|
43
|
-
props:
|
|
31
|
+
props: {
|
|
32
|
+
animators: { default: undefined, type: Object as ()=> Array<Participant>},
|
|
33
|
+
},
|
|
44
34
|
|
|
45
35
|
data() {
|
|
46
36
|
return {
|
|
47
|
-
visibleIndex: 0,
|
|
37
|
+
visibleIndex: 0 as number,
|
|
48
38
|
};
|
|
49
39
|
},
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
getAnimatorName(animator:
|
|
41
|
+
methods: {
|
|
42
|
+
getAnimatorName(animator: Participant): string {
|
|
53
43
|
const first = animator.firstName || '';
|
|
54
44
|
const last = animator.lastName || '';
|
|
55
45
|
return (first + ' ' + last).trim();
|
|
56
46
|
},
|
|
57
47
|
},
|
|
58
|
-
})
|
|
48
|
+
})
|
|
59
49
|
</script>
|
|
50
|
+
|
|
51
|
+
<style lang="scss">
|
|
52
|
+
.podcast-item-animator {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: flex-start;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
|
|
57
|
+
font-size: 0.55rem;
|
|
58
|
+
font-weight: 300;
|
|
59
|
+
text-transform: capitalize;
|
|
60
|
+
margin: 00.25rem 0.5rem 0;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="participants.length"
|
|
4
|
+
class="comma"
|
|
5
|
+
>
|
|
6
|
+
{{ title }}
|
|
7
|
+
<span
|
|
8
|
+
:id="idPopover"
|
|
9
|
+
class="saooti-help m-0 c-hand"
|
|
10
|
+
data-bs-toggle="popover"
|
|
11
|
+
data-bs-trigger="hover focus"
|
|
12
|
+
:aria-label="$t('Help')"
|
|
13
|
+
data-bs-custom-class="participant-help"
|
|
14
|
+
/>
|
|
15
|
+
<span class="mx-1">:</span>
|
|
16
|
+
<div
|
|
17
|
+
:id="idPopover+'content'"
|
|
18
|
+
class="d-none"
|
|
19
|
+
>
|
|
20
|
+
<div class="text-center fw-bold">
|
|
21
|
+
{{ title }}
|
|
22
|
+
</div>
|
|
23
|
+
<div class="horizontal-separator my-1" />
|
|
24
|
+
<div
|
|
25
|
+
v-for="participant in participants"
|
|
26
|
+
:key="'desc-'+participant.participantId"
|
|
27
|
+
class="d-flex flex-column align-items-center"
|
|
28
|
+
>
|
|
29
|
+
<b><i>{{ getName(participant) }}</i></b>
|
|
30
|
+
<div
|
|
31
|
+
v-if="participant.description"
|
|
32
|
+
class="h6 participant-desc html-wysiwyg-content"
|
|
33
|
+
v-html="participant.description"
|
|
34
|
+
/>
|
|
35
|
+
<div class="horizontal-separator my-1" />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<router-link
|
|
39
|
+
v-for="participant in participants"
|
|
40
|
+
:key="participant.participantId"
|
|
41
|
+
:aria-label="$t('Participant')"
|
|
42
|
+
class="link-info"
|
|
43
|
+
:to="{
|
|
44
|
+
name: 'participant',
|
|
45
|
+
params: { participantId: participant.participantId },
|
|
46
|
+
query: {
|
|
47
|
+
productor: $store.state.filter.organisationId,
|
|
48
|
+
},
|
|
49
|
+
}"
|
|
50
|
+
>
|
|
51
|
+
{{ getName(participant) }}
|
|
52
|
+
</router-link>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script lang="ts">
|
|
57
|
+
const bootstrap = require('bootstrap/dist/js/bootstrap.esm.min.js');
|
|
58
|
+
import { Participant } from '@/store/class/participant';
|
|
59
|
+
import { defineComponent } from 'vue'
|
|
60
|
+
export default defineComponent({
|
|
61
|
+
name: 'ParticipantDescription',
|
|
62
|
+
|
|
63
|
+
props: {
|
|
64
|
+
participants: { default: () => [], type: Array as ()=> Array<Participant>},
|
|
65
|
+
isGuest: { default: false, type: Boolean},
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed:{
|
|
73
|
+
idPopover(): string{
|
|
74
|
+
if(this.isGuest){
|
|
75
|
+
return "popover-guests-help";
|
|
76
|
+
}
|
|
77
|
+
return "popover-animators-help";
|
|
78
|
+
},
|
|
79
|
+
title(): string{
|
|
80
|
+
if(this.isGuest){
|
|
81
|
+
return this.$t('Guests').toString();
|
|
82
|
+
}
|
|
83
|
+
return this.$t('Animated by').toString();
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
mounted(){
|
|
87
|
+
const contentPopover = document.querySelector('#'+this.idPopover+'content');
|
|
88
|
+
if(contentPopover){
|
|
89
|
+
new bootstrap.Popover(document.querySelector('#'+this.idPopover),{
|
|
90
|
+
trigger: 'hover focus',
|
|
91
|
+
html: true,
|
|
92
|
+
content: (contentPopover as HTMLElement).innerHTML
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
methods: {
|
|
99
|
+
getName(person: any): string {
|
|
100
|
+
const first = person.firstName || '';
|
|
101
|
+
const last = person.lastName || '';
|
|
102
|
+
return (first + ' ' + last).trim();
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style lang="scss">
|
|
109
|
+
.participant-help{
|
|
110
|
+
.horizontal-separator {
|
|
111
|
+
border-top: 1px solid #cccccc;
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</style>
|