@saooti/octopus-sdk 37.0.6 → 37.0.8
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 +2 -2
- package/index.ts +22 -22
- package/package.json +26 -22
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/transition.scss +34 -22
- package/src/components/display/aggregator/RssSection.vue +3 -3
- package/src/components/display/categories/CategoryChooser.vue +73 -60
- package/src/components/display/categories/CategoryFilter.vue +134 -90
- package/src/components/display/categories/CategoryList.vue +76 -62
- package/src/components/display/comments/AddCommentModal.vue +44 -44
- package/src/components/display/comments/CommentBasicView.vue +38 -30
- package/src/components/display/comments/CommentInput.vue +121 -106
- package/src/components/display/comments/CommentItem.vue +144 -102
- package/src/components/display/comments/CommentList.vue +117 -85
- package/src/components/display/comments/CommentParentInfo.vue +18 -15
- package/src/components/display/comments/CommentPlayer.vue +39 -41
- package/src/components/display/comments/CommentSection.vue +68 -53
- package/src/components/display/edit/EditBox.vue +7 -7
- package/src/components/display/edit/EditBoxRadio.vue +3 -4
- package/src/components/display/edit/EditCommentBox.vue +34 -36
- package/src/components/display/emission/EmissionInlineList.vue +75 -63
- package/src/components/display/emission/EmissionItem.vue +47 -35
- package/src/components/display/emission/EmissionList.vue +118 -83
- package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
- package/src/components/display/filter/AdvancedSearch.vue +81 -73
- package/src/components/display/filter/CategorySearchFilter.vue +27 -25
- package/src/components/display/filter/DateFilter.vue +38 -38
- package/src/components/display/filter/MonetizableFilter.vue +16 -14
- package/src/components/display/filter/ProductorSearch.vue +55 -47
- package/src/components/display/filter/RubriqueChoice.vue +42 -27
- package/src/components/display/filter/RubriqueFilter.vue +130 -85
- package/src/components/display/filter/SearchOrder.vue +16 -11
- package/src/components/display/list/ListPaginate.vue +72 -70
- package/src/components/display/list/PaginateParams.vue +29 -30
- package/src/components/display/list/PaginateSection.vue +210 -0
- package/src/components/display/list/SwiperList.vue +28 -32
- package/src/components/display/live/CountDown.vue +12 -14
- package/src/components/display/live/LiveHorizontalList.vue +60 -50
- package/src/components/display/live/LiveItem.vue +42 -26
- package/src/components/display/live/LiveList.vue +92 -65
- package/src/components/display/live/RadioCurrently.vue +47 -42
- package/src/components/display/live/RadioImage.vue +40 -42
- package/src/components/display/live/RadioItem.vue +15 -22
- package/src/components/display/live/RadioList.vue +24 -21
- package/src/components/display/live/RadioPlanning.vue +105 -68
- package/src/components/display/organisation/OrganisationChooser.vue +58 -42
- package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
- package/src/components/display/participant/ParticipantItem.vue +89 -77
- package/src/components/display/participant/ParticipantList.vue +90 -60
- package/src/components/display/playlist/PlaylistItem.vue +32 -35
- package/src/components/display/playlist/PlaylistList.vue +70 -52
- package/src/components/display/playlist/PodcastList.vue +61 -50
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
- package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
- package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
- package/src/components/display/podcasts/PodcastImage.vue +129 -131
- package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
- package/src/components/display/podcasts/PodcastItem.vue +96 -90
- package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
- package/src/components/display/podcasts/PodcastList.vue +115 -84
- package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
- package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
- package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
- package/src/components/display/podcasts/TagList.vue +33 -37
- package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
- package/src/components/display/rubriques/RubriqueList.vue +117 -89
- package/src/components/display/sharing/PlayerParameters.vue +45 -42
- package/src/components/display/sharing/QrCode.vue +52 -46
- package/src/components/display/sharing/ShareButtons.vue +18 -18
- package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
- package/src/components/display/sharing/ShareDistribution.vue +101 -67
- package/src/components/display/sharing/SharePlayer.vue +207 -127
- package/src/components/display/sharing/SharePlayerColors.vue +15 -15
- package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
- package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
- package/src/components/display/sharing/SubscribeButtons.vue +83 -32
- package/src/components/display/studio/RecordingItemButton.vue +3 -3
- package/src/components/form/ClassicCheckbox.vue +32 -31
- package/src/components/form/ClassicDatePicker.vue +47 -49
- package/src/components/form/ClassicInputText.vue +99 -98
- package/src/components/form/ClassicLoading.vue +11 -14
- package/src/components/form/ClassicMultiselect.vue +125 -126
- package/src/components/form/ClassicRadio.vue +15 -18
- package/src/components/form/ClassicSearch.vue +17 -23
- package/src/components/form/ClassicSelect.vue +35 -27
- package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
- package/src/components/misc/AcpmImage.vue +6 -6
- package/src/components/misc/ClassicAccordion.vue +73 -0
- package/src/components/misc/ClassicNav.vue +117 -0
- package/src/components/misc/ClassicPopover.vue +212 -0
- package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
- package/src/components/misc/ErrorMessage.vue +9 -17
- package/src/components/misc/FooterSection.vue +198 -0
- package/src/components/misc/HomeDropdown.vue +60 -60
- package/src/components/misc/LeftMenu.vue +115 -79
- package/src/components/misc/ProgressBar.vue +36 -32
- package/src/components/misc/SnackBar.vue +169 -0
- package/src/components/misc/TopBar.vue +162 -116
- package/src/components/misc/modal/ClassicModal.vue +99 -103
- package/src/components/misc/modal/ClipboardModal.vue +21 -23
- package/src/components/misc/modal/MessageModal.vue +22 -28
- package/src/components/misc/modal/NewsletterModal.vue +139 -113
- package/src/components/misc/modal/QrCodeModal.vue +14 -17
- package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
- package/src/components/misc/player/PlayerCompact.vue +47 -62
- package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
- package/src/components/misc/player/PlayerLarge.vue +62 -61
- package/src/components/misc/player/PlayerProgressBar.vue +40 -30
- package/src/components/misc/player/PlayerTimeline.vue +32 -36
- package/src/components/misc/player/radio/RadioHistory.vue +62 -59
- package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
- package/src/components/mixins/cookies.ts +11 -10
- package/src/components/mixins/displayMethods.ts +5 -4
- package/src/components/mixins/handle403.ts +9 -9
- package/src/components/mixins/imageProxy.ts +14 -7
- package/src/components/mixins/init.ts +31 -16
- package/src/components/mixins/orgaComputed.ts +7 -7
- package/src/components/mixins/organisationFilter.ts +36 -22
- package/src/components/mixins/player/playerComment.ts +46 -37
- package/src/components/mixins/player/playerDisplay.ts +122 -87
- package/src/components/mixins/player/playerLive.ts +65 -43
- package/src/components/mixins/player/playerLogic.ts +133 -88
- package/src/components/mixins/player/playerTranscript.ts +48 -30
- package/src/components/mixins/radio/fetchRadioData.ts +40 -23
- package/src/components/mixins/selenium.ts +2 -2
- package/src/components/mixins/tagOfMixins.ts +11 -11
- package/src/components/pages/CategoryPage.vue +43 -0
- package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
- package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
- package/src/components/pages/Error403Page.vue +20 -19
- package/src/components/pages/HomePage.vue +144 -0
- package/src/components/pages/LivesPage.vue +66 -0
- package/src/components/pages/PageNotFound.vue +33 -22
- package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
- package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
- package/src/components/pages/PlaylistPage.vue +175 -0
- package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
- package/src/components/pages/PodcastPage.vue +365 -0
- package/src/components/pages/PodcastsPage.vue +152 -0
- package/src/components/pages/RadioPage.vue +131 -0
- package/src/components/pages/RubriquePage.vue +45 -0
- package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +10 -4
- package/src/helper/useEventListener.ts +7 -8
- package/src/i18n.ts +31 -30
- package/src/locale/de.ts +272 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +332 -324
- package/src/locale/es.ts +334 -318
- package/src/locale/fr.ts +339 -324
- package/src/locale/it.ts +341 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +324 -319
- package/src/main.ts +28 -31
- package/src/router/router.ts +218 -198
- package/src/shims-tsx.d.ts +1 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/stores/ApiStore.ts +44 -44
- package/src/stores/AuthStore.ts +21 -15
- package/src/stores/CommentStore.ts +13 -11
- package/src/stores/FilterStore.ts +25 -15
- package/src/stores/GeneralStore.ts +15 -15
- package/src/stores/ParamSdkStore.ts +179 -137
- package/src/stores/PlayerStore.ts +139 -125
- package/src/stores/class/adserver/adserverConfig.ts +1 -1
- package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
- package/src/stores/class/cartouchier/cartouche.ts +4 -4
- package/src/stores/class/cartouchier/cartouchier.ts +2 -2
- package/src/stores/class/conference/conference.ts +10 -9
- package/src/stores/class/conference/conferenceMessage.ts +2 -2
- package/src/stores/class/conference/conferenceParticipant.ts +1 -1
- package/src/stores/class/conference/studioCall.ts +6 -6
- package/src/stores/class/contract/contractOrganisation.ts +5 -5
- package/src/stores/class/ftp/ftpEmission.ts +9 -9
- package/src/stores/class/ftp/testFtpEmission.ts +4 -4
- package/src/stores/class/general/audioView.ts +19 -19
- package/src/stores/class/general/category.ts +1 -1
- package/src/stores/class/general/classicSelectType.ts +2 -3
- package/src/stores/class/general/customPlayer.ts +8 -8
- package/src/stores/class/general/emission.ts +20 -20
- package/src/stores/class/general/fetchParam.ts +8 -2
- package/src/stores/class/general/initState.ts +31 -31
- package/src/stores/class/general/interfacePageable.ts +13 -13
- package/src/stores/class/general/ituneCategory.ts +4 -4
- package/src/stores/class/general/listReturn.ts +12 -12
- package/src/stores/class/general/media.ts +7 -7
- package/src/stores/class/general/organisation.ts +9 -9
- package/src/stores/class/general/pageable.ts +10 -10
- package/src/stores/class/general/participant.ts +7 -7
- package/src/stores/class/general/player.ts +30 -28
- package/src/stores/class/general/playlist.ts +17 -19
- package/src/stores/class/general/podcast.ts +19 -19
- package/src/stores/class/general/sortPageable.ts +4 -4
- package/src/stores/class/general/soundcastCategory.ts +7 -7
- package/src/stores/class/ouestFrance/ofTag.ts +34 -34
- package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
- package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
- package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +6 -6
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +54 -54
- package/src/stores/class/rss/rssEmission.ts +13 -13
- package/src/stores/class/rss/rssInfo.ts +7 -7
- package/src/stores/class/rubrique/rubriquage.ts +2 -2
- package/src/stores/class/rubrique/rubrique.ts +1 -1
- package/src/stores/class/stat/statArrayIncome.ts +5 -5
- package/src/stores/class/stat/statArrayObject.ts +26 -26
- package/src/stores/class/stat/statGraph.ts +6 -6
- package/src/stores/class/user/person.ts +4 -2
- package/src/stores/class/user/profile.ts +4 -2
- package/src/stores/class/user/userKeycloak.ts +4 -5
- package/src/components/display/list/Paginate.vue +0 -181
- package/src/components/misc/Accordion.vue +0 -78
- package/src/components/misc/Footer.vue +0 -169
- package/src/components/misc/Nav.vue +0 -119
- package/src/components/misc/Popover.vue +0 -193
- package/src/components/misc/Snackbar.vue +0 -168
- package/src/components/pages/Category.vue +0 -41
- package/src/components/pages/Home.vue +0 -125
- package/src/components/pages/Lives.vue +0 -64
- package/src/components/pages/Playlist.vue +0 -164
- package/src/components/pages/Podcast.vue +0 -307
- package/src/components/pages/Podcasts.vue +0 -146
- package/src/components/pages/Radio.vue +0 -122
- package/src/components/pages/Rubrique.vue +0 -42
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-column mt-3">
|
|
3
3
|
<ClassicLoading
|
|
4
|
-
:loading-text="loading
|
|
5
|
-
:error-text="error
|
|
4
|
+
:loading-text="loading ? $t('Loading content ...') : undefined"
|
|
5
|
+
:error-text="error ? $t(`Comments loading error`) : undefined"
|
|
6
6
|
/>
|
|
7
|
-
<div
|
|
8
|
-
v-show="!loading"
|
|
9
|
-
>
|
|
7
|
+
<div v-show="!loading">
|
|
10
8
|
<CommentItem
|
|
11
9
|
v-for="(c, indexCom) in comments"
|
|
12
10
|
:ref="'comItem' + c.comId"
|
|
@@ -16,60 +14,60 @@
|
|
|
16
14
|
:podcast="podcast"
|
|
17
15
|
:fetch-conference="fetchConference"
|
|
18
16
|
:organisation="organisation"
|
|
19
|
-
@
|
|
20
|
-
@
|
|
17
|
+
@delete-comment="deleteComment(c)"
|
|
18
|
+
@update-comment="updateComment"
|
|
21
19
|
/>
|
|
22
20
|
</div>
|
|
23
21
|
<button
|
|
24
|
-
v-show="!allFetched && (!loading || 0!==first)"
|
|
22
|
+
v-show="!allFetched && (!loading || 0 !== first)"
|
|
25
23
|
class="btn btn-primary mt-2"
|
|
26
24
|
:class="comId ? 'align-self-start' : 'align-self-center'"
|
|
27
25
|
:disabled="loading"
|
|
28
26
|
:title="$t('See more comments')"
|
|
29
27
|
@click="fetchContent(false)"
|
|
30
28
|
>
|
|
31
|
-
{{ $t(
|
|
29
|
+
{{ $t("See more comments") }}
|
|
32
30
|
</button>
|
|
33
31
|
</div>
|
|
34
32
|
</template>
|
|
35
33
|
|
|
36
34
|
<script lang="ts">
|
|
37
|
-
import ClassicLoading from
|
|
38
|
-
import { state } from
|
|
39
|
-
import octopusApi from
|
|
40
|
-
import dayjs from
|
|
41
|
-
import { Podcast } from
|
|
42
|
-
import { Conference } from
|
|
43
|
-
import { CommentPodcast } from
|
|
44
|
-
import { InterfacePageable } from
|
|
45
|
-
import { defineComponent, defineAsyncComponent } from
|
|
35
|
+
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
36
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
37
|
+
import octopusApi from "@saooti/octopus-api";
|
|
38
|
+
import dayjs from "dayjs";
|
|
39
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
40
|
+
import { Conference } from "@/stores/class/conference/conference";
|
|
41
|
+
import { CommentPodcast } from "@/stores/class/general/comment";
|
|
42
|
+
import { InterfacePageable } from "@/stores/class/general/interfacePageable";
|
|
43
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
46
44
|
/* eslint-disable */
|
|
47
45
|
const CommentItem: any = defineAsyncComponent(() => import('./CommentItem.vue'));
|
|
48
46
|
/* eslint-enable */
|
|
49
47
|
export default defineComponent({
|
|
50
|
-
name:
|
|
48
|
+
name: "CommentList",
|
|
51
49
|
|
|
52
50
|
components: {
|
|
53
51
|
CommentItem,
|
|
54
|
-
ClassicLoading
|
|
52
|
+
ClassicLoading,
|
|
55
53
|
},
|
|
56
54
|
|
|
57
55
|
props: {
|
|
58
|
-
podcast: { default: undefined, type: Object as ()=>Podcast},
|
|
56
|
+
podcast: { default: undefined, type: Object as () => Podcast },
|
|
59
57
|
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},
|
|
58
|
+
reload: { default: false, type: Boolean },
|
|
59
|
+
fetchConference: { default: undefined, type: Object as () => Conference },
|
|
60
|
+
organisation: { default: undefined, type: String },
|
|
61
|
+
status: { default: undefined, type: String },
|
|
62
|
+
isFlat: { default: false, type: Boolean },
|
|
65
63
|
},
|
|
66
|
-
emits: [
|
|
64
|
+
emits: ["updateStatus", "fetch"],
|
|
67
65
|
|
|
68
66
|
data() {
|
|
69
67
|
return {
|
|
70
68
|
loading: true as boolean,
|
|
71
69
|
error: false as boolean,
|
|
72
|
-
first:0 as number,
|
|
70
|
+
first: 0 as number,
|
|
73
71
|
size: 20 as number,
|
|
74
72
|
totalCount: 0 as number,
|
|
75
73
|
comments: [] as Array<CommentPodcast>,
|
|
@@ -80,88 +78,108 @@ export default defineComponent({
|
|
|
80
78
|
allFetched(): boolean {
|
|
81
79
|
return this.first >= this.totalCount;
|
|
82
80
|
},
|
|
83
|
-
myOrganisationId(): string|undefined {
|
|
81
|
+
myOrganisationId(): string | undefined {
|
|
84
82
|
return state.generalParameters.organisationId;
|
|
85
83
|
},
|
|
86
|
-
podcastId(): number|undefined {
|
|
84
|
+
podcastId(): number | undefined {
|
|
87
85
|
return this.podcast?.podcastId;
|
|
88
86
|
},
|
|
89
87
|
editRight(): boolean {
|
|
90
|
-
return (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
return (
|
|
89
|
+
(true === state.generalParameters.isCommments &&
|
|
90
|
+
(this.myOrganisationId === this.podcast?.organisation.id ||
|
|
91
|
+
this.myOrganisationId === this.organisation)) ||
|
|
92
|
+
true === state.generalParameters.isAdmin
|
|
93
|
+
);
|
|
94
94
|
},
|
|
95
|
-
watchVariable():string{
|
|
95
|
+
watchVariable(): string {
|
|
96
96
|
return `${this.reload}|${this.status}`;
|
|
97
97
|
},
|
|
98
|
-
statusPost():Array<string>{
|
|
99
|
-
if(this.editRight && this.status){
|
|
98
|
+
statusPost(): Array<string> {
|
|
99
|
+
if (this.editRight && this.status) {
|
|
100
100
|
return [this.status];
|
|
101
101
|
}
|
|
102
|
-
return this.editRight? [
|
|
103
|
-
}
|
|
104
|
-
|
|
102
|
+
return this.editRight ? ["Valid", "Pending", "Invalid"] : ["Valid"];
|
|
103
|
+
},
|
|
105
104
|
},
|
|
106
105
|
watch: {
|
|
107
106
|
watchVariable: {
|
|
108
|
-
immediate:true,
|
|
109
|
-
handler(){
|
|
107
|
+
immediate: true,
|
|
108
|
+
handler() {
|
|
110
109
|
this.fetchContent();
|
|
111
|
-
}
|
|
110
|
+
},
|
|
112
111
|
},
|
|
113
112
|
comments: {
|
|
114
113
|
deep: true,
|
|
115
|
-
handler(){
|
|
116
|
-
this.$emit(
|
|
117
|
-
|
|
114
|
+
handler() {
|
|
115
|
+
this.$emit("fetch", {
|
|
116
|
+
count: this.totalCount,
|
|
117
|
+
comments: this.comments,
|
|
118
|
+
});
|
|
119
|
+
},
|
|
118
120
|
},
|
|
119
121
|
},
|
|
120
122
|
methods: {
|
|
121
|
-
async fetchContent(reset=true): Promise<void> {
|
|
123
|
+
async fetchContent(reset = true): Promise<void> {
|
|
122
124
|
this.loading = true;
|
|
123
125
|
this.error = false;
|
|
124
|
-
if(reset){
|
|
126
|
+
if (reset) {
|
|
125
127
|
this.first = 0;
|
|
126
128
|
}
|
|
127
129
|
let data;
|
|
128
130
|
try {
|
|
129
131
|
if (this.comId) {
|
|
130
|
-
data = await octopusApi.postDataPublic<
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
data = await octopusApi.postDataPublic<
|
|
133
|
+
InterfacePageable<CommentPodcast>
|
|
134
|
+
>(2, this.comId.toString(), { first: this.first, size: this.size });
|
|
135
|
+
} else {
|
|
136
|
+
data = await octopusApi.postDataPublic<
|
|
137
|
+
InterfacePageable<CommentPodcast>
|
|
138
|
+
>(2, this.isFlat ? "" : "getRootCom", {
|
|
133
139
|
first: this.first,
|
|
134
140
|
size: this.size,
|
|
135
141
|
podcastId: this.podcastId,
|
|
136
|
-
status:this.statusPost,
|
|
137
|
-
organisationId:
|
|
142
|
+
status: this.statusPost,
|
|
143
|
+
organisationId:
|
|
144
|
+
undefined === this.podcastId ? this.organisation : undefined,
|
|
138
145
|
});
|
|
139
146
|
}
|
|
140
|
-
if(reset){
|
|
147
|
+
if (reset) {
|
|
141
148
|
this.comments.length = 0;
|
|
142
149
|
}
|
|
143
150
|
this.totalCount = data.totalElements;
|
|
144
|
-
this.comments = this.comments
|
|
145
|
-
|
|
146
|
-
|
|
151
|
+
this.comments = this.comments
|
|
152
|
+
.concat(data.content)
|
|
153
|
+
.filter((c: CommentPodcast) => {
|
|
154
|
+
return null !== c;
|
|
155
|
+
});
|
|
147
156
|
this.first += this.size;
|
|
148
157
|
} catch {
|
|
149
158
|
this.error = true;
|
|
150
159
|
}
|
|
151
160
|
this.loading = false;
|
|
152
161
|
},
|
|
153
|
-
findCommentIndex(comId: number|undefined): number{
|
|
162
|
+
findCommentIndex(comId: number | undefined): number {
|
|
154
163
|
return this.comments.findIndex(
|
|
155
|
-
(element: CommentPodcast) => element.comId === comId
|
|
164
|
+
(element: CommentPodcast) => element.comId === comId,
|
|
156
165
|
);
|
|
157
166
|
},
|
|
158
|
-
commentInAnotherList(commentIdReferer:undefined|number):boolean{
|
|
159
|
-
return
|
|
167
|
+
commentInAnotherList(commentIdReferer: undefined | number): boolean {
|
|
168
|
+
return (
|
|
169
|
+
!this.isFlat &&
|
|
170
|
+
undefined !== commentIdReferer &&
|
|
171
|
+
null !== commentIdReferer &&
|
|
172
|
+
this.comId !== commentIdReferer
|
|
173
|
+
);
|
|
160
174
|
},
|
|
161
175
|
deleteComment(comment: CommentPodcast): void {
|
|
162
|
-
if (this.commentInAnotherList(comment.commentIdReferer)){
|
|
163
|
-
const comItem = (
|
|
164
|
-
|
|
176
|
+
if (this.commentInAnotherList(comment.commentIdReferer)) {
|
|
177
|
+
const comItem = (
|
|
178
|
+
this.$refs["comItem" + comment.commentIdReferer] as Array<
|
|
179
|
+
InstanceType<typeof CommentItem>
|
|
180
|
+
>
|
|
181
|
+
)[0];
|
|
182
|
+
comItem.receiveCommentEvent({ type: "Delete", comment: comment });
|
|
165
183
|
return;
|
|
166
184
|
}
|
|
167
185
|
const index = this.findCommentIndex(comment.comId);
|
|
@@ -172,51 +190,65 @@ export default defineComponent({
|
|
|
172
190
|
}
|
|
173
191
|
this.comments.splice(index, 1);
|
|
174
192
|
},
|
|
175
|
-
updateExistingComment(comment: CommentPodcast, index: number){
|
|
176
|
-
if (
|
|
177
|
-
(this.editRight &&
|
|
193
|
+
updateExistingComment(comment: CommentPodcast, index: number) {
|
|
194
|
+
if (
|
|
195
|
+
(!this.editRight && "Valid" !== comment.status) ||
|
|
196
|
+
(this.editRight && this.status && this.status !== comment.status)
|
|
197
|
+
) {
|
|
178
198
|
this.comments.splice(index, 1);
|
|
179
199
|
} else {
|
|
180
200
|
this.comments.splice(index, 1, comment);
|
|
181
201
|
}
|
|
182
202
|
},
|
|
183
|
-
updateNotExistingComment(comment: CommentPodcast){
|
|
203
|
+
updateNotExistingComment(comment: CommentPodcast) {
|
|
184
204
|
let indexNewComment = 0;
|
|
185
205
|
for (let i = 0, len = this.comments.length; i < len; i++) {
|
|
186
|
-
if (
|
|
187
|
-
dayjs(this.comments[i].date).isBefore(dayjs(comment.date))
|
|
188
|
-
) {
|
|
206
|
+
if (dayjs(this.comments[i].date).isBefore(dayjs(comment.date))) {
|
|
189
207
|
indexNewComment = i;
|
|
190
208
|
break;
|
|
191
209
|
}
|
|
192
210
|
}
|
|
193
211
|
this.comments.splice(indexNewComment, 0, comment);
|
|
194
212
|
},
|
|
195
|
-
updateComment(data: {
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
updateComment(data: {
|
|
214
|
+
type: string;
|
|
215
|
+
comment: CommentPodcast;
|
|
216
|
+
oldStatus?: string;
|
|
217
|
+
}): void {
|
|
218
|
+
if (this.commentInAnotherList(data.comment.commentIdReferer)) {
|
|
219
|
+
const comItem = (
|
|
220
|
+
this.$refs["comItem" + data.comment.commentIdReferer] as Array<
|
|
221
|
+
InstanceType<typeof CommentItem>
|
|
222
|
+
>
|
|
223
|
+
)[0];
|
|
198
224
|
comItem.receiveCommentEvent(data);
|
|
199
225
|
return;
|
|
200
226
|
}
|
|
201
227
|
const index = this.findCommentIndex(data.comment.comId);
|
|
202
228
|
if (-1 !== index) {
|
|
203
229
|
this.updateExistingComment(data.comment, index);
|
|
204
|
-
}else if(
|
|
205
|
-
|
|
206
|
-
|
|
230
|
+
} else if (
|
|
231
|
+
(!this.editRight && "Valid" === data.comment.status) ||
|
|
232
|
+
(this.editRight && !this.status) ||
|
|
233
|
+
(this.editRight && this.status && this.status === data.comment.status)
|
|
234
|
+
) {
|
|
207
235
|
this.updateNotExistingComment(data.comment);
|
|
208
236
|
}
|
|
209
|
-
if (this.comId && data.oldStatus!==data.comment.status) {
|
|
210
|
-
this.$emit(
|
|
237
|
+
if (this.comId && data.oldStatus !== data.comment.status) {
|
|
238
|
+
this.$emit("updateStatus", data.comment.status);
|
|
211
239
|
}
|
|
212
240
|
},
|
|
213
241
|
addNewComment(comment: CommentPodcast, myself = false): void {
|
|
214
|
-
if (!myself && !this.editRight &&
|
|
242
|
+
if (!myself && !this.editRight && "Valid" !== comment.status) {
|
|
215
243
|
return;
|
|
216
244
|
}
|
|
217
|
-
if (this.commentInAnotherList(comment.commentIdReferer)){
|
|
218
|
-
const comItem = (
|
|
219
|
-
|
|
245
|
+
if (this.commentInAnotherList(comment.commentIdReferer)) {
|
|
246
|
+
const comItem = (
|
|
247
|
+
this.$refs["comItem" + comment.commentIdReferer] as Array<
|
|
248
|
+
InstanceType<typeof CommentItem>
|
|
249
|
+
>
|
|
250
|
+
)[0];
|
|
251
|
+
comItem.receiveCommentEvent({ type: "Create", comment: comment });
|
|
220
252
|
return;
|
|
221
253
|
}
|
|
222
254
|
const index = this.findCommentIndex(comment.comId);
|
|
@@ -229,5 +261,5 @@ export default defineComponent({
|
|
|
229
261
|
}
|
|
230
262
|
},
|
|
231
263
|
},
|
|
232
|
-
})
|
|
233
|
-
</script>
|
|
264
|
+
});
|
|
265
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mt-2">
|
|
3
3
|
<ClassicLoading
|
|
4
|
-
:loading-text="loading
|
|
4
|
+
:loading-text="loading ? $t('Loading content ...') : undefined"
|
|
5
5
|
/>
|
|
6
6
|
<CommentBasicView
|
|
7
7
|
v-if="!loading"
|
|
@@ -12,35 +12,38 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
-
import octopusApi from
|
|
16
|
-
import CommentBasicView from
|
|
17
|
-
import ClassicLoading from
|
|
18
|
-
import { CommentPodcast } from
|
|
19
|
-
import { defineComponent } from
|
|
15
|
+
import octopusApi from "@saooti/octopus-api";
|
|
16
|
+
import CommentBasicView from "./CommentBasicView.vue";
|
|
17
|
+
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
18
|
+
import { CommentPodcast } from "@/stores/class/general/comment";
|
|
19
|
+
import { defineComponent } from "vue";
|
|
20
20
|
export default defineComponent({
|
|
21
|
-
name:
|
|
21
|
+
name: "CommentParentInfo",
|
|
22
22
|
|
|
23
|
-
components:{
|
|
23
|
+
components: {
|
|
24
24
|
CommentBasicView,
|
|
25
|
-
ClassicLoading
|
|
25
|
+
ClassicLoading,
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
props: {
|
|
29
29
|
comId: { default: undefined, type: Number },
|
|
30
|
-
editRight: { default: false, type: Boolean},
|
|
30
|
+
editRight: { default: false, type: Boolean },
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
data() {
|
|
34
34
|
return {
|
|
35
35
|
loading: true as boolean,
|
|
36
|
-
comment: undefined as CommentPodcast|undefined,
|
|
36
|
+
comment: undefined as CommentPodcast | undefined,
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
async created() {
|
|
40
|
-
if(this.comId){
|
|
41
|
-
this.comment = await octopusApi.fetchData<CommentPodcast>(
|
|
40
|
+
if (this.comId) {
|
|
41
|
+
this.comment = await octopusApi.fetchData<CommentPodcast>(
|
|
42
|
+
2,
|
|
43
|
+
`comment/${this.comId}`,
|
|
44
|
+
);
|
|
42
45
|
}
|
|
43
46
|
this.loading = false;
|
|
44
47
|
},
|
|
45
|
-
})
|
|
46
|
-
</script>
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
@@ -18,16 +18,11 @@
|
|
|
18
18
|
:data-selenium="'comment-' + seleniumFormat(c.name)"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
|
-
<div
|
|
22
|
-
v-if="displayContent"
|
|
23
|
-
class="h6 mt-auto"
|
|
24
|
-
>
|
|
21
|
+
<div v-if="displayContent" class="h6 mt-auto">
|
|
25
22
|
<div class="text-primary flex-shrink-0">
|
|
26
23
|
{{ displayContent.name }}
|
|
27
24
|
</div>
|
|
28
|
-
<div class="ms-1 me-1">
|
|
29
|
-
-
|
|
30
|
-
</div>
|
|
25
|
+
<div class="ms-1 me-1">-</div>
|
|
31
26
|
<div class="text-truncate">
|
|
32
27
|
{{ displayContent.content }}
|
|
33
28
|
</div>
|
|
@@ -36,25 +31,28 @@
|
|
|
36
31
|
</template>
|
|
37
32
|
|
|
38
33
|
<script lang="ts">
|
|
39
|
-
import { CommentPodcast } from
|
|
40
|
-
import selenium from
|
|
41
|
-
import { usePlayerStore } from
|
|
42
|
-
import { mapState } from
|
|
43
|
-
import { defineComponent } from
|
|
34
|
+
import { CommentPodcast } from "@/stores/class/general/comment";
|
|
35
|
+
import selenium from "../../mixins/selenium";
|
|
36
|
+
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
37
|
+
import { mapState } from "pinia";
|
|
38
|
+
import { defineComponent } from "vue";
|
|
44
39
|
export default defineComponent({
|
|
45
|
-
name:
|
|
46
|
-
mixins:[selenium],
|
|
40
|
+
name: "CommentPlayer",
|
|
41
|
+
mixins: [selenium],
|
|
47
42
|
props: {
|
|
48
|
-
comments: {
|
|
49
|
-
|
|
43
|
+
comments: {
|
|
44
|
+
default: undefined,
|
|
45
|
+
type: Array as () => Array<CommentPodcast>,
|
|
46
|
+
},
|
|
47
|
+
totalTime: { default: 0, type: Number },
|
|
50
48
|
},
|
|
51
49
|
data() {
|
|
52
50
|
return {
|
|
53
|
-
displayContent: undefined as CommentPodcast|undefined,
|
|
51
|
+
displayContent: undefined as CommentPodcast | undefined,
|
|
54
52
|
};
|
|
55
53
|
},
|
|
56
54
|
computed: {
|
|
57
|
-
...mapState(usePlayerStore, [
|
|
55
|
+
...mapState(usePlayerStore, ["playerPodcast"]),
|
|
58
56
|
},
|
|
59
57
|
methods: {
|
|
60
58
|
percentPosition(time: number): number {
|
|
@@ -68,31 +66,31 @@ export default defineComponent({
|
|
|
68
66
|
return Math.round((time * 100) / this.totalTime);
|
|
69
67
|
},
|
|
70
68
|
},
|
|
71
|
-
})
|
|
69
|
+
});
|
|
72
70
|
</script>
|
|
73
71
|
|
|
74
72
|
<style lang="scss">
|
|
75
|
-
.octopus-app{
|
|
76
|
-
.comment-player-container {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
.octopus-app {
|
|
74
|
+
.comment-player-container {
|
|
75
|
+
position: relative;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 3rem;
|
|
78
|
+
display: flex;
|
|
79
|
+
@media (max-width: 960px) {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
.comment-border {
|
|
83
|
+
width: auto;
|
|
84
|
+
position: absolute;
|
|
85
|
+
border-left: solid 1px #555;
|
|
86
|
+
height: 20px;
|
|
87
|
+
}
|
|
88
|
+
.status-Valid,
|
|
89
|
+
.status-Invalid,
|
|
90
|
+
.status-Pending {
|
|
91
|
+
margin-top: 20px;
|
|
92
|
+
position: absolute;
|
|
93
|
+
}
|
|
83
94
|
}
|
|
84
|
-
.comment-border {
|
|
85
|
-
width: auto;
|
|
86
|
-
position: absolute;
|
|
87
|
-
border-left: solid 1px #555;
|
|
88
|
-
height: 20px;
|
|
89
|
-
}
|
|
90
|
-
.status-Valid,
|
|
91
|
-
.status-Invalid,
|
|
92
|
-
.status-Pending {
|
|
93
|
-
margin-top: 20px;
|
|
94
|
-
position: absolute;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
95
|
}
|
|
98
|
-
</style>
|
|
96
|
+
</style>
|