@saooti/octopus-sdk 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +261 -0
- package/index.d.ts +4 -0
- package/index.ts +55 -3
- package/package.json +53 -45
- package/public/config.ts +4 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +129 -0
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/style.css +186 -1224
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/public/img/ACPM.png +0 -0
- package/public/img/ouest_france_logo.svg +12 -0
- package/src/App.vue +102 -31
- package/src/api/classicCrud.ts +34 -0
- package/src/api/initialize.ts +5 -2
- package/src/assets/bootstrap-diff.scss +197 -0
- package/src/assets/form.scss +77 -77
- package/src/assets/general.scss +284 -272
- package/src/assets/live.scss +39 -0
- package/src/assets/modal.scss +43 -50
- package/src/assets/multiselect.scss +522 -573
- package/src/assets/octopus-library.scss +18 -4
- package/src/assets/share.scss +243 -0
- package/src/assets/transition.scss +98 -2
- package/src/components/display/aggregator/RssSection.vue +3 -5
- package/src/components/display/categories/CategoryChooser.vue +151 -114
- package/src/components/display/categories/CategoryFilter.vue +162 -0
- package/src/components/display/categories/CategoryList.vue +149 -117
- package/src/components/display/comments/AddCommentModal.vue +103 -108
- package/src/components/display/comments/CommentBasicView.vue +95 -0
- package/src/components/display/comments/CommentInput.vue +195 -183
- package/src/components/display/comments/CommentItem.vue +170 -208
- package/src/components/display/comments/CommentList.vue +134 -228
- package/src/components/display/comments/CommentParentInfo.vue +28 -62
- package/src/components/display/comments/CommentPlayer.vue +53 -56
- package/src/components/display/comments/CommentSection.vue +52 -83
- package/src/components/display/edit/EditBox.vue +10 -4
- package/src/components/display/edit/EditCommentBox.vue +124 -38
- package/src/components/display/emission/EmissionChooser.vue +88 -108
- package/src/components/display/emission/EmissionInlineList.vue +156 -157
- package/src/components/display/emission/EmissionItem.vue +72 -226
- package/src/components/display/emission/EmissionList.vue +159 -201
- package/src/components/display/emission/EmissionPlayerItem.vue +203 -174
- package/src/components/display/filter/AdvancedSearch.vue +224 -432
- package/src/components/display/filter/CategoryFilter.vue +105 -0
- package/src/components/display/filter/MonetizableFilter.vue +18 -15
- package/src/components/display/filter/ProductorSearch.vue +153 -176
- package/src/components/display/filter/RubriqueChoice.vue +97 -0
- package/src/components/display/filter/RubriqueFilter.vue +232 -0
- package/src/components/display/list/ListPaginate.vue +145 -0
- package/src/components/display/list/Paginate.vue +218 -0
- package/src/components/display/live/CountDown.vue +31 -30
- package/src/components/display/live/LiveHorizontalList.vue +84 -62
- package/src/components/display/live/LiveItem.vue +161 -186
- package/src/components/display/live/LiveList.vue +184 -295
- package/src/components/display/organisation/OrganisationChooser.vue +124 -162
- package/src/components/display/organisation/OrganisationChooserLight.vue +53 -56
- package/src/components/display/participant/ParticipantItem.vue +91 -128
- package/src/components/display/participant/ParticipantList.vue +134 -121
- package/src/components/display/playlist/PlaylistItem.vue +60 -97
- package/src/components/display/playlist/PlaylistList.vue +99 -92
- package/src/components/display/playlist/PodcastList.vue +117 -132
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +191 -0
- package/src/components/display/podcasts/AnimatorsItem.vue +29 -37
- package/src/components/display/podcasts/ParticipantDescription.vue +82 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +49 -102
- package/src/components/display/podcasts/PodcastImage.vue +208 -225
- package/src/components/display/podcasts/PodcastInlineList.vue +62 -355
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +240 -0
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +167 -0
- package/src/components/display/podcasts/PodcastItem.vue +94 -218
- package/src/components/display/podcasts/PodcastItemInfo.vue +166 -0
- package/src/components/display/podcasts/PodcastList.vue +127 -178
- package/src/components/display/podcasts/PodcastModuleBox.vue +234 -0
- package/src/components/display/podcasts/PodcastPlayBar.vue +101 -0
- package/src/components/display/podcasts/PodcastSwiperList.vue +204 -0
- package/src/components/display/podcasts/TagList.vue +60 -38
- package/src/components/display/rubriques/RubriqueChooser.vue +144 -131
- package/src/components/display/rubriques/RubriqueList.vue +216 -0
- package/src/components/display/sharing/PlayerParameters.vue +111 -153
- package/src/components/display/sharing/QrCode.vue +96 -0
- package/src/components/display/sharing/ShareButtons.vue +63 -233
- package/src/components/display/sharing/ShareButtonsIntern.vue +225 -0
- package/src/components/display/sharing/ShareDistribution.vue +102 -166
- package/src/components/display/sharing/SharePlayer.vue +189 -353
- package/src/components/display/sharing/SharePlayerColors.vue +78 -0
- package/src/components/display/sharing/SharePlayerTypes.vue +112 -0
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +65 -118
- package/src/components/display/studio/RecordingItemButton.vue +3 -5
- package/src/components/form/ClassicCheckbox.vue +66 -0
- package/src/components/form/ClassicLoading.vue +28 -0
- package/src/components/form/ClassicRadio.vue +66 -0
- package/src/components/form/ClassicSearch.vue +86 -0
- package/src/components/form/ClassicSelect.vue +65 -0
- package/src/components/misc/ErrorMessage.vue +27 -18
- package/src/components/misc/Footer.vue +151 -108
- package/src/components/misc/HomeDropdown.vue +95 -154
- package/src/components/misc/LeftMenu.vue +137 -206
- package/src/components/misc/Popover.vue +118 -0
- package/src/components/misc/Snackbar.vue +73 -37
- package/src/components/misc/TopBar.vue +211 -314
- package/src/components/misc/modal/ClipboardModal.vue +34 -47
- package/src/components/misc/modal/MessageModal.vue +74 -53
- package/src/components/misc/modal/NewsletterModal.vue +272 -224
- package/src/components/misc/modal/QrCodeModal.vue +58 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +140 -74
- package/src/components/misc/player/Player.vue +146 -0
- package/src/components/misc/player/PlayerCompact.vue +154 -0
- package/src/components/misc/player/PlayerLarge.vue +166 -0
- package/src/components/misc/player/PlayerProgressBar.vue +112 -0
- package/src/components/misc/player/PlayerTimeline.vue +61 -0
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/orgaComputed.ts +15 -0
- package/src/components/mixins/organisationFilter.ts +41 -0
- package/src/components/mixins/player/playerComment.ts +98 -0
- package/src/components/mixins/player/playerDisplay.ts +113 -0
- package/src/components/mixins/player/playerLive.ts +111 -0
- package/src/components/mixins/player/playerLogic.ts +225 -0
- package/src/components/mixins/tagOfMixins.ts +19 -0
- package/src/components/pages/Category.vue +24 -28
- package/src/components/pages/Emission.vue +144 -177
- package/src/components/pages/Emissions.vue +94 -110
- package/src/components/pages/Error403Page.vue +60 -0
- package/src/components/pages/Home.vue +74 -21
- package/src/components/pages/Lives.vue +53 -58
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +113 -129
- package/src/components/pages/Participants.vue +25 -41
- package/src/components/pages/Playlist.vue +86 -86
- package/src/components/pages/Playlists.vue +33 -52
- package/src/components/pages/Podcast.vue +206 -478
- package/src/components/pages/Podcasts.vue +112 -156
- package/src/components/pages/Rubrique.vue +21 -27
- package/src/components/pages/Search.vue +37 -94
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/helper/useEventListener.ts +18 -0
- package/src/i18n.ts +36 -0
- package/src/locale/de.ts +309 -0
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +316 -1
- package/src/locale/es.ts +309 -0
- package/src/locale/fr.ts +47 -15
- package/src/locale/it.ts +307 -0
- package/src/locale/messages.ts +11 -2
- package/src/locale/sl.ts +309 -0
- package/src/main.ts +64 -55
- package/src/router/router.ts +192 -159
- package/src/sass/_variables.scss +10 -8
- package/src/shims-tsx.d.ts +15 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +41 -173
- package/src/store/class/adserver/adserverConfig.ts +9 -0
- package/src/store/class/adserver/adserverOtherEmission.ts +13 -0
- package/src/store/class/adserver/adserverTiming.ts +10 -0
- package/src/store/class/cartouchier/cartouche.ts +15 -0
- package/src/store/class/cartouchier/cartouchier.ts +9 -0
- package/src/store/class/conference/conference.ts +35 -0
- package/src/store/class/conference/conferenceMessage.ts +10 -0
- package/src/store/class/conference/conferenceParticipant.ts +18 -0
- package/src/store/class/conference/pad.ts +15 -0
- package/src/store/class/conference/studioCall.ts +7 -0
- package/src/store/class/contract/contract.ts +7 -0
- package/src/store/class/contract/contractOrganisation.ts +7 -0
- package/src/store/class/ftp/ftpEmission.ts +41 -0
- package/src/store/class/ftp/ftpParam.ts +12 -0
- package/src/store/class/ftp/testFtpEmission.ts +5 -0
- package/src/store/class/general/audioView.ts +21 -0
- package/src/store/class/general/category.ts +10 -0
- package/src/store/class/general/comment.ts +16 -0
- package/src/store/class/general/customPlayer.ts +9 -0
- package/src/store/class/general/emission.ts +23 -0
- package/src/store/class/general/fetchParam.ts +3 -0
- package/src/store/class/general/initState.ts +25 -0
- package/src/store/class/general/interfacePageable.ts +16 -0
- package/src/store/class/general/ituneCategory.ts +5 -0
- package/src/store/class/general/media.ts +14 -0
- package/src/store/class/general/organisation.ts +20 -0
- package/src/store/class/general/pageable.ts +13 -0
- package/src/store/class/general/participant.ts +12 -0
- package/src/store/class/general/player.ts +14 -0
- package/src/store/class/general/playlist.ts +13 -0
- package/src/store/class/general/podcast.ts +43 -0
- package/src/store/class/general/sortPageable.ts +5 -0
- package/src/store/class/general/soundcastCategory.ts +8 -0
- package/src/store/class/ouestFrance/ofTag.ts +36 -0
- package/src/store/class/ouestFrance/ofTagInfo.ts +9 -0
- package/src/store/class/ouestFrance/ofTagPage.ts +7 -0
- package/src/store/class/ouestFrance/ofTagSeo.ts +7 -0
- package/src/store/class/ouestFrance/ofTagVente.ts +6 -0
- package/src/store/class/ouestFrance/ofTagWithParents.ts +26 -0
- package/src/store/class/rss/aggregator.ts +28 -0
- package/src/store/class/rss/rssEmission.ts +14 -0
- package/src/store/class/rss/rssInfo.ts +8 -0
- package/src/store/class/rubrique/rubriquage.ts +10 -0
- package/src/store/class/rubrique/rubriquageFilter.ts +6 -0
- package/src/store/class/rubrique/rubrique.ts +9 -0
- package/src/store/class/stat/statArrayIncome.ts +6 -0
- package/src/store/class/stat/statArrayObject.ts +34 -0
- package/src/store/class/stat/statGraph.ts +7 -0
- package/src/store/class/user/person.ts +15 -0
- package/src/store/class/user/profile.ts +12 -0
- package/src/store/class/user/userKeycloak.ts +24 -0
- package/src/store/paramStore.ts +222 -217
- package/src/store/typeAppStore.ts +186 -235
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +16 -0
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +0 -829
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/stitcher-logo.svg +0 -83
- package/public/img/ACPM.PNG +0 -0
- package/src/api/comments.ts +0 -7
- package/src/api/emissions.ts +0 -7
- package/src/api/podcasts.ts +0 -7
- package/src/api/profile.ts +0 -8
- package/src/api/studio.ts +0 -1
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/components/misc/Player.vue +0 -792
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
v-if="isPresent"
|
|
4
|
+
class="d-flex flex-column comment-input-container mt-3"
|
|
5
|
+
>
|
|
3
6
|
<b
|
|
4
|
-
class="small-Text mt-1 c-hand"
|
|
5
|
-
@click="changeIdentity"
|
|
6
7
|
v-if="knownIdentity && !editName"
|
|
7
|
-
|
|
8
|
+
class="small-text mt-1 c-hand"
|
|
9
|
+
@click="changeIdentity"
|
|
10
|
+
>{{ knownIdentity }}</b>
|
|
11
|
+
<div
|
|
12
|
+
v-if="editName"
|
|
13
|
+
class="d-flex"
|
|
8
14
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
<div class="d-flex flex-column">
|
|
16
|
+
<input
|
|
17
|
+
v-model="temporaryName"
|
|
18
|
+
class="small-text mt-1"
|
|
19
|
+
type="text"
|
|
20
|
+
:class="{ 'border border-danger': 0 === countName || !validName }"
|
|
21
|
+
>
|
|
22
|
+
<p
|
|
23
|
+
class="d-flex justify-content-end small-text mb-0"
|
|
24
|
+
:class="{ 'text-danger': !validName }"
|
|
25
|
+
>
|
|
26
|
+
{{ countName + ' / ' + maxName }}
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
29
|
+
<button
|
|
30
|
+
class="btn m-1"
|
|
31
|
+
@click="editName = false"
|
|
32
|
+
>
|
|
17
33
|
{{ $t('Cancel') }}
|
|
18
34
|
</button>
|
|
19
35
|
<button
|
|
20
|
-
class="btn btn-primary
|
|
21
|
-
:disabled="
|
|
36
|
+
class="btn btn-primary m-1"
|
|
37
|
+
:disabled="0 === countName || !validName"
|
|
22
38
|
@click="validEdit"
|
|
23
39
|
>
|
|
24
40
|
{{ $t('Validate') }}
|
|
25
41
|
</button>
|
|
26
42
|
</div>
|
|
27
|
-
<
|
|
43
|
+
<textarea
|
|
28
44
|
ref="textarea"
|
|
29
45
|
v-model="newComment"
|
|
30
46
|
:placeholder="placeholder"
|
|
@@ -32,19 +48,30 @@
|
|
|
32
48
|
:class="{ short: isOneLine && !newComment.includes('\n') }"
|
|
33
49
|
@focus="textareaFocus = true"
|
|
34
50
|
@blur="textareaFocus = false"
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<button
|
|
41
|
-
class="btn btn-primary"
|
|
42
|
-
@mousedown="requestToSend"
|
|
43
|
-
:disabled="0 === newComment.trim().length"
|
|
51
|
+
/>
|
|
52
|
+
<template v-if="textareaFocus">
|
|
53
|
+
<p
|
|
54
|
+
class="d-flex justify-content-end small-text"
|
|
55
|
+
:class="{ 'text-danger': !validComment }"
|
|
44
56
|
>
|
|
45
|
-
{{
|
|
46
|
-
</
|
|
47
|
-
|
|
57
|
+
{{ countComment + ' / ' + maxComment }}
|
|
58
|
+
</p>
|
|
59
|
+
<div class="d-flex justify-content-end mt-1">
|
|
60
|
+
<button
|
|
61
|
+
class="btn me-2"
|
|
62
|
+
@mousedown="cancelAction"
|
|
63
|
+
>
|
|
64
|
+
{{ $t('Cancel') }}
|
|
65
|
+
</button>
|
|
66
|
+
<button
|
|
67
|
+
class="btn btn-primary"
|
|
68
|
+
:disabled="0 === countComment || !validComment"
|
|
69
|
+
@mousedown="requestToSend"
|
|
70
|
+
>
|
|
71
|
+
{{ placeholder }}
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
48
75
|
<AddCommentModal
|
|
49
76
|
v-if="checkIdentityModal"
|
|
50
77
|
@validate="postComment"
|
|
@@ -52,134 +79,96 @@
|
|
|
52
79
|
/>
|
|
53
80
|
<MessageModal
|
|
54
81
|
v-if="postError"
|
|
55
|
-
@close="postError = false"
|
|
56
|
-
@validate="postError = false"
|
|
57
82
|
:validatetext="$t('Close')"
|
|
58
83
|
:title="$t('Error')"
|
|
59
84
|
:message="$t('Error occurs while post your comment...')"
|
|
85
|
+
@close="postError = false"
|
|
86
|
+
@validate="postError = false"
|
|
60
87
|
/>
|
|
61
88
|
</div>
|
|
62
89
|
</template>
|
|
63
90
|
|
|
64
|
-
<style lang="scss">
|
|
65
|
-
@import '../../../sass/_variables.scss';
|
|
66
|
-
.comment-input-container {
|
|
67
|
-
textarea::placeholder {
|
|
68
|
-
color: $octopus-primary-color;
|
|
69
|
-
}
|
|
70
|
-
textarea:focus::placeholder {
|
|
71
|
-
color: black;
|
|
72
|
-
}
|
|
73
|
-
textarea {
|
|
74
|
-
border-top: 0;
|
|
75
|
-
border-right: 0;
|
|
76
|
-
border-left: 0;
|
|
77
|
-
border-bottom: 0.1rem solid #ddd !important;
|
|
78
|
-
overflow: hidden !important;
|
|
79
|
-
box-shadow: unset !important;
|
|
80
|
-
background: transparent !important;
|
|
81
|
-
height: 40px;
|
|
82
|
-
}
|
|
83
|
-
textarea.short {
|
|
84
|
-
max-height: 38px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
88
|
-
|
|
89
91
|
<script lang="ts">
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
const octopusApi = require('@saooti/octopus-api');
|
|
93
|
-
import commentApi from '@/api/comments';
|
|
94
|
-
|
|
92
|
+
import octopusApi from '@saooti/octopus-api';
|
|
93
|
+
import crudApi from '@/api/classicCrud';
|
|
95
94
|
import { cookies } from '../../mixins/functions';
|
|
96
95
|
import { state } from '../../../store/paramStore';
|
|
97
|
-
|
|
98
|
-
import {
|
|
96
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
97
|
+
import { Conference } from '@/store/class/conference/conference';
|
|
98
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
99
|
+
import Constants from '../../../../public/config';
|
|
100
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
101
|
+
const AddCommentModal = defineAsyncComponent(() => import('./AddCommentModal.vue'));
|
|
102
|
+
const MessageModal = defineAsyncComponent(() => import('../../misc/modal/MessageModal.vue'));
|
|
99
103
|
export default defineComponent({
|
|
100
104
|
name: 'CommentInput',
|
|
101
|
-
|
|
102
|
-
props: {
|
|
103
|
-
podcast: { default: undefined as any },
|
|
104
|
-
knownIdentity: { default: null as any },
|
|
105
|
-
focus: { default: false },
|
|
106
|
-
comId: { default: undefined as any },
|
|
107
|
-
fetchConference: { default: undefined as any },
|
|
108
|
-
},
|
|
109
|
-
emits: ['update:knownIdentity', 'cancelAction', 'newComment'],
|
|
110
|
-
|
|
111
|
-
mixins: [cookies],
|
|
112
|
-
|
|
113
105
|
components: {
|
|
114
106
|
AddCommentModal,
|
|
115
107
|
MessageModal,
|
|
116
108
|
},
|
|
109
|
+
mixins:[cookies],
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
111
|
+
props: {
|
|
112
|
+
podcast: { default: undefined, type: Object as ()=>Podcast },
|
|
113
|
+
knownIdentity: { default: undefined, type: String },
|
|
114
|
+
focus: { default: false, type: Boolean },
|
|
115
|
+
comment: { default: undefined, type: Object as ()=>CommentPodcast },
|
|
116
|
+
fetchConference: { default: undefined, type: Object as ()=>Conference },
|
|
123
117
|
},
|
|
118
|
+
emits: ['update:knownIdentity', 'cancelAction', 'newComment'],
|
|
124
119
|
|
|
125
120
|
data() {
|
|
126
121
|
return {
|
|
127
|
-
newComment: '',
|
|
128
|
-
textareaFocus: false,
|
|
129
|
-
checkIdentityModal: false,
|
|
130
|
-
postError: false,
|
|
131
|
-
isOneLine: true,
|
|
132
|
-
editName: false,
|
|
133
|
-
temporaryName: '',
|
|
122
|
+
newComment: '' as string,
|
|
123
|
+
textareaFocus: false as boolean,
|
|
124
|
+
checkIdentityModal: false as boolean,
|
|
125
|
+
postError: false as boolean,
|
|
126
|
+
isOneLine: true as boolean,
|
|
127
|
+
editName: false as boolean,
|
|
128
|
+
temporaryName: '' as string,
|
|
129
|
+
maxComment : Constants.MAX_COMMENT as number,
|
|
130
|
+
maxName : Constants.MAX_COMMENT_NAME as number
|
|
134
131
|
};
|
|
135
132
|
},
|
|
136
133
|
|
|
137
134
|
computed: {
|
|
138
|
-
|
|
135
|
+
validName(): boolean{
|
|
136
|
+
return this.countName <= this.maxName;
|
|
137
|
+
},
|
|
138
|
+
countName(): number{
|
|
139
|
+
return this.temporaryName.length;
|
|
140
|
+
},
|
|
141
|
+
validComment(): boolean{
|
|
142
|
+
return this.countComment <= this.maxComment;
|
|
143
|
+
},
|
|
144
|
+
countComment(): number{
|
|
145
|
+
return this.newComment.length;
|
|
146
|
+
},
|
|
147
|
+
isPresent(): boolean {
|
|
139
148
|
if (!this.podcast) return true;
|
|
140
|
-
let podcastComment = 'INHERIT';
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
let organisationComment = 'LIVE_ONLY';
|
|
145
|
-
if (this.podcast.organisation.comments) {
|
|
146
|
-
organisationComment = this.podcast.organisation.comments;
|
|
147
|
-
}
|
|
148
|
-
if (
|
|
149
|
-
('LIVE_ONLY' === podcastComment &&
|
|
149
|
+
let podcastComment = this.podcast.annotations?.COMMENTS ?? 'INHERIT';
|
|
150
|
+
let organisationComment = this.podcast.organisation.comments??'LIVE_ONLY';
|
|
151
|
+
return !(('LIVE_ONLY' === podcastComment &&
|
|
150
152
|
'READY_TO_RECORD' !== this.podcast.processingStatus) ||
|
|
151
153
|
('INHERIT' === podcastComment &&
|
|
152
154
|
'LIVE_ONLY' === organisationComment &&
|
|
153
|
-
'READY_TO_RECORD' !== this.podcast.processingStatus)
|
|
154
|
-
) {
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
return true;
|
|
158
|
-
},
|
|
159
|
-
placeholder():string {
|
|
160
|
-
if (this.comId) return this.$t('Answer a comment');
|
|
161
|
-
return this.$t('Write a comment');
|
|
155
|
+
'READY_TO_RECORD' !== this.podcast.processingStatus));
|
|
162
156
|
},
|
|
163
|
-
|
|
164
|
-
return
|
|
157
|
+
placeholder(): string {
|
|
158
|
+
return this.comment?.comId? this.$t('Answer a comment') : this.$t('Write a comment');
|
|
165
159
|
},
|
|
166
|
-
|
|
167
|
-
return state.generalParameters.
|
|
160
|
+
isCertified(): boolean {
|
|
161
|
+
return (true === state.generalParameters.isCommments &&
|
|
162
|
+
state.generalParameters.organisationId === this.podcastOrga) ||
|
|
163
|
+
true === state.generalParameters.isAdmin;
|
|
168
164
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
(state.generalParameters.isCommments &&
|
|
172
|
-
this.organisationId === this.podcast.organisation.id) ||
|
|
173
|
-
state.generalParameters.isAdmin
|
|
174
|
-
)
|
|
175
|
-
return true;
|
|
176
|
-
return false;
|
|
165
|
+
userId(): string|undefined {
|
|
166
|
+
return state.generalParameters.authenticated ? this.$store.state.profile.userId : undefined;
|
|
177
167
|
},
|
|
178
|
-
|
|
179
|
-
if
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
phase() {
|
|
168
|
+
phase(): string|undefined {
|
|
169
|
+
if(undefined === this.podcast){
|
|
170
|
+
return this.comment ? this.comment.phase : undefined;
|
|
171
|
+
}
|
|
183
172
|
if (
|
|
184
173
|
!this.podcast.conferenceId ||
|
|
185
174
|
0 === this.podcast.conferenceId ||
|
|
@@ -194,72 +183,89 @@ export default defineComponent({
|
|
|
194
183
|
return 'Prelive';
|
|
195
184
|
return 'Live';
|
|
196
185
|
},
|
|
186
|
+
podcastOrga(): string|undefined{
|
|
187
|
+
const commentOrga = this.comment?.organisationId ??'';
|
|
188
|
+
return this.podcast?.organisation.id ?? commentOrga;
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
watch: {
|
|
192
|
+
textareaFocus(): void {
|
|
193
|
+
this.newComment = this.newComment.trim();
|
|
194
|
+
},
|
|
195
|
+
focus(): void {
|
|
196
|
+
(this.$refs.textarea as HTMLElement).focus();
|
|
197
|
+
},
|
|
198
|
+
newComment(): void {
|
|
199
|
+
const padding =
|
|
200
|
+
1.5 * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
201
|
+
this.isOneLine =
|
|
202
|
+
(this.$refs.textarea as HTMLElement).clientWidth -
|
|
203
|
+
this.inputExceeded(
|
|
204
|
+
this.newComment,
|
|
205
|
+
'18px Montserrat, sans-serif, Helvetica Neue'
|
|
206
|
+
) >
|
|
207
|
+
padding;
|
|
208
|
+
},
|
|
197
209
|
},
|
|
198
|
-
|
|
199
210
|
methods: {
|
|
200
|
-
changeIdentity() {
|
|
211
|
+
changeIdentity(): void {
|
|
212
|
+
if(!this.knownIdentity){return}
|
|
201
213
|
this.temporaryName = this.knownIdentity;
|
|
202
214
|
this.editName = true;
|
|
203
215
|
},
|
|
204
|
-
validEdit() {
|
|
216
|
+
validEdit(): void {
|
|
205
217
|
this.setCookie('comment-octopus-name', this.temporaryName);
|
|
206
218
|
this.$emit('update:knownIdentity', this.temporaryName);
|
|
207
219
|
this.editName = false;
|
|
208
220
|
},
|
|
209
|
-
inputExceeded(text: string, font: string) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
context
|
|
213
|
-
return context
|
|
221
|
+
inputExceeded(text: string, font: string): number {
|
|
222
|
+
const context = document.createElement('canvas').getContext('2d');
|
|
223
|
+
if(null === context){return 0;}
|
|
224
|
+
context.font = font;
|
|
225
|
+
return context.measureText(text).width;
|
|
214
226
|
},
|
|
215
|
-
requestToSend() {
|
|
227
|
+
requestToSend(): void {
|
|
216
228
|
if (this.knownIdentity) {
|
|
217
229
|
this.postComment();
|
|
218
230
|
} else {
|
|
219
231
|
this.checkIdentityModal = true;
|
|
220
232
|
}
|
|
221
233
|
},
|
|
222
|
-
cancelAction() {
|
|
234
|
+
cancelAction(): void {
|
|
223
235
|
this.$emit('cancelAction');
|
|
224
236
|
},
|
|
225
|
-
|
|
226
|
-
if (name) {
|
|
227
|
-
this.setCookie('comment-octopus-name', name);
|
|
228
|
-
this.$emit('update:knownIdentity', name);
|
|
229
|
-
}
|
|
237
|
+
defineTimelineValue(): number{
|
|
230
238
|
let timeline = 0;
|
|
231
239
|
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
(this.$store.state.player.live &&
|
|
236
|
-
this.$store.state.player.live.livePodcastId ===
|
|
237
|
-
this.podcast.podcastId)
|
|
240
|
+
undefined !== this.podcast &&(
|
|
241
|
+
(this.$store.state.player.podcast?.podcastId ===this.podcast.podcastId) ||
|
|
242
|
+
(this.$store.state.player.live?.livePodcastId ===this.podcast.podcastId))
|
|
238
243
|
) {
|
|
239
244
|
timeline = Math.round(
|
|
240
|
-
this.$store.state.player.elapsed
|
|
245
|
+
this.$store.state.player.elapsed * this.$store.state.player.total
|
|
241
246
|
);
|
|
242
247
|
if (this.podcast.duration && this.$store.state.player.podcast) {
|
|
243
248
|
timeline = Math.round(
|
|
244
|
-
timeline -
|
|
245
|
-
(this.$store.state.player.total! - this.podcast.duration / 1000)
|
|
249
|
+
timeline - (this.$store.state.player.total - this.podcast.duration / 1000)
|
|
246
250
|
);
|
|
247
251
|
}
|
|
248
|
-
if (timeline < 0) {
|
|
249
|
-
timeline = 0;
|
|
250
|
-
}
|
|
251
252
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
return timeline < 0? 0 : timeline;
|
|
254
|
+
},
|
|
255
|
+
async postComment(name?: string): Promise<void> {
|
|
256
|
+
if (name) {
|
|
257
|
+
this.setCookie('comment-octopus-name', name);
|
|
258
|
+
this.$emit('update:knownIdentity', name);
|
|
255
259
|
}
|
|
256
|
-
|
|
260
|
+
const sendName = name??this.knownIdentity;
|
|
261
|
+
const commentPodcastId = this.comment?.podcastId ?? 0;
|
|
262
|
+
const comment: CommentPodcast = {
|
|
257
263
|
content: this.newComment,
|
|
258
|
-
name: sendName,
|
|
259
|
-
podcastId: this.podcast
|
|
260
|
-
timeline:
|
|
261
|
-
organisationId: this.
|
|
262
|
-
commentIdReferer:
|
|
264
|
+
name: sendName ??'',
|
|
265
|
+
podcastId: this.podcast?.podcastId ?? commentPodcastId,
|
|
266
|
+
timeline: this.defineTimelineValue(),
|
|
267
|
+
organisationId: this.podcastOrga,
|
|
268
|
+
commentIdReferer:this.comment?.comId,
|
|
263
269
|
certified: this.isCertified,
|
|
264
270
|
userId: this.userId,
|
|
265
271
|
phase: this.phase,
|
|
@@ -268,38 +274,44 @@ export default defineComponent({
|
|
|
268
274
|
let data;
|
|
269
275
|
if (this.isCertified) {
|
|
270
276
|
comment.status = 'Valid';
|
|
271
|
-
data = await
|
|
277
|
+
data = await crudApi.postData<CommentPodcast>(this.$store.state,2, 'registeredComment/' + comment.userId, {...comment, ...{userId: undefined}});
|
|
272
278
|
} else {
|
|
273
|
-
data = await octopusApi.
|
|
279
|
+
data = await octopusApi.postDataPublic<CommentPodcast>(2,'unregisteredComment',comment);
|
|
274
280
|
}
|
|
275
281
|
this.$emit('newComment', data);
|
|
276
282
|
this.newComment = '';
|
|
277
|
-
this.checkIdentityModal = false;
|
|
278
283
|
} catch (error) {
|
|
279
|
-
this.checkIdentityModal = false;
|
|
280
284
|
this.postError = true;
|
|
281
285
|
}
|
|
286
|
+
this.checkIdentityModal = false;
|
|
282
287
|
},
|
|
283
288
|
},
|
|
284
|
-
|
|
285
|
-
watch: {
|
|
286
|
-
textareaFocus() {
|
|
287
|
-
this.newComment = this.newComment.trim();
|
|
288
|
-
},
|
|
289
|
-
focus() {
|
|
290
|
-
this.textarea.focus();
|
|
291
|
-
},
|
|
292
|
-
newComment() {
|
|
293
|
-
let padding =
|
|
294
|
-
1.5 * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
295
|
-
this.isOneLine =
|
|
296
|
-
this.textarea.$el.clientWidth -
|
|
297
|
-
this.inputExceeded(
|
|
298
|
-
this.newComment,
|
|
299
|
-
'18px Montserrat, sans-serif, Helvetica Neue'
|
|
300
|
-
) >
|
|
301
|
-
padding;
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
});
|
|
289
|
+
})
|
|
305
290
|
</script>
|
|
291
|
+
|
|
292
|
+
<style lang="scss">
|
|
293
|
+
@import '../../../sass/_variables.scss';
|
|
294
|
+
.octopus-app{
|
|
295
|
+
.comment-input-container {
|
|
296
|
+
textarea::placeholder {
|
|
297
|
+
color: $octopus-primary-dark;
|
|
298
|
+
}
|
|
299
|
+
textarea:focus::placeholder {
|
|
300
|
+
color: black;
|
|
301
|
+
}
|
|
302
|
+
textarea {
|
|
303
|
+
border-top: 0;
|
|
304
|
+
border-right: 0;
|
|
305
|
+
border-left: 0;
|
|
306
|
+
border-bottom: 0.1rem solid #ddd !important;
|
|
307
|
+
overflow: hidden !important;
|
|
308
|
+
box-shadow: unset !important;
|
|
309
|
+
background: transparent !important;
|
|
310
|
+
height: 50px;
|
|
311
|
+
&.short{
|
|
312
|
+
max-height: 38px;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
</style>
|