@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
|
@@ -1,314 +1,220 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column mt-3">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
</div>
|
|
10
|
-
<transition-group
|
|
11
|
-
tag="div"
|
|
12
|
-
name="comment-list"
|
|
13
|
-
class="d-flex flex-column my-transition-list-comments"
|
|
14
|
-
v-show="loaded"
|
|
3
|
+
<ClassicLoading
|
|
4
|
+
:loading-text="loading?$t('Loading content ...'):undefined"
|
|
5
|
+
:error-text="error?$t(`Comments loading error`):undefined"
|
|
6
|
+
/>
|
|
7
|
+
<div
|
|
8
|
+
v-show="!loading"
|
|
15
9
|
>
|
|
16
10
|
<CommentItem
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
|
|
11
|
+
v-for="(c, indexCom) in comments"
|
|
12
|
+
:ref="'comItem' + c.comId"
|
|
13
|
+
:key="c.comId"
|
|
14
|
+
v-model:comment="comments[indexCom]"
|
|
15
|
+
:is-flat="isFlat"
|
|
20
16
|
:podcast="podcast"
|
|
21
|
-
:
|
|
17
|
+
:fetch-conference="fetchConference"
|
|
22
18
|
:organisation="organisation"
|
|
23
|
-
v-for="(c, index) in comments"
|
|
24
|
-
:key="c.comId"
|
|
25
19
|
@deleteComment="deleteComment(c)"
|
|
26
20
|
@updateComment="updateComment"
|
|
27
21
|
/>
|
|
28
|
-
</
|
|
22
|
+
</div>
|
|
29
23
|
<button
|
|
24
|
+
v-show="!allFetched && (!loading || 0!==first)"
|
|
30
25
|
class="btn btn-primary mt-2"
|
|
31
26
|
:class="comId ? 'align-self-start' : 'align-self-center'"
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
:aria-label="$t('See more comments')"
|
|
27
|
+
:disabled="loading"
|
|
28
|
+
:title="$t('See more comments')"
|
|
29
|
+
@click="fetchContent(false)"
|
|
36
30
|
>
|
|
37
31
|
{{ $t('See more comments') }}
|
|
38
32
|
</button>
|
|
39
33
|
</div>
|
|
40
34
|
</template>
|
|
41
35
|
|
|
42
|
-
<style lang="scss">
|
|
43
|
-
@import '../../../sass/_variables.scss';
|
|
44
|
-
.my-transition-list-comments {
|
|
45
|
-
.comment-list-enter-active,
|
|
46
|
-
.comment-list-leave-active {
|
|
47
|
-
transition: 1200ms cubic-bezier(0.59, 0.12, 0.34, 0.95);
|
|
48
|
-
transition-property: opacity, transform;
|
|
49
|
-
background-color: $primaryColorReallyTransparent;
|
|
50
|
-
width: 100%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.comment-list-enter {
|
|
54
|
-
opacity: 0;
|
|
55
|
-
transform: translateX(50px) scaleY(0.5);
|
|
56
|
-
background-color: $primaryColorReallyTransparent;
|
|
57
|
-
width: 100%;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.comment-list-enter-to {
|
|
61
|
-
opacity: 1;
|
|
62
|
-
transform: translateX(0) scaleY(1);
|
|
63
|
-
background-color: $primaryColorReallyTransparent;
|
|
64
|
-
width: 100%;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.comment-list-leave-active {
|
|
68
|
-
position: absolute;
|
|
69
|
-
background-color: $primaryColorReallyTransparent;
|
|
70
|
-
width: 100%;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.comment-list-leave-to {
|
|
74
|
-
opacity: 0;
|
|
75
|
-
transform: scaleY(0);
|
|
76
|
-
transform-origin: center top;
|
|
77
|
-
background-color: $primaryColorReallyTransparent;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
</style>
|
|
81
|
-
|
|
82
36
|
<script lang="ts">
|
|
37
|
+
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
83
38
|
import { state } from '../../../store/paramStore';
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
import {
|
|
39
|
+
import octopusApi from '@saooti/octopus-api';
|
|
40
|
+
import moment from 'moment';
|
|
41
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
42
|
+
import { Conference } from '@/store/class/conference/conference';
|
|
43
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
44
|
+
import { InterfacePageable } from '@/store/class/general/interfacePageable';
|
|
45
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
46
|
+
/* eslint-disable */
|
|
47
|
+
const CommentItem: any = defineAsyncComponent(() => import('./CommentItem.vue'));
|
|
48
|
+
/* eslint-enable */
|
|
87
49
|
export default defineComponent({
|
|
88
50
|
name: 'CommentList',
|
|
89
51
|
|
|
90
|
-
props: {
|
|
91
|
-
first: { default: 0 },
|
|
92
|
-
size: { default: 50 },
|
|
93
|
-
podcast: { default: undefined as any },
|
|
94
|
-
comId: { default: undefined as any },
|
|
95
|
-
reload: { default: false },
|
|
96
|
-
fetchConference: { default: undefined as any },
|
|
97
|
-
organisation: { default: undefined as any },
|
|
98
|
-
status: { default: undefined as any },
|
|
99
|
-
isFlat: { default: false },
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
emits: ['updateStatus', 'fetch'],
|
|
103
|
-
|
|
104
52
|
components: {
|
|
105
|
-
CommentItem
|
|
53
|
+
CommentItem,
|
|
54
|
+
ClassicLoading
|
|
106
55
|
},
|
|
107
56
|
|
|
108
|
-
|
|
109
|
-
|
|
57
|
+
props: {
|
|
58
|
+
podcast: { default: undefined, type: Object as ()=>Podcast},
|
|
59
|
+
comId: { default: undefined, type: Number },
|
|
60
|
+
reload: { default: false, type: Boolean},
|
|
61
|
+
fetchConference: { default: undefined, type: Object as ()=>Conference},
|
|
62
|
+
organisation: { default: undefined, type: String},
|
|
63
|
+
status: { default: undefined, type: String},
|
|
64
|
+
isFlat: { default: false, type: Boolean},
|
|
110
65
|
},
|
|
66
|
+
emits: ['updateStatus', 'fetch'],
|
|
111
67
|
|
|
112
68
|
data() {
|
|
113
69
|
return {
|
|
114
|
-
loading: true,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
comments: [] as any,
|
|
121
|
-
inFetching: false,
|
|
70
|
+
loading: true as boolean,
|
|
71
|
+
error: false as boolean,
|
|
72
|
+
first:0 as number,
|
|
73
|
+
size: 20 as number,
|
|
74
|
+
totalCount: 0 as number,
|
|
75
|
+
comments: [] as Array<CommentPodcast>,
|
|
122
76
|
};
|
|
123
77
|
},
|
|
124
78
|
|
|
125
79
|
computed: {
|
|
126
|
-
allFetched():boolean {
|
|
127
|
-
return this.
|
|
80
|
+
allFetched(): boolean {
|
|
81
|
+
return this.first >= this.totalCount;
|
|
128
82
|
},
|
|
129
|
-
|
|
83
|
+
myOrganisationId(): string|undefined {
|
|
130
84
|
return state.generalParameters.organisationId;
|
|
131
85
|
},
|
|
132
|
-
podcastId():
|
|
133
|
-
|
|
134
|
-
return undefined;
|
|
86
|
+
podcastId(): number|undefined {
|
|
87
|
+
return this.podcast?.podcastId;
|
|
135
88
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
89
|
+
editRight(): boolean {
|
|
90
|
+
return (true === state.generalParameters.isCommments &&
|
|
91
|
+
((this.myOrganisationId === this.podcast?.organisation.id) ||
|
|
92
|
+
this.myOrganisationId === this.organisation)) ||
|
|
93
|
+
true === state.generalParameters.isAdmin;
|
|
94
|
+
},
|
|
95
|
+
watchVariable():string{
|
|
96
|
+
return `${this.reload}|${this.status}`;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
watch: {
|
|
100
|
+
watchVariable: {
|
|
101
|
+
immediate:true,
|
|
102
|
+
handler(){
|
|
103
|
+
this.fetchContent();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
comments: {
|
|
107
|
+
deep: true,
|
|
108
|
+
handler(){
|
|
109
|
+
this.$emit('fetch', { count: this.totalCount, comments: this.comments });
|
|
110
|
+
}
|
|
147
111
|
},
|
|
148
112
|
},
|
|
149
|
-
|
|
150
113
|
methods: {
|
|
151
|
-
async fetchContent(reset:
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
114
|
+
async fetchContent(reset=true): Promise<void> {
|
|
115
|
+
this.loading = true;
|
|
116
|
+
this.error = false;
|
|
117
|
+
if(reset){
|
|
118
|
+
this.first = 0;
|
|
119
|
+
}
|
|
154
120
|
let data;
|
|
155
121
|
try {
|
|
156
122
|
if (this.comId) {
|
|
157
|
-
data = await octopusApi.
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
first: this.
|
|
161
|
-
size: this.
|
|
123
|
+
data = await octopusApi.postDataPublic<InterfacePageable<CommentPodcast>>(2, this.comId.toString(), {first: this.first,size: this.size});
|
|
124
|
+
}else{
|
|
125
|
+
data = await octopusApi.postDataPublic<InterfacePageable<CommentPodcast>>(2, this.isFlat ?'':'getRootCom',{
|
|
126
|
+
first: this.first,
|
|
127
|
+
size: this.size,
|
|
162
128
|
podcastId: this.podcastId,
|
|
163
|
-
status: this.status,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
param.organisationId = this.organisation;
|
|
170
|
-
}
|
|
171
|
-
if (!this.isFlat) {
|
|
172
|
-
data = await octopusApi.fetchRootComments(param);
|
|
173
|
-
} else {
|
|
174
|
-
data = await octopusApi.fetchComments(param);
|
|
175
|
-
}
|
|
129
|
+
status:this.editRight && this.status?[this.status]: this.editRight? ['Valid','Pending', 'Invalid']:['Valid'],
|
|
130
|
+
organisationId: undefined === this.podcastId? this.organisation: undefined,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if(reset){
|
|
134
|
+
this.comments.length = 0;
|
|
176
135
|
}
|
|
177
|
-
|
|
178
|
-
this.resetData(reset);
|
|
179
|
-
this.loading = false;
|
|
180
|
-
this.loaded = true;
|
|
181
136
|
this.totalCount = data.totalElements;
|
|
182
|
-
this.comments = this.comments.concat(data.content).filter((c:
|
|
137
|
+
this.comments = this.comments.concat(data.content).filter((c: CommentPodcast) => {
|
|
183
138
|
return null !== c;
|
|
184
139
|
});
|
|
185
|
-
this.
|
|
186
|
-
} catch
|
|
187
|
-
this.loading = false;
|
|
140
|
+
this.first += this.size;
|
|
141
|
+
} catch {
|
|
188
142
|
this.error = true;
|
|
189
143
|
}
|
|
190
|
-
this.
|
|
144
|
+
this.loading = false;
|
|
191
145
|
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
this.dfirst = 0;
|
|
197
|
-
this.loading = true;
|
|
198
|
-
this.loaded = false;
|
|
146
|
+
findCommentIndex(comId: number|undefined): number{
|
|
147
|
+
return this.comments.findIndex(
|
|
148
|
+
(element: CommentPodcast) => element.comId === comId
|
|
149
|
+
);
|
|
199
150
|
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this.fetchContent(false);
|
|
151
|
+
commentIsNotInList(commentIdReferer:undefined|number):boolean{
|
|
152
|
+
return !this.isFlat && undefined!==commentIdReferer && null!==commentIdReferer && this.comId !==commentIdReferer;
|
|
203
153
|
},
|
|
204
|
-
deleteComment(comment:
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.comId !== comment.commentIdReferer
|
|
209
|
-
) {
|
|
210
|
-
let comItem :any = document.getElementsByClassName('comItem' + comment.commentIdReferer);
|
|
211
|
-
comItem[0].receiveCommentEvent({ type: 'Delete', comment: comment });
|
|
154
|
+
deleteComment(comment: CommentPodcast): void {
|
|
155
|
+
if (this.commentIsNotInList(comment.commentIdReferer)){
|
|
156
|
+
const comItem = (this.$refs['comItem' + comment.commentIdReferer] as Array<InstanceType<typeof CommentItem>>)[0];
|
|
157
|
+
comItem.receiveCommentEvent({ type: 'Delete', comment: comment });
|
|
212
158
|
return;
|
|
213
159
|
}
|
|
214
|
-
|
|
215
|
-
(element:any) => element.comId === comment.comId
|
|
216
|
-
);
|
|
160
|
+
const index = this.findCommentIndex(comment.comId);
|
|
217
161
|
if (-1 === index) return;
|
|
218
162
|
this.totalCount -= 1;
|
|
219
|
-
if (0 !== this.
|
|
220
|
-
this.
|
|
163
|
+
if (0 !== this.first) {
|
|
164
|
+
this.first -= 1;
|
|
221
165
|
}
|
|
222
166
|
this.comments.splice(index, 1);
|
|
223
167
|
},
|
|
224
|
-
updateComment(data:
|
|
225
|
-
if (
|
|
226
|
-
|
|
227
|
-
data
|
|
228
|
-
this.comId !== data.comment.commentIdReferer
|
|
229
|
-
) {
|
|
230
|
-
let comItem :any = document.getElementsByClassName('comItem' + data.comment.commentIdReferer);
|
|
231
|
-
comItem[0].receiveCommentEvent({ ...data, type: 'Update' });
|
|
168
|
+
updateComment(data: {type: string; comment: CommentPodcast; oldStatus?:string }): void {
|
|
169
|
+
if (this.commentIsNotInList(data.comment.commentIdReferer)){
|
|
170
|
+
const comItem = (this.$refs['comItem' + data.comment.commentIdReferer] as Array<InstanceType<typeof CommentItem>>)[0];
|
|
171
|
+
comItem.receiveCommentEvent(data);
|
|
232
172
|
return;
|
|
233
173
|
}
|
|
234
|
-
|
|
235
|
-
(element:any) => element.comId === data.comment.comId
|
|
236
|
-
);
|
|
174
|
+
const index = this.findCommentIndex(data.comment.comId);
|
|
237
175
|
if (-1 !== index) {
|
|
238
|
-
if (
|
|
239
|
-
|
|
240
|
-
(!this.editRight || (this.status && this.status !== data.status))
|
|
241
|
-
) {
|
|
176
|
+
if ((!this.editRight && 'Valid' !== data.comment.status) ||
|
|
177
|
+
(this.editRight && this.status && this.status !== data.comment.status)) {
|
|
242
178
|
this.comments.splice(index, 1);
|
|
243
179
|
} else {
|
|
244
180
|
this.comments.splice(index, 1, data.comment);
|
|
245
181
|
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
182
|
+
}else if((!this.editRight && 'Valid' === data.comment.status) ||
|
|
183
|
+
(this.editRight && !this.status) ||
|
|
184
|
+
(this.editRight && this.status && this.status === data.comment.status)){
|
|
185
|
+
let indexNewComment = 0;
|
|
186
|
+
for (let i = 0, len = this.comments.length; i < len; i++) {
|
|
187
|
+
if (
|
|
188
|
+
moment(this.comments[i].date).isBefore(moment(data.comment.date))
|
|
189
|
+
) {
|
|
190
|
+
indexNewComment = i;
|
|
191
|
+
break;
|
|
258
192
|
}
|
|
259
|
-
if (-1 !== indexNewComment) {
|
|
260
|
-
if (!this.status || this.status === data.status) {
|
|
261
|
-
this.comments.splice(indexNewComment, 0, data.comment);
|
|
262
|
-
} else {
|
|
263
|
-
this.comments.splice(indexNewComment, 1);
|
|
264
|
-
}
|
|
265
|
-
} else if (!this.status || this.status === data.status) {
|
|
266
|
-
this.comments.push(data.comment);
|
|
267
|
-
}
|
|
268
|
-
} else if (!this.status || this.status === data.status) {
|
|
269
|
-
this.comments.unshift(data.comment);
|
|
270
193
|
}
|
|
194
|
+
this.comments.splice(indexNewComment, 0, data.comment);
|
|
271
195
|
}
|
|
272
|
-
if (this.comId && data.status) {
|
|
273
|
-
this.$emit('updateStatus', data.status);
|
|
196
|
+
if (this.comId && data.oldStatus!==data.comment.status) {
|
|
197
|
+
this.$emit('updateStatus', data.comment.status);
|
|
274
198
|
}
|
|
275
199
|
},
|
|
276
|
-
addNewComment(comment:
|
|
200
|
+
addNewComment(comment: CommentPodcast, myself = false): void {
|
|
277
201
|
if (!myself && !this.editRight && 'Valid' !== comment.status) {
|
|
278
202
|
return;
|
|
279
203
|
}
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
this.comId !== comment.commentIdReferer
|
|
284
|
-
) {
|
|
285
|
-
let comItem :any = document.getElementsByClassName('comItem' + comment.commentIdReferer);
|
|
286
|
-
comItem[0].receiveCommentEvent({ type: 'Create', comment: comment });
|
|
204
|
+
if (this.commentIsNotInList(comment.commentIdReferer)){
|
|
205
|
+
const comItem = (this.$refs['comItem' + comment.commentIdReferer] as Array<InstanceType<typeof CommentItem>>)[0];
|
|
206
|
+
comItem.receiveCommentEvent({ type: 'Create', comment: comment });
|
|
287
207
|
return;
|
|
288
208
|
}
|
|
289
|
-
|
|
290
|
-
(element:any) => element.comId === comment.comId
|
|
291
|
-
);
|
|
209
|
+
const index = this.findCommentIndex(comment.comId);
|
|
292
210
|
if (-1 === index) {
|
|
293
211
|
this.totalCount += 1;
|
|
294
|
-
this.
|
|
212
|
+
this.first += 1;
|
|
295
213
|
if (!this.status || this.status === comment.status) {
|
|
296
214
|
this.comments.unshift(comment);
|
|
297
215
|
}
|
|
298
216
|
}
|
|
299
217
|
},
|
|
300
218
|
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
reload() {
|
|
304
|
-
this.fetchContent(true);
|
|
305
|
-
},
|
|
306
|
-
status() {
|
|
307
|
-
this.fetchContent(true);
|
|
308
|
-
},
|
|
309
|
-
comments() {
|
|
310
|
-
this.$emit('fetch', { count: this.totalCount, comments: this.comments });
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
});
|
|
314
|
-
</script>
|
|
219
|
+
})
|
|
220
|
+
</script>
|
|
@@ -1,80 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mt-2">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class="icon-certified"
|
|
12
|
-
src="/img/certified.png"
|
|
13
|
-
v-if="comment.certified"
|
|
14
|
-
:title="$t('Certified account')"
|
|
15
|
-
/>
|
|
16
|
-
<div class="mr-2">{{ date }}</div>
|
|
17
|
-
</div>
|
|
18
|
-
<div>{{ contentDisplay }}</div>
|
|
19
|
-
<a
|
|
20
|
-
class="c-hand font-italic"
|
|
21
|
-
v-if="comment.content.length > 300"
|
|
22
|
-
@click="summary = !summary"
|
|
23
|
-
>{{ readMore }}</a
|
|
24
|
-
>
|
|
25
|
-
</div>
|
|
3
|
+
<ClassicLoading
|
|
4
|
+
:loading-text="loading?$t('Loading content ...'):undefined"
|
|
5
|
+
/>
|
|
6
|
+
<CommentBasicView
|
|
7
|
+
v-if="!loading"
|
|
8
|
+
:comment="comment"
|
|
9
|
+
:edit-right="editRight"
|
|
10
|
+
/>
|
|
26
11
|
</div>
|
|
27
12
|
</template>
|
|
28
13
|
|
|
29
|
-
<style lang="scss"></style>
|
|
30
|
-
|
|
31
14
|
<script lang="ts">
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
import octopusApi from '@saooti/octopus-api';
|
|
16
|
+
import CommentBasicView from './CommentBasicView.vue';
|
|
17
|
+
import ClassicLoading from '../../form/ClassicLoading.vue';
|
|
18
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
34
19
|
import { defineComponent } from 'vue'
|
|
35
20
|
export default defineComponent({
|
|
36
21
|
name: 'CommentParentInfo',
|
|
37
22
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
components:{
|
|
24
|
+
CommentBasicView,
|
|
25
|
+
ClassicLoading
|
|
26
|
+
},
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
props: {
|
|
29
|
+
comId: { default: undefined, type: Number },
|
|
30
|
+
editRight: { default: false, type: Boolean},
|
|
45
31
|
},
|
|
46
32
|
|
|
47
33
|
data() {
|
|
48
34
|
return {
|
|
49
|
-
loading: true,
|
|
50
|
-
|
|
51
|
-
comment: undefined as any,
|
|
35
|
+
loading: true as boolean,
|
|
36
|
+
comment: undefined as CommentPodcast|undefined,
|
|
52
37
|
};
|
|
53
38
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return '';
|
|
60
|
-
},
|
|
61
|
-
limitContent():string {
|
|
62
|
-
if (!this.comment.content) return '';
|
|
63
|
-
if (this.comment.content.length <= 300) return this.comment.content;
|
|
64
|
-
return this.comment.content.substring(0, 300) + '...';
|
|
65
|
-
},
|
|
66
|
-
readMore():string {
|
|
67
|
-
if (this.summary) return this.$t('Read more');
|
|
68
|
-
return this.$t('Read less');
|
|
69
|
-
},
|
|
70
|
-
contentDisplay():string {
|
|
71
|
-
if (this.summary) return this.limitContent;
|
|
72
|
-
return this.comment.content;
|
|
73
|
-
},
|
|
39
|
+
async created() {
|
|
40
|
+
if(this.comId){
|
|
41
|
+
this.comment = await octopusApi.fetchData<CommentPodcast>(2, `comment/${this.comId}`);
|
|
42
|
+
}
|
|
43
|
+
this.loading = false;
|
|
74
44
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
watch: {},
|
|
79
|
-
});
|
|
80
|
-
</script>
|
|
45
|
+
})
|
|
46
|
+
</script>
|