@saooti/octopus-sdk 1.0.0 → 1.1.1
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 +261 -0
- package/index.d.ts +4 -0
- package/index.ts +55 -3
- package/package.json +53 -45
- package/public/config.ts +4 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +129 -0
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/style.css +186 -1224
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/public/img/ACPM.png +0 -0
- package/public/img/ouest_france_logo.svg +12 -0
- package/src/App.vue +102 -31
- package/src/api/classicCrud.ts +34 -0
- package/src/api/initialize.ts +5 -2
- package/src/assets/bootstrap-diff.scss +197 -0
- package/src/assets/form.scss +77 -77
- package/src/assets/general.scss +284 -272
- package/src/assets/live.scss +39 -0
- package/src/assets/modal.scss +43 -50
- package/src/assets/multiselect.scss +522 -573
- package/src/assets/octopus-library.scss +18 -4
- package/src/assets/share.scss +243 -0
- package/src/assets/transition.scss +98 -2
- package/src/components/display/aggregator/RssSection.vue +3 -5
- package/src/components/display/categories/CategoryChooser.vue +151 -114
- package/src/components/display/categories/CategoryFilter.vue +162 -0
- package/src/components/display/categories/CategoryList.vue +149 -117
- package/src/components/display/comments/AddCommentModal.vue +103 -108
- package/src/components/display/comments/CommentBasicView.vue +95 -0
- package/src/components/display/comments/CommentInput.vue +195 -183
- package/src/components/display/comments/CommentItem.vue +170 -208
- package/src/components/display/comments/CommentList.vue +134 -228
- package/src/components/display/comments/CommentParentInfo.vue +28 -62
- package/src/components/display/comments/CommentPlayer.vue +53 -56
- package/src/components/display/comments/CommentSection.vue +52 -83
- package/src/components/display/edit/EditBox.vue +10 -4
- package/src/components/display/edit/EditCommentBox.vue +124 -38
- package/src/components/display/emission/EmissionChooser.vue +88 -108
- package/src/components/display/emission/EmissionInlineList.vue +156 -157
- package/src/components/display/emission/EmissionItem.vue +72 -226
- package/src/components/display/emission/EmissionList.vue +159 -201
- package/src/components/display/emission/EmissionPlayerItem.vue +203 -174
- package/src/components/display/filter/AdvancedSearch.vue +224 -432
- package/src/components/display/filter/CategoryFilter.vue +105 -0
- package/src/components/display/filter/MonetizableFilter.vue +18 -15
- package/src/components/display/filter/ProductorSearch.vue +153 -176
- package/src/components/display/filter/RubriqueChoice.vue +97 -0
- package/src/components/display/filter/RubriqueFilter.vue +232 -0
- package/src/components/display/list/ListPaginate.vue +145 -0
- package/src/components/display/list/Paginate.vue +218 -0
- package/src/components/display/live/CountDown.vue +31 -30
- package/src/components/display/live/LiveHorizontalList.vue +84 -62
- package/src/components/display/live/LiveItem.vue +161 -186
- package/src/components/display/live/LiveList.vue +184 -295
- package/src/components/display/organisation/OrganisationChooser.vue +124 -162
- package/src/components/display/organisation/OrganisationChooserLight.vue +53 -56
- package/src/components/display/participant/ParticipantItem.vue +91 -128
- package/src/components/display/participant/ParticipantList.vue +134 -121
- package/src/components/display/playlist/PlaylistItem.vue +60 -97
- package/src/components/display/playlist/PlaylistList.vue +99 -92
- package/src/components/display/playlist/PodcastList.vue +117 -132
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +191 -0
- package/src/components/display/podcasts/AnimatorsItem.vue +29 -37
- package/src/components/display/podcasts/ParticipantDescription.vue +82 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +49 -102
- package/src/components/display/podcasts/PodcastImage.vue +208 -225
- package/src/components/display/podcasts/PodcastInlineList.vue +62 -355
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +240 -0
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +167 -0
- package/src/components/display/podcasts/PodcastItem.vue +94 -218
- package/src/components/display/podcasts/PodcastItemInfo.vue +166 -0
- package/src/components/display/podcasts/PodcastList.vue +127 -178
- package/src/components/display/podcasts/PodcastModuleBox.vue +234 -0
- package/src/components/display/podcasts/PodcastPlayBar.vue +101 -0
- package/src/components/display/podcasts/PodcastSwiperList.vue +204 -0
- package/src/components/display/podcasts/TagList.vue +60 -38
- package/src/components/display/rubriques/RubriqueChooser.vue +144 -131
- package/src/components/display/rubriques/RubriqueList.vue +216 -0
- package/src/components/display/sharing/PlayerParameters.vue +111 -153
- package/src/components/display/sharing/QrCode.vue +96 -0
- package/src/components/display/sharing/ShareButtons.vue +63 -233
- package/src/components/display/sharing/ShareButtonsIntern.vue +225 -0
- package/src/components/display/sharing/ShareDistribution.vue +102 -166
- package/src/components/display/sharing/SharePlayer.vue +189 -353
- package/src/components/display/sharing/SharePlayerColors.vue +78 -0
- package/src/components/display/sharing/SharePlayerTypes.vue +112 -0
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +65 -118
- package/src/components/display/studio/RecordingItemButton.vue +3 -5
- package/src/components/form/ClassicCheckbox.vue +66 -0
- package/src/components/form/ClassicLoading.vue +28 -0
- package/src/components/form/ClassicRadio.vue +66 -0
- package/src/components/form/ClassicSearch.vue +86 -0
- package/src/components/form/ClassicSelect.vue +65 -0
- package/src/components/misc/ErrorMessage.vue +27 -18
- package/src/components/misc/Footer.vue +151 -108
- package/src/components/misc/HomeDropdown.vue +95 -154
- package/src/components/misc/LeftMenu.vue +137 -206
- package/src/components/misc/Popover.vue +118 -0
- package/src/components/misc/Snackbar.vue +73 -37
- package/src/components/misc/TopBar.vue +211 -314
- package/src/components/misc/modal/ClipboardModal.vue +34 -47
- package/src/components/misc/modal/MessageModal.vue +74 -53
- package/src/components/misc/modal/NewsletterModal.vue +272 -224
- package/src/components/misc/modal/QrCodeModal.vue +58 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +140 -74
- package/src/components/misc/player/Player.vue +146 -0
- package/src/components/misc/player/PlayerCompact.vue +154 -0
- package/src/components/misc/player/PlayerLarge.vue +166 -0
- package/src/components/misc/player/PlayerProgressBar.vue +112 -0
- package/src/components/misc/player/PlayerTimeline.vue +61 -0
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/orgaComputed.ts +15 -0
- package/src/components/mixins/organisationFilter.ts +41 -0
- package/src/components/mixins/player/playerComment.ts +98 -0
- package/src/components/mixins/player/playerDisplay.ts +113 -0
- package/src/components/mixins/player/playerLive.ts +111 -0
- package/src/components/mixins/player/playerLogic.ts +225 -0
- package/src/components/mixins/tagOfMixins.ts +19 -0
- package/src/components/pages/Category.vue +24 -28
- package/src/components/pages/Emission.vue +144 -177
- package/src/components/pages/Emissions.vue +94 -110
- package/src/components/pages/Error403Page.vue +60 -0
- package/src/components/pages/Home.vue +74 -21
- package/src/components/pages/Lives.vue +53 -58
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +113 -129
- package/src/components/pages/Participants.vue +25 -41
- package/src/components/pages/Playlist.vue +86 -86
- package/src/components/pages/Playlists.vue +33 -52
- package/src/components/pages/Podcast.vue +206 -478
- package/src/components/pages/Podcasts.vue +112 -156
- package/src/components/pages/Rubrique.vue +21 -27
- package/src/components/pages/Search.vue +37 -94
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/helper/useEventListener.ts +18 -0
- package/src/i18n.ts +36 -0
- package/src/locale/de.ts +309 -0
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +316 -1
- package/src/locale/es.ts +309 -0
- package/src/locale/fr.ts +47 -15
- package/src/locale/it.ts +307 -0
- package/src/locale/messages.ts +11 -2
- package/src/locale/sl.ts +309 -0
- package/src/main.ts +64 -55
- package/src/router/router.ts +192 -159
- package/src/sass/_variables.scss +10 -8
- package/src/shims-tsx.d.ts +15 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +41 -173
- package/src/store/class/adserver/adserverConfig.ts +9 -0
- package/src/store/class/adserver/adserverOtherEmission.ts +13 -0
- package/src/store/class/adserver/adserverTiming.ts +10 -0
- package/src/store/class/cartouchier/cartouche.ts +15 -0
- package/src/store/class/cartouchier/cartouchier.ts +9 -0
- package/src/store/class/conference/conference.ts +35 -0
- package/src/store/class/conference/conferenceMessage.ts +10 -0
- package/src/store/class/conference/conferenceParticipant.ts +18 -0
- package/src/store/class/conference/pad.ts +15 -0
- package/src/store/class/conference/studioCall.ts +7 -0
- package/src/store/class/contract/contract.ts +7 -0
- package/src/store/class/contract/contractOrganisation.ts +7 -0
- package/src/store/class/ftp/ftpEmission.ts +41 -0
- package/src/store/class/ftp/ftpParam.ts +12 -0
- package/src/store/class/ftp/testFtpEmission.ts +5 -0
- package/src/store/class/general/audioView.ts +21 -0
- package/src/store/class/general/category.ts +10 -0
- package/src/store/class/general/comment.ts +16 -0
- package/src/store/class/general/customPlayer.ts +9 -0
- package/src/store/class/general/emission.ts +23 -0
- package/src/store/class/general/fetchParam.ts +3 -0
- package/src/store/class/general/initState.ts +25 -0
- package/src/store/class/general/interfacePageable.ts +16 -0
- package/src/store/class/general/ituneCategory.ts +5 -0
- package/src/store/class/general/media.ts +14 -0
- package/src/store/class/general/organisation.ts +20 -0
- package/src/store/class/general/pageable.ts +13 -0
- package/src/store/class/general/participant.ts +12 -0
- package/src/store/class/general/player.ts +14 -0
- package/src/store/class/general/playlist.ts +13 -0
- package/src/store/class/general/podcast.ts +43 -0
- package/src/store/class/general/sortPageable.ts +5 -0
- package/src/store/class/general/soundcastCategory.ts +8 -0
- package/src/store/class/ouestFrance/ofTag.ts +36 -0
- package/src/store/class/ouestFrance/ofTagInfo.ts +9 -0
- package/src/store/class/ouestFrance/ofTagPage.ts +7 -0
- package/src/store/class/ouestFrance/ofTagSeo.ts +7 -0
- package/src/store/class/ouestFrance/ofTagVente.ts +6 -0
- package/src/store/class/ouestFrance/ofTagWithParents.ts +26 -0
- package/src/store/class/rss/aggregator.ts +28 -0
- package/src/store/class/rss/rssEmission.ts +14 -0
- package/src/store/class/rss/rssInfo.ts +8 -0
- package/src/store/class/rubrique/rubriquage.ts +10 -0
- package/src/store/class/rubrique/rubriquageFilter.ts +6 -0
- package/src/store/class/rubrique/rubrique.ts +9 -0
- package/src/store/class/stat/statArrayIncome.ts +6 -0
- package/src/store/class/stat/statArrayObject.ts +34 -0
- package/src/store/class/stat/statGraph.ts +7 -0
- package/src/store/class/user/person.ts +15 -0
- package/src/store/class/user/profile.ts +12 -0
- package/src/store/class/user/userKeycloak.ts +24 -0
- package/src/store/paramStore.ts +222 -217
- package/src/store/typeAppStore.ts +186 -235
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +16 -0
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +0 -829
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/stitcher-logo.svg +0 -83
- package/public/img/ACPM.PNG +0 -0
- package/src/api/comments.ts +0 -7
- package/src/api/emissions.ts +0 -7
- package/src/api/podcasts.ts +0 -7
- package/src/api/profile.ts +0 -8
- package/src/api/studio.ts +0 -1
- 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/components/misc/Player.vue +0 -792
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="d-flex flex-column p-3"
|
|
4
|
+
>
|
|
5
|
+
<div class="d-flex align-items-center mb-2">
|
|
6
|
+
<h2 class="mb-0">
|
|
7
|
+
{{ title }}
|
|
8
|
+
</h2>
|
|
9
|
+
<router-link
|
|
10
|
+
v-if="isButtonNextTitle"
|
|
11
|
+
class="btn admin-button m-1 fw-bold saooti-right"
|
|
12
|
+
:title="buttonText"
|
|
13
|
+
:to="refTo"
|
|
14
|
+
@click="handleSeeMoreButton"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="d-flex justify-content-between">
|
|
18
|
+
<div class="d-flex">
|
|
19
|
+
<button
|
|
20
|
+
class="btn btn-underline"
|
|
21
|
+
:class="{ active: !popularSort }"
|
|
22
|
+
@click="sortChrono()"
|
|
23
|
+
>
|
|
24
|
+
{{ $t('Last added') }}
|
|
25
|
+
</button>
|
|
26
|
+
<button
|
|
27
|
+
class="btn btn-underline"
|
|
28
|
+
:class="{ active: popularSort }"
|
|
29
|
+
@click="sortPopular()"
|
|
30
|
+
>
|
|
31
|
+
{{ $t('Most popular') }}
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
v-if="displayArrow"
|
|
36
|
+
class="hide-phone"
|
|
37
|
+
>
|
|
38
|
+
<button
|
|
39
|
+
class="btn admin-button m-1 saooti-left"
|
|
40
|
+
:class="{ disabled: !previousAvailable }"
|
|
41
|
+
:title="$t('Display previous')"
|
|
42
|
+
@click="displayPrevious()"
|
|
43
|
+
/>
|
|
44
|
+
<button
|
|
45
|
+
class="btn admin-button m-1 saooti-right"
|
|
46
|
+
:class="{ disabled: !nextAvailable }"
|
|
47
|
+
:title="$t('Display next')"
|
|
48
|
+
@click="displayNext()"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<slot name="list-inline" />
|
|
53
|
+
<router-link
|
|
54
|
+
v-if="!isButtonNextTitle"
|
|
55
|
+
class="btn btn-primary align-self-center width-fit-content m-4"
|
|
56
|
+
:to="refTo"
|
|
57
|
+
@click="handleSeeMoreButton"
|
|
58
|
+
>
|
|
59
|
+
{{ buttonText }}
|
|
60
|
+
<div
|
|
61
|
+
v-if="buttonPlus"
|
|
62
|
+
class="ms-1 saooti-more"
|
|
63
|
+
/>
|
|
64
|
+
</router-link>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script lang="ts">
|
|
69
|
+
import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
|
|
70
|
+
import { defineComponent } from 'vue'
|
|
71
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
72
|
+
import { Rubrique } from '@/store/class/rubrique/rubrique';
|
|
73
|
+
export default defineComponent({
|
|
74
|
+
name: 'PodcastInlineListTemplate',
|
|
75
|
+
|
|
76
|
+
components: {
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
props: {
|
|
80
|
+
displayArrow: { default: true, type: Boolean},
|
|
81
|
+
previousAvailable: { default: false, type: Boolean},
|
|
82
|
+
nextAvailable: { default: false, type: Boolean},
|
|
83
|
+
popularSort: { default: false, type: Boolean},
|
|
84
|
+
buttonText: { default: undefined, type: String},
|
|
85
|
+
buttonPlus: { default:false, type: Boolean},
|
|
86
|
+
title: { default: '', type: String},
|
|
87
|
+
href: { default: undefined, type: String},
|
|
88
|
+
iabId: { default: undefined, type: Number},
|
|
89
|
+
rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
|
|
90
|
+
noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
|
|
91
|
+
isButtonNextTitle: {default: false, type:Boolean}
|
|
92
|
+
},
|
|
93
|
+
emits:['sortChrono','sortPopular', 'displayPrevious', 'displayNext'],
|
|
94
|
+
data() {
|
|
95
|
+
return {
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
computed: {
|
|
100
|
+
rubriqueQueryParam(): string|undefined{
|
|
101
|
+
if(this.$store.state.filter?.rubriqueFilter?.length){
|
|
102
|
+
return this.$store.state.filter.rubriqueFilter.map((value: RubriquageFilter) => value.rubriquageId+':'+value.rubriqueId).join();
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
},
|
|
106
|
+
refTo(): string | RouteLocationRaw {
|
|
107
|
+
if (this.href) return this.href;
|
|
108
|
+
if(this.iabId){
|
|
109
|
+
return {
|
|
110
|
+
name: 'category',
|
|
111
|
+
params:{ 'iabId': this.iabId },
|
|
112
|
+
query: { productor: this.$store.state.filter.organisationId },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
name: 'podcasts',
|
|
117
|
+
query: { productor: this.$store.state.filter.organisationId,
|
|
118
|
+
iabId:this.$store.state.filter.iab?.id,
|
|
119
|
+
rubriquesId: this.rubriqueQueryParam },
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
methods: {
|
|
125
|
+
sortChrono():void{
|
|
126
|
+
this.$emit('sortChrono');
|
|
127
|
+
},
|
|
128
|
+
sortPopular():void{
|
|
129
|
+
this.$emit('sortPopular');
|
|
130
|
+
},
|
|
131
|
+
displayPrevious():void{
|
|
132
|
+
this.$emit('displayPrevious');
|
|
133
|
+
},
|
|
134
|
+
displayNext():void{
|
|
135
|
+
this.$emit('displayNext');
|
|
136
|
+
},
|
|
137
|
+
handleSeeMoreButton(event: { preventDefault: () => void; }){
|
|
138
|
+
if(!this.rubriqueId || 0===this.rubriqueId.length || this.noRubriquageId.length){
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
const rubriqueChosenId = this.rubriqueId[this.rubriqueId.length - 1];
|
|
143
|
+
let filterToAdd: RubriquageFilter = {
|
|
144
|
+
rubriquageId: 0,
|
|
145
|
+
rubriqueId: rubriqueChosenId,
|
|
146
|
+
nameRubriquage: '',
|
|
147
|
+
nameRubrique: ''
|
|
148
|
+
};
|
|
149
|
+
if(this.$store.state.filter.rubriquageArray.length){
|
|
150
|
+
const rubriqueChosen = this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriques.find((element: Rubrique) => element.rubriqueId === rubriqueChosenId);
|
|
151
|
+
filterToAdd = {
|
|
152
|
+
rubriquageId: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].rubriquageId,
|
|
153
|
+
rubriqueId: rubriqueChosenId,
|
|
154
|
+
nameRubriquage: this.$store.state.filter.rubriquageArray[this.rubriqueId.length - 1].title,
|
|
155
|
+
nameRubrique: rubriqueChosen.name
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
|
|
159
|
+
newFilter.push(filterToAdd);
|
|
160
|
+
this.$store.commit('filterRubrique', newFilter);
|
|
161
|
+
const queries = this.$route.query;
|
|
162
|
+
const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
|
|
163
|
+
this.$router.push({ name: 'podcasts',query: { ...queries, ...{ rubriquesId: queryString }} });
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
})
|
|
167
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li
|
|
3
|
-
class="podcast-item-container
|
|
3
|
+
class="podcast-item-container"
|
|
4
4
|
:class="[
|
|
5
5
|
podcastShadow ? 'shadow-element' : '',
|
|
6
6
|
podcastBorderBottom ? 'border-bottom' : '',
|
|
@@ -9,70 +9,114 @@
|
|
|
9
9
|
:data-count="podcast.downloadCount"
|
|
10
10
|
>
|
|
11
11
|
<PodcastImage
|
|
12
|
-
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
12
|
+
:podcast="podcast"
|
|
13
|
+
:hide-play="!podcastItemDescription || (podcastItemDescription && (!hover || !description))"
|
|
14
|
+
:display-description="0!==description.length && podcastItemDescription"
|
|
15
|
+
:arrow-direction="arrowDirection"
|
|
16
16
|
@hideDescription="hideDescription"
|
|
17
17
|
@showDescription="showDescription"
|
|
18
18
|
/>
|
|
19
19
|
<div
|
|
20
|
-
|
|
20
|
+
v-if="podcastItemDescription"
|
|
21
|
+
ref="descriptionPodcastContainer"
|
|
21
22
|
class="description-podcast-item html-wysiwyg-content"
|
|
22
23
|
:class="[
|
|
23
|
-
hover && description ? 'visible' : 'invisible',
|
|
24
|
+
hover && ''!==description ? 'visible' : 'invisible',
|
|
24
25
|
isDescriptionBig ? 'after-podcast-description' : '',
|
|
25
26
|
]"
|
|
26
27
|
>
|
|
28
|
+
<!-- eslint-disable vue/no-v-html -->
|
|
27
29
|
<div
|
|
28
|
-
|
|
30
|
+
ref="descriptionPodcast"
|
|
29
31
|
v-html="description"
|
|
30
|
-
|
|
32
|
+
/>
|
|
33
|
+
<!-- eslint-enable -->
|
|
31
34
|
</div>
|
|
32
|
-
<
|
|
33
|
-
|
|
35
|
+
<PodcastItemInfo
|
|
36
|
+
:podcast-id="podcast.podcastId"
|
|
37
|
+
:title="podcast.title"
|
|
38
|
+
:pub-date="podcast.pubDate"
|
|
39
|
+
:podcast-organisation-id="podcast.organisation.id"
|
|
40
|
+
:podcast-organisation-name="podcast.organisation.name"
|
|
41
|
+
:podcast-order="podcast.order"
|
|
42
|
+
:duration="podcast.duration"
|
|
43
|
+
:animators="podcast.animators"
|
|
34
44
|
@mouseenter="showDescription"
|
|
35
45
|
@mouseleave="hideDescription"
|
|
36
|
-
|
|
37
|
-
<div class="d-flex justify-content-between flex-wrap text-secondary mb-3">
|
|
38
|
-
<div class="mr-3 small-Text">{{ date }}</div>
|
|
39
|
-
<div class="small-Text" v-if="0 !== duration.length">
|
|
40
|
-
<!-- <span class="saooti-clock3"></span> -->{{ duration }}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<AnimatorsItem v-bind:animators="podcast.animators" />
|
|
44
|
-
<router-link
|
|
45
|
-
:to="{
|
|
46
|
-
name: 'podcast',
|
|
47
|
-
params: { podcastId: podcast.podcastId },
|
|
48
|
-
query: { productor: this.$store.state.filter.organisationId },
|
|
49
|
-
}"
|
|
50
|
-
class="text-dark d-flex flex-column flex-grow"
|
|
51
|
-
>
|
|
52
|
-
<div class="title-podcast-item">{{ title }}</div>
|
|
53
|
-
</router-link>
|
|
54
|
-
<div class="d-flex justify-content-between">
|
|
55
|
-
<router-link
|
|
56
|
-
v-if="!isPodcastmaker"
|
|
57
|
-
:to="{
|
|
58
|
-
name: 'productor',
|
|
59
|
-
params: { productorId: podcast.organisation.id },
|
|
60
|
-
query: { productor: this.$store.state.filter.organisationId },
|
|
61
|
-
}"
|
|
62
|
-
class="text-dark producer-podcast-item"
|
|
63
|
-
>
|
|
64
|
-
<div>{{ '© ' + podcast.organisation.name }}</div>
|
|
65
|
-
</router-link>
|
|
66
|
-
<span
|
|
67
|
-
class="saooti-star-bounty text-danger pr-2"
|
|
68
|
-
v-if="editRight && podcast.order && podcast.order > 1"
|
|
69
|
-
></span>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
46
|
+
/>
|
|
72
47
|
</li>
|
|
73
48
|
</template>
|
|
74
49
|
|
|
50
|
+
<script lang="ts">
|
|
51
|
+
import PodcastItemInfo from './PodcastItemInfo.vue';
|
|
52
|
+
import PodcastImage from './PodcastImage.vue';
|
|
53
|
+
import { state } from '../../../store/paramStore';
|
|
54
|
+
import moment from 'moment';
|
|
55
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
56
|
+
import { defineComponent } from 'vue'
|
|
57
|
+
export default defineComponent({
|
|
58
|
+
name: 'PodcastItem',
|
|
59
|
+
|
|
60
|
+
components: {
|
|
61
|
+
PodcastItemInfo,
|
|
62
|
+
PodcastImage,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
props: {
|
|
66
|
+
podcast: { default: ()=>({}), type: Object as ()=> Podcast},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
hover: false as boolean,
|
|
72
|
+
arrowDirection: 'up' as string,
|
|
73
|
+
isDescriptionBig: false as boolean,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
computed: {
|
|
78
|
+
podcastShadow(): boolean {
|
|
79
|
+
return (state.podcastsPage.podcastShadow as boolean);
|
|
80
|
+
},
|
|
81
|
+
podcastBorderBottom(): boolean {
|
|
82
|
+
return (state.podcastsPage.podcastBorderBottom as boolean);
|
|
83
|
+
},
|
|
84
|
+
podcastItemDescription(): boolean {
|
|
85
|
+
return (state.podcastPage.podcastItemDescription as boolean);
|
|
86
|
+
},
|
|
87
|
+
displayDate(): string {
|
|
88
|
+
return moment(this.podcast.pubDate).format('X');
|
|
89
|
+
},
|
|
90
|
+
description(): string {
|
|
91
|
+
return this.podcast.description ?? '';
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
mounted() {
|
|
96
|
+
if(!this.podcastItemDescription){return}
|
|
97
|
+
const podcastDesc = (this.$refs.descriptionPodcast as HTMLElement);
|
|
98
|
+
const podcastDescContainer = (this.$refs.descriptionPodcastContainer as HTMLElement);
|
|
99
|
+
if (podcastDesc?.clientHeight > podcastDescContainer?.clientHeight) {
|
|
100
|
+
this.isDescriptionBig = true;
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
showDescription(): void {
|
|
105
|
+
if(!this.podcastItemDescription){return}
|
|
106
|
+
this.arrowDirection = 'down';
|
|
107
|
+
this.hover = true;
|
|
108
|
+
},
|
|
109
|
+
hideDescription(): void {
|
|
110
|
+
if(!this.podcastItemDescription){return}
|
|
111
|
+
this.arrowDirection = 'up';
|
|
112
|
+
this.hover = false;
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
})
|
|
116
|
+
</script>
|
|
117
|
+
|
|
75
118
|
<style lang="scss">
|
|
119
|
+
.octopus-app{
|
|
76
120
|
.podcast-item-container {
|
|
77
121
|
border-radius: 0.8rem;
|
|
78
122
|
list-style: none;
|
|
@@ -84,26 +128,7 @@
|
|
|
84
128
|
text-align: left;
|
|
85
129
|
background: #fff;
|
|
86
130
|
flex-shrink: 0;
|
|
87
|
-
|
|
88
|
-
margin: 0.5rem !important;
|
|
89
|
-
}
|
|
90
|
-
.saooti-star-bounty {
|
|
91
|
-
font-size: 22px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.title-podcast-item {
|
|
95
|
-
font-weight: 700;
|
|
96
|
-
margin: 0.25rem 0.5rem 0.5rem;
|
|
97
|
-
overflow: hidden;
|
|
98
|
-
display: -webkit-box;
|
|
99
|
-
flex-grow: 1;
|
|
100
|
-
font-size: 0.7rem;
|
|
101
|
-
-webkit-line-clamp: 3;
|
|
102
|
-
-webkit-box-orient: vertical;
|
|
103
|
-
min-height: 3rem;
|
|
104
|
-
line-height: 1rem;
|
|
105
|
-
word-break: break-word;
|
|
106
|
-
}
|
|
131
|
+
|
|
107
132
|
.description-podcast-item {
|
|
108
133
|
padding: 1rem;
|
|
109
134
|
color: #333;
|
|
@@ -128,158 +153,9 @@
|
|
|
128
153
|
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
|
|
129
154
|
}
|
|
130
155
|
}
|
|
131
|
-
.producer-podcast-item {
|
|
132
|
-
margin: 0.2rem 0.5rem 0.5rem;
|
|
133
|
-
font-size: 0.55rem;
|
|
134
|
-
color: #666;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
156
|
@media (max-width: 960px) {
|
|
138
157
|
margin: 0.5rem !important;
|
|
139
158
|
}
|
|
140
159
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<script lang="ts">
|
|
144
|
-
import AnimatorsItem from './AnimatorsItem.vue';
|
|
145
|
-
import PodcastImage from './PodcastImage.vue';
|
|
146
|
-
import { state } from '../../../store/paramStore';
|
|
147
|
-
const moment = require('moment');
|
|
148
|
-
const humanizeDuration = require('humanize-duration');
|
|
149
|
-
|
|
150
|
-
import { defineComponent } from 'vue'
|
|
151
|
-
export default defineComponent({
|
|
152
|
-
name: 'PodcastItem',
|
|
153
|
-
|
|
154
|
-
props: ['podcast'],
|
|
155
|
-
|
|
156
|
-
components: {
|
|
157
|
-
AnimatorsItem,
|
|
158
|
-
PodcastImage,
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
mounted() {
|
|
162
|
-
let podcastDesc = document.getElementById(
|
|
163
|
-
'description-podcast-' + this.podcast.podcastId
|
|
164
|
-
);
|
|
165
|
-
let podcastDescContainer:any = document.getElementById(
|
|
166
|
-
'description-podcast-container-' + this.podcast.podcastId
|
|
167
|
-
);
|
|
168
|
-
if (
|
|
169
|
-
null !== podcastDesc &&
|
|
170
|
-
podcastDesc.clientHeight > podcastDescContainer.clientHeight
|
|
171
|
-
) {
|
|
172
|
-
this.isDescriptionBig = true;
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
data() {
|
|
177
|
-
return {
|
|
178
|
-
hover: false,
|
|
179
|
-
arrowDirection: 'up',
|
|
180
|
-
isDescriptionBig: false,
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
computed: {
|
|
185
|
-
isPodcastmaker() {
|
|
186
|
-
return state.generalParameters.podcastmaker;
|
|
187
|
-
},
|
|
188
|
-
podcastShadow() {
|
|
189
|
-
return state.podcastsPage.podcastShadow;
|
|
190
|
-
},
|
|
191
|
-
podcastBorderBottom() {
|
|
192
|
-
return state.podcastsPage.podcastBorderBottom;
|
|
193
|
-
},
|
|
194
|
-
date():string {
|
|
195
|
-
return moment(this.podcast.pubDate).format('D/MM/YYYY [à] HH[h]mm');
|
|
196
|
-
},
|
|
197
|
-
displayDate():string {
|
|
198
|
-
return moment(this.podcast.pubDate).format('X');
|
|
199
|
-
},
|
|
200
|
-
category() {
|
|
201
|
-
const catIds = this.podcast.emission.iabIds;
|
|
202
|
-
return state.generalParameters.allCategories
|
|
203
|
-
.filter((c:any) => {
|
|
204
|
-
return catIds.includes(c.id);
|
|
205
|
-
})
|
|
206
|
-
.map((c:any) => {
|
|
207
|
-
return c.name;
|
|
208
|
-
})
|
|
209
|
-
.join(', ');
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
description():any {
|
|
213
|
-
if (!this.podcast.description) return null;
|
|
214
|
-
return this.podcast.description;
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
title():string {
|
|
218
|
-
if (state.generalParameters.isIE11)
|
|
219
|
-
return this.podcast.title.substring(0, 50) + '...';
|
|
220
|
-
return this.podcast.title;
|
|
221
|
-
},
|
|
222
|
-
organisationId() {
|
|
223
|
-
return state.generalParameters.organisationId;
|
|
224
|
-
},
|
|
225
|
-
authenticated():boolean {
|
|
226
|
-
return state.generalParameters.authenticated;
|
|
227
|
-
},
|
|
228
|
-
editRight() {
|
|
229
|
-
if (
|
|
230
|
-
(this.authenticated &&
|
|
231
|
-
this.organisationId === this.podcast.organisation.id) ||
|
|
232
|
-
state.generalParameters.isAdmin
|
|
233
|
-
)
|
|
234
|
-
return true;
|
|
235
|
-
return false;
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
duration():string {
|
|
239
|
-
if (this.podcast.duration <= 1) return '';
|
|
240
|
-
|
|
241
|
-
if (this.podcast.duration > 600000) {
|
|
242
|
-
return humanizeDuration(this.podcast.duration, {
|
|
243
|
-
language: 'shortFr',
|
|
244
|
-
largest: 1,
|
|
245
|
-
round: true,
|
|
246
|
-
languages: {
|
|
247
|
-
shortFr: {
|
|
248
|
-
y: () => 'années',
|
|
249
|
-
mo: () => 'mois',
|
|
250
|
-
w: () => 'semaines',
|
|
251
|
-
d: () => 'jours',
|
|
252
|
-
h: () => 'h',
|
|
253
|
-
m: () => 'min',
|
|
254
|
-
s: () => 'sec',
|
|
255
|
-
ms: () => 'ms',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
return humanizeDuration(this.podcast.duration, {
|
|
261
|
-
language: 'shortFr',
|
|
262
|
-
largest: 2,
|
|
263
|
-
round: true,
|
|
264
|
-
languages: {
|
|
265
|
-
shortFr: {
|
|
266
|
-
m: () => 'min',
|
|
267
|
-
s: () => 'sec',
|
|
268
|
-
ms: () => 'ms',
|
|
269
|
-
},
|
|
270
|
-
},
|
|
271
|
-
});
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
methods: {
|
|
275
|
-
showDescription() {
|
|
276
|
-
this.arrowDirection = 'down';
|
|
277
|
-
this.hover = true;
|
|
278
|
-
},
|
|
279
|
-
hideDescription() {
|
|
280
|
-
this.arrowDirection = 'up';
|
|
281
|
-
this.hover = false;
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
});
|
|
285
|
-
</script>
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-contents podcast-item-info">
|
|
3
|
+
<div class="d-flex justify-content-between flex-wrap text-secondary mb-3">
|
|
4
|
+
<div class="me-3 small-text">
|
|
5
|
+
{{ date }}
|
|
6
|
+
</div>
|
|
7
|
+
<div
|
|
8
|
+
v-if="0 !== durationString.length"
|
|
9
|
+
class="small-text"
|
|
10
|
+
>
|
|
11
|
+
{{ durationString }}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<AnimatorsItem
|
|
15
|
+
v-if="animators && 0!==animators.length"
|
|
16
|
+
:animator="animators[0]"
|
|
17
|
+
/>
|
|
18
|
+
<router-link
|
|
19
|
+
:to="{
|
|
20
|
+
name: 'podcast',
|
|
21
|
+
params: { podcastId: podcastId },
|
|
22
|
+
query: { productor: filterOrga },
|
|
23
|
+
}"
|
|
24
|
+
class="text-dark d-flex flex-column flex-grow-1"
|
|
25
|
+
>
|
|
26
|
+
<div class="title-podcast-item">
|
|
27
|
+
{{ title }}
|
|
28
|
+
</div>
|
|
29
|
+
</router-link>
|
|
30
|
+
<PodcastPlayBar
|
|
31
|
+
:podcast-id="podcastId"
|
|
32
|
+
:duration="duration"
|
|
33
|
+
class="mx-2"
|
|
34
|
+
/>
|
|
35
|
+
<div class="d-flex justify-content-between">
|
|
36
|
+
<div class="useless-div-for-podcastmaker" />
|
|
37
|
+
<router-link
|
|
38
|
+
v-if="!isPodcastmaker"
|
|
39
|
+
:to="{
|
|
40
|
+
name: 'productor',
|
|
41
|
+
params: { productorId: podcastOrganisationId },
|
|
42
|
+
query: { productor: filterOrga },
|
|
43
|
+
}"
|
|
44
|
+
class="text-dark producer-podcast-item"
|
|
45
|
+
>
|
|
46
|
+
<div>{{ '© ' + podcastOrganisationName }}</div>
|
|
47
|
+
</router-link>
|
|
48
|
+
<span
|
|
49
|
+
v-if="editRight && podcastOrder && podcastOrder > 1"
|
|
50
|
+
class="saooti-pin text-danger pe-2"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script lang="ts">
|
|
57
|
+
import AnimatorsItem from './AnimatorsItem.vue';
|
|
58
|
+
import { state } from '../../../store/paramStore';
|
|
59
|
+
import { orgaComputed } from '../../mixins/orgaComputed';
|
|
60
|
+
import moment from 'moment';
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
import humanizeDuration from 'humanize-duration';
|
|
63
|
+
import PodcastPlayBar from './PodcastPlayBar.vue';
|
|
64
|
+
import { defineComponent } from 'vue'
|
|
65
|
+
import { Participant } from '@/store/class/general/participant';
|
|
66
|
+
export default defineComponent({
|
|
67
|
+
name: 'PodcastItemInfo',
|
|
68
|
+
|
|
69
|
+
components: {
|
|
70
|
+
AnimatorsItem,
|
|
71
|
+
PodcastPlayBar
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
mixins:[orgaComputed],
|
|
75
|
+
|
|
76
|
+
props: {
|
|
77
|
+
podcastId: { default: undefined, type: Number},
|
|
78
|
+
title: { default: "", type: String},
|
|
79
|
+
pubDate: { default: "", type: String},
|
|
80
|
+
podcastOrganisationId: { default: "", type: String},
|
|
81
|
+
podcastOrganisationName: { default: "", type: String},
|
|
82
|
+
podcastOrder: { default: undefined, type: Number},
|
|
83
|
+
duration: { default: 0, type: Number},
|
|
84
|
+
animators: { default: undefined, type: Object as ()=> Array<Participant>},
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
computed: {
|
|
88
|
+
isPodcastmaker(): boolean {
|
|
89
|
+
return (state.generalParameters.podcastmaker as boolean);
|
|
90
|
+
},
|
|
91
|
+
date(): string {
|
|
92
|
+
return moment(this.pubDate).format('D MMMM YYYY, HH[h]mm');
|
|
93
|
+
},
|
|
94
|
+
editRight(): boolean {
|
|
95
|
+
return (true===this.authenticated && this.myOrganisationId === this.podcastOrganisationId) ||
|
|
96
|
+
true===state.generalParameters.isAdmin
|
|
97
|
+
},
|
|
98
|
+
durationString(): string {
|
|
99
|
+
if (this.duration <= 1) return '';
|
|
100
|
+
if (this.duration > 600000) {
|
|
101
|
+
return humanizeDuration(this.duration, {
|
|
102
|
+
language: 'short',
|
|
103
|
+
largest: 1,
|
|
104
|
+
round: true,
|
|
105
|
+
languages: {
|
|
106
|
+
short: {
|
|
107
|
+
y: () => 'years',
|
|
108
|
+
mo: () => 'months',
|
|
109
|
+
w: () => 'weeks',
|
|
110
|
+
d: () => 'days',
|
|
111
|
+
h: () => 'h',
|
|
112
|
+
m: () => 'min',
|
|
113
|
+
s: () => 'sec',
|
|
114
|
+
ms: () => 'ms',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return humanizeDuration(this.duration, {
|
|
120
|
+
language: 'short',
|
|
121
|
+
largest: 2,
|
|
122
|
+
round: true,
|
|
123
|
+
languages: {
|
|
124
|
+
short: {
|
|
125
|
+
m: () => 'min',
|
|
126
|
+
s: () => 'sec',
|
|
127
|
+
ms: () => 'ms',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
})
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<style lang="scss">
|
|
137
|
+
.octopus-app{
|
|
138
|
+
.podcast-item-info {
|
|
139
|
+
.text-secondary {
|
|
140
|
+
margin: 0.5rem !important;
|
|
141
|
+
}
|
|
142
|
+
.saooti-pin {
|
|
143
|
+
font-size: 22px;
|
|
144
|
+
}
|
|
145
|
+
.title-podcast-item {
|
|
146
|
+
font-weight: 700;
|
|
147
|
+
margin: 0.25rem 0.5rem 0.5rem;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
display: -webkit-box;
|
|
150
|
+
flex-grow: 1;
|
|
151
|
+
font-size: 0.7rem;
|
|
152
|
+
-webkit-line-clamp: 3;
|
|
153
|
+
-webkit-box-orient: vertical;
|
|
154
|
+
min-height: 3rem;
|
|
155
|
+
line-height: 1rem;
|
|
156
|
+
word-break: break-word;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.producer-podcast-item {
|
|
160
|
+
margin: 0.2rem 0.5rem 0.5rem;
|
|
161
|
+
font-size: 0.55rem;
|
|
162
|
+
color: #666;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
</style>
|