@saooti/octopus-sdk 30.0.19 → 30.0.23

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.
Files changed (63) hide show
  1. package/README.md +5 -1
  2. package/package.json +2 -2
  3. package/src/assets/bootstrap-diff.scss +30 -84
  4. package/src/assets/form.scss +6 -3
  5. package/src/assets/general.scss +14 -3
  6. package/src/assets/share.scss +17 -43
  7. package/src/components/display/aggregator/RssSection.vue +1 -3
  8. package/src/components/display/categories/CategoryChooser.vue +1 -3
  9. package/src/components/display/categories/CategoryFilter.vue +5 -4
  10. package/src/components/display/categories/CategoryList.vue +4 -15
  11. package/src/components/display/comments/AddCommentModal.vue +35 -50
  12. package/src/components/display/comments/CommentBasicView.vue +96 -0
  13. package/src/components/display/comments/CommentInput.vue +22 -28
  14. package/src/components/display/comments/CommentItem.vue +56 -148
  15. package/src/components/display/comments/CommentList.vue +56 -112
  16. package/src/components/display/comments/CommentParentInfo.vue +17 -57
  17. package/src/components/display/comments/CommentPlayer.vue +2 -7
  18. package/src/components/display/comments/CommentSection.vue +9 -24
  19. package/src/components/display/edit/EditBox.vue +0 -2
  20. package/src/components/display/edit/EditCommentBox.vue +123 -23
  21. package/src/components/display/emission/EmissionChooser.vue +1 -3
  22. package/src/components/display/emission/EmissionInlineList.vue +2 -2
  23. package/src/components/display/emission/EmissionItem.vue +1 -2
  24. package/src/components/display/emission/EmissionList.vue +5 -2
  25. package/src/components/display/filter/AdvancedSearch.vue +2 -2
  26. package/src/components/display/filter/CategoryFilter.vue +0 -2
  27. package/src/components/display/filter/MonetizableFilter.vue +1 -3
  28. package/src/components/display/filter/ProductorSearch.vue +2 -2
  29. package/src/components/display/filter/RubriqueChoice.vue +1 -3
  30. package/src/components/display/filter/RubriqueFilter.vue +1 -3
  31. package/src/components/display/live/CountDown.vue +1 -3
  32. package/src/components/display/live/LiveHorizontalList.vue +6 -5
  33. package/src/components/display/organisation/OrganisationChooser.vue +1 -3
  34. package/src/components/display/playlist/PlaylistItem.vue +2 -4
  35. package/src/components/display/playlist/PlaylistList.vue +6 -5
  36. package/src/components/display/playlist/PodcastList.vue +5 -2
  37. package/src/components/display/podcasts/ParticipantDescription.vue +1 -3
  38. package/src/components/display/podcasts/PodcastFilterList.vue +1 -3
  39. package/src/components/display/podcasts/PodcastImage.vue +1 -1
  40. package/src/components/display/podcasts/PodcastInlineList.vue +5 -7
  41. package/src/components/display/podcasts/PodcastList.vue +6 -5
  42. package/src/components/display/podcasts/PodcastModuleBox.vue +1 -3
  43. package/src/components/display/podcasts/TagList.vue +2 -1
  44. package/src/components/display/rubriques/RubriqueChooser.vue +1 -3
  45. package/src/components/display/rubriques/RubriqueList.vue +1 -1
  46. package/src/components/display/sharing/QrCode.vue +1 -3
  47. package/src/components/display/sharing/ShareDistribution.vue +1 -6
  48. package/src/components/display/sharing/SharePlayer.vue +1 -1
  49. package/src/components/display/sharing/SubscribeButtons.vue +3 -5
  50. package/src/components/display/studio/RecordingItemButton.vue +1 -3
  51. package/src/components/form/ClassicSearch.vue +21 -19
  52. package/src/components/misc/HomeDropdown.vue +74 -115
  53. package/src/components/misc/PlayerButtons.vue +1 -4
  54. package/src/components/misc/TopBar.vue +2 -2
  55. package/src/components/misc/modal/MessageModal.vue +2 -4
  56. package/src/components/misc/modal/QrCodeModal.vue +1 -3
  57. package/src/components/pages/Emission.vue +2 -6
  58. package/src/components/pages/Rubrique.vue +1 -3
  59. package/src/locale/en.ts +2 -0
  60. package/src/locale/fr.ts +2 -0
  61. package/src/sass/_variables.scss +10 -7
  62. package/src/store/AppStore.ts +0 -3
  63. package/src/store/typeAppStore.ts +0 -1
package/README.md CHANGED
@@ -516,4 +516,8 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
516
516
  * 30.0.16 Change Aria-Label in title
517
517
  * 30.0.17 Oups
518
518
  * 30.0.18 Responsive select
519
- * 30.0.19 Mise à jour Api
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é
523
+ * 30.0.23 Css + Accessibilité
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "30.0.19",
3
+ "version": "30.0.23",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -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.62.1"
42
+ "webpack": "^5.66.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/bootstrap": "^5.1.8",
@@ -10,7 +10,7 @@
10
10
  .btn{
11
11
  font-size:.7rem;
12
12
  border-radius: 50px;
13
- background: $octopus-light-secondary-color;
13
+ background: $octopus-secondary-color;
14
14
  transition: background .2s, border .2s, box-shadow .2s, color .2s;
15
15
  text-decoration: none !important;
16
16
  white-space: nowrap;
@@ -30,56 +30,33 @@
30
30
  // Button Primary
31
31
  &.btn-primary {
32
32
  background: $octopus-third-color;
33
- background: -moz-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
34
- background: -webkit-gradient(left top, right bottom, color-stop(0%, $octopus-third-color), color-stop(100%, $octopus-primary-color));
35
- background: -webkit-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
36
- background: -o-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
37
- background: -ms-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
38
- background: linear-gradient(135deg, $octopus-third-color 0%, $octopus-primary-color 100%);
33
+ background: -moz-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-linear-background 100%);
34
+ background: -webkit-gradient(left top, right bottom, color-stop(0%, $octopus-third-color), color-stop(100%, $octopus-primary-linear-background));
35
+ background: -webkit-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-linear-background 100%);
36
+ background: -o-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-linear-background 100%);
37
+ background: -ms-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-linear-background 100%);
38
+ background: linear-gradient(135deg, $octopus-third-color 0%, $octopus-primary-linear-background 100%);
39
39
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d6d91f', endColorstr='#50b685', GradientType=1 );
40
40
  border-radius: 50px;
41
41
  height: auto;
42
42
  border: 0;
43
- color: white !important;
43
+ color: black !important;
44
44
  &:focus,
45
45
  &:hover {
46
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{
67
- &:focus,
68
- &:hover {
69
- background:$octopus-third-color;
70
- background: -moz-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
71
- background: -webkit-gradient(left top, right bottom, color-stop(0%, $octopus-third-color), color-stop(100%, $octopus-primary-color));
72
- background: -webkit-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
73
- background: -o-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
74
- background: -ms-linear-gradient(-45deg, $octopus-third-color 0%, $octopus-primary-color 100%);
75
- background: linear-gradient(135deg, $octopus-third-color 0%, $octopus-primary-color 100%);
76
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d6d91f', endColorstr='#4fcf91', GradientType=1 );
77
- border: 0;
47
+ background: -moz-linear-gradient(-45deg, darken($octopus-third-color,7%) 0%, darken($octopus-primary-linear-background, 7%) 100%);
48
+ background: -webkit-gradient(left top, right bottom, color-stop(0%, darken($octopus-third-color,7%)), color-stop(100%, darken($octopus-primary-linear-background, 7%)));
49
+ background: -webkit-linear-gradient(-45deg, darken($octopus-third-color,7%) 0%, darken($octopus-primary-linear-background, 7%) 100%);
50
+ background: -o-linear-gradient(-45deg, darken($octopus-third-color,7%) 0%, darken($octopus-primary-linear-background, 7%) 100%);
51
+ background: -ms-linear-gradient(-45deg, darken($octopus-third-color,7%) 0%, darken($octopus-primary-linear-background, 7%) 100%);
52
+ background: linear-gradient(135deg, darken($octopus-third-color,7%) 0%, darken($octopus-primary-linear-background, 7%) 100%);
53
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d6d91f', endColorstr='#4fcf91', GradientType=1 );
54
+ border: 0;
78
55
  }
79
56
  &:active,
80
57
  &.active {
81
- background: darken($octopus-primary-color, 4%);
82
- border-color: darken($octopus-primary-color, 7%);
58
+ background: darken($octopus-primary-linear-background, 4%);
59
+ border-color: darken($octopus-primary-linear-background, 7%);
83
60
  }
84
61
  }
85
62
  //Button disable halo after click
@@ -98,8 +75,12 @@
98
75
  }
99
76
 
100
77
  &.btn-link {
101
- background: $octopus-secondary-color;
102
- color: $octopus-primary-color;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ background: $octopus-primary-dark;
82
+ border: 2px solid $octopus-primary-dark;
83
+ color: white;
103
84
  font-weight: bold;
104
85
  margin: 2rem;
105
86
  width: fit-content;
@@ -108,39 +89,16 @@
108
89
  &:hover,
109
90
  &:active,
110
91
  &.active {
111
- background: darken($octopus-secondary-color, 5%);
112
- color: $octopus-primary-color;
92
+ background: transparent;
93
+ color: $octopus-primary-dark;
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
- background: $octopus-primary-color;
101
+ background: $octopus-primary-dark;
144
102
  color: $octopus-background;
145
103
  width: 2rem;
146
104
  height: 2rem;
@@ -163,8 +121,7 @@
163
121
  height: 5rem;
164
122
  }
165
123
 
166
- &.admin-button,
167
- &.btn-arrow {
124
+ &.admin-button{
168
125
  padding: 0.3rem;
169
126
  height: 1.8rem;
170
127
  width: 1.8rem;
@@ -173,13 +130,6 @@
173
130
  align-items: center;
174
131
  justify-content: center;
175
132
  }
176
- &.btn-arrow {
177
- margin: 0.2rem;
178
- background: $octopus-secondary-color;
179
- &:hover {
180
- background: $octopus-secondary-color;
181
- }
182
- }
183
133
 
184
134
  }
185
135
 
@@ -229,13 +179,9 @@
229
179
  }
230
180
  }
231
181
 
232
- .custom-control-label {
233
- //border: 1px solid #ddd;
234
- border-radius: 5px;
235
- }
236
182
  .dropdown-toggle-no-caret::after{
237
183
  display: none;
238
- }
184
+ }
239
185
  .dropdown-menu {
240
186
  padding: 0.5rem;
241
187
  }
@@ -1,6 +1,9 @@
1
1
  .octopus-app{
2
2
  .input-no-outline{
3
- outline-width: 0 !important;
3
+ outline-width: 0 !important;
4
+ }
5
+ :-moz-focusring {
6
+ outline: 0px solid black;
4
7
  }
5
8
  .width-auto{
6
9
  width: auto !important;
@@ -64,8 +67,8 @@
64
67
  border-bottom: 0.1rem solid transparent;
65
68
  }
66
69
  .active{
67
- border-bottom-color: $octopus-primary-color;
68
- color: $octopus-primary-color;
70
+ border-bottom-color: $octopus-primary-dark;
71
+ color: $octopus-primary-dark;
69
72
  }
70
73
  }
71
74
  }
@@ -8,7 +8,7 @@ body{
8
8
  font-family: Montserrat,sans-serif,Helvetica Neue;
9
9
  font-size: 0.8rem;
10
10
  overflow-x: hidden;
11
- background: #fff;
11
+ background: #ebebeb;
12
12
  min-height: 100%;
13
13
  overscroll-behavior-y: contain;
14
14
  }
@@ -73,6 +73,12 @@ body{
73
73
  .secondary-bg{
74
74
  background: $octopus-background;
75
75
  }
76
+ .light-primary-bg{
77
+ background-color: $primaryColorTransparent !important;
78
+ }
79
+ .really-light-primary-bg{
80
+ background-color: $primaryColorReallyTransparent !important;
81
+ }
76
82
  .width-fit-content{
77
83
  width: fit-content !important;
78
84
  }
@@ -93,7 +99,7 @@ body{
93
99
  }
94
100
 
95
101
  .module-box{
96
- background-color: $octopus-secondary-background;
102
+ background-color: white;
97
103
  padding: 1.3rem;
98
104
  margin: 0.5rem 0.5rem 0 0.5rem;
99
105
  border-radius: 1rem;
@@ -125,7 +131,7 @@ body{
125
131
  color: black !important;
126
132
  }
127
133
  a.link-hover.router-link-exact-active.router-link-active, a.link-hover:hover {
128
- color: $octopus-primary-color !important;
134
+ color: $octopus-primary-dark !important;
129
135
  }
130
136
  .descriptionText{
131
137
  white-space: pre-wrap;
@@ -158,6 +164,11 @@ body{
158
164
  display: none !important;
159
165
  }
160
166
  }
167
+ .hide-small-screen{
168
+ @media (max-width: 450px) {
169
+ display: none !important;
170
+ }
171
+ }
161
172
  .show-phone{
162
173
  display: none;
163
174
  @media (max-width: 960px) {
@@ -19,14 +19,6 @@
19
19
  background: #f3f3f3;
20
20
  }
21
21
  }
22
- .category-rubrique-item-plus {
23
- display: flex;
24
- height: 1.8rem;
25
- width: 1.8rem;
26
- align-items: center;
27
- justify-content: center;
28
- font-size: 0.5rem;
29
- }
30
22
  .icon-caution {
31
23
  margin-right: 5px;
32
24
  margin-bottom: 2px;
@@ -153,42 +145,24 @@
153
145
  font-size: 0.6rem;
154
146
  }
155
147
  }
156
- .comment-item-container {
157
- .btn-comment-edit {
158
- width: 32px;
159
- height: 32px;
160
- background: $octopus-secondary-color;
161
- padding: 0;
162
- display: flex;
163
- align-items: center;
164
- justify-content: center;
165
- color: $octopus-primary-color;
166
- margin-right: 0.25rem;
167
- }
168
- .status-Pending {
169
- background: #eb7d22;
170
- }
171
- .status-Invalid {
172
- background: #d40303;
173
- }
174
- .status-Valid {
175
- background: $octopus-primary-color;
176
- }
177
- .status-Valid, .status-Invalid, .status-Pending {
178
- width: 14px;
179
- height: 14px;
180
- border-radius: 50%;
181
- }
182
- .icon-certified {
183
- height: 15px;
184
- margin-right: 0.5rem;
185
- }
186
- .collapsed > .when-opened,
187
- :not(.collapsed) > .when-closed {
188
- display: none !important;
189
- }
148
+ .status-Pending {
149
+ background: #eb7d22;
150
+ }
151
+ .status-Invalid {
152
+ background: #d40303;
153
+ }
154
+ .status-Valid {
155
+ background: $octopus-primary-color;
156
+ }
157
+ .status-Valid, .status-Invalid, .status-Pending {
158
+ width: 14px;
159
+ height: 14px;
160
+ border-radius: 50%;
161
+ }
162
+ .icon-certified {
163
+ height: 15px;
164
+ margin-right: 0.5rem;
190
165
  }
191
-
192
166
 
193
167
  .saooti-stitcher-logo,
194
168
  .saooti-google-podcasts,
@@ -5,6 +5,4 @@
5
5
  <script lang="ts">
6
6
  import { defineComponent } from 'vue'
7
7
  export default defineComponent({})
8
- </script>
9
-
10
- <style lang="scss"></style>
8
+ </script>
@@ -255,6 +255,4 @@ export default defineComponent({
255
255
  },
256
256
  },
257
257
  })
258
- </script>
259
-
260
- <style lang="scss"></style>
258
+ </script>
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div v-if="isDisplay">
2
+ <div
3
+ v-if="isDisplay"
4
+ class="mt-3"
5
+ >
3
6
  <nav
4
7
  v-if="categoryFilter || rubriqueFilter.length"
5
8
  title="breadcrumb"
@@ -142,6 +145,4 @@ export default defineComponent({
142
145
  }
143
146
  }
144
147
  })
145
- </script>
146
-
147
- <style lang="scss"></style>
148
+ </script>
@@ -19,7 +19,7 @@
19
19
  class="dropdown btn-group"
20
20
  >
21
21
  <button
22
- class="btn dropdown-toggle category-rubrique-item-plus dropdown-toggle-no-caret saooti-plus"
22
+ class="btn dropdown-toggle admin-button dropdown-toggle-no-caret saooti-plus"
23
23
  data-bs-toggle="dropdown"
24
24
  aria-expanded="false"
25
25
  :title="$t('See more')"
@@ -163,6 +163,7 @@ export default defineComponent({
163
163
  })
164
164
  </script>
165
165
  <style lang="scss">
166
+ @import '../../../sass/_variables.scss';
166
167
  .category-list-container {
167
168
  display: inline-flex;
168
169
  justify-content: flex-start;
@@ -184,20 +185,8 @@ export default defineComponent({
184
185
  justify-content: center;
185
186
  white-space: nowrap;
186
187
  flex-shrink: 0;
187
- .router-link-active {
188
- background: #ddd !important;
188
+ .router-link-active,&:hover {
189
+ background: $octopus-secondary-color !important;
189
190
  }
190
- &:hover {
191
- background: #ddd !important;
192
- }
193
- }
194
-
195
- .category-list .category-item-plus {
196
- display: flex;
197
- height: 1.5rem;
198
- width: 1.5rem;
199
- align-items: center;
200
- justify-content: center;
201
- font-size: 0.5rem;
202
191
  }
203
192
  </style>
@@ -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
- <template
42
- v-if="!sending"
42
+ <button
43
+ class="btn m-1"
44
+ @click="closePopup"
43
45
  >
44
- <button
45
- class="btn btn-light m-1"
46
- @click="closePopup"
47
- >
48
- {{ $t('Cancel') }}
49
- </button>
50
- <button
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
- <button
62
- class="btn m-1"
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
- const captcha = document.getElementsByClassName('grecaptcha-badge')[0];
105
- if (captcha) {
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
- const captcha = document.getElementsByClassName('grecaptcha-badge')[0];
120
- if (captcha) {
121
- (captcha as HTMLElement).style.display = 'none';
122
- }
94
+ this.displayCaptcha('none');
123
95
  },
124
96
 
125
97
  methods: {
126
- async recaptcha(): Promise<void> {
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(event: { preventDefault: () => void }): void {
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>