@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.
Files changed (230) hide show
  1. package/README.md +73 -0
  2. package/index.d.ts +4 -0
  3. package/index.ts +12 -0
  4. package/package.json +61 -39
  5. package/public/css/fonts/saooti-ui.eot +0 -0
  6. package/public/css/fonts/saooti-ui.svg +30 -19
  7. package/public/css/fonts/saooti-ui.ttf +0 -0
  8. package/public/css/fonts/saooti-ui.woff +0 -0
  9. package/public/css/fonts/style.css +48 -5
  10. package/public/img/ACPM.png +0 -0
  11. package/public/img/article.png +0 -0
  12. package/src/App.vue +97 -31
  13. package/src/api/comments.ts +3 -1
  14. package/src/api/emissions.ts +5 -2
  15. package/src/api/initialize.ts +3 -2
  16. package/src/api/podcasts.ts +5 -2
  17. package/src/api/profile.ts +4 -2
  18. package/src/api/studio.ts +12 -1
  19. package/src/assets/bootstrap-diff.scss +265 -0
  20. package/src/assets/form.scss +23 -0
  21. package/src/assets/general.scss +47 -20
  22. package/src/assets/modal.scss +9 -10
  23. package/src/assets/multiselect.scss +19 -2
  24. package/src/assets/octopus-library.scss +16 -4
  25. package/src/assets/share.scss +343 -0
  26. package/src/components/display/aggregator/RssSection.vue +4 -4
  27. package/src/components/display/categories/CategoryChooser.vue +152 -105
  28. package/src/components/display/categories/CategoryFilter.vue +108 -0
  29. package/src/components/display/categories/CategoryList.vue +138 -109
  30. package/src/components/display/comments/AddCommentModal.vue +104 -87
  31. package/src/components/display/comments/CommentInput.vue +137 -118
  32. package/src/components/display/comments/CommentItem.vue +155 -137
  33. package/src/components/display/comments/CommentList.vue +142 -120
  34. package/src/components/display/comments/CommentParentInfo.vue +39 -35
  35. package/src/components/display/comments/CommentPlayer.vue +54 -48
  36. package/src/components/display/comments/CommentSection.vue +57 -58
  37. package/src/components/display/edit/EditBox.vue +4 -4
  38. package/src/components/display/edit/EditCommentBox.vue +25 -31
  39. package/src/components/display/emission/EmissionChooser.vue +82 -80
  40. package/src/components/display/emission/EmissionInlineList.vue +118 -105
  41. package/src/components/display/emission/EmissionItem.vue +66 -167
  42. package/src/components/display/emission/EmissionList.vue +96 -122
  43. package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
  44. package/src/components/display/filter/AdvancedSearch.vue +306 -372
  45. package/src/components/display/filter/CategoryFilter.vue +117 -0
  46. package/src/components/display/filter/MonetizableFilter.vue +24 -10
  47. package/src/components/display/filter/ProductorSearch.vue +131 -135
  48. package/src/components/display/filter/RubriqueChoice.vue +104 -0
  49. package/src/components/display/filter/RubriqueFilter.vue +235 -0
  50. package/src/components/display/live/CountDown.vue +30 -29
  51. package/src/components/display/live/LiveHorizontalList.vue +40 -34
  52. package/src/components/display/live/LiveItem.vue +146 -158
  53. package/src/components/display/live/LiveList.vue +167 -154
  54. package/src/components/display/organisation/OrganisationChooser.vue +125 -124
  55. package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
  56. package/src/components/display/participant/ParticipantItem.vue +92 -108
  57. package/src/components/display/participant/ParticipantList.vue +76 -69
  58. package/src/components/display/playlist/PlaylistItem.vue +45 -56
  59. package/src/components/display/playlist/PlaylistList.vue +57 -48
  60. package/src/components/display/playlist/PodcastList.vue +94 -70
  61. package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
  62. package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
  63. package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
  64. package/src/components/display/podcasts/PodcastImage.vue +244 -208
  65. package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
  66. package/src/components/display/podcasts/PodcastItem.vue +150 -132
  67. package/src/components/display/podcasts/PodcastList.vue +89 -110
  68. package/src/components/display/podcasts/TagList.vue +23 -16
  69. package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
  70. package/src/components/display/rubriques/RubriqueList.vue +227 -0
  71. package/src/components/display/sharing/PlayerParameters.vue +154 -106
  72. package/src/components/display/sharing/QrCode.vue +58 -0
  73. package/src/components/display/sharing/ShareButtons.vue +214 -92
  74. package/src/components/display/sharing/ShareDistribution.vue +110 -121
  75. package/src/components/display/sharing/SharePlayer.vue +245 -190
  76. package/src/components/display/sharing/SubscribeButtons.vue +130 -66
  77. package/src/components/display/studio/RecordingItemButton.vue +4 -4
  78. package/src/components/misc/ErrorMessage.vue +21 -16
  79. package/src/components/misc/Footer.vue +131 -66
  80. package/src/components/misc/HomeDropdown.vue +166 -123
  81. package/src/components/misc/LeftMenu.vue +151 -134
  82. package/src/components/misc/Player.vue +332 -328
  83. package/src/components/misc/Snackbar.vue +27 -29
  84. package/src/components/misc/TopBar.vue +204 -174
  85. package/src/components/misc/modal/ClipboardModal.vue +46 -26
  86. package/src/components/misc/modal/MessageModal.vue +67 -51
  87. package/src/components/misc/modal/NewsletterModal.vue +179 -136
  88. package/src/components/misc/modal/QrCodeModal.vue +83 -0
  89. package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
  90. package/src/components/mixins/functions.ts +21 -18
  91. package/src/components/mixins/init.ts +24 -0
  92. package/src/components/mixins/organisationFilter.ts +24 -0
  93. package/src/components/pages/Category.vue +26 -26
  94. package/src/components/pages/Emission.vue +120 -92
  95. package/src/components/pages/Emissions.vue +109 -86
  96. package/src/components/pages/Home.vue +70 -16
  97. package/src/components/pages/Lives.vue +57 -47
  98. package/src/components/pages/Participant.vue +93 -77
  99. package/src/components/pages/Participants.vue +44 -31
  100. package/src/components/pages/Playlist.vue +63 -52
  101. package/src/components/pages/Playlists.vue +41 -39
  102. package/src/components/pages/Podcast.vue +265 -251
  103. package/src/components/pages/Podcasts.vue +135 -104
  104. package/src/components/pages/Rubrique.vue +25 -19
  105. package/src/components/pages/Search.vue +71 -67
  106. package/src/helper/dom.ts +2 -2
  107. package/src/helper/duration.ts +18 -8
  108. package/src/locale/educationen.ts +14 -0
  109. package/src/locale/en.ts +299 -1
  110. package/src/locale/fr.ts +25 -10
  111. package/src/locale/messages.ts +3 -2
  112. package/src/main.ts +54 -32
  113. package/src/router/router.ts +184 -159
  114. package/src/shims-tsx.d.ts +13 -0
  115. package/src/shims-vue-recaptcha-v3.d.ts +9 -0
  116. package/src/shims-vue.d.ts +5 -6
  117. package/src/store/AppStore.ts +36 -171
  118. package/src/store/class/category.ts +8 -0
  119. package/src/store/class/comment.ts +17 -0
  120. package/src/store/class/conference.ts +27 -0
  121. package/src/store/class/customPlayer.ts +8 -0
  122. package/src/store/class/emission.ts +20 -0
  123. package/src/store/class/fetchParam.ts +16 -0
  124. package/src/store/class/media.ts +13 -0
  125. package/src/store/class/organisation.ts +19 -0
  126. package/src/store/class/participant.ts +12 -0
  127. package/src/store/class/person.ts +13 -0
  128. package/src/store/class/player.ts +12 -0
  129. package/src/store/class/playlist.ts +15 -0
  130. package/src/store/class/podcast.ts +37 -0
  131. package/src/store/class/rubriquage.ts +9 -0
  132. package/src/store/class/rubriquageFilter.ts +5 -0
  133. package/src/store/class/rubrique.ts +8 -0
  134. package/src/store/paramStore.ts +70 -29
  135. package/src/store/typeAppStore.ts +171 -237
  136. package/src/vuex-shim.d.ts +8 -0
  137. package/tsconfig.json +4 -0
  138. package/vue.config.js +14 -0
  139. package/public/img/ACPM.PNG +0 -0
  140. package/src/assets/bootstrap_scss/_alert.scss +0 -51
  141. package/src/assets/bootstrap_scss/_badge.scss +0 -54
  142. package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
  143. package/src/assets/bootstrap_scss/_button-group.scss +0 -164
  144. package/src/assets/bootstrap_scss/_buttons.scss +0 -291
  145. package/src/assets/bootstrap_scss/_card.scss +0 -278
  146. package/src/assets/bootstrap_scss/_carousel.scss +0 -197
  147. package/src/assets/bootstrap_scss/_close.scss +0 -41
  148. package/src/assets/bootstrap_scss/_code.scss +0 -48
  149. package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
  150. package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
  151. package/src/assets/bootstrap_scss/_forms.scss +0 -352
  152. package/src/assets/bootstrap_scss/_functions.scss +0 -134
  153. package/src/assets/bootstrap_scss/_grid.scss +0 -69
  154. package/src/assets/bootstrap_scss/_images.scss +0 -42
  155. package/src/assets/bootstrap_scss/_input-group.scss +0 -191
  156. package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
  157. package/src/assets/bootstrap_scss/_list-group.scss +0 -158
  158. package/src/assets/bootstrap_scss/_media.scss +0 -8
  159. package/src/assets/bootstrap_scss/_mixins.scss +0 -47
  160. package/src/assets/bootstrap_scss/_modal.scss +0 -243
  161. package/src/assets/bootstrap_scss/_nav.scss +0 -120
  162. package/src/assets/bootstrap_scss/_navbar.scss +0 -324
  163. package/src/assets/bootstrap_scss/_pagination.scss +0 -74
  164. package/src/assets/bootstrap_scss/_popover.scss +0 -170
  165. package/src/assets/bootstrap_scss/_print.scss +0 -141
  166. package/src/assets/bootstrap_scss/_progress.scss +0 -46
  167. package/src/assets/bootstrap_scss/_reboot.scss +0 -482
  168. package/src/assets/bootstrap_scss/_root.scss +0 -20
  169. package/src/assets/bootstrap_scss/_spinners.scss +0 -55
  170. package/src/assets/bootstrap_scss/_tables.scss +0 -185
  171. package/src/assets/bootstrap_scss/_toasts.scss +0 -44
  172. package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
  173. package/src/assets/bootstrap_scss/_transitions.scss +0 -20
  174. package/src/assets/bootstrap_scss/_type.scss +0 -125
  175. package/src/assets/bootstrap_scss/_utilities.scss +0 -17
  176. package/src/assets/bootstrap_scss/_variables.scss +0 -1145
  177. package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
  178. package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
  179. package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
  180. package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
  181. package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
  182. package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
  183. package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
  184. package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
  185. package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
  186. package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
  187. package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
  188. package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
  189. package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
  190. package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
  191. package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
  192. package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
  193. package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
  194. package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
  195. package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
  196. package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
  197. package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
  198. package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
  199. package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
  200. package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
  201. package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
  202. package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
  203. package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
  204. package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
  205. package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
  206. package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
  207. package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
  208. package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
  209. package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
  210. package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
  211. package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
  212. package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
  213. package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
  214. package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
  215. package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
  216. package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
  217. package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
  218. package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
  219. package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
  220. package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
  221. package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
  222. package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
  223. package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
  224. package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
  225. package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
  226. package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
  227. package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
  228. package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
  229. package/src/shims-vuex.d.ts +0 -7
  230. package/src/views/Home.vue +0 -18
@@ -9,10 +9,10 @@
9
9
  :data-count="podcast.downloadCount"
10
10
  >
11
11
  <PodcastImage
12
- v-bind:podcast="podcast"
13
- :hidePlay="!hover || !description"
14
- :displayDescription="description"
15
- :arrowDirection="arrowDirection"
12
+ :podcast="podcast"
13
+ :hide-play="!hover || !description"
14
+ :display-description="description"
15
+ :arrow-direction="arrowDirection"
16
16
  @hideDescription="hideDescription"
17
17
  @showDescription="showDescription"
18
18
  />
@@ -20,14 +20,14 @@
20
20
  :id="'description-podcast-container-' + podcast.podcastId"
21
21
  class="description-podcast-item html-wysiwyg-content"
22
22
  :class="[
23
- hover && description ? 'visible' : 'invisible',
23
+ hover && ''!==description ? 'visible' : 'invisible',
24
24
  isDescriptionBig ? 'after-podcast-description' : '',
25
25
  ]"
26
26
  >
27
27
  <div
28
28
  :id="'description-podcast-' + podcast.podcastId"
29
29
  v-html="description"
30
- ></div>
30
+ />
31
31
  </div>
32
32
  <div
33
33
  class="d-contents"
@@ -35,21 +35,28 @@
35
35
  @mouseleave="hideDescription"
36
36
  >
37
37
  <div class="d-flex justify-content-between flex-wrap text-secondary mb-3">
38
- <div class="mr-3 small-Text">{{ date }}</div>
39
- <div class="small-Text" v-if="0 !== duration.length">
38
+ <div class="me-3 small-Text">
39
+ {{ date }}
40
+ </div>
41
+ <div
42
+ v-if="0 !== duration.length"
43
+ class="small-Text"
44
+ >
40
45
  <!-- <span class="saooti-clock3"></span> -->{{ duration }}
41
46
  </div>
42
47
  </div>
43
- <AnimatorsItem v-bind:animators="podcast.animators" />
48
+ <AnimatorsItem :animators="podcast.animators" />
44
49
  <router-link
45
50
  :to="{
46
51
  name: 'podcast',
47
52
  params: { podcastId: podcast.podcastId },
48
- query: { productor: this.$store.state.filter.organisationId },
53
+ query: { productor: $store.state.filter.organisationId },
49
54
  }"
50
55
  class="text-dark d-flex flex-column flex-grow"
51
56
  >
52
- <div class="title-podcast-item">{{ title }}</div>
57
+ <div class="title-podcast-item">
58
+ {{ title }}
59
+ </div>
53
60
  </router-link>
54
61
  <div class="d-flex justify-content-between">
55
62
  <router-link
@@ -57,89 +64,21 @@
57
64
  :to="{
58
65
  name: 'productor',
59
66
  params: { productorId: podcast.organisation.id },
60
- query: { productor: this.$store.state.filter.organisationId },
67
+ query: { productor: $store.state.filter.organisationId },
61
68
  }"
62
69
  class="text-dark producer-podcast-item"
63
70
  >
64
71
  <div>{{ '© ' + podcast.organisation.name }}</div>
65
72
  </router-link>
66
73
  <span
67
- class="saooti-star-bounty text-danger pr-2"
68
74
  v-if="editRight && podcast.order && podcast.order > 1"
69
- ></span>
75
+ class="saooti-star-bounty text-danger pe-2"
76
+ />
70
77
  </div>
71
78
  </div>
72
79
  </li>
73
80
  </template>
74
81
 
75
- <style lang="scss">
76
- .podcast-item-container {
77
- border-radius: 0.8rem;
78
- list-style: none;
79
- position: relative;
80
- width: 13rem;
81
- overflow: hidden;
82
- display: flex;
83
- flex-direction: column;
84
- text-align: left;
85
- background: #fff;
86
- flex-shrink: 0;
87
- .text-secondary {
88
- margin: 0.5rem !important;
89
- }
90
- .saooti-star-bounty {
91
- font-size: 22px;
92
- }
93
-
94
- .title-podcast-item {
95
- font-weight: 700;
96
- margin: 0.25rem 0.5rem 0.5rem;
97
- overflow: hidden;
98
- display: -webkit-box;
99
- flex-grow: 1;
100
- font-size: 0.7rem;
101
- -webkit-line-clamp: 3;
102
- -webkit-box-orient: vertical;
103
- min-height: 3rem;
104
- line-height: 1rem;
105
- word-break: break-word;
106
- }
107
- .description-podcast-item {
108
- padding: 1rem;
109
- color: #333;
110
- background-color: rgba(255, 255, 255, 0.92);
111
- height: 13rem;
112
- overflow: hidden;
113
- text-overflow: ellipsis;
114
- font-size: 0.9em;
115
- position: absolute;
116
- width: 13rem;
117
- word-break: break-word;
118
- &.after-podcast-description:after {
119
- content: '...';
120
- position: absolute;
121
- padding-left: 1rem;
122
- right: 0;
123
- bottom: 0;
124
- width: 100%;
125
- font-size: 1rem;
126
- font-weight: bolder;
127
- text-align: center;
128
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
129
- }
130
- }
131
- .producer-podcast-item {
132
- margin: 0.2rem 0.5rem 0.5rem;
133
- font-size: 0.55rem;
134
- color: #666;
135
- }
136
-
137
- @media (max-width: 960px) {
138
- margin: 0.5rem !important;
139
- }
140
- }
141
- </style>
142
-
143
82
  <script lang="ts">
144
83
  import AnimatorsItem from './AnimatorsItem.vue';
145
84
  import PodcastImage from './PodcastImage.vue';
@@ -147,85 +86,73 @@ import { state } from '../../../store/paramStore';
147
86
  const moment = require('moment');
148
87
  const humanizeDuration = require('humanize-duration');
149
88
 
89
+ import { Podcast } from '@/store/class/podcast';
90
+ import { Category } from '@/store/class/category';
150
91
  import { defineComponent } from 'vue'
151
92
  export default defineComponent({
152
93
  name: 'PodcastItem',
153
-
154
- props: ['podcast'],
155
-
94
+
156
95
  components: {
157
96
  AnimatorsItem,
158
97
  PodcastImage,
159
98
  },
160
99
 
161
- mounted() {
162
- let podcastDesc = document.getElementById(
163
- 'description-podcast-' + this.podcast.podcastId
164
- );
165
- let podcastDescContainer:any = document.getElementById(
166
- 'description-podcast-container-' + this.podcast.podcastId
167
- );
168
- if (
169
- null !== podcastDesc &&
170
- podcastDesc.clientHeight > podcastDescContainer.clientHeight
171
- ) {
172
- this.isDescriptionBig = true;
173
- }
100
+ props: {
101
+ podcast: { default: ()=>({}), type: Object as ()=> Podcast},
174
102
  },
175
103
 
176
104
  data() {
177
105
  return {
178
- hover: false,
179
- arrowDirection: 'up',
180
- isDescriptionBig: false,
106
+ hover: false as boolean,
107
+ arrowDirection: 'up' as string,
108
+ isDescriptionBig: false as boolean,
181
109
  };
182
110
  },
183
-
111
+
184
112
  computed: {
185
- isPodcastmaker() {
113
+ isPodcastmaker(): boolean {
186
114
  return state.generalParameters.podcastmaker;
187
115
  },
188
- podcastShadow() {
116
+ podcastShadow(): boolean {
189
117
  return state.podcastsPage.podcastShadow;
190
118
  },
191
- podcastBorderBottom() {
119
+ podcastBorderBottom(): boolean {
192
120
  return state.podcastsPage.podcastBorderBottom;
193
121
  },
194
- date():string {
195
- return moment(this.podcast.pubDate).format('D/MM/YYYY [à] HH[h]mm');
122
+ date(): string {
123
+ if('fr' === this.$i18n.locale){
124
+ return moment(this.podcast.pubDate).format('D MMMM YYYY [à] HH[h]mm');
125
+ }
126
+ return moment(this.podcast.pubDate).format('D MMMM YYYY [at] HH[h]mm');
196
127
  },
197
- displayDate():string {
128
+ displayDate(): string {
198
129
  return moment(this.podcast.pubDate).format('X');
199
130
  },
200
- category() {
131
+ category(): string {
201
132
  const catIds = this.podcast.emission.iabIds;
202
- return state.generalParameters.allCategories
203
- .filter((c:any) => {
204
- return catIds.includes(c.id);
133
+ return this.$store.state.categories
134
+ .filter((c: Category) => {
135
+ return catIds && catIds.includes(c.id);
205
136
  })
206
- .map((c:any) => {
137
+ .map((c: any) => {
207
138
  return c.name;
208
139
  })
209
140
  .join(', ');
210
141
  },
211
-
212
- description():any {
213
- if (!this.podcast.description) return null;
142
+ description(): string {
143
+ if (!this.podcast.description) return '';
214
144
  return this.podcast.description;
215
145
  },
216
-
217
- title():string {
218
- if (state.generalParameters.isIE11)
219
- return this.podcast.title.substring(0, 50) + '...';
146
+ title(): string {
220
147
  return this.podcast.title;
221
148
  },
222
- organisationId() {
149
+ organisationId(): string {
223
150
  return state.generalParameters.organisationId;
224
151
  },
225
- authenticated():boolean {
152
+ authenticated(): boolean {
226
153
  return state.generalParameters.authenticated;
227
154
  },
228
- editRight() {
155
+ editRight(): boolean {
229
156
  if (
230
157
  (this.authenticated &&
231
158
  this.organisationId === this.podcast.organisation.id) ||
@@ -234,13 +161,11 @@ export default defineComponent({
234
161
  return true;
235
162
  return false;
236
163
  },
237
-
238
- duration():string {
164
+ duration(): string {
239
165
  if (this.podcast.duration <= 1) return '';
240
-
241
166
  if (this.podcast.duration > 600000) {
242
167
  return humanizeDuration(this.podcast.duration, {
243
- language: 'shortFr',
168
+ language: 'short'+this.$i18n.locale.charAt(0).toUpperCase() + this.$i18n.locale.slice(1),
244
169
  largest: 1,
245
170
  round: true,
246
171
  languages: {
@@ -254,15 +179,25 @@ export default defineComponent({
254
179
  s: () => 'sec',
255
180
  ms: () => 'ms',
256
181
  },
182
+ shortEn: {
183
+ y: () => 'years',
184
+ mo: () => 'months',
185
+ w: () => 'weeks',
186
+ d: () => 'days',
187
+ h: () => 'h',
188
+ m: () => 'min',
189
+ s: () => 'sec',
190
+ ms: () => 'ms',
191
+ },
257
192
  },
258
193
  });
259
194
  }
260
195
  return humanizeDuration(this.podcast.duration, {
261
- language: 'shortFr',
196
+ language: 'short',
262
197
  largest: 2,
263
198
  round: true,
264
199
  languages: {
265
- shortFr: {
200
+ short: {
266
201
  m: () => 'min',
267
202
  s: () => 'sec',
268
203
  ms: () => 'ms',
@@ -271,15 +206,98 @@ export default defineComponent({
271
206
  });
272
207
  },
273
208
  },
209
+
210
+ mounted() {
211
+ const podcastDesc = document.getElementById(
212
+ 'description-podcast-' + this.podcast.podcastId
213
+ );
214
+ const podcastDescContainer = document.getElementById(
215
+ 'description-podcast-container-' + this.podcast.podcastId
216
+ );
217
+ if (
218
+ null !== podcastDesc && null !== podcastDescContainer &&
219
+ podcastDesc.clientHeight > podcastDescContainer.clientHeight
220
+ ) {
221
+ this.isDescriptionBig = true;
222
+ }
223
+ },
274
224
  methods: {
275
- showDescription() {
225
+ showDescription(): void {
276
226
  this.arrowDirection = 'down';
277
227
  this.hover = true;
278
228
  },
279
- hideDescription() {
229
+ hideDescription(): void {
280
230
  this.arrowDirection = 'up';
281
231
  this.hover = false;
282
232
  },
283
233
  },
284
- });
234
+ })
285
235
  </script>
236
+
237
+ <style lang="scss">
238
+ .podcast-item-container {
239
+ border-radius: 0.8rem;
240
+ list-style: none;
241
+ position: relative;
242
+ width: 13rem;
243
+ overflow: hidden;
244
+ display: flex;
245
+ flex-direction: column;
246
+ text-align: left;
247
+ background: #fff;
248
+ flex-shrink: 0;
249
+ .text-secondary {
250
+ margin: 0.5rem !important;
251
+ }
252
+ .saooti-star-bounty {
253
+ font-size: 22px;
254
+ }
255
+
256
+ .title-podcast-item {
257
+ font-weight: 700;
258
+ margin: 0.25rem 0.5rem 0.5rem;
259
+ overflow: hidden;
260
+ display: -webkit-box;
261
+ flex-grow: 1;
262
+ font-size: 0.7rem;
263
+ -webkit-line-clamp: 3;
264
+ -webkit-box-orient: vertical;
265
+ min-height: 3rem;
266
+ line-height: 1rem;
267
+ word-break: break-word;
268
+ }
269
+ .description-podcast-item {
270
+ padding: 1rem;
271
+ color: #333;
272
+ background-color: rgba(255, 255, 255, 0.92);
273
+ height: 13rem;
274
+ overflow: hidden;
275
+ text-overflow: ellipsis;
276
+ font-size: 0.9em;
277
+ position: absolute;
278
+ width: 13rem;
279
+ word-break: break-word;
280
+ &.after-podcast-description:after {
281
+ content: '...';
282
+ position: absolute;
283
+ padding-left: 1rem;
284
+ right: 0;
285
+ bottom: 0;
286
+ width: 100%;
287
+ font-size: 1rem;
288
+ font-weight: bolder;
289
+ text-align: center;
290
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
291
+ }
292
+ }
293
+ .producer-podcast-item {
294
+ margin: 0.2rem 0.5rem 0.5rem;
295
+ font-size: 0.55rem;
296
+ color: #666;
297
+ }
298
+
299
+ @media (max-width: 960px) {
300
+ margin: 0.5rem !important;
301
+ }
302
+ }
303
+ </style>