@saooti/octopus-sdk 1.0.0 → 29.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/index.d.ts +4 -0
- package/index.ts +12 -0
- package/package.json +61 -39
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +30 -19
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/style.css +48 -5
- package/public/img/ACPM.png +0 -0
- package/public/img/article.png +0 -0
- package/src/App.vue +97 -31
- package/src/api/comments.ts +3 -1
- package/src/api/emissions.ts +5 -2
- package/src/api/initialize.ts +3 -2
- package/src/api/podcasts.ts +5 -2
- package/src/api/profile.ts +4 -2
- package/src/api/studio.ts +12 -1
- package/src/assets/bootstrap-diff.scss +265 -0
- package/src/assets/form.scss +23 -0
- package/src/assets/general.scss +47 -20
- package/src/assets/modal.scss +9 -10
- package/src/assets/multiselect.scss +19 -2
- package/src/assets/octopus-library.scss +16 -4
- package/src/assets/share.scss +343 -0
- package/src/components/display/aggregator/RssSection.vue +4 -4
- package/src/components/display/categories/CategoryChooser.vue +152 -105
- package/src/components/display/categories/CategoryFilter.vue +108 -0
- package/src/components/display/categories/CategoryList.vue +138 -109
- package/src/components/display/comments/AddCommentModal.vue +104 -87
- package/src/components/display/comments/CommentInput.vue +137 -118
- package/src/components/display/comments/CommentItem.vue +155 -137
- package/src/components/display/comments/CommentList.vue +142 -120
- package/src/components/display/comments/CommentParentInfo.vue +39 -35
- package/src/components/display/comments/CommentPlayer.vue +54 -48
- package/src/components/display/comments/CommentSection.vue +57 -58
- package/src/components/display/edit/EditBox.vue +4 -4
- package/src/components/display/edit/EditCommentBox.vue +25 -31
- package/src/components/display/emission/EmissionChooser.vue +82 -80
- package/src/components/display/emission/EmissionInlineList.vue +118 -105
- package/src/components/display/emission/EmissionItem.vue +66 -167
- package/src/components/display/emission/EmissionList.vue +96 -122
- package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
- package/src/components/display/filter/AdvancedSearch.vue +306 -372
- package/src/components/display/filter/CategoryFilter.vue +117 -0
- package/src/components/display/filter/MonetizableFilter.vue +24 -10
- package/src/components/display/filter/ProductorSearch.vue +131 -135
- package/src/components/display/filter/RubriqueChoice.vue +104 -0
- package/src/components/display/filter/RubriqueFilter.vue +235 -0
- package/src/components/display/live/CountDown.vue +30 -29
- package/src/components/display/live/LiveHorizontalList.vue +40 -34
- package/src/components/display/live/LiveItem.vue +146 -158
- package/src/components/display/live/LiveList.vue +167 -154
- package/src/components/display/organisation/OrganisationChooser.vue +125 -124
- package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
- package/src/components/display/participant/ParticipantItem.vue +92 -108
- package/src/components/display/participant/ParticipantList.vue +76 -69
- package/src/components/display/playlist/PlaylistItem.vue +45 -56
- package/src/components/display/playlist/PlaylistList.vue +57 -48
- package/src/components/display/playlist/PodcastList.vue +94 -70
- package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
- package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
- package/src/components/display/podcasts/PodcastImage.vue +244 -208
- package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
- package/src/components/display/podcasts/PodcastItem.vue +150 -132
- package/src/components/display/podcasts/PodcastList.vue +89 -110
- package/src/components/display/podcasts/TagList.vue +23 -16
- package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
- package/src/components/display/rubriques/RubriqueList.vue +227 -0
- package/src/components/display/sharing/PlayerParameters.vue +154 -106
- package/src/components/display/sharing/QrCode.vue +58 -0
- package/src/components/display/sharing/ShareButtons.vue +214 -92
- package/src/components/display/sharing/ShareDistribution.vue +110 -121
- package/src/components/display/sharing/SharePlayer.vue +245 -190
- package/src/components/display/sharing/SubscribeButtons.vue +130 -66
- package/src/components/display/studio/RecordingItemButton.vue +4 -4
- package/src/components/misc/ErrorMessage.vue +21 -16
- package/src/components/misc/Footer.vue +131 -66
- package/src/components/misc/HomeDropdown.vue +166 -123
- package/src/components/misc/LeftMenu.vue +151 -134
- package/src/components/misc/Player.vue +332 -328
- package/src/components/misc/Snackbar.vue +27 -29
- package/src/components/misc/TopBar.vue +204 -174
- package/src/components/misc/modal/ClipboardModal.vue +46 -26
- package/src/components/misc/modal/MessageModal.vue +67 -51
- package/src/components/misc/modal/NewsletterModal.vue +179 -136
- package/src/components/misc/modal/QrCodeModal.vue +83 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/organisationFilter.ts +24 -0
- package/src/components/pages/Category.vue +26 -26
- package/src/components/pages/Emission.vue +120 -92
- package/src/components/pages/Emissions.vue +109 -86
- package/src/components/pages/Home.vue +70 -16
- package/src/components/pages/Lives.vue +57 -47
- package/src/components/pages/Participant.vue +93 -77
- package/src/components/pages/Participants.vue +44 -31
- package/src/components/pages/Playlist.vue +63 -52
- package/src/components/pages/Playlists.vue +41 -39
- package/src/components/pages/Podcast.vue +265 -251
- package/src/components/pages/Podcasts.vue +135 -104
- package/src/components/pages/Rubrique.vue +25 -19
- package/src/components/pages/Search.vue +71 -67
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +299 -1
- package/src/locale/fr.ts +25 -10
- package/src/locale/messages.ts +3 -2
- package/src/main.ts +54 -32
- package/src/router/router.ts +184 -159
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +36 -171
- package/src/store/class/category.ts +8 -0
- package/src/store/class/comment.ts +17 -0
- package/src/store/class/conference.ts +27 -0
- package/src/store/class/customPlayer.ts +8 -0
- package/src/store/class/emission.ts +20 -0
- package/src/store/class/fetchParam.ts +16 -0
- package/src/store/class/media.ts +13 -0
- package/src/store/class/organisation.ts +19 -0
- package/src/store/class/participant.ts +12 -0
- package/src/store/class/person.ts +13 -0
- package/src/store/class/player.ts +12 -0
- package/src/store/class/playlist.ts +15 -0
- package/src/store/class/podcast.ts +37 -0
- package/src/store/class/rubriquage.ts +9 -0
- package/src/store/class/rubriquageFilter.ts +5 -0
- package/src/store/class/rubrique.ts +8 -0
- package/src/store/paramStore.ts +70 -29
- package/src/store/typeAppStore.ts +171 -237
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +14 -0
- package/public/img/ACPM.PNG +0 -0
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -1,142 +1,146 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
3
|
+
<div
|
|
4
4
|
id="newsletter-modal"
|
|
5
|
-
|
|
6
|
-
@hide="closePopup"
|
|
7
|
-
@cancel="closePopup"
|
|
8
|
-
:title="$t('Share newsletter')"
|
|
5
|
+
class="modal"
|
|
9
6
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div class="
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
7
|
+
<div class="modal-backdrop" />
|
|
8
|
+
<div class="modal-dialog">
|
|
9
|
+
<div class="modal-content">
|
|
10
|
+
<div class="modal-header">
|
|
11
|
+
<h5 class="modal-title">
|
|
12
|
+
{{ $t('Share newsletter') }}
|
|
13
|
+
</h5>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="modal-body">
|
|
16
|
+
<div class="d-flex justify-content-between">
|
|
17
|
+
<div v-html="newsletterHtml" />
|
|
18
|
+
<div class="d-flex flex-column flex-grow ms-4">
|
|
19
|
+
<h4 class="mb-3">
|
|
20
|
+
{{ $t('Configuration') }}
|
|
21
|
+
</h4>
|
|
22
|
+
<div>
|
|
23
|
+
<input
|
|
24
|
+
id="display-emission-name"
|
|
25
|
+
v-model="displayEmissionName"
|
|
26
|
+
type="checkbox"
|
|
27
|
+
class="form-check-input"
|
|
28
|
+
>
|
|
29
|
+
<label
|
|
30
|
+
class="form-check-label"
|
|
31
|
+
for="display-emission-name"
|
|
32
|
+
>{{
|
|
33
|
+
$t('Display emission name')
|
|
34
|
+
}}</label>
|
|
35
|
+
</div>
|
|
36
|
+
<div>
|
|
37
|
+
<input
|
|
38
|
+
id="display-participants-names"
|
|
39
|
+
v-model="displayParticipantsNames"
|
|
40
|
+
type="checkbox"
|
|
41
|
+
class="form-check-input"
|
|
42
|
+
>
|
|
43
|
+
<label
|
|
44
|
+
class="form-check-label"
|
|
45
|
+
for="display-participants-names"
|
|
46
|
+
>{{ $t('Display participants list') }}</label>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="d-flex align-items-center mt-2">
|
|
49
|
+
<VSwatches
|
|
50
|
+
v-model="color"
|
|
51
|
+
class="c-hand input-no-outline me-2 mt-2"
|
|
52
|
+
show-fallback
|
|
53
|
+
colors="text-advanced"
|
|
54
|
+
popover-to="right"
|
|
55
|
+
:data-color="color"
|
|
56
|
+
/>
|
|
57
|
+
<div>{{ $t('Choose main color') }}</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div
|
|
60
|
+
class=" d-flex justify-content-between align-items-center mt-3 mb-2"
|
|
61
|
+
>
|
|
62
|
+
<h4 class="mb-0">
|
|
63
|
+
{{ $t('HTML Code') }}
|
|
64
|
+
</h4>
|
|
65
|
+
<input
|
|
66
|
+
type="button"
|
|
67
|
+
:value="$t('Copy')"
|
|
68
|
+
class="btn btn-primary"
|
|
69
|
+
:aria-label="$t('Copy')"
|
|
70
|
+
@click="onCopyCode(newsletterHtml, afterCopy)"
|
|
71
|
+
>
|
|
72
|
+
</div>
|
|
73
|
+
<textarea
|
|
74
|
+
id="newsletter_code_textarea"
|
|
75
|
+
v-model="newsletterHtml"
|
|
76
|
+
readonly
|
|
77
|
+
@click="selectAll"
|
|
78
|
+
/>
|
|
79
|
+
<label
|
|
80
|
+
for="newsletter_code_textarea"
|
|
81
|
+
:aria-label="$t('HTML Code')"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
49
84
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
85
|
+
</div>
|
|
86
|
+
<div class="modal-footer">
|
|
87
|
+
<button
|
|
88
|
+
class="btn btn-primary m-1"
|
|
89
|
+
@click="closePopup"
|
|
52
90
|
>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
type="button"
|
|
56
|
-
:value="$t('Copy')"
|
|
57
|
-
class="btn btn-primary"
|
|
58
|
-
@click="onCopyCode(newsletterHtml, afterCopy)"
|
|
59
|
-
:aria-label="$t('Copy')"
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
|
-
<textarea
|
|
63
|
-
id="newsletter_code_textarea"
|
|
64
|
-
v-model="newsletterHtml"
|
|
65
|
-
@click="selectAll"
|
|
66
|
-
readonly
|
|
67
|
-
></textarea>
|
|
68
|
-
<label
|
|
69
|
-
for="newsletter_code_textarea"
|
|
70
|
-
:aria-label="$t('HTML Code')"
|
|
71
|
-
></label>
|
|
91
|
+
{{ $t('Close') }}
|
|
92
|
+
</button>
|
|
72
93
|
</div>
|
|
73
94
|
</div>
|
|
74
|
-
</
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</b-modal>
|
|
81
|
-
<Snackbar ref="snackbar" position="bottom-left"></Snackbar>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<Snackbar
|
|
98
|
+
ref="snackbar"
|
|
99
|
+
position="bottom-left"
|
|
100
|
+
/>
|
|
82
101
|
</div>
|
|
83
102
|
</template>
|
|
84
103
|
|
|
85
|
-
<style lang="scss">
|
|
86
|
-
#newsletter-modal {
|
|
87
|
-
textarea {
|
|
88
|
-
border: 2px solid #eee;
|
|
89
|
-
height: 200px;
|
|
90
|
-
padding: 1em;
|
|
91
|
-
border-radius: 1em;
|
|
92
|
-
&:focus {
|
|
93
|
-
outline-width: 0;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.modal-dialog {
|
|
98
|
-
max-width: 60%;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
</style>
|
|
102
104
|
<script lang="ts">
|
|
103
105
|
import Snackbar from '../../misc/Snackbar.vue';
|
|
104
106
|
const moment = require('moment');
|
|
105
|
-
|
|
106
|
-
import Swatches from 'vue-swatches';
|
|
107
|
+
import VSwatches from 'vue3-swatches';
|
|
107
108
|
const humanizeDuration = require('humanize-duration');
|
|
108
109
|
import { displayMethods } from '../../mixins/functions';
|
|
110
|
+
import { Participant } from '@/store/class/participant';
|
|
111
|
+
import { Podcast } from '@/store/class/podcast';
|
|
112
|
+
import { state } from '../../../store/paramStore';
|
|
109
113
|
import { defineComponent } from 'vue'
|
|
110
114
|
export default defineComponent({
|
|
111
115
|
name: 'NewsletterModal',
|
|
112
116
|
|
|
113
|
-
props: ['podcast'],
|
|
114
|
-
emits: ['close'],
|
|
115
|
-
mixins: [displayMethods],
|
|
116
|
-
|
|
117
117
|
components: {
|
|
118
118
|
Snackbar,
|
|
119
|
-
|
|
119
|
+
VSwatches,
|
|
120
120
|
},
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
mixins: [displayMethods],
|
|
123
|
+
|
|
124
|
+
props: {
|
|
125
|
+
podcast: { default: ()=>({}), type: Object as ()=> Podcast},
|
|
124
126
|
},
|
|
125
127
|
|
|
128
|
+
emits: ['close'],
|
|
129
|
+
|
|
126
130
|
data() {
|
|
127
131
|
return {
|
|
128
|
-
displayParticipantsNames: true,
|
|
129
|
-
displayEmissionName: true,
|
|
130
|
-
color: '#40a372',
|
|
131
|
-
dummyParam: new Date().getTime().toString(),
|
|
132
|
+
displayParticipantsNames: true as boolean,
|
|
133
|
+
displayEmissionName: true as boolean,
|
|
134
|
+
color: '#40a372' as string,
|
|
135
|
+
dummyParam: new Date().getTime().toString() as string,
|
|
132
136
|
};
|
|
133
137
|
},
|
|
134
138
|
|
|
135
139
|
computed: {
|
|
136
|
-
|
|
137
|
-
return
|
|
140
|
+
resourcesUrl(): string{
|
|
141
|
+
return state.podcastPage.resourceUrl? state.podcastPage.resourceUrl : window.location.origin;
|
|
138
142
|
},
|
|
139
|
-
emissionName():string {
|
|
143
|
+
emissionName(): string {
|
|
140
144
|
if (this.displayEmissionName)
|
|
141
145
|
return (
|
|
142
146
|
`<tr><td colspan="2" style="font-size: 16px;line-height:24px;font-weight: bold;">` +
|
|
@@ -145,10 +149,28 @@ export default defineComponent({
|
|
|
145
149
|
);
|
|
146
150
|
return '';
|
|
147
151
|
},
|
|
148
|
-
|
|
152
|
+
articleHtml(): string{
|
|
153
|
+
if(this.podcast.article && 0 !== this.podcast.article.length){
|
|
154
|
+
return (`<a href="` +
|
|
155
|
+
this.podcast.article +
|
|
156
|
+
`" aria-label="` +
|
|
157
|
+
this.$t('See associated article') +
|
|
158
|
+
`">
|
|
159
|
+
<img width="44" height="44" style="display: inline-block;vertical-align: middle; margin-right:3px" src="` +
|
|
160
|
+
this.resourcesUrl + `/img/article.png">
|
|
161
|
+
</a>
|
|
162
|
+
<a style="color: #000;text-decoration: none;" href="` +
|
|
163
|
+
this.podcast.article +
|
|
164
|
+
`">` +
|
|
165
|
+
this.$t('See associated article') +
|
|
166
|
+
`</a>`);
|
|
167
|
+
}
|
|
168
|
+
return '';
|
|
169
|
+
},
|
|
170
|
+
participantsName(): string {
|
|
149
171
|
if (!this.displayParticipantsNames || !this.podcast.animators) return '';
|
|
150
|
-
|
|
151
|
-
this.podcast.animators.forEach((element:any) => {
|
|
172
|
+
const text = [''];
|
|
173
|
+
this.podcast.animators.forEach((element: any) => {
|
|
152
174
|
text.push(
|
|
153
175
|
`<table width='100%' style="width:100%;background: #f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-bottom-left-radius: 1.5em;border-bottom-right-radius: 1.5em;">
|
|
154
176
|
<tr>
|
|
@@ -179,8 +201,8 @@ export default defineComponent({
|
|
|
179
201
|
});
|
|
180
202
|
return text.join('');
|
|
181
203
|
},
|
|
182
|
-
newsletterHtml():string {
|
|
183
|
-
|
|
204
|
+
newsletterHtml(): string {
|
|
205
|
+
const html = [
|
|
184
206
|
`<table width='100%' style="width:100%;background:#f3f3f3;font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;border-top-left-radius: 1.5em;border-top-right-radius: 1.5em;">
|
|
185
207
|
<tr>
|
|
186
208
|
<td valign="top" rowspan="4" style="vertical-align: top; padding: 10px;">
|
|
@@ -223,71 +245,92 @@ export default defineComponent({
|
|
|
223
245
|
}
|
|
224
246
|
html.push(
|
|
225
247
|
`
|
|
226
|
-
|
|
227
|
-
<
|
|
248
|
+
</table>
|
|
249
|
+
<div style="font-family: Arial, sans-serif;font-size: 12px;line-height: 20px;background: #f3f3f3;vertical-align: middle;padding: 15px 10px;display: flex; align-items:center; flex-wrap:wrap">
|
|
228
250
|
<a href="` +
|
|
229
251
|
window.location.href +
|
|
230
252
|
`" aria-label="` +
|
|
231
253
|
this.$t('Listen this episode') +
|
|
232
254
|
`">
|
|
233
255
|
<img width="44" height="44" style="display: inline-block;vertical-align: middle" src="` +
|
|
234
|
-
|
|
256
|
+
this.resourcesUrl +
|
|
235
257
|
`/img/play-podcast.png">
|
|
236
258
|
</a>
|
|
237
|
-
<a style="color: #000;text-decoration: none;" href="` +
|
|
259
|
+
<a style="color: #000;text-decoration: none; margin-right:8px" href="` +
|
|
238
260
|
window.location.href +
|
|
239
261
|
`">` +
|
|
240
262
|
this.$t('Listen this episode') +
|
|
241
|
-
`</a
|
|
242
|
-
</
|
|
243
|
-
</tr>
|
|
244
|
-
</table>
|
|
263
|
+
`</a>` + this.articleHtml + `
|
|
264
|
+
</div>
|
|
245
265
|
` +
|
|
246
266
|
this.participantsName
|
|
247
267
|
);
|
|
248
268
|
return html.join('');
|
|
249
269
|
},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
270
|
+
|
|
271
|
+
date(): string {
|
|
272
|
+
if (1970 !== moment(this.podcast.pubDate).year()){
|
|
273
|
+
if('fr' === this.$i18n.locale){
|
|
274
|
+
return moment(this.podcast.pubDate).format('D MMMM YYYY [à] HH[h]mm');
|
|
275
|
+
}
|
|
276
|
+
return moment(this.podcast.pubDate).format('D MMMM YYYY [at] HH[h]mm');
|
|
277
|
+
}
|
|
253
278
|
return '';
|
|
254
279
|
},
|
|
255
|
-
duration():string {
|
|
280
|
+
duration(): string {
|
|
256
281
|
if (this.podcast.duration <= 1) return '';
|
|
257
282
|
if (this.podcast.duration > 600000) {
|
|
258
283
|
return humanizeDuration(this.podcast.duration, {
|
|
259
|
-
language:
|
|
284
|
+
language: this.$i18n.locale,
|
|
260
285
|
largest: 1,
|
|
261
286
|
round: true,
|
|
262
287
|
});
|
|
263
288
|
}
|
|
264
289
|
return humanizeDuration(this.podcast.duration, {
|
|
265
|
-
language:
|
|
290
|
+
language: this.$i18n.locale,
|
|
266
291
|
largest: 2,
|
|
267
292
|
round: true,
|
|
268
293
|
});
|
|
269
294
|
},
|
|
270
295
|
},
|
|
271
|
-
|
|
272
296
|
methods: {
|
|
273
|
-
closePopup(event: { preventDefault: () => void
|
|
297
|
+
closePopup(event: { preventDefault: () => void }): void {
|
|
274
298
|
event.preventDefault();
|
|
275
299
|
this.$emit('close');
|
|
276
300
|
},
|
|
277
|
-
|
|
278
|
-
getName(person:any) {
|
|
301
|
+
getName(person: Participant): string {
|
|
279
302
|
const first = person.firstName || '';
|
|
280
303
|
const last = person.lastName || '';
|
|
281
304
|
return (first + ' ' + last).trim();
|
|
282
305
|
},
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
306
|
+
selectAll(element: Event): void {
|
|
307
|
+
const target = element.target;
|
|
308
|
+
if(null!==target){
|
|
309
|
+
(target as HTMLInputElement).focus();
|
|
310
|
+
(target as HTMLInputElement).select();
|
|
311
|
+
}
|
|
287
312
|
},
|
|
288
|
-
afterCopy(){
|
|
289
|
-
this.
|
|
313
|
+
afterCopy(): void{
|
|
314
|
+
(this.$refs.snackbar as any).open(this.$t('Data in clipboard'));
|
|
290
315
|
}
|
|
291
316
|
},
|
|
292
|
-
})
|
|
317
|
+
})
|
|
293
318
|
</script>
|
|
319
|
+
|
|
320
|
+
<style lang="scss">
|
|
321
|
+
#newsletter-modal {
|
|
322
|
+
textarea {
|
|
323
|
+
border: 2px solid #eee;
|
|
324
|
+
height: 200px;
|
|
325
|
+
padding: 1em;
|
|
326
|
+
border-radius: 1em;
|
|
327
|
+
&:focus {
|
|
328
|
+
outline-width: 0;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.modal-dialog {
|
|
333
|
+
max-width: 60%;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
id="qrcode-modal"
|
|
4
|
+
class="modal"
|
|
5
|
+
>
|
|
6
|
+
<div class="modal-backdrop" />
|
|
7
|
+
<div class="modal-dialog">
|
|
8
|
+
<div class="modal-content">
|
|
9
|
+
<div class="modal-header">
|
|
10
|
+
<h5 class="modal-title">
|
|
11
|
+
{{ $t('Share QR Code') }}
|
|
12
|
+
</h5>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="modal-body">
|
|
15
|
+
<QrCode :url="urlPage" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="modal-footer">
|
|
18
|
+
<button
|
|
19
|
+
class="btn btn-primary m-1"
|
|
20
|
+
@click="closePopup"
|
|
21
|
+
>
|
|
22
|
+
{{ $t('Close') }}
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import { Podcast } from '@/store/class/podcast';
|
|
32
|
+
import { Emission } from '@/store/class/emission';
|
|
33
|
+
import QrCode from '../../display/sharing/QrCode.vue';
|
|
34
|
+
import { defineComponent } from 'vue'
|
|
35
|
+
export default defineComponent({
|
|
36
|
+
name: 'QrCodeModal',
|
|
37
|
+
|
|
38
|
+
components: {
|
|
39
|
+
QrCode
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
props: {
|
|
43
|
+
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
44
|
+
emission: { default: undefined, type: Object as ()=> Emission},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
emits: ['close'],
|
|
48
|
+
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
computed: {
|
|
55
|
+
urlPage(): string{
|
|
56
|
+
if(window.location.href.includes('?productor')){
|
|
57
|
+
return window.location.href;
|
|
58
|
+
}
|
|
59
|
+
if("" !== window.location.search){
|
|
60
|
+
return window.location.href + "&productor=" + this.productor;
|
|
61
|
+
}
|
|
62
|
+
return window.location.href + "?productor=" + this.productor;
|
|
63
|
+
},
|
|
64
|
+
productor(): string{
|
|
65
|
+
if(this.podcast){
|
|
66
|
+
return this.podcast.organisation.id;
|
|
67
|
+
}
|
|
68
|
+
if(this.emission){
|
|
69
|
+
return this.emission.orga.id;
|
|
70
|
+
}
|
|
71
|
+
return "";
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
methods:{
|
|
75
|
+
closePopup(event: { preventDefault: () => void }): void {
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
this.$emit('close');
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style lang="scss"></style>
|