@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,140 +1,107 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column mt-3">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="loading"
|
|
5
|
+
class="d-flex justify-content-center"
|
|
6
|
+
>
|
|
7
|
+
<div class="spinner-border me-3" />
|
|
8
|
+
<h3 class="mt-2">
|
|
9
|
+
{{ $t('Loading content ...') }}
|
|
10
|
+
</h3>
|
|
6
11
|
</div>
|
|
7
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
v-if="error"
|
|
14
|
+
class="text-danger align-self-center"
|
|
15
|
+
>
|
|
8
16
|
{{ $t('Comments loading error') }}
|
|
9
17
|
</div>
|
|
10
18
|
<transition-group
|
|
19
|
+
v-show="loaded"
|
|
11
20
|
tag="div"
|
|
12
21
|
name="comment-list"
|
|
13
22
|
class="d-flex flex-column my-transition-list-comments"
|
|
14
|
-
v-show="loaded"
|
|
15
23
|
>
|
|
16
24
|
<CommentItem
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
|
|
25
|
+
v-for="(c, indexCom) in comments"
|
|
26
|
+
:ref="'comItem' + c.comId"
|
|
27
|
+
:key="c.comId"
|
|
28
|
+
v-model:comment="comments[indexCom]"
|
|
29
|
+
:is-flat="isFlat"
|
|
20
30
|
:podcast="podcast"
|
|
21
|
-
:
|
|
31
|
+
:fetch-conference="fetchConference"
|
|
22
32
|
:organisation="organisation"
|
|
23
|
-
v-for="(c, index) in comments"
|
|
24
|
-
:key="c.comId"
|
|
25
33
|
@deleteComment="deleteComment(c)"
|
|
26
34
|
@updateComment="updateComment"
|
|
27
35
|
/>
|
|
28
36
|
</transition-group>
|
|
29
37
|
<button
|
|
38
|
+
v-show="!allFetched && loaded"
|
|
30
39
|
class="btn btn-primary mt-2"
|
|
31
40
|
:class="comId ? 'align-self-start' : 'align-self-center'"
|
|
32
|
-
@click="displayMore"
|
|
33
41
|
:disabled="inFetching"
|
|
34
|
-
v-show="!allFetched && loaded"
|
|
35
42
|
:aria-label="$t('See more comments')"
|
|
43
|
+
@click="displayMore"
|
|
36
44
|
>
|
|
37
45
|
{{ $t('See more comments') }}
|
|
38
46
|
</button>
|
|
39
47
|
</div>
|
|
40
48
|
</template>
|
|
41
49
|
|
|
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
50
|
<script lang="ts">
|
|
83
51
|
import { state } from '../../../store/paramStore';
|
|
84
52
|
const octopusApi = require('@saooti/octopus-api');
|
|
85
53
|
const moment = require('moment');
|
|
86
|
-
|
|
54
|
+
|
|
55
|
+
import { Podcast } from '@/store/class/podcast';
|
|
56
|
+
import { Conference } from '@/store/class/conference';
|
|
57
|
+
import { CommentPodcast } from '@/store/class/comment';
|
|
58
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
59
|
+
const CommentItem: any = defineAsyncComponent(() => import('./CommentItem.vue'));
|
|
87
60
|
export default defineComponent({
|
|
88
61
|
name: 'CommentList',
|
|
89
62
|
|
|
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
63
|
components: {
|
|
105
|
-
CommentItem
|
|
64
|
+
CommentItem,
|
|
106
65
|
},
|
|
107
66
|
|
|
108
|
-
|
|
109
|
-
|
|
67
|
+
props: {
|
|
68
|
+
first: { default: 0, type: Number },
|
|
69
|
+
size: { default: 50, type: Number },
|
|
70
|
+
podcast: { default: undefined, type: Object as ()=>Podcast},
|
|
71
|
+
comId: { default: undefined, type: Number },
|
|
72
|
+
reload: { default: false, type: Boolean},
|
|
73
|
+
fetchConference: { default: undefined, type: Object as ()=>Conference},
|
|
74
|
+
organisation: { default: undefined, type: String},
|
|
75
|
+
status: { default: undefined, type: String},
|
|
76
|
+
isFlat: { default: false, type: Boolean},
|
|
110
77
|
},
|
|
78
|
+
emits: ['updateStatus', 'fetch'],
|
|
111
79
|
|
|
112
80
|
data() {
|
|
113
81
|
return {
|
|
114
|
-
loading: true,
|
|
115
|
-
loaded:
|
|
116
|
-
error: false,
|
|
117
|
-
dfirst: this
|
|
118
|
-
dsize: this
|
|
119
|
-
totalCount: 0,
|
|
120
|
-
comments: [] as
|
|
121
|
-
inFetching: false,
|
|
82
|
+
loading: true as boolean,
|
|
83
|
+
loaded: false as boolean,
|
|
84
|
+
error: false as boolean,
|
|
85
|
+
dfirst: this.first as number,
|
|
86
|
+
dsize: this.size as number,
|
|
87
|
+
totalCount: 0 as number,
|
|
88
|
+
comments: [] as Array<CommentPodcast>,
|
|
89
|
+
inFetching: false as boolean,
|
|
122
90
|
};
|
|
123
91
|
},
|
|
124
92
|
|
|
125
93
|
computed: {
|
|
126
|
-
allFetched():boolean {
|
|
94
|
+
allFetched(): boolean {
|
|
127
95
|
return this.dfirst >= this.totalCount;
|
|
128
96
|
},
|
|
129
|
-
organisationId() {
|
|
97
|
+
organisationId(): string {
|
|
130
98
|
return state.generalParameters.organisationId;
|
|
131
99
|
},
|
|
132
|
-
podcastId():
|
|
100
|
+
podcastId(): number|undefined {
|
|
133
101
|
if (this.podcast) return this.podcast.podcastId;
|
|
134
102
|
return undefined;
|
|
135
103
|
},
|
|
136
|
-
|
|
137
|
-
editRight() {
|
|
104
|
+
editRight(): boolean {
|
|
138
105
|
if (
|
|
139
106
|
(state.generalParameters.isCommments &&
|
|
140
107
|
((this.podcast &&
|
|
@@ -146,24 +113,53 @@ export default defineComponent({
|
|
|
146
113
|
return false;
|
|
147
114
|
},
|
|
148
115
|
},
|
|
149
|
-
|
|
116
|
+
watch: {
|
|
117
|
+
reload(): void {
|
|
118
|
+
this.fetchContent(true);
|
|
119
|
+
},
|
|
120
|
+
status(): void {
|
|
121
|
+
this.fetchContent(true);
|
|
122
|
+
},
|
|
123
|
+
comments(): void {
|
|
124
|
+
this.$emit('fetch', { count: this.totalCount, comments: this.comments });
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
created() {
|
|
128
|
+
this.fetchContent(true);
|
|
129
|
+
},
|
|
150
130
|
methods: {
|
|
151
|
-
async fetchContent(reset: boolean) {
|
|
131
|
+
async fetchContent(reset: boolean): Promise<void> {
|
|
152
132
|
this.inFetching = true;
|
|
153
133
|
this.resetData(reset);
|
|
154
134
|
let data;
|
|
155
135
|
try {
|
|
136
|
+
const param: any = {
|
|
137
|
+
first: this.dfirst,
|
|
138
|
+
size: this.dsize,
|
|
139
|
+
podcastId: this.podcastId,
|
|
140
|
+
};
|
|
141
|
+
if (!this.editRight) {
|
|
142
|
+
param.status = ['Valid'];
|
|
143
|
+
}else if(this.status){
|
|
144
|
+
param.status = [this.status];
|
|
145
|
+
}
|
|
146
|
+
if (undefined === this.podcastId) {
|
|
147
|
+
param.organisationId = this.organisation;
|
|
148
|
+
}
|
|
156
149
|
if (this.comId) {
|
|
157
|
-
data = await octopusApi.fetchCommentAnswers(this.comId);
|
|
150
|
+
data = await octopusApi.fetchCommentAnswers(this.comId, {first: this.dfirst,size: this.dsize});
|
|
151
|
+
} else if (!this.isFlat) {
|
|
152
|
+
data = await octopusApi.fetchRootComments(param);
|
|
158
153
|
} else {
|
|
159
|
-
|
|
154
|
+
const param: any = {
|
|
160
155
|
first: this.dfirst,
|
|
161
156
|
size: this.dsize,
|
|
162
157
|
podcastId: this.podcastId,
|
|
163
|
-
status: this.status,
|
|
164
158
|
};
|
|
165
159
|
if (!this.editRight) {
|
|
166
|
-
param.status = 'Valid';
|
|
160
|
+
param.status = ['Valid'];
|
|
161
|
+
}else if(this.status){
|
|
162
|
+
param.status = [this.status];
|
|
167
163
|
}
|
|
168
164
|
if (undefined === this.podcastId) {
|
|
169
165
|
param.organisationId = this.organisation;
|
|
@@ -174,12 +170,11 @@ export default defineComponent({
|
|
|
174
170
|
data = await octopusApi.fetchComments(param);
|
|
175
171
|
}
|
|
176
172
|
}
|
|
177
|
-
|
|
178
173
|
this.resetData(reset);
|
|
179
174
|
this.loading = false;
|
|
180
175
|
this.loaded = true;
|
|
181
176
|
this.totalCount = data.totalElements;
|
|
182
|
-
this.comments = this.comments.concat(data.content).filter((c:
|
|
177
|
+
this.comments = this.comments.concat(data.content).filter((c: CommentPodcast) => {
|
|
183
178
|
return null !== c;
|
|
184
179
|
});
|
|
185
180
|
this.dfirst += this.dsize;
|
|
@@ -189,30 +184,29 @@ export default defineComponent({
|
|
|
189
184
|
}
|
|
190
185
|
this.inFetching = false;
|
|
191
186
|
},
|
|
192
|
-
|
|
193
|
-
resetData(reset: any) {
|
|
187
|
+
resetData(reset: boolean): void {
|
|
194
188
|
if (!reset) return;
|
|
195
189
|
this.comments.length = 0;
|
|
196
190
|
this.dfirst = 0;
|
|
197
191
|
this.loading = true;
|
|
198
192
|
this.loaded = false;
|
|
199
193
|
},
|
|
200
|
-
displayMore(event: { preventDefault: () => void
|
|
194
|
+
displayMore(event: { preventDefault: () => void }): void {
|
|
201
195
|
event.preventDefault();
|
|
202
196
|
this.fetchContent(false);
|
|
203
197
|
},
|
|
204
|
-
deleteComment(comment:
|
|
198
|
+
deleteComment(comment: CommentPodcast): void {
|
|
205
199
|
if (
|
|
206
200
|
!this.isFlat &&
|
|
207
201
|
comment.commentIdReferer &&
|
|
208
202
|
this.comId !== comment.commentIdReferer
|
|
209
203
|
) {
|
|
210
|
-
|
|
204
|
+
const comItem: any = document.getElementsByClassName('comItem' + comment.commentIdReferer);
|
|
211
205
|
comItem[0].receiveCommentEvent({ type: 'Delete', comment: comment });
|
|
212
206
|
return;
|
|
213
207
|
}
|
|
214
|
-
|
|
215
|
-
(element:
|
|
208
|
+
const index = this.comments.findIndex(
|
|
209
|
+
(element: CommentPodcast) => element.comId === comment.comId
|
|
216
210
|
);
|
|
217
211
|
if (-1 === index) return;
|
|
218
212
|
this.totalCount -= 1;
|
|
@@ -221,18 +215,18 @@ export default defineComponent({
|
|
|
221
215
|
}
|
|
222
216
|
this.comments.splice(index, 1);
|
|
223
217
|
},
|
|
224
|
-
updateComment(data: any) {
|
|
218
|
+
updateComment(data: any): void {
|
|
225
219
|
if (
|
|
226
220
|
!this.isFlat &&
|
|
227
221
|
data.comment.commentIdReferer &&
|
|
228
222
|
this.comId !== data.comment.commentIdReferer
|
|
229
223
|
) {
|
|
230
|
-
|
|
224
|
+
const comItem: any = document.getElementsByClassName('comItem' + data.comment.commentIdReferer);
|
|
231
225
|
comItem[0].receiveCommentEvent({ ...data, type: 'Update' });
|
|
232
226
|
return;
|
|
233
227
|
}
|
|
234
|
-
|
|
235
|
-
(element:
|
|
228
|
+
const index = this.comments.findIndex(
|
|
229
|
+
(element: CommentPodcast) => element.comId === data.comment.comId
|
|
236
230
|
);
|
|
237
231
|
if (-1 !== index) {
|
|
238
232
|
if (
|
|
@@ -273,7 +267,7 @@ export default defineComponent({
|
|
|
273
267
|
this.$emit('updateStatus', data.status);
|
|
274
268
|
}
|
|
275
269
|
},
|
|
276
|
-
addNewComment(comment:
|
|
270
|
+
addNewComment(comment: CommentPodcast, myself = false): void {
|
|
277
271
|
if (!myself && !this.editRight && 'Valid' !== comment.status) {
|
|
278
272
|
return;
|
|
279
273
|
}
|
|
@@ -282,12 +276,12 @@ export default defineComponent({
|
|
|
282
276
|
comment.commentIdReferer &&
|
|
283
277
|
this.comId !== comment.commentIdReferer
|
|
284
278
|
) {
|
|
285
|
-
|
|
279
|
+
const comItem: any = document.getElementsByClassName('comItem' + comment.commentIdReferer);
|
|
286
280
|
comItem[0].receiveCommentEvent({ type: 'Create', comment: comment });
|
|
287
281
|
return;
|
|
288
282
|
}
|
|
289
|
-
|
|
290
|
-
(element:
|
|
283
|
+
const index = this.comments.findIndex(
|
|
284
|
+
(element: CommentPodcast) => element.comId === comment.comId
|
|
291
285
|
);
|
|
292
286
|
if (-1 === index) {
|
|
293
287
|
this.totalCount += 1;
|
|
@@ -298,17 +292,45 @@ export default defineComponent({
|
|
|
298
292
|
}
|
|
299
293
|
},
|
|
300
294
|
},
|
|
301
|
-
|
|
302
|
-
watch: {
|
|
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
|
-
});
|
|
295
|
+
})
|
|
314
296
|
</script>
|
|
297
|
+
|
|
298
|
+
<style lang="scss">
|
|
299
|
+
@import '../../../sass/_variables.scss';
|
|
300
|
+
.my-transition-list-comments {
|
|
301
|
+
position: relative;
|
|
302
|
+
.comment-list-enter-active,
|
|
303
|
+
.comment-list-leave-active {
|
|
304
|
+
transition: 1200ms cubic-bezier(0.59, 0.12, 0.34, 0.95);
|
|
305
|
+
transition-property: opacity, transform;
|
|
306
|
+
background-color: $primaryColorReallyTransparent;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.comment-list-enter {
|
|
310
|
+
opacity: 0;
|
|
311
|
+
transform: translateX(50px) scaleY(0.5);
|
|
312
|
+
background-color: $primaryColorReallyTransparent;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.comment-list-enter-to {
|
|
316
|
+
opacity: 1;
|
|
317
|
+
transform: translateX(0) scaleY(1);
|
|
318
|
+
background-color: $primaryColorReallyTransparent;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.comment-list-leave-active {
|
|
322
|
+
position: absolute;
|
|
323
|
+
background-color: $primaryColorReallyTransparent;
|
|
324
|
+
top: 0;
|
|
325
|
+
left: 0;
|
|
326
|
+
right: 0;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.comment-list-leave-to {
|
|
330
|
+
opacity: 0;
|
|
331
|
+
transform: scaleY(0);
|
|
332
|
+
transform-origin: center top;
|
|
333
|
+
background-color: $primaryColorReallyTransparent;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
</style>
|
|
@@ -1,80 +1,84 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mt-2">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="loading"
|
|
5
|
+
class="d-flex"
|
|
6
|
+
>
|
|
7
|
+
<div class="spinner-border me-3" />
|
|
8
|
+
<div class="mt-2">
|
|
9
|
+
{{ $t('Loading content ...') }}
|
|
10
|
+
</div>
|
|
6
11
|
</div>
|
|
7
12
|
<div v-else>
|
|
8
13
|
<div class="d-flex small-Text">
|
|
9
|
-
<b class="
|
|
14
|
+
<b class="me-2">{{ comment.name }}</b>
|
|
10
15
|
<img
|
|
16
|
+
v-if="comment.certified"
|
|
11
17
|
class="icon-certified"
|
|
12
18
|
src="/img/certified.png"
|
|
13
|
-
v-if="comment.certified"
|
|
14
19
|
:title="$t('Certified account')"
|
|
15
|
-
|
|
16
|
-
<div class="
|
|
20
|
+
>
|
|
21
|
+
<div class="me-2">
|
|
22
|
+
{{ date }}
|
|
23
|
+
</div>
|
|
17
24
|
</div>
|
|
18
25
|
<div>{{ contentDisplay }}</div>
|
|
19
26
|
<a
|
|
20
|
-
class="c-hand font-italic"
|
|
21
27
|
v-if="comment.content.length > 300"
|
|
28
|
+
class="c-hand font-italic"
|
|
22
29
|
@click="summary = !summary"
|
|
23
|
-
|
|
24
|
-
>
|
|
30
|
+
>{{ readMore }}</a>
|
|
25
31
|
</div>
|
|
26
32
|
</div>
|
|
27
33
|
</template>
|
|
28
34
|
|
|
29
|
-
<style lang="scss"></style>
|
|
30
|
-
|
|
31
35
|
<script lang="ts">
|
|
32
36
|
const octopusApi = require('@saooti/octopus-api');
|
|
33
37
|
const moment = require('moment');
|
|
38
|
+
import { CommentPodcast } from '@/store/class/comment';
|
|
34
39
|
import { defineComponent } from 'vue'
|
|
35
40
|
export default defineComponent({
|
|
36
41
|
name: 'CommentParentInfo',
|
|
37
42
|
|
|
38
|
-
props:
|
|
39
|
-
|
|
40
|
-
components: {},
|
|
41
|
-
|
|
42
|
-
async created() {
|
|
43
|
-
this.comment = await octopusApi.fetchComment(this.comId);
|
|
44
|
-
this.loading = false;
|
|
43
|
+
props: {
|
|
44
|
+
comId: { default: undefined, type: Number },
|
|
45
45
|
},
|
|
46
46
|
|
|
47
47
|
data() {
|
|
48
48
|
return {
|
|
49
|
-
loading: true,
|
|
50
|
-
summary: true,
|
|
51
|
-
comment: undefined as
|
|
49
|
+
loading: true as boolean,
|
|
50
|
+
summary: true as boolean,
|
|
51
|
+
comment: undefined as CommentPodcast|undefined,
|
|
52
52
|
};
|
|
53
53
|
},
|
|
54
54
|
|
|
55
|
+
|
|
55
56
|
computed: {
|
|
56
|
-
date():string {
|
|
57
|
-
if (this.comment.date)
|
|
57
|
+
date(): string {
|
|
58
|
+
if (this.comment && this.comment.date)
|
|
58
59
|
return moment(this.comment.date).format('D MMMM YYYY HH[h]mm');
|
|
59
60
|
return '';
|
|
60
61
|
},
|
|
61
|
-
limitContent():string {
|
|
62
|
-
if (!this.comment.content) return '';
|
|
62
|
+
limitContent(): string {
|
|
63
|
+
if (!this.comment || !this.comment.content) return '';
|
|
63
64
|
if (this.comment.content.length <= 300) return this.comment.content;
|
|
64
65
|
return this.comment.content.substring(0, 300) + '...';
|
|
65
66
|
},
|
|
66
|
-
readMore():string {
|
|
67
|
-
if (this.summary) return this.$t('Read more');
|
|
68
|
-
return this.$t('Read less');
|
|
67
|
+
readMore(): string {
|
|
68
|
+
if (this.summary) return this.$t('Read more').toString();
|
|
69
|
+
return this.$t('Read less').toString();
|
|
69
70
|
},
|
|
70
|
-
contentDisplay():string {
|
|
71
|
+
contentDisplay(): string {
|
|
71
72
|
if (this.summary) return this.limitContent;
|
|
72
|
-
return this.comment.content;
|
|
73
|
+
return this.comment && this.comment.content? this.comment.content : '';
|
|
73
74
|
},
|
|
74
75
|
},
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
77
|
+
async created() {
|
|
78
|
+
this.comment = await octopusApi.fetchComment(this.comId);
|
|
79
|
+
this.loading = false;
|
|
80
|
+
},
|
|
81
|
+
})
|
|
80
82
|
</script>
|
|
83
|
+
|
|
84
|
+
<style lang="scss"></style>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="comment-player-container comment-item-container">
|
|
3
3
|
<div
|
|
4
|
-
class="c-hand"
|
|
5
4
|
v-for="c in comments"
|
|
6
5
|
:key="c.comId"
|
|
6
|
+
class="c-hand"
|
|
7
7
|
@mouseenter="displayContent = c"
|
|
8
8
|
@mouseleave="displayContent = undefined"
|
|
9
9
|
@click="displayContent = c"
|
|
@@ -11,74 +11,51 @@
|
|
|
11
11
|
<div
|
|
12
12
|
:style="'margin-left: ' + percentPosition(c.timeline) + '%'"
|
|
13
13
|
class="comment-border"
|
|
14
|
-
|
|
14
|
+
/>
|
|
15
15
|
<div
|
|
16
16
|
:style="'margin-left: calc(' + percentPosition(c.timeline) + '% - 7px)'"
|
|
17
17
|
:class="'status-' + c.status"
|
|
18
18
|
:data-selenium="'comment-' + seleniumFormat(c.name)"
|
|
19
|
-
|
|
19
|
+
/>
|
|
20
20
|
</div>
|
|
21
|
-
<div
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
<div
|
|
22
|
+
v-if="displayContent"
|
|
23
|
+
class="comment-content"
|
|
24
|
+
>
|
|
25
|
+
<div class="primary-color flex-shrink">
|
|
26
|
+
{{ displayContent.name }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="ms-1 me-1">
|
|
29
|
+
-
|
|
30
|
+
</div>
|
|
31
|
+
<div class="text-truncate">
|
|
32
|
+
{{ displayContent.content }}
|
|
33
|
+
</div>
|
|
25
34
|
</div>
|
|
26
35
|
</div>
|
|
27
36
|
</template>
|
|
28
37
|
|
|
29
|
-
<style lang="scss">
|
|
30
|
-
.comment-player-container {
|
|
31
|
-
position: relative;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 3rem;
|
|
34
|
-
display: flex;
|
|
35
|
-
@media (max-width: 960px) {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
.comment-border {
|
|
39
|
-
width: auto;
|
|
40
|
-
position: absolute;
|
|
41
|
-
border-left: solid 1px #555;
|
|
42
|
-
height: 20px;
|
|
43
|
-
}
|
|
44
|
-
.status-Valid,
|
|
45
|
-
.status-Invalid,
|
|
46
|
-
.status-Pending {
|
|
47
|
-
margin-top: 20px;
|
|
48
|
-
position: absolute;
|
|
49
|
-
}
|
|
50
|
-
.comment-content {
|
|
51
|
-
margin-top: auto;
|
|
52
|
-
font-size: 0.7rem;
|
|
53
|
-
display: flex;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
57
|
-
|
|
58
38
|
<script lang="ts">
|
|
39
|
+
import { CommentPodcast } from '@/store/class/comment';
|
|
59
40
|
import { selenium } from '../../mixins/functions';
|
|
60
|
-
|
|
61
41
|
import { defineComponent } from 'vue'
|
|
62
42
|
export default defineComponent({
|
|
63
43
|
name: 'CommentPlayer',
|
|
64
44
|
|
|
65
|
-
props: ['comments', 'totalTime'],
|
|
66
|
-
|
|
67
45
|
components: {},
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
mixins:[selenium],
|
|
47
|
+
props: {
|
|
48
|
+
comments: { default: undefined, type: Array as ()=>Array<CommentPodcast>},
|
|
49
|
+
totalTime: { default: 0, type: Number},
|
|
50
|
+
},
|
|
70
51
|
|
|
71
52
|
data() {
|
|
72
53
|
return {
|
|
73
|
-
|
|
74
|
-
displayContent: undefined as any,
|
|
54
|
+
displayContent: undefined as CommentPodcast|undefined,
|
|
75
55
|
};
|
|
76
56
|
},
|
|
77
|
-
|
|
78
|
-
computed: {},
|
|
79
|
-
|
|
80
57
|
methods: {
|
|
81
|
-
percentPosition(time: number) {
|
|
58
|
+
percentPosition(time: number): number {
|
|
82
59
|
let realDuration = this.totalTime;
|
|
83
60
|
if (
|
|
84
61
|
this.$store.state.player.podcast &&
|
|
@@ -94,5 +71,34 @@ export default defineComponent({
|
|
|
94
71
|
return Math.round((time * 100) / this.totalTime);
|
|
95
72
|
},
|
|
96
73
|
},
|
|
97
|
-
})
|
|
74
|
+
})
|
|
98
75
|
</script>
|
|
76
|
+
|
|
77
|
+
<style lang="scss">
|
|
78
|
+
.comment-player-container {
|
|
79
|
+
position: relative;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 3rem;
|
|
82
|
+
display: flex;
|
|
83
|
+
@media (max-width: 960px) {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
.comment-border {
|
|
87
|
+
width: auto;
|
|
88
|
+
position: absolute;
|
|
89
|
+
border-left: solid 1px #555;
|
|
90
|
+
height: 20px;
|
|
91
|
+
}
|
|
92
|
+
.status-Valid,
|
|
93
|
+
.status-Invalid,
|
|
94
|
+
.status-Pending {
|
|
95
|
+
margin-top: 20px;
|
|
96
|
+
position: absolute;
|
|
97
|
+
}
|
|
98
|
+
.comment-content {
|
|
99
|
+
margin-top: auto;
|
|
100
|
+
font-size: 0.7rem;
|
|
101
|
+
display: flex;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</style>
|