@saooti/octopus-sdk 37.0.5 → 37.0.7
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.html +1 -0
- package/index.ts +21 -21
- package/package.json +26 -20
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +1 -1
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/montserrat/Montserrat-Black.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Bold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Italic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Light.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Medium.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Regular.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Thin.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
- package/public/css/fonts/montserrat/style.css +28 -0
- package/public/css/fonts/style.css +5 -5
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/bootstrap.scss +9 -0
- package/src/assets/general.scss +1 -1
- package/src/assets/share.scss +1 -1
- 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 +122 -110
- 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 +111 -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 -76
- 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 -138
- 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 +63 -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 +25 -27
- package/src/components/display/sharing/ShareButtonsIntern.vue +182 -155
- 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} +94 -109
- package/src/components/misc/AcpmImage.vue +26 -0
- package/src/components/misc/ClassicAccordion.vue +69 -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 +67 -64
- 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 +161 -115
- 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 +66 -62
- 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 +263 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +323 -324
- package/src/locale/es.ts +325 -318
- package/src/locale/fr.ts +330 -324
- package/src/locale/it.ts +332 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +315 -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 +24 -16
- 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 -21
- 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 -10
- 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 -165
- 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
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
class="form-input"
|
|
14
14
|
type="text"
|
|
15
15
|
:class="{ 'border border-danger': 0 === countName || !validName }"
|
|
16
|
-
|
|
16
|
+
/>
|
|
17
17
|
<p
|
|
18
18
|
class="d-flex justify-content-end h6"
|
|
19
19
|
:class="{ 'text-danger': !validName }"
|
|
20
20
|
>
|
|
21
|
-
{{ countName +
|
|
21
|
+
{{ countName + " / " + maxName }}
|
|
22
22
|
</p>
|
|
23
23
|
<textarea
|
|
24
24
|
v-model="temporaryContent"
|
|
@@ -30,59 +30,58 @@
|
|
|
30
30
|
class="d-flex justify-content-end h6"
|
|
31
31
|
:class="{ 'text-danger': !validComment }"
|
|
32
32
|
>
|
|
33
|
-
{{ countComment +
|
|
33
|
+
{{ countComment + " / " + maxComment }}
|
|
34
34
|
</p>
|
|
35
35
|
<div class="d-flex justify-content-end">
|
|
36
|
-
<button
|
|
37
|
-
|
|
38
|
-
@click="isEditing = false"
|
|
39
|
-
>
|
|
40
|
-
{{ $t('Cancel') }}
|
|
36
|
+
<button class="btn m-1" @click="isEditing = false">
|
|
37
|
+
{{ $t("Cancel") }}
|
|
41
38
|
</button>
|
|
42
39
|
<button
|
|
43
40
|
class="btn btn-primary m-1"
|
|
44
|
-
:disabled="
|
|
41
|
+
:disabled="
|
|
42
|
+
0 === countComment || !validComment || 0 === countName || !validName
|
|
43
|
+
"
|
|
45
44
|
@click="validEdit"
|
|
46
45
|
>
|
|
47
|
-
{{ $t(
|
|
46
|
+
{{ $t("Validate") }}
|
|
48
47
|
</button>
|
|
49
48
|
</div>
|
|
50
49
|
</template>
|
|
51
50
|
<div class="d-flex align-items-center mt-1">
|
|
52
51
|
<button
|
|
53
|
-
v-if="null === comment.commentIdReferer && 'Valid'=== comment.status"
|
|
52
|
+
v-if="null === comment.commentIdReferer && 'Valid' === comment.status"
|
|
54
53
|
class="btn d-flex align-items-center py-1 px-3 me-2"
|
|
55
54
|
:data-selenium="'answer-button-comment-' + seleniumFormat(comment.name)"
|
|
56
55
|
@click="answerComment"
|
|
57
56
|
>
|
|
58
|
-
{{ $t(
|
|
57
|
+
{{ $t("To answer") }}
|
|
59
58
|
</button>
|
|
60
59
|
<button
|
|
61
60
|
v-if="
|
|
62
61
|
(!isFlat && comment.relatedComments) ||
|
|
63
|
-
|
|
62
|
+
(isFlat && comment.commentIdReferer)
|
|
64
63
|
"
|
|
65
64
|
class="btn py-1 d-flex align-items-center px-3 me-2"
|
|
66
|
-
@click="collapseVisible
|
|
65
|
+
@click="collapseVisible = !collapseVisible"
|
|
67
66
|
>
|
|
68
67
|
<span v-if="comment.relatedComments">
|
|
69
68
|
<template v-if="!collapseVisible">
|
|
70
|
-
{{ $t(
|
|
69
|
+
{{ $t("Display answers", { nb: comment.relatedComments }) }}
|
|
71
70
|
<em v-if="editRight">{{
|
|
72
|
-
$t(
|
|
71
|
+
$t("(nb valid comment answers)", {
|
|
73
72
|
nb: comment.relatedValidComments,
|
|
74
73
|
})
|
|
75
74
|
}}</em>
|
|
76
75
|
</template>
|
|
77
76
|
<template v-else>
|
|
78
|
-
{{ $t(
|
|
77
|
+
{{ $t("Hide answers") }}
|
|
79
78
|
</template>
|
|
80
79
|
</span>
|
|
81
80
|
<span v-else>
|
|
82
|
-
{{ $t(
|
|
81
|
+
{{ $t("In response to") }}
|
|
83
82
|
</span>
|
|
84
|
-
<span
|
|
85
|
-
:class="collapseVisible? 'arrow-transform': ''"
|
|
83
|
+
<span
|
|
84
|
+
:class="collapseVisible ? 'arrow-transform' : ''"
|
|
86
85
|
class="ms-1 saooti-down"
|
|
87
86
|
/>
|
|
88
87
|
</button>
|
|
@@ -91,15 +90,12 @@
|
|
|
91
90
|
ref="editBox"
|
|
92
91
|
:comment="comment"
|
|
93
92
|
:organisation="organisation"
|
|
94
|
-
@
|
|
95
|
-
@
|
|
96
|
-
@
|
|
93
|
+
@delete-comment="deleteComment"
|
|
94
|
+
@update-comment="updateComment"
|
|
95
|
+
@edit-comment="editComment"
|
|
97
96
|
/>
|
|
98
97
|
</div>
|
|
99
|
-
<div
|
|
100
|
-
v-if="collapseVisible"
|
|
101
|
-
class="ms-4"
|
|
102
|
-
>
|
|
98
|
+
<div v-if="collapseVisible" class="ms-4">
|
|
103
99
|
<CommentInput
|
|
104
100
|
v-if="!isFlat || (isFlat && !comment.commentIdReferer)"
|
|
105
101
|
v-model:knownIdentity="knownIdentity"
|
|
@@ -107,8 +103,8 @@
|
|
|
107
103
|
:podcast="podcast"
|
|
108
104
|
:comment="comment"
|
|
109
105
|
:fetch-conference="fetchConference"
|
|
110
|
-
@
|
|
111
|
-
@
|
|
106
|
+
@cancel-action="collapseVisible = false"
|
|
107
|
+
@new-comment="newComment"
|
|
112
108
|
/>
|
|
113
109
|
<CommentParentInfo
|
|
114
110
|
v-if="isFlat && comment.commentIdReferer"
|
|
@@ -122,132 +118,153 @@
|
|
|
122
118
|
:fetch-conference="fetchConference"
|
|
123
119
|
:organisation="organisation"
|
|
124
120
|
:com-id="comment.comId"
|
|
125
|
-
@
|
|
121
|
+
@update-status="updateStatus"
|
|
126
122
|
/>
|
|
127
123
|
</div>
|
|
128
124
|
</div>
|
|
129
125
|
</template>
|
|
130
126
|
|
|
131
127
|
<script lang="ts">
|
|
132
|
-
import { state } from
|
|
133
|
-
import selenium from
|
|
134
|
-
import displayMethods from
|
|
135
|
-
import { CommentPodcast } from
|
|
136
|
-
import { Podcast } from
|
|
137
|
-
import { Conference } from
|
|
138
|
-
import CommentBasicView from
|
|
139
|
-
import Constants from
|
|
140
|
-
import { useCommentStore } from
|
|
141
|
-
import { mapState, mapActions } from
|
|
142
|
-
import { defineComponent, defineAsyncComponent } from
|
|
143
|
-
const CommentInput = defineAsyncComponent(() => import(
|
|
144
|
-
const CommentParentInfo = defineAsyncComponent(
|
|
145
|
-
|
|
146
|
-
|
|
128
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
129
|
+
import selenium from "../../mixins/selenium";
|
|
130
|
+
import displayMethods from "../../mixins/displayMethods";
|
|
131
|
+
import { CommentPodcast } from "@/stores/class/general/comment";
|
|
132
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
133
|
+
import { Conference } from "@/stores/class/conference/conference";
|
|
134
|
+
import CommentBasicView from "./CommentBasicView.vue";
|
|
135
|
+
import Constants from "../../../../public/config";
|
|
136
|
+
import { useCommentStore } from "@/stores/CommentStore";
|
|
137
|
+
import { mapState, mapActions } from "pinia";
|
|
138
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
139
|
+
const CommentInput = defineAsyncComponent(() => import("./CommentInput.vue"));
|
|
140
|
+
const CommentParentInfo = defineAsyncComponent(
|
|
141
|
+
() => import("./CommentParentInfo.vue"),
|
|
142
|
+
);
|
|
143
|
+
const EditCommentBox = defineAsyncComponent(
|
|
144
|
+
() => import("@/components/display/edit/EditCommentBox.vue"),
|
|
145
|
+
);
|
|
146
|
+
const CommentList = defineAsyncComponent(() => import("./CommentList.vue"));
|
|
147
147
|
export default defineComponent({
|
|
148
|
-
name:
|
|
148
|
+
name: "CommentItem",
|
|
149
149
|
|
|
150
150
|
components: {
|
|
151
151
|
CommentInput,
|
|
152
152
|
CommentParentInfo,
|
|
153
153
|
EditCommentBox,
|
|
154
154
|
CommentList,
|
|
155
|
-
CommentBasicView
|
|
155
|
+
CommentBasicView,
|
|
156
156
|
},
|
|
157
157
|
|
|
158
|
-
mixins:[displayMethods, selenium],
|
|
158
|
+
mixins: [displayMethods, selenium],
|
|
159
159
|
|
|
160
160
|
props: {
|
|
161
|
-
comment: { default: ()=>({}), type: Object as ()=>CommentPodcast },
|
|
162
|
-
podcast: { default: undefined, type: Object as ()=>Podcast },
|
|
163
|
-
fetchConference: { default: undefined, type: Object as ()=>Conference },
|
|
164
|
-
organisation: { default: undefined, type: String},
|
|
161
|
+
comment: { default: () => ({}), type: Object as () => CommentPodcast },
|
|
162
|
+
podcast: { default: undefined, type: Object as () => Podcast },
|
|
163
|
+
fetchConference: { default: undefined, type: Object as () => Conference },
|
|
164
|
+
organisation: { default: undefined, type: String },
|
|
165
165
|
isFlat: { default: false, type: Boolean },
|
|
166
166
|
},
|
|
167
167
|
|
|
168
|
-
emits: [
|
|
169
|
-
|
|
168
|
+
emits: ["deleteComment", "updateComment", "update:comment"],
|
|
169
|
+
|
|
170
170
|
data() {
|
|
171
171
|
return {
|
|
172
172
|
collapseVisible: false as boolean,
|
|
173
173
|
focus: false as boolean,
|
|
174
174
|
isEditing: false as boolean,
|
|
175
|
-
temporaryContent:
|
|
176
|
-
temporaryName:
|
|
177
|
-
maxComment
|
|
178
|
-
maxName
|
|
175
|
+
temporaryContent: "" as string,
|
|
176
|
+
temporaryName: "" as string,
|
|
177
|
+
maxComment: Constants.MAX_COMMENT as number,
|
|
178
|
+
maxName: Constants.MAX_COMMENT_NAME as number,
|
|
179
179
|
};
|
|
180
180
|
},
|
|
181
181
|
computed: {
|
|
182
|
-
...mapState(useCommentStore, [
|
|
183
|
-
validName(): boolean{
|
|
182
|
+
...mapState(useCommentStore, ["commentKnownIdentity"]),
|
|
183
|
+
validName(): boolean {
|
|
184
184
|
return this.countName <= this.maxName;
|
|
185
185
|
},
|
|
186
|
-
countName(): number{
|
|
186
|
+
countName(): number {
|
|
187
187
|
return this.temporaryName.length;
|
|
188
188
|
},
|
|
189
|
-
validComment(): boolean{
|
|
189
|
+
validComment(): boolean {
|
|
190
190
|
return this.countComment <= this.maxComment;
|
|
191
191
|
},
|
|
192
|
-
countComment(): number{
|
|
192
|
+
countComment(): number {
|
|
193
193
|
return this.temporaryContent.length;
|
|
194
194
|
},
|
|
195
|
-
myOrganisationId(): string|undefined {
|
|
195
|
+
myOrganisationId(): string | undefined {
|
|
196
196
|
return state.generalParameters.organisationId;
|
|
197
197
|
},
|
|
198
198
|
editRight(): boolean {
|
|
199
|
-
return (
|
|
200
|
-
(
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
return (
|
|
200
|
+
(true === state.generalParameters.isCommments &&
|
|
201
|
+
(this.myOrganisationId === this.podcast?.organisation.id ||
|
|
202
|
+
this.myOrganisationId === this.organisation)) ||
|
|
203
|
+
true === state.generalParameters.isAdmin
|
|
204
|
+
);
|
|
203
205
|
},
|
|
204
206
|
knownIdentity: {
|
|
205
|
-
get(): string|null {
|
|
207
|
+
get(): string | null {
|
|
206
208
|
return this.commentKnownIdentity;
|
|
207
209
|
},
|
|
208
|
-
set(value: string|null) {
|
|
210
|
+
set(value: string | null) {
|
|
209
211
|
this.setCommentIdentity(value);
|
|
210
212
|
},
|
|
211
213
|
},
|
|
212
214
|
recordingInLive(): boolean {
|
|
213
215
|
return (
|
|
214
|
-
undefined!==this.podcast?.conferenceId &&
|
|
216
|
+
undefined !== this.podcast?.conferenceId &&
|
|
215
217
|
0 !== this.podcast.conferenceId &&
|
|
216
|
-
|
|
218
|
+
"READY" === this.podcast.processingStatus
|
|
217
219
|
);
|
|
218
220
|
},
|
|
219
221
|
},
|
|
220
222
|
methods: {
|
|
221
|
-
...mapActions(useCommentStore, [
|
|
223
|
+
...mapActions(useCommentStore, ["setCommentIdentity"]),
|
|
222
224
|
answerComment(): void {
|
|
223
225
|
this.collapseVisible = true;
|
|
224
226
|
this.focus = !this.focus;
|
|
225
227
|
},
|
|
226
228
|
deleteComment(): void {
|
|
227
|
-
this.$emit(
|
|
229
|
+
this.$emit("deleteComment");
|
|
228
230
|
},
|
|
229
|
-
updateComment(data: {
|
|
231
|
+
updateComment(data: {
|
|
232
|
+
type: string;
|
|
233
|
+
comment: CommentPodcast;
|
|
234
|
+
status?: string;
|
|
235
|
+
}): void {
|
|
230
236
|
this.isEditing = false;
|
|
231
|
-
this.$emit(
|
|
237
|
+
this.$emit("updateComment", data);
|
|
232
238
|
},
|
|
233
239
|
newComment(comment: CommentPodcast, fromEvent = false): void {
|
|
234
240
|
if (undefined === this.fetchConference || fromEvent) {
|
|
235
241
|
const updatedComment = this.comment;
|
|
236
|
-
if(undefined !== updatedComment.relatedComments){
|
|
242
|
+
if (undefined !== updatedComment.relatedComments) {
|
|
237
243
|
updatedComment.relatedComments += 1;
|
|
238
244
|
}
|
|
239
|
-
if (
|
|
245
|
+
if (
|
|
246
|
+
undefined !== updatedComment.relatedValidComments &&
|
|
247
|
+
"Valid" === comment.status
|
|
248
|
+
) {
|
|
240
249
|
updatedComment.relatedValidComments += 1;
|
|
241
250
|
}
|
|
242
|
-
this.$emit(
|
|
251
|
+
this.$emit("update:comment", updatedComment);
|
|
243
252
|
}
|
|
244
253
|
if (this.$refs.commentList) {
|
|
245
|
-
(
|
|
254
|
+
(
|
|
255
|
+
this.$refs.commentList as InstanceType<typeof CommentList>
|
|
256
|
+
).addNewComment(comment, true);
|
|
246
257
|
}
|
|
247
258
|
},
|
|
248
259
|
editComment(): void {
|
|
249
|
-
this.temporaryName =
|
|
250
|
-
|
|
260
|
+
this.temporaryName =
|
|
261
|
+
this.comment.name && null !== this.comment.name
|
|
262
|
+
? this.comment.name
|
|
263
|
+
: "";
|
|
264
|
+
this.temporaryContent =
|
|
265
|
+
this.comment.content && null !== this.comment.content
|
|
266
|
+
? this.comment.content
|
|
267
|
+
: "";
|
|
251
268
|
this.isEditing = true;
|
|
252
269
|
this.$nextTick(() => {
|
|
253
270
|
(this.$refs.focusElement as HTMLElement)?.focus();
|
|
@@ -257,57 +274,82 @@ export default defineComponent({
|
|
|
257
274
|
const comment = this.comment;
|
|
258
275
|
comment.content = this.temporaryContent;
|
|
259
276
|
comment.name = this.temporaryName;
|
|
260
|
-
(this.$refs.editBox as InstanceType<typeof EditCommentBox>).updateComment(
|
|
277
|
+
(this.$refs.editBox as InstanceType<typeof EditCommentBox>).updateComment(
|
|
278
|
+
comment,
|
|
279
|
+
);
|
|
261
280
|
},
|
|
262
281
|
updateStatus(data: string): void {
|
|
263
282
|
const updatedComment = this.comment;
|
|
264
|
-
if(undefined === updatedComment.relatedValidComments){
|
|
265
|
-
|
|
283
|
+
if (undefined === updatedComment.relatedValidComments) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if ("Valid" === data) {
|
|
266
287
|
updatedComment.relatedValidComments += 1;
|
|
267
288
|
} else {
|
|
268
289
|
updatedComment.relatedValidComments -= 1;
|
|
269
290
|
}
|
|
270
|
-
this.$emit(
|
|
291
|
+
this.$emit("update:comment", updatedComment);
|
|
271
292
|
},
|
|
272
|
-
receiveUpdateComment(event: {
|
|
293
|
+
receiveUpdateComment(event: {
|
|
294
|
+
type: string;
|
|
295
|
+
comment: CommentPodcast;
|
|
296
|
+
oldStatus?: string;
|
|
297
|
+
}) {
|
|
273
298
|
let updatedStatus = "";
|
|
274
299
|
if (event.comment.status && event.comment.status !== event.oldStatus) {
|
|
275
300
|
updatedStatus = event.comment.status;
|
|
276
301
|
}
|
|
277
302
|
const updatedComment = this.comment;
|
|
278
|
-
if(undefined !== updatedComment.relatedValidComments){
|
|
279
|
-
if (
|
|
303
|
+
if (undefined !== updatedComment.relatedValidComments) {
|
|
304
|
+
if ("Invalid" === updatedStatus) {
|
|
280
305
|
updatedComment.relatedValidComments -= 1;
|
|
281
|
-
} else if (
|
|
306
|
+
} else if ("Valid" === updatedStatus) {
|
|
282
307
|
updatedComment.relatedValidComments += 1;
|
|
283
308
|
}
|
|
284
309
|
}
|
|
285
|
-
this.$emit(
|
|
310
|
+
this.$emit("update:comment", updatedComment);
|
|
286
311
|
},
|
|
287
|
-
receiveDeleteComment(event: {
|
|
312
|
+
receiveDeleteComment(event: {
|
|
313
|
+
type: string;
|
|
314
|
+
comment: CommentPodcast;
|
|
315
|
+
oldStatus?: string;
|
|
316
|
+
}) {
|
|
288
317
|
const deletedComment = this.comment;
|
|
289
|
-
if(undefined !== deletedComment.relatedComments){
|
|
318
|
+
if (undefined !== deletedComment.relatedComments) {
|
|
290
319
|
deletedComment.relatedComments -= 1;
|
|
291
320
|
}
|
|
292
|
-
if (
|
|
321
|
+
if (
|
|
322
|
+
undefined !== deletedComment.relatedValidComments &&
|
|
323
|
+
"Valid" === event.comment.status
|
|
324
|
+
) {
|
|
293
325
|
deletedComment.relatedValidComments -= 1;
|
|
294
326
|
}
|
|
295
|
-
this.$emit(
|
|
327
|
+
this.$emit("update:comment", deletedComment);
|
|
296
328
|
},
|
|
297
329
|
|
|
298
|
-
receiveCommentEvent(event: {
|
|
330
|
+
receiveCommentEvent(event: {
|
|
331
|
+
type: string;
|
|
332
|
+
comment: CommentPodcast;
|
|
333
|
+
oldStatus?: string;
|
|
334
|
+
}): void {
|
|
299
335
|
switch (event.type) {
|
|
300
|
-
case
|
|
301
|
-
|
|
336
|
+
case "Create":
|
|
337
|
+
this.newComment(event.comment, true);
|
|
338
|
+
break;
|
|
339
|
+
case "Update":
|
|
302
340
|
if (this.$refs.commentList) {
|
|
303
|
-
(
|
|
341
|
+
(
|
|
342
|
+
this.$refs.commentList as InstanceType<typeof CommentList>
|
|
343
|
+
).updateComment(event);
|
|
304
344
|
return;
|
|
305
345
|
}
|
|
306
346
|
this.receiveUpdateComment(event);
|
|
307
347
|
break;
|
|
308
|
-
case
|
|
348
|
+
case "Delete":
|
|
309
349
|
if (this.$refs.commentList) {
|
|
310
|
-
(
|
|
350
|
+
(
|
|
351
|
+
this.$refs.commentList as InstanceType<typeof CommentList>
|
|
352
|
+
).deleteComment(event.comment);
|
|
311
353
|
return;
|
|
312
354
|
}
|
|
313
355
|
this.receiveDeleteComment(event);
|
|
@@ -317,5 +359,5 @@ export default defineComponent({
|
|
|
317
359
|
}
|
|
318
360
|
},
|
|
319
361
|
},
|
|
320
|
-
})
|
|
362
|
+
});
|
|
321
363
|
</script>
|