@saooti/octopus-sdk 29.0.0 → 29.0.4
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 +5 -0
- package/index.ts +5 -2
- package/package.json +12 -11
- package/src/assets/bootstrap-diff.scss +5 -0
- package/src/assets/form.scss +19 -0
- package/src/assets/modal.scss +9 -10
- package/src/components/display/categories/CategoryList.vue +20 -19
- package/src/components/display/comments/AddCommentModal.vue +67 -67
- package/src/components/display/comments/CommentItem.vue +6 -4
- package/src/components/display/emission/EmissionInlineList.vue +4 -2
- package/src/components/display/filter/AdvancedSearch.vue +40 -27
- package/src/components/display/filter/RubriqueFilter.vue +3 -0
- package/src/components/display/organisation/OrganisationChooser.vue +1 -1
- package/src/components/display/participant/ParticipantItem.vue +3 -0
- package/src/components/display/podcasts/ParticipantDescription.vue +8 -4
- package/src/components/display/podcasts/PodcastInlineList.vue +4 -2
- package/src/components/display/rubriques/RubriqueList.vue +22 -21
- package/src/components/display/sharing/PlayerParameters.vue +8 -4
- package/src/components/display/sharing/ShareButtons.vue +5 -3
- package/src/components/misc/HomeDropdown.vue +116 -87
- package/src/components/misc/Popover.vue +86 -0
- package/src/components/misc/modal/MessageModal.vue +51 -50
- package/src/components/misc/modal/NewsletterModal.vue +88 -82
- package/src/components/misc/modal/QrCodeModal.vue +31 -21
- package/src/components/misc/modal/ShareModalPlayer.vue +91 -51
- package/src/components/pages/Home.vue +8 -1
- package/src/components/pages/Participant.vue +2 -1
- package/src/helper/useEventListener.ts +18 -0
- package/src/main.ts +5 -24
|
@@ -1,93 +1,99 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
3
|
+
<div
|
|
4
4
|
id="newsletter-modal"
|
|
5
|
-
|
|
6
|
-
:title="$t('Share newsletter')"
|
|
7
|
-
@close="closePopup"
|
|
8
|
-
@hide="closePopup"
|
|
9
|
-
@cancel="closePopup"
|
|
5
|
+
class="modal"
|
|
10
6
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div class="
|
|
15
|
-
<
|
|
16
|
-
{{ $t('
|
|
17
|
-
</
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class="
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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>
|
|
54
84
|
</div>
|
|
55
|
-
|
|
56
|
-
|
|
85
|
+
</div>
|
|
86
|
+
<div class="modal-footer">
|
|
87
|
+
<button
|
|
88
|
+
class="btn btn-primary m-1"
|
|
89
|
+
@click="closePopup"
|
|
57
90
|
>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</h4>
|
|
61
|
-
<input
|
|
62
|
-
type="button"
|
|
63
|
-
:value="$t('Copy')"
|
|
64
|
-
class="btn btn-primary"
|
|
65
|
-
:aria-label="$t('Copy')"
|
|
66
|
-
@click="onCopyCode(newsletterHtml, afterCopy)"
|
|
67
|
-
>
|
|
68
|
-
</div>
|
|
69
|
-
<textarea
|
|
70
|
-
id="newsletter_code_textarea"
|
|
71
|
-
v-model="newsletterHtml"
|
|
72
|
-
readonly
|
|
73
|
-
@click="selectAll"
|
|
74
|
-
/>
|
|
75
|
-
<label
|
|
76
|
-
for="newsletter_code_textarea"
|
|
77
|
-
:aria-label="$t('HTML Code')"
|
|
78
|
-
/>
|
|
91
|
+
{{ $t('Close') }}
|
|
92
|
+
</button>
|
|
79
93
|
</div>
|
|
80
94
|
</div>
|
|
81
|
-
</
|
|
82
|
-
|
|
83
|
-
<button
|
|
84
|
-
class="btn btn-primary m-1"
|
|
85
|
-
@click="closePopup"
|
|
86
|
-
>
|
|
87
|
-
{{ $t('Close') }}
|
|
88
|
-
</button>
|
|
89
|
-
</template>
|
|
90
|
-
</b-modal>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
91
97
|
<Snackbar
|
|
92
98
|
ref="snackbar"
|
|
93
99
|
position="bottom-left"
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
class="btn-close"
|
|
16
|
+
aria-label="Close"
|
|
17
|
+
@click="closePopup"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="modal-body">
|
|
21
|
+
<QrCode :url="urlPage" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="modal-footer">
|
|
24
|
+
<button
|
|
25
|
+
class="btn btn-primary m-1"
|
|
26
|
+
@click="closePopup"
|
|
27
|
+
>
|
|
28
|
+
{{ $t('Close') }}
|
|
29
|
+
</button>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
23
33
|
</div>
|
|
24
34
|
</template>
|
|
25
35
|
|
|
@@ -1,63 +1,89 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
3
|
+
<div
|
|
4
4
|
id="share-modal"
|
|
5
|
-
|
|
6
|
-
:title="$t('Share the player')"
|
|
7
|
-
@close="closePopup"
|
|
8
|
-
@hide="closePopup"
|
|
9
|
-
@cancel="closePopup"
|
|
5
|
+
class="modal"
|
|
10
6
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class="
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
class="
|
|
21
|
-
|
|
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 the player') }}
|
|
13
|
+
</h5>
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
class="btn-close"
|
|
17
|
+
aria-label="Close"
|
|
18
|
+
@click="closePopup"
|
|
22
19
|
/>
|
|
23
|
-
</
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
</div>
|
|
21
|
+
<div class="modal-body">
|
|
22
|
+
<ul class="nav nav-tabs">
|
|
23
|
+
<li
|
|
24
|
+
v-for="(tab, index) in tabs"
|
|
25
|
+
:key="tab"
|
|
26
|
+
class="nav-item"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
class="nav-link"
|
|
30
|
+
:class="activeTab === index? 'active':''"
|
|
31
|
+
@click="activeTab = index"
|
|
32
|
+
>
|
|
33
|
+
{{ tab }}
|
|
34
|
+
</div>
|
|
35
|
+
</li>
|
|
36
|
+
</ul>
|
|
37
|
+
<div class="tab-content p-2 share-modal-border">
|
|
38
|
+
<div
|
|
39
|
+
class="tab-pane tab-pane"
|
|
40
|
+
:class="activeTab === 0? 'active':''"
|
|
41
|
+
>
|
|
42
|
+
<p>{{ embedLink }}</p>
|
|
43
|
+
<div
|
|
44
|
+
class="saooti-copy"
|
|
45
|
+
@click="onCopyCode(embedLink, afterCopy)"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
class="tab-pane tab-pane"
|
|
50
|
+
:class="activeTab === 1? 'active':''"
|
|
51
|
+
>
|
|
52
|
+
<div class="d-flex flex-column">
|
|
53
|
+
<div class="d-flex">
|
|
54
|
+
<p>{{ embedlyLink }}</p>
|
|
55
|
+
<div
|
|
56
|
+
class="saooti-copy"
|
|
57
|
+
@click="onCopyCode(embedlyLink, afterCopy)"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
<QrCode :url="embedlyLink" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div
|
|
64
|
+
v-if="directLink"
|
|
65
|
+
class="tab-pane tab-pane active"
|
|
66
|
+
:class="activeTab === 2? 'active':''"
|
|
67
|
+
>
|
|
68
|
+
<p>{{ directLink.audioUrl }}</p>
|
|
31
69
|
<div
|
|
32
70
|
class="saooti-copy"
|
|
33
|
-
@click="onCopyCode(
|
|
71
|
+
@click="onCopyCode(directLink.audioUrl, snackbarRef)"
|
|
34
72
|
/>
|
|
35
73
|
</div>
|
|
36
|
-
<QrCode :url="embedlyLink" />
|
|
37
74
|
</div>
|
|
38
|
-
</
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</b-tabs>
|
|
51
|
-
</template>
|
|
52
|
-
<template #modal-footer>
|
|
53
|
-
<button
|
|
54
|
-
class="btn btn-primary m-1"
|
|
55
|
-
@click="closePopup"
|
|
56
|
-
>
|
|
57
|
-
{{ $t('Close') }}
|
|
58
|
-
</button>
|
|
59
|
-
</template>
|
|
60
|
-
</b-modal>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="modal-footer">
|
|
77
|
+
<button
|
|
78
|
+
class="btn btn-primary m-1"
|
|
79
|
+
@click="closePopup"
|
|
80
|
+
>
|
|
81
|
+
{{ $t('Close') }}
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
61
87
|
<Snackbar
|
|
62
88
|
ref="snackbar"
|
|
63
89
|
position="bottom-left"
|
|
@@ -71,6 +97,7 @@ import { displayMethods } from '../../mixins/functions';
|
|
|
71
97
|
|
|
72
98
|
import QrCode from '../../display/sharing/QrCode.vue';
|
|
73
99
|
import { defineComponent } from 'vue'
|
|
100
|
+
import { Podcast } from '@/store/class/podcast';
|
|
74
101
|
export default defineComponent({
|
|
75
102
|
name: 'ShareModalPlayer',
|
|
76
103
|
|
|
@@ -82,9 +109,22 @@ export default defineComponent({
|
|
|
82
109
|
props: {
|
|
83
110
|
embedLink: { default: undefined, type: String},
|
|
84
111
|
embedlyLink: { default: undefined, type: String},
|
|
85
|
-
directLink: { default: undefined, type:
|
|
112
|
+
directLink: { default: undefined, type: Object as ()=>Podcast},
|
|
86
113
|
},
|
|
87
114
|
emits: ['close'],
|
|
115
|
+
data() {
|
|
116
|
+
return {
|
|
117
|
+
activeTab: 0 as number,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
computed:{
|
|
121
|
+
tabs(): Array<string>{
|
|
122
|
+
if(this.directLink){
|
|
123
|
+
return [this.$t('Embed link'),this.$t('Embedly link'),this.$t('Direct link')];
|
|
124
|
+
}
|
|
125
|
+
return [this.$t('Embed link'),this.$t('Embedly link')];
|
|
126
|
+
}
|
|
127
|
+
},
|
|
88
128
|
methods: {
|
|
89
129
|
closePopup(event: { preventDefault: () => void }): void {
|
|
90
130
|
event.preventDefault();
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
:title="r.name"
|
|
18
18
|
:button-text="$t('All podcast button', { name: r.name })"
|
|
19
19
|
/>
|
|
20
|
+
<PodcastInlineList
|
|
21
|
+
v-if="rubriqueDisplay && rubriqueDisplay.length"
|
|
22
|
+
:no-rubriquage-id="[rubriqueDisplay[0].rubriquageId]"
|
|
23
|
+
:rubrique-id="rubriqueId"
|
|
24
|
+
:title="$t('Without rubric')"
|
|
25
|
+
:button-text="$t('All podcast button', { name: $t('Without rubric') })"
|
|
26
|
+
/>
|
|
20
27
|
</template>
|
|
21
28
|
</div>
|
|
22
29
|
</template>
|
|
@@ -42,7 +49,7 @@ export default defineComponent({
|
|
|
42
49
|
},
|
|
43
50
|
computed: {
|
|
44
51
|
rubriqueDisplay(): Array<Rubrique>{
|
|
45
|
-
return this.$store.state.filter.rubriqueDisplay;
|
|
52
|
+
return this.$store.state.filter.rubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
|
|
46
53
|
},
|
|
47
54
|
rubriquageFilter(): Array<Rubriquage>{
|
|
48
55
|
if(this.$store.state.filter.organisationId){
|
|
@@ -158,8 +158,9 @@ export default defineComponent({
|
|
|
158
158
|
).trim();
|
|
159
159
|
},
|
|
160
160
|
editRight(): boolean {
|
|
161
|
+
if(!this.participant || !this.participant.orga ){return false;}
|
|
161
162
|
if (
|
|
162
|
-
(this.authenticated &&
|
|
163
|
+
(this.authenticated &&
|
|
163
164
|
this.organisationId === this.participant.orga.id) ||
|
|
164
165
|
state.generalParameters.isAdmin
|
|
165
166
|
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import {onBeforeUnmount, onMounted, Ref} from 'vue'
|
|
3
|
+
|
|
4
|
+
function useEventListener(
|
|
5
|
+
element: Ref<HTMLElement | undefined>,
|
|
6
|
+
event: string,
|
|
7
|
+
callback: EventListener
|
|
8
|
+
): void {
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
element?.value?.addEventListener(event, callback)
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
onBeforeUnmount(() => {
|
|
14
|
+
element?.value?.removeEventListener(event, callback)
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default useEventListener
|
package/src/main.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import { VueReCaptcha } from 'vue-recaptcha-v3';
|
|
3
|
-
/* import {
|
|
4
|
-
ModalPlugin,
|
|
5
|
-
FormRadioPlugin,
|
|
6
|
-
CardPlugin,
|
|
7
|
-
ButtonPlugin,
|
|
8
|
-
DropdownPlugin,
|
|
9
|
-
PopoverPlugin,
|
|
10
|
-
TabsPlugin,
|
|
11
|
-
FormGroupPlugin,
|
|
12
|
-
FormTextareaPlugin,
|
|
13
|
-
CollapsePlugin } from 'bootstrap-vue-3'; */
|
|
14
|
-
import bootstrap from 'bootstrap-vue-3';
|
|
15
|
-
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css';
|
|
16
3
|
import App from './App.vue';
|
|
17
4
|
import { createI18n } from 'vue-i18n';
|
|
18
5
|
import I18nResources from './locale/messages';
|
|
@@ -20,6 +7,11 @@ import router from '@/router/router';
|
|
|
20
7
|
const moment = require('moment');
|
|
21
8
|
import store from '@/store/AppStore';
|
|
22
9
|
const paramStore = require('./store/paramStore');
|
|
10
|
+
/* import 'popper.js/dist/popper.min.js'; */
|
|
11
|
+
/* import 'jquery/src/jquery.js'; */
|
|
12
|
+
import 'jquery';
|
|
13
|
+
import 'bootstrap/dist/js/bootstrap.bundle.min.js';
|
|
14
|
+
|
|
23
15
|
|
|
24
16
|
//TODO
|
|
25
17
|
const navigatorLang = navigator.language /* || navigator.userLanguage */;
|
|
@@ -62,17 +54,6 @@ paramStore
|
|
|
62
54
|
.use(i18n)
|
|
63
55
|
.use(store)
|
|
64
56
|
.use(router)
|
|
65
|
-
.use(bootstrap)
|
|
66
57
|
.use(VueReCaptcha, { siteKey: '6LfyP_4ZAAAAAPODj8nov2LvosIwcX0GYeBSungh' })
|
|
67
|
-
/* .use(ModalPlugin)
|
|
68
|
-
.use(FormRadioPlugin)
|
|
69
|
-
.use(CardPlugin)
|
|
70
|
-
.use(ButtonPlugin)
|
|
71
|
-
.use(FormTextareaPlugin)
|
|
72
|
-
.use(DropdownPlugin)
|
|
73
|
-
.use(PopoverPlugin)
|
|
74
|
-
.use(TabsPlugin)
|
|
75
|
-
.use(FormGroupPlugin)
|
|
76
|
-
.use(CollapsePlugin) */
|
|
77
58
|
.mount('#app');
|
|
78
59
|
});
|