@saooti/octopus-sdk 30.0.18 → 30.0.22
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 -1
- package/package.json +3 -3
- package/src/assets/bootstrap-diff.scss +10 -52
- package/src/assets/general.scss +1 -1
- package/src/assets/share.scss +17 -37
- package/src/components/display/categories/CategoryFilter.vue +4 -1
- package/src/components/display/comments/AddCommentModal.vue +35 -50
- package/src/components/display/comments/CommentBasicView.vue +96 -0
- package/src/components/display/comments/CommentInput.vue +22 -28
- package/src/components/display/comments/CommentItem.vue +56 -148
- package/src/components/display/comments/CommentList.vue +56 -112
- package/src/components/display/comments/CommentParentInfo.vue +17 -57
- package/src/components/display/comments/CommentPlayer.vue +2 -7
- package/src/components/display/comments/CommentSection.vue +9 -24
- package/src/components/display/edit/EditCommentBox.vue +123 -23
- package/src/components/display/emission/EmissionList.vue +5 -2
- package/src/components/display/filter/AdvancedSearch.vue +1 -1
- package/src/components/display/live/LiveHorizontalList.vue +5 -2
- package/src/components/display/live/LiveList.vue +3 -3
- package/src/components/display/playlist/PlaylistList.vue +5 -2
- package/src/components/display/playlist/PodcastList.vue +5 -2
- package/src/components/display/podcasts/PodcastImage.vue +1 -1
- package/src/components/display/podcasts/PodcastInlineList.vue +2 -2
- package/src/components/display/podcasts/PodcastList.vue +5 -2
- package/src/components/misc/HomeDropdown.vue +74 -115
- package/src/components/misc/PlayerButtons.vue +1 -4
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/misc/modal/MessageModal.vue +1 -1
- package/src/components/pages/Emission.vue +2 -6
- package/src/locale/en.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/store/AppStore.ts +0 -3
- package/src/store/typeAppStore.ts +0 -1
package/README.md
CHANGED
|
@@ -515,4 +515,8 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
|
515
515
|
* 30.0.15 Améliorations css
|
|
516
516
|
* 30.0.16 Change Aria-Label in title
|
|
517
517
|
* 30.0.17 Oups
|
|
518
|
-
* 30.0.18 Responsive select
|
|
518
|
+
* 30.0.18 Responsive select
|
|
519
|
+
* 30.0.19 Mise à jour Api
|
|
520
|
+
* 30.0.20 Petit refacto commentaires
|
|
521
|
+
* 30.0.21 #10701 & #10698
|
|
522
|
+
* 30.0.22 Accessibilité
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.22",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"main": "./dist/octopus.common.js",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@popperjs/core": "^2.11.0",
|
|
18
|
-
"@saooti/octopus-api": "^0.30.
|
|
18
|
+
"@saooti/octopus-api": "^0.30.3",
|
|
19
19
|
"@vue/cli": "^5.0.0-rc.1",
|
|
20
20
|
"@vue/compat": "^3.2.26",
|
|
21
21
|
"axios": "^0.24.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"vue-router": "^4.0.12",
|
|
40
40
|
"vue3-swatches": "^1.0.5",
|
|
41
41
|
"vuex": "^4.0.2",
|
|
42
|
-
"webpack": "^5.
|
|
42
|
+
"webpack": "^5.66.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/bootstrap": "^5.1.8",
|
|
@@ -40,30 +40,7 @@
|
|
|
40
40
|
border-radius: 50px;
|
|
41
41
|
height: auto;
|
|
42
42
|
border: 0;
|
|
43
|
-
color:
|
|
44
|
-
&:focus,
|
|
45
|
-
&:hover {
|
|
46
|
-
background:$octopus-third-color;
|
|
47
|
-
background: -moz-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
|
|
48
|
-
background: -webkit-gradient(left top, right bottom, color-stop(0%, $octopus-third-color), color-stop(100%, $octopus-primary-color));
|
|
49
|
-
background: -webkit-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
|
|
50
|
-
background: -o-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
|
|
51
|
-
background: -ms-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
|
|
52
|
-
background: linear-gradient(135deg, $octopus-third-color 0%, $octopus-primary-color 100%);
|
|
53
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d6d91f', endColorstr='#4fcf91', GradientType=1 );
|
|
54
|
-
border: 0;
|
|
55
|
-
}
|
|
56
|
-
&:active,
|
|
57
|
-
&.active {
|
|
58
|
-
background: darken($octopus-primary-color, 4%);
|
|
59
|
-
border-color: darken($octopus-primary-color, 7%);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
&.btn-light{
|
|
63
|
-
color: $octopus-primary-color;
|
|
64
|
-
background: transparent;
|
|
65
|
-
}
|
|
66
|
-
&.btn-auth{
|
|
43
|
+
color: black !important;
|
|
67
44
|
&:focus,
|
|
68
45
|
&:hover {
|
|
69
46
|
background:$octopus-third-color;
|
|
@@ -98,8 +75,12 @@
|
|
|
98
75
|
}
|
|
99
76
|
|
|
100
77
|
&.btn-link {
|
|
101
|
-
|
|
102
|
-
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
background: $octopus-primary-color;
|
|
82
|
+
border: 2px solid $octopus-primary-color;
|
|
83
|
+
color: white;
|
|
103
84
|
font-weight: bold;
|
|
104
85
|
margin: 2rem;
|
|
105
86
|
width: fit-content;
|
|
@@ -108,37 +89,14 @@
|
|
|
108
89
|
&:hover,
|
|
109
90
|
&:active,
|
|
110
91
|
&.active {
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
background: transparent;
|
|
93
|
+
color: $octopus-primary-color;
|
|
113
94
|
}
|
|
114
95
|
@media (max-width: 500px){
|
|
115
96
|
margin: 0.3rem;
|
|
116
97
|
}
|
|
117
98
|
}
|
|
118
|
-
|
|
119
|
-
&.btn-link-plus {
|
|
120
|
-
padding: 8px 16px;
|
|
121
|
-
font-size: 0.8rem;
|
|
122
|
-
border-radius: 50px;
|
|
123
|
-
background-color: #ddd;
|
|
124
|
-
color: #000;
|
|
125
|
-
box-shadow: none;
|
|
126
|
-
display: flex;
|
|
127
|
-
border: 1px solid transparent;
|
|
128
|
-
.saooti-plus{
|
|
129
|
-
line-height: 1.5 !important;
|
|
130
|
-
margin-left: 5px;
|
|
131
|
-
}
|
|
132
|
-
&:focus,
|
|
133
|
-
&:hover,
|
|
134
|
-
&:active,
|
|
135
|
-
&.active {
|
|
136
|
-
background: $octopus-primary-color;
|
|
137
|
-
color: white;
|
|
138
|
-
border: 1px solid $octopus-primary-color;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
99
|
+
|
|
142
100
|
&.btn-more{
|
|
143
101
|
background: $octopus-primary-color;
|
|
144
102
|
color: $octopus-background;
|
package/src/assets/general.scss
CHANGED
package/src/assets/share.scss
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
border: 0;
|
|
19
19
|
background: #f3f3f3;
|
|
20
20
|
}
|
|
21
|
-
@media (max-width: 450px) {
|
|
22
|
-
margin: 0.5rem auto 0;
|
|
23
|
-
}
|
|
24
21
|
}
|
|
25
22
|
.category-rubrique-item-plus {
|
|
26
23
|
display: flex;
|
|
@@ -156,40 +153,23 @@
|
|
|
156
153
|
font-size: 0.6rem;
|
|
157
154
|
}
|
|
158
155
|
}
|
|
159
|
-
.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
background:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
.status-Valid {
|
|
178
|
-
background: $octopus-primary-color;
|
|
179
|
-
}
|
|
180
|
-
.status-Valid, .status-Invalid, .status-Pending {
|
|
181
|
-
width: 14px;
|
|
182
|
-
height: 14px;
|
|
183
|
-
border-radius: 50%;
|
|
184
|
-
}
|
|
185
|
-
.icon-certified {
|
|
186
|
-
height: 15px;
|
|
187
|
-
margin-right: 0.5rem;
|
|
188
|
-
}
|
|
189
|
-
.collapsed > .when-opened,
|
|
190
|
-
:not(.collapsed) > .when-closed {
|
|
191
|
-
display: none !important;
|
|
192
|
-
}
|
|
156
|
+
.status-Pending {
|
|
157
|
+
background: #eb7d22;
|
|
158
|
+
}
|
|
159
|
+
.status-Invalid {
|
|
160
|
+
background: #d40303;
|
|
161
|
+
}
|
|
162
|
+
.status-Valid {
|
|
163
|
+
background: $octopus-primary-color;
|
|
164
|
+
}
|
|
165
|
+
.status-Valid, .status-Invalid, .status-Pending {
|
|
166
|
+
width: 14px;
|
|
167
|
+
height: 14px;
|
|
168
|
+
border-radius: 50%;
|
|
169
|
+
}
|
|
170
|
+
.icon-certified {
|
|
171
|
+
height: 15px;
|
|
172
|
+
margin-right: 0.5rem;
|
|
193
173
|
}
|
|
194
174
|
|
|
195
175
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
class="form-input"
|
|
20
20
|
type="text"
|
|
21
21
|
:placeholder="$t('Your name')"
|
|
22
|
+
:class="{ 'border border-danger': name.length < 2 }"
|
|
22
23
|
>
|
|
23
24
|
<div
|
|
24
25
|
v-if="sendError"
|
|
@@ -38,33 +39,20 @@
|
|
|
38
39
|
</template>
|
|
39
40
|
</div>
|
|
40
41
|
<div class="modal-footer">
|
|
41
|
-
<
|
|
42
|
-
|
|
42
|
+
<button
|
|
43
|
+
class="btn m-1"
|
|
44
|
+
@click="closePopup"
|
|
43
45
|
>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class="btn btn-primary m-1"
|
|
52
|
-
:disabled="name.length <= 2"
|
|
53
|
-
@click="recaptcha"
|
|
54
|
-
>
|
|
55
|
-
{{ $t('Validate') }}
|
|
56
|
-
</button>
|
|
57
|
-
</template>
|
|
58
|
-
<template
|
|
59
|
-
v-else
|
|
46
|
+
{{ $t('Close') }}
|
|
47
|
+
</button>
|
|
48
|
+
<button
|
|
49
|
+
v-if="!sending"
|
|
50
|
+
class="btn btn-primary m-1"
|
|
51
|
+
:disabled="name.length <= 2"
|
|
52
|
+
@click="validateName"
|
|
60
53
|
>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
@click="closePopup"
|
|
64
|
-
>
|
|
65
|
-
{{ $t('Close') }}
|
|
66
|
-
</button>
|
|
67
|
-
</template>
|
|
54
|
+
{{ $t('Validate') }}
|
|
55
|
+
</button>
|
|
68
56
|
</div>
|
|
69
57
|
</div>
|
|
70
58
|
</div>
|
|
@@ -92,38 +80,38 @@ export default defineComponent({
|
|
|
92
80
|
},
|
|
93
81
|
|
|
94
82
|
computed: {
|
|
95
|
-
authenticated(): boolean {
|
|
96
|
-
return (state.generalParameters.authenticated as boolean);
|
|
97
|
-
},
|
|
98
83
|
isCaptchaTest(): boolean {
|
|
99
84
|
return (state.generalParameters.isCaptchaTest as boolean);
|
|
100
85
|
},
|
|
101
86
|
},
|
|
102
87
|
|
|
103
88
|
mounted() {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
(captcha as HTMLElement).style.display = 'block';
|
|
107
|
-
}
|
|
108
|
-
if (this.authenticated) {
|
|
109
|
-
this.name = (
|
|
110
|
-
(this.$store.state.profile.firstname || '') +
|
|
111
|
-
' ' +
|
|
112
|
-
(this.$store.state.profile.lastname || '')
|
|
113
|
-
).trim();
|
|
114
|
-
this.needVerify = false;
|
|
115
|
-
}
|
|
89
|
+
this.displayCaptcha('block');
|
|
90
|
+
this.initAuthenticatedName();
|
|
116
91
|
},
|
|
117
92
|
|
|
118
93
|
unmounted() {
|
|
119
|
-
|
|
120
|
-
if (captcha) {
|
|
121
|
-
(captcha as HTMLElement).style.display = 'none';
|
|
122
|
-
}
|
|
94
|
+
this.displayCaptcha('none');
|
|
123
95
|
},
|
|
124
96
|
|
|
125
97
|
methods: {
|
|
126
|
-
|
|
98
|
+
initAuthenticatedName():void{
|
|
99
|
+
if (state.generalParameters.authenticated) {
|
|
100
|
+
this.name = (
|
|
101
|
+
(this.$store.state.profile.firstname || '') +
|
|
102
|
+
' ' +
|
|
103
|
+
(this.$store.state.profile.lastname || '')
|
|
104
|
+
).trim();
|
|
105
|
+
this.needVerify = false;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
displayCaptcha(displayStyle: string): void{
|
|
109
|
+
const captcha = document.getElementsByClassName('grecaptcha-badge')[0];
|
|
110
|
+
if (captcha) {
|
|
111
|
+
(captcha as HTMLElement).style.display = displayStyle;
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
async validateName(): Promise<void> {
|
|
127
115
|
if (!this.needVerify || this.isCaptchaTest) {
|
|
128
116
|
this.sendComment();
|
|
129
117
|
return;
|
|
@@ -145,8 +133,7 @@ export default defineComponent({
|
|
|
145
133
|
}
|
|
146
134
|
this.sendComment();
|
|
147
135
|
},
|
|
148
|
-
closePopup(
|
|
149
|
-
event.preventDefault();
|
|
136
|
+
closePopup(): void {
|
|
150
137
|
this.$emit('close');
|
|
151
138
|
},
|
|
152
139
|
sendComment(): void {
|
|
@@ -155,6 +142,4 @@ export default defineComponent({
|
|
|
155
142
|
},
|
|
156
143
|
},
|
|
157
144
|
})
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<style lang="scss"></style>
|
|
145
|
+
</script>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="d-flex small-text">
|
|
4
|
+
<b
|
|
5
|
+
v-if="recordingInLive && ('Live' === comment.phase || 'Prelive' === comment.phase)"
|
|
6
|
+
class="recording-bg me-1 text-light p-1"
|
|
7
|
+
>{{ $t('Live') }}</b>
|
|
8
|
+
<b
|
|
9
|
+
:id="'popover-comment' + comment.comId"
|
|
10
|
+
tabindex="-1"
|
|
11
|
+
:class="editRight || isValid? '':'text-danger'"
|
|
12
|
+
class="me-2"
|
|
13
|
+
>{{
|
|
14
|
+
comment.name
|
|
15
|
+
}}</b>
|
|
16
|
+
<Popover
|
|
17
|
+
v-if="!editRight && !isValid"
|
|
18
|
+
:target="'popover-comment' + comment.comId"
|
|
19
|
+
>
|
|
20
|
+
{{ $t('Comment waiting') }}
|
|
21
|
+
</Popover>
|
|
22
|
+
<img
|
|
23
|
+
v-if="comment.certified"
|
|
24
|
+
class="icon-certified"
|
|
25
|
+
src="/img/certified.png"
|
|
26
|
+
:data-selenium="'certified-icon-' + seleniumFormat(comment.name)"
|
|
27
|
+
:title="$t('Certified account')"
|
|
28
|
+
>
|
|
29
|
+
<div class="me-2">
|
|
30
|
+
{{ date }}
|
|
31
|
+
</div>
|
|
32
|
+
<span
|
|
33
|
+
v-if="editRight"
|
|
34
|
+
:class="'status-' + comment.status"
|
|
35
|
+
:data-selenium="'status-comment-' + seleniumFormat(comment.name)"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<!-- eslint-disable vue/no-v-html -->
|
|
39
|
+
<div v-html="urlify(contentDisplay)" />
|
|
40
|
+
<!-- eslint-enable -->
|
|
41
|
+
<a
|
|
42
|
+
v-if="comment.content.length > 300"
|
|
43
|
+
class="c-hand font-italic"
|
|
44
|
+
@click="summary = !summary"
|
|
45
|
+
>{{ readMore }}</a>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script lang="ts">
|
|
50
|
+
import { displayMethods, selenium } from '../../mixins/functions';
|
|
51
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
52
|
+
import moment from 'moment';
|
|
53
|
+
import Popover from '../../misc/Popover.vue';
|
|
54
|
+
import { defineComponent } from 'vue';
|
|
55
|
+
export default defineComponent({
|
|
56
|
+
name: 'CommentBasicView',
|
|
57
|
+
|
|
58
|
+
components: {
|
|
59
|
+
Popover
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
mixins:[displayMethods, selenium],
|
|
63
|
+
|
|
64
|
+
props: {
|
|
65
|
+
comment: { default: ()=>({}), type: Object as ()=>CommentPodcast },
|
|
66
|
+
editRight: { default: false, type: Boolean},
|
|
67
|
+
recordingInLive: { default: false, type: Boolean},
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
summary: true as boolean,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
isValid(): boolean{
|
|
77
|
+
return 'Valid'=== this.comment.status;
|
|
78
|
+
},
|
|
79
|
+
date(): string {
|
|
80
|
+
if (this.comment.date)
|
|
81
|
+
return moment(this.comment.date).format('D MMMM YYYY HH[h]mm');
|
|
82
|
+
return '';
|
|
83
|
+
},
|
|
84
|
+
readMore(): string {
|
|
85
|
+
if (this.summary) return this.$t('Read more').toString();
|
|
86
|
+
return this.$t('Read less').toString();
|
|
87
|
+
},
|
|
88
|
+
contentDisplay(): string {
|
|
89
|
+
if (!this.summary){return this.comment.content;}
|
|
90
|
+
if (!this.comment.content) return '';
|
|
91
|
+
if (this.comment.content.length <= 300) return this.comment.content;
|
|
92
|
+
return this.comment.content.substring(0, 300) + '...';
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
</script>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@click="changeIdentity"
|
|
10
10
|
>{{ knownIdentity }}</b>
|
|
11
11
|
<div
|
|
12
|
-
v-if="
|
|
12
|
+
v-if="editName"
|
|
13
13
|
class="d-flex"
|
|
14
14
|
>
|
|
15
15
|
<input
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
:class="{ 'border border-danger': temporaryName.length < 2 }"
|
|
20
20
|
>
|
|
21
21
|
<button
|
|
22
|
-
class="btn
|
|
22
|
+
class="btn"
|
|
23
23
|
@click="editName = false"
|
|
24
24
|
>
|
|
25
25
|
{{ $t('Cancel') }}
|
|
26
26
|
</button>
|
|
27
27
|
<button
|
|
28
|
-
class="btn btn-primary
|
|
28
|
+
class="btn btn-primary"
|
|
29
29
|
:disabled="temporaryName.length < 2"
|
|
30
30
|
@click="validEdit"
|
|
31
31
|
>
|
|
@@ -142,28 +142,23 @@ export default defineComponent({
|
|
|
142
142
|
if (this.comment && this.comment.comId) return this.$t('Answer a comment').toString();
|
|
143
143
|
return this.$t('Write a comment').toString();
|
|
144
144
|
},
|
|
145
|
-
organisationId(): string|undefined {
|
|
146
|
-
return state.generalParameters.organisationId;
|
|
147
|
-
},
|
|
148
|
-
authenticated(): boolean {
|
|
149
|
-
return (state.generalParameters.authenticated as boolean);
|
|
150
|
-
},
|
|
151
145
|
isCertified(): boolean {
|
|
152
146
|
if (
|
|
153
147
|
(state.generalParameters.isCommments &&
|
|
154
|
-
|
|
148
|
+
state.generalParameters.organisationId === this.podcastOrga) ||
|
|
155
149
|
state.generalParameters.isAdmin
|
|
156
|
-
)
|
|
150
|
+
){
|
|
157
151
|
return true;
|
|
152
|
+
}
|
|
158
153
|
return false;
|
|
159
154
|
},
|
|
160
155
|
userId(): string|undefined {
|
|
161
|
-
if (
|
|
156
|
+
if (state.generalParameters.authenticated) return this.$store.state.profile.userId;
|
|
162
157
|
return undefined;
|
|
163
158
|
},
|
|
164
159
|
phase(): string|undefined {
|
|
165
160
|
if(undefined === this.podcast){
|
|
166
|
-
return this.comment ? this.comment.phase :
|
|
161
|
+
return this.comment ? this.comment.phase : undefined;
|
|
167
162
|
}
|
|
168
163
|
if (
|
|
169
164
|
!this.podcast.conferenceId ||
|
|
@@ -233,11 +228,7 @@ export default defineComponent({
|
|
|
233
228
|
cancelAction(): void {
|
|
234
229
|
this.$emit('cancelAction');
|
|
235
230
|
},
|
|
236
|
-
|
|
237
|
-
if (name) {
|
|
238
|
-
this.setCookie('comment-octopus-name', name);
|
|
239
|
-
this.$emit('update:knownIdentity', name);
|
|
240
|
-
}
|
|
231
|
+
defineTimelineValue(): number{
|
|
241
232
|
let timeline = 0;
|
|
242
233
|
if (
|
|
243
234
|
undefined !== this.podcast &&(
|
|
@@ -261,16 +252,20 @@ export default defineComponent({
|
|
|
261
252
|
timeline = 0;
|
|
262
253
|
}
|
|
263
254
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
255
|
+
return timeline;
|
|
256
|
+
},
|
|
257
|
+
async postComment(name?: string): Promise<void> {
|
|
258
|
+
if (name) {
|
|
259
|
+
this.setCookie('comment-octopus-name', name);
|
|
260
|
+
this.$emit('update:knownIdentity', name);
|
|
267
261
|
}
|
|
262
|
+
const sendName = name ? name: this.knownIdentity;
|
|
268
263
|
const commentPodcastId = this.comment ? this.comment.podcastId : 0;
|
|
269
264
|
const comment: CommentPodcast = {
|
|
270
265
|
content: this.newComment,
|
|
271
266
|
name: sendName ? sendName : '',
|
|
272
267
|
podcastId: this.podcast ? this.podcast.podcastId : commentPodcastId,
|
|
273
|
-
timeline:
|
|
268
|
+
timeline: this.defineTimelineValue(),
|
|
274
269
|
organisationId: this.podcastOrga,
|
|
275
270
|
commentIdReferer: this.comment ? this.comment.comId : undefined,
|
|
276
271
|
certified: this.isCertified,
|
|
@@ -287,11 +282,10 @@ export default defineComponent({
|
|
|
287
282
|
}
|
|
288
283
|
this.$emit('newComment', data);
|
|
289
284
|
this.newComment = '';
|
|
290
|
-
this.checkIdentityModal = false;
|
|
291
285
|
} catch (error) {
|
|
292
|
-
this.checkIdentityModal = false;
|
|
293
286
|
this.postError = true;
|
|
294
287
|
}
|
|
288
|
+
this.checkIdentityModal = false;
|
|
295
289
|
},
|
|
296
290
|
},
|
|
297
291
|
})
|
|
@@ -315,10 +309,10 @@ export default defineComponent({
|
|
|
315
309
|
overflow: hidden !important;
|
|
316
310
|
box-shadow: unset !important;
|
|
317
311
|
background: transparent !important;
|
|
318
|
-
height:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
312
|
+
height: 50px;
|
|
313
|
+
&.short{
|
|
314
|
+
max-height: 38px;
|
|
315
|
+
}
|
|
322
316
|
}
|
|
323
317
|
}
|
|
324
318
|
</style>
|