@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,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li
|
|
3
3
|
class="emission-player-container shadow-element"
|
|
4
|
-
v-if="activeEmission || editRight"
|
|
5
4
|
>
|
|
6
5
|
<router-link
|
|
7
6
|
:to="{
|
|
8
7
|
name: 'emission',
|
|
9
8
|
params: { emissionId: emission.emissionId },
|
|
10
|
-
query: { productor:
|
|
9
|
+
query: { productor: $store.state.filter.organisationId },
|
|
11
10
|
}"
|
|
12
11
|
class="d-flex flex-column text-dark"
|
|
13
12
|
>
|
|
14
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
v-if="rubriqueName"
|
|
15
|
+
class="emissionPlayerItem-info"
|
|
16
|
+
>
|
|
15
17
|
{{ rubriqueName }}
|
|
16
18
|
</div>
|
|
17
19
|
<div
|
|
@@ -20,9 +22,16 @@
|
|
|
20
22
|
'background-image':
|
|
21
23
|
'url(\'' + emission.imageUrl + '?dummy=' + dummyParam + '\')',
|
|
22
24
|
}"
|
|
23
|
-
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
v-if="titleInImage"
|
|
28
|
+
class="titleInImage"
|
|
29
|
+
>
|
|
30
|
+
{{ emission.name }}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
24
33
|
<div class="d-flex flex-column p-2">
|
|
25
|
-
<div class="
|
|
34
|
+
<div class="fw-bold text-uppercase text-ellipsis">
|
|
26
35
|
{{ emission.name }}
|
|
27
36
|
</div>
|
|
28
37
|
<div
|
|
@@ -32,26 +41,28 @@
|
|
|
32
41
|
<div
|
|
33
42
|
:id="'description-emission-' + emission.emissionId"
|
|
34
43
|
v-html="urlify(emission.description)"
|
|
35
|
-
|
|
44
|
+
/>
|
|
36
45
|
</div>
|
|
37
46
|
<!-- <div class="text-ellipsis html-wysiwyg-content" v-html="urlify(emission.description)"></div> -->
|
|
38
47
|
</div>
|
|
39
48
|
</router-link>
|
|
40
49
|
<div
|
|
41
|
-
class="border-top emission-item-border-color p-2 secondary-bg d-flex"
|
|
42
50
|
v-for="p in podcasts"
|
|
43
51
|
:key="p.podcastId"
|
|
52
|
+
class="border-top emission-item-border-color p-2 secondary-bg d-flex"
|
|
44
53
|
>
|
|
45
54
|
<div class="d-flex justify-content-between flex-grow">
|
|
46
55
|
<router-link
|
|
47
56
|
:to="{
|
|
48
57
|
name: 'podcast',
|
|
49
58
|
params: { podcastId: p.podcastId },
|
|
50
|
-
query: { productor:
|
|
59
|
+
query: { productor: $store.state.filter.organisationId },
|
|
51
60
|
}"
|
|
52
61
|
class="d-flex flex-column define-width text-dark"
|
|
53
62
|
>
|
|
54
|
-
<div class="
|
|
63
|
+
<div class="fw-bold text-ellipsis">
|
|
64
|
+
{{ p.title }}
|
|
65
|
+
</div>
|
|
55
66
|
<div
|
|
56
67
|
:id="'description-podcast-container-' + p.podcastId"
|
|
57
68
|
class="emission-description html-wysiwyg-content"
|
|
@@ -59,156 +70,91 @@
|
|
|
59
70
|
<div
|
|
60
71
|
:id="'description-podcast-' + p.podcastId"
|
|
61
72
|
v-html="urlify(p.description)"
|
|
62
|
-
|
|
73
|
+
/>
|
|
63
74
|
</div>
|
|
64
75
|
</router-link>
|
|
65
76
|
<div
|
|
66
|
-
class="play-button-box bg-secondary"
|
|
67
|
-
@click="play(p)"
|
|
68
77
|
v-if="
|
|
69
|
-
|
|
70
|
-
(
|
|
71
|
-
'PAUSED' ===
|
|
78
|
+
$store.state.player.podcast !== p ||
|
|
79
|
+
($store.state.player.podcast === p &&
|
|
80
|
+
'PAUSED' === $store.state.player.status)
|
|
72
81
|
"
|
|
82
|
+
class="play-button-box bg-secondary"
|
|
83
|
+
@click="play(p)"
|
|
73
84
|
>
|
|
74
85
|
<div
|
|
75
86
|
class="text-light saooti-play2-bounty"
|
|
76
87
|
:aria-label="$t('Play')"
|
|
77
|
-
|
|
88
|
+
/>
|
|
78
89
|
</div>
|
|
79
|
-
<div
|
|
90
|
+
<div
|
|
91
|
+
v-else
|
|
92
|
+
class="play-button-box bg-secondary"
|
|
93
|
+
@click="pause(p)"
|
|
94
|
+
>
|
|
80
95
|
<div
|
|
81
96
|
class="text-light saooti-pause-bounty"
|
|
82
97
|
:aria-label="$t('Pause')"
|
|
83
|
-
|
|
98
|
+
/>
|
|
84
99
|
</div>
|
|
85
100
|
</div>
|
|
86
101
|
</div>
|
|
87
102
|
<div
|
|
88
|
-
class="border-top emission-item-border-color p-2 secondary-bg d-flex justify-content-center"
|
|
89
103
|
v-if="buttonMore && podcasts.length === nbPodcasts"
|
|
104
|
+
class="border-top emission-item-border-color p-2 secondary-bg d-flex justify-content-center"
|
|
90
105
|
>
|
|
91
106
|
<router-link
|
|
92
107
|
:to="{
|
|
93
108
|
name: 'emission',
|
|
94
109
|
params: { emissionId: emission.emissionId },
|
|
95
|
-
query: { productor:
|
|
110
|
+
query: { productor: $store.state.filter.organisationId },
|
|
96
111
|
}"
|
|
97
112
|
class="btn"
|
|
98
|
-
>{{ $t('More episodes') }}</router-link
|
|
99
113
|
>
|
|
114
|
+
{{ $t('More episodes') }}
|
|
115
|
+
</router-link>
|
|
100
116
|
</div>
|
|
101
117
|
</li>
|
|
102
118
|
</template>
|
|
103
119
|
|
|
104
|
-
<style lang="scss">
|
|
105
|
-
.no-border-round {
|
|
106
|
-
border-radius: 0;
|
|
107
|
-
}
|
|
108
|
-
.text-ellipsis {
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
text-overflow: ellipsis;
|
|
112
|
-
}
|
|
113
|
-
.emission-player-container {
|
|
114
|
-
list-style: none;
|
|
115
|
-
background: #fff;
|
|
116
|
-
display: flex;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
width: 100%;
|
|
119
|
-
max-width: 13rem;
|
|
120
|
-
height: min-content;
|
|
121
|
-
border-radius: 0.8rem;
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
.emission-description {
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
margin-top: 0.5em;
|
|
126
|
-
word-break: break-word;
|
|
127
|
-
max-height: 3.5rem;
|
|
128
|
-
position: relative;
|
|
129
|
-
&.after-emission-description:after {
|
|
130
|
-
content: '...';
|
|
131
|
-
position: absolute;
|
|
132
|
-
padding-left: 1rem;
|
|
133
|
-
right: 0;
|
|
134
|
-
bottom: 0;
|
|
135
|
-
width: 100%;
|
|
136
|
-
font-size: 1rem;
|
|
137
|
-
font-weight: bolder;
|
|
138
|
-
text-align: center;
|
|
139
|
-
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
.define-width {
|
|
143
|
-
width: 9rem;
|
|
144
|
-
}
|
|
145
|
-
@media (max-width: 960px) {
|
|
146
|
-
.d-flex:not(.flex-column) {
|
|
147
|
-
flex-wrap: nowrap;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
.two-line-clamp {
|
|
152
|
-
display: block;
|
|
153
|
-
max-width: 100%;
|
|
154
|
-
height: 29px;
|
|
155
|
-
font-size: 14px;
|
|
156
|
-
line-height: 1;
|
|
157
|
-
-webkit-line-clamp: 2;
|
|
158
|
-
-webkit-box-orient: vertical;
|
|
159
|
-
overflow: hidden;
|
|
160
|
-
text-overflow: ellipsis;
|
|
161
|
-
}
|
|
162
|
-
.emission-item-border-color {
|
|
163
|
-
border-color: #ddd;
|
|
164
|
-
}
|
|
165
|
-
</style>
|
|
166
|
-
|
|
167
120
|
<script lang="ts">
|
|
168
121
|
const octopusApi = require('@saooti/octopus-api');
|
|
122
|
+
import { Emission } from '@/store/class/emission';
|
|
123
|
+
import { Podcast } from '@/store/class/podcast';
|
|
169
124
|
import { state } from '../../../store/paramStore';
|
|
170
125
|
import { displayMethods } from '../../mixins/functions';
|
|
171
|
-
|
|
172
|
-
import { defineComponent, nextTick } from 'vue'
|
|
126
|
+
import { defineComponent } from 'vue'
|
|
173
127
|
export default defineComponent({
|
|
174
128
|
name: 'EmissionPlayerItem',
|
|
175
|
-
|
|
176
|
-
props: ['emission', 'nbPodcasts', 'rubriqueName'],
|
|
177
|
-
emits: ['emissionNotVisible'],
|
|
178
|
-
|
|
179
129
|
mixins: [displayMethods],
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
mounted() {
|
|
185
|
-
let emissionDesc = document.getElementById(
|
|
186
|
-
'description-emission-' + this.emission.emissionId
|
|
187
|
-
);
|
|
188
|
-
let emissionDescContainer:any = document.getElementById(
|
|
189
|
-
'description-emission-container-' + this.emission.emissionId
|
|
190
|
-
);
|
|
191
|
-
if (
|
|
192
|
-
null !== emissionDesc &&
|
|
193
|
-
emissionDesc.clientHeight > emissionDescContainer.clientHeight
|
|
194
|
-
) {
|
|
195
|
-
emissionDescContainer.classList.add('after-emission-description');
|
|
196
|
-
}
|
|
130
|
+
props: {
|
|
131
|
+
emission: { default: ()=>({}), type: Object as ()=>Emission },
|
|
132
|
+
nbPodcasts: { default: undefined, type: Number },
|
|
133
|
+
rubriqueName: { default: undefined, type: String},
|
|
197
134
|
},
|
|
198
135
|
|
|
199
136
|
data() {
|
|
200
137
|
return {
|
|
201
|
-
activeEmission: true,
|
|
202
|
-
podcasts: [] as
|
|
203
|
-
dummyParam: new Date().getTime().toString(),
|
|
138
|
+
activeEmission: true as boolean,
|
|
139
|
+
podcasts: [] as Array<Podcast>,
|
|
140
|
+
dummyParam: new Date().getTime().toString() as string,
|
|
204
141
|
};
|
|
205
142
|
},
|
|
206
|
-
|
|
143
|
+
|
|
207
144
|
computed: {
|
|
208
|
-
buttonMore() {
|
|
145
|
+
buttonMore(): boolean {
|
|
209
146
|
return state.emissionsPage.buttonMore;
|
|
210
147
|
},
|
|
211
|
-
|
|
148
|
+
titleInImage(): boolean {
|
|
149
|
+
return state.emissionsPage.titleInImage;
|
|
150
|
+
},
|
|
151
|
+
authenticated(): boolean {
|
|
152
|
+
return this.$store.state.authentication.isAuthenticated;
|
|
153
|
+
},
|
|
154
|
+
organisationId(): string {
|
|
155
|
+
return state.generalParameters.organisationId;
|
|
156
|
+
},
|
|
157
|
+
editRight(): boolean {
|
|
212
158
|
if (
|
|
213
159
|
(this.authenticated && this.organisationId === this.emission.orga.id) ||
|
|
214
160
|
state.generalParameters.isAdmin
|
|
@@ -218,9 +164,26 @@ export default defineComponent({
|
|
|
218
164
|
},
|
|
219
165
|
},
|
|
220
166
|
|
|
167
|
+
created() {
|
|
168
|
+
this.loadPodcasts();
|
|
169
|
+
},
|
|
170
|
+
mounted() {
|
|
171
|
+
const emissionDesc = document.getElementById(
|
|
172
|
+
'description-emission-' + this.emission.emissionId
|
|
173
|
+
);
|
|
174
|
+
const emissionDescContainer = document.getElementById(
|
|
175
|
+
'description-emission-container-' + this.emission.emissionId
|
|
176
|
+
);
|
|
177
|
+
if (
|
|
178
|
+
null !== emissionDesc && null !== emissionDescContainer &&
|
|
179
|
+
emissionDesc.clientHeight > emissionDescContainer.clientHeight
|
|
180
|
+
) {
|
|
181
|
+
emissionDescContainer.classList.add('after-emission-description');
|
|
182
|
+
}
|
|
183
|
+
},
|
|
221
184
|
methods: {
|
|
222
|
-
async loadPodcasts() {
|
|
223
|
-
|
|
185
|
+
async loadPodcasts(): Promise<void> {
|
|
186
|
+
const nb = this.nbPodcasts ? this.nbPodcasts : 2;
|
|
224
187
|
const data = await octopusApi.fetchPodcasts({
|
|
225
188
|
emissionId: this.emission.emissionId,
|
|
226
189
|
size: nb,
|
|
@@ -229,36 +192,78 @@ export default defineComponent({
|
|
|
229
192
|
this.activeEmission = false;
|
|
230
193
|
}
|
|
231
194
|
this.podcasts = data.result;
|
|
232
|
-
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
this.$emit('emissionNotVisible');
|
|
236
|
-
await nextTick();
|
|
195
|
+
this.$nextTick(() => {
|
|
237
196
|
for (let index = 0, len = this.podcasts.length; index < len; index++) {
|
|
238
|
-
|
|
197
|
+
const podcastDesc = document.getElementById(
|
|
239
198
|
'description-podcast-' + this.podcasts[index].podcastId
|
|
240
199
|
);
|
|
241
|
-
|
|
200
|
+
const podcastDescContainer = document.getElementById(
|
|
242
201
|
'description-podcast-container-' + this.podcasts[index].podcastId
|
|
243
202
|
);
|
|
244
203
|
if (
|
|
245
|
-
null !== podcastDesc &&
|
|
204
|
+
null !== podcastDesc && null !== podcastDescContainer &&
|
|
246
205
|
podcastDesc.clientHeight > podcastDescContainer.clientHeight
|
|
247
206
|
) {
|
|
248
207
|
podcastDescContainer.classList.add('after-emission-description');
|
|
249
208
|
}
|
|
250
209
|
}
|
|
210
|
+
});
|
|
251
211
|
},
|
|
252
|
-
play(podcast:
|
|
212
|
+
play(podcast: Podcast): void {
|
|
253
213
|
if (podcast === this.$store.state.player.podcast) {
|
|
254
214
|
this.$store.commit('playerPause', false);
|
|
255
215
|
} else {
|
|
256
216
|
this.$store.commit('playerPlayPodcast', podcast);
|
|
257
217
|
}
|
|
258
218
|
},
|
|
259
|
-
pause() {
|
|
219
|
+
pause(): void {
|
|
260
220
|
this.$store.commit('playerPause', true);
|
|
261
221
|
},
|
|
262
222
|
},
|
|
263
|
-
})
|
|
223
|
+
})
|
|
264
224
|
</script>
|
|
225
|
+
|
|
226
|
+
<style lang="scss">
|
|
227
|
+
|
|
228
|
+
.emission-player-container {
|
|
229
|
+
list-style: none;
|
|
230
|
+
background: #fff;
|
|
231
|
+
display: flex;
|
|
232
|
+
flex-direction: column;
|
|
233
|
+
width: 100%;
|
|
234
|
+
max-width: 13rem;
|
|
235
|
+
height: min-content;
|
|
236
|
+
border-radius: 0.8rem;
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
.emission-description {
|
|
239
|
+
overflow: hidden;
|
|
240
|
+
margin-top: 0.5em;
|
|
241
|
+
word-break: break-word;
|
|
242
|
+
max-height: 3.5rem;
|
|
243
|
+
position: relative;
|
|
244
|
+
&.after-emission-description:after {
|
|
245
|
+
content: '...';
|
|
246
|
+
position: absolute;
|
|
247
|
+
padding-left: 1rem;
|
|
248
|
+
right: 0;
|
|
249
|
+
bottom: 0;
|
|
250
|
+
width: 100%;
|
|
251
|
+
font-size: 1rem;
|
|
252
|
+
font-weight: bolder;
|
|
253
|
+
text-align: center;
|
|
254
|
+
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
.define-width {
|
|
258
|
+
width: 9rem;
|
|
259
|
+
}
|
|
260
|
+
@media (max-width: 960px) {
|
|
261
|
+
.d-flex:not(.flex-column) {
|
|
262
|
+
flex-wrap: nowrap;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
.emission-item-border-color {
|
|
267
|
+
border-color: #ddd;
|
|
268
|
+
}
|
|
269
|
+
</style>
|