@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
@@ -1,40 +1,94 @@
1
1
  <template>
2
2
  <div class="page-box">
3
- <PodcastInlineList
4
- v-for="c in categories"
5
- :key="c.id"
6
- :iabId="c.id"
7
- :title="c.name"
8
- :buttonText="$t('All podcast button', { name: c.name })"
9
- />
3
+ <template v-if="0 === rubriquageFilter.length">
4
+ <PodcastInlineList
5
+ v-for="c in categories"
6
+ :key="c.id"
7
+ :iab-id="c.id"
8
+ :title="c.name"
9
+ :button-text="$t('All podcast button', { name: c.name })"
10
+ />
11
+ </template>
12
+ <template v-else>
13
+ <PodcastInlineList
14
+ v-for="r in rubriqueDisplay"
15
+ :key="r.rubriqueId"
16
+ :rubrique-id="rubriqueId.concat(r.rubriqueId)"
17
+ :title="r.name"
18
+ :button-text="$t('All podcast button', { name: r.name })"
19
+ />
20
+ </template>
10
21
  </div>
11
22
  </template>
12
- <style lang="scss"></style>
13
23
 
14
24
  <script lang="ts">
15
25
  import PodcastInlineList from '../display/podcasts/PodcastInlineList.vue';
16
26
  import { state } from '../../store/paramStore';
17
27
 
28
+ import { RubriquageFilter } from '@/store/class/rubriquageFilter';
29
+ import { Rubriquage } from '@/store/class/rubriquage';
30
+ import { Rubrique } from '@/store/class/rubrique';
18
31
  import { defineComponent } from 'vue'
19
32
  export default defineComponent({
20
- name: 'home',
33
+ name: 'Home',
21
34
 
22
35
  components: {
23
36
  PodcastInlineList,
24
37
  },
25
-
26
- mounted() {},
27
-
38
+ data() {
39
+ return {
40
+ rubriqueId: [] as Array<number>,
41
+ };
42
+ },
28
43
  computed: {
29
- isPodcastmaker() {
44
+ rubriqueDisplay(): Array<Rubrique>{
45
+ return this.$store.state.filter.rubriqueDisplay;
46
+ },
47
+ rubriquageFilter(): Array<Rubriquage>{
48
+ if(this.$store.state.filter.organisationId){
49
+ return this.$store.state.filter.rubriquageArray;
50
+ }
51
+ return [];
52
+ },
53
+ rubriqueFilter(): Array<RubriquageFilter>{
54
+ return this.$store.state.filter.rubriqueFilter;
55
+ },
56
+ isPodcastmaker(): boolean {
30
57
  return state.generalParameters.podcastmaker;
31
58
  },
32
- categories() {
33
- return state.generalParameters.allCategories.filter((c:any) => {
59
+ categories(): any {
60
+ if(this.$store.state.filter.iab){
61
+ return [this.$store.state.filter.iab];
62
+ }
63
+ return this.$store.state.categories.filter((c: any) => {
34
64
  if (this.isPodcastmaker) return c.podcastOrganisationCount;
35
65
  return c.podcastCount;
36
66
  });
37
67
  },
38
68
  },
39
- });
69
+ watch:{
70
+ rubriqueFilter(){
71
+ this.updateRubriquageFilter();
72
+ }
73
+ },
74
+ created(){
75
+ if(this.rubriqueFilter.length){
76
+ this.updateRubriquageFilter();
77
+ }
78
+ },
79
+ methods:{
80
+ updateRubriquageFilter(){
81
+ const length = this.rubriqueFilter.length;
82
+ const rubriqueId: Array<number>= [];
83
+ for (let index = 0; index < length; index++) {
84
+ if(0 < this.rubriqueFilter[index].rubriqueId){
85
+ rubriqueId.push(this.rubriqueFilter[index].rubriqueId);
86
+ }
87
+ }
88
+ this.rubriqueId = rubriqueId;
89
+ },
90
+ }
91
+ })
40
92
  </script>
93
+
94
+ <style lang="scss"></style>
@@ -2,86 +2,94 @@
2
2
  <div class="page-box">
3
3
  <div class="d-flex flex-column align-items-center mb-3">
4
4
  <h1>{{ $t('In live') }}</h1>
5
- <router-link to="/main/priv/edit/live" v-if="liveRight && filterOrga">
6
- <button class="btn btn-primary">{{ $t('Launch a new live') }}</button>
7
- </router-link>
8
- <template v-else>
9
- <div class="align-self-start font-weight-bold mb-2">
10
- {{ $t('Please chose a productor') }}
11
- </div>
12
- <OrganisationChooser
13
- :defaultanswer="$t('Please chose a productor')"
14
- :all="true"
15
- @selected="onOrganisationSelected"
16
- />
5
+ <template v-if="!isPodcastmaker">
6
+ <router-link
7
+ v-if="liveRight && filterOrga"
8
+ to="/main/priv/edit/live"
9
+ >
10
+ <button class="btn btn-primary">
11
+ {{ $t('Launch a new live') }}
12
+ </button>
13
+ </router-link>
14
+ <template v-else>
15
+ <div class="align-self-start fw-bold mb-2">
16
+ {{ $t('Please chose a productor') }}
17
+ </div>
18
+ <OrganisationChooser
19
+ :defaultanswer="$t('Please chose a productor')"
20
+ :all="true"
21
+ @selected="onOrganisationSelected"
22
+ />
23
+ </template>
17
24
  </template>
18
25
  </div>
19
26
  <LiveList
20
- @initConferenceIds="initConferenceIds"
21
- :conferenceWatched="conferenceWatched"
22
- :organisationId="organisationId"
23
27
  v-if="filterOrga || organisationId"
28
+ :conference-watched="conferenceWatched"
29
+ :organisation-id="organisationId"
30
+ @initConferenceIds="initConferenceIds"
24
31
  />
25
32
  </div>
26
33
  </template>
27
- <style lang="scss"></style>
34
+
28
35
  <script lang="ts">
29
- // @ is an alias to /src
30
36
  import { state } from '../../store/paramStore';
31
- import LiveList from '../display/live/LiveList.vue';
32
- import OrganisationChooser from '../display/organisation/OrganisationChooser.vue';
33
37
 
34
- import { defineComponent } from 'vue'
38
+ import { Organisation } from '@/store/class/organisation';
39
+ import { defineComponent, defineAsyncComponent } from 'vue';
40
+ const LiveList = defineAsyncComponent(() => import('../display/live/LiveList.vue'));
41
+ const OrganisationChooser = defineAsyncComponent(() => import('../display/organisation/OrganisationChooser.vue'));
35
42
  export default defineComponent({
36
43
  components: {
37
44
  LiveList,
38
45
  OrganisationChooser,
39
46
  },
40
47
  props: {
41
- conferenceWatched: { default: [] },
42
- organisationId: { default: undefined as any },
48
+ conferenceWatched: { default: () => [], type: Array as ()=>Array<any>},
49
+ organisationId: { default: undefined, type: String },
50
+ productor:{default:undefined, type: String}
43
51
  },
44
52
  emits: ['update:organisationId', 'initConferenceIds'],
45
-
46
- created() {
47
- if (this.$route.query.productor) {
48
- this.$emit('update:organisationId',this.$route.query.productor);
49
- } else if (this.$store.state.filter.organisationId) {
50
- this.$emit('update:organisationId',this.$store.state.filter.organisationId);
51
- }
52
- if (
53
- this.$store.state.organisation &&
54
- this.$store.state.organisation.attributes &&
55
- !this.$store.state.organisation.attributes['live.active']
56
- ) {
57
- this.live = false;
58
- }
59
- },
60
-
61
53
  data() {
62
54
  return {
63
- live: true,
55
+ live: true as boolean,
64
56
  };
65
57
  },
66
-
58
+
67
59
  computed: {
68
- liveRight() {
60
+ liveRight(): boolean {
69
61
  if (this.isRoleLive && this.live) return true;
70
62
  return false;
71
63
  },
72
- isRoleLive() {
64
+ isRoleLive(): boolean {
73
65
  return state.generalParameters.isRoleLive;
74
66
  },
75
- filterOrga():any {
67
+ filterOrga(): string {
76
68
  return this.$store.state.filter.organisationId;
77
69
  },
70
+ isPodcastmaker(): boolean {
71
+ return state.generalParameters.podcastmaker;
72
+ },
73
+ },
74
+ created() {
75
+ if (this.productor) {
76
+ this.$emit('update:organisationId',this.productor);
77
+ } else if (this.$store.state.filter.organisationId) {
78
+ this.$emit('update:organisationId',this.$store.state.filter.organisationId);
79
+ }
80
+ if (
81
+ this.$store.state.organisation &&
82
+ this.$store.state.organisation.attributes &&
83
+ !this.$store.state.organisation.attributes['live.active']
84
+ ) {
85
+ this.live = false;
86
+ }
78
87
  },
79
-
80
88
  methods: {
81
- initConferenceIds(listIds: any) {
89
+ initConferenceIds(listIds: any): void {
82
90
  this.$emit('initConferenceIds', listIds);
83
91
  },
84
- onOrganisationSelected(organisation: any) {
92
+ onOrganisationSelected(organisation: Organisation|undefined): void {
85
93
  if (organisation && organisation.id) {
86
94
  this.$emit('update:organisationId', organisation.id);
87
95
  } else {
@@ -89,5 +97,7 @@ export default defineComponent({
89
97
  }
90
98
  },
91
99
  },
92
- });
100
+ })
93
101
  </script>
102
+
103
+ <style lang="scss"></style>
@@ -1,7 +1,15 @@
1
1
  <template>
2
2
  <div>
3
- <div class="page-box" v-if="loaded && !error">
4
- <h1 v-if="!lightStyle">{{ $t('Animator') }}</h1>
3
+ <div
4
+ v-if="loaded && !error"
5
+ class="page-box intervenant-page"
6
+ >
7
+ <h1 v-if="undefined === titlePage ||!lightStyle">
8
+ {{ $t('Animator') }}
9
+ </h1>
10
+ <h1 v-else>
11
+ {{ titlePage }}
12
+ </h1>
5
13
  <div
6
14
  class="d-flex w-100 flex-column align-items-center justify-content-center"
7
15
  >
@@ -10,81 +18,86 @@
10
18
  :style="{
11
19
  'background-image': 'url(\'' + participant.imageUrl + '\')',
12
20
  }"
13
- ></div>
14
- <h2 class="text-capitalize">{{ name }}</h2>
21
+ />
22
+ <h2 class="text-capitalize">
23
+ {{ name }}
24
+ </h2>
15
25
  <div
16
26
  class="h6 participant-desc html-wysiwyg-content"
17
27
  v-html="urlify(description)"
18
- ></div>
19
- <div class="d-flex justify-content-center" v-if="isRssButton">
28
+ />
29
+ <div
30
+ v-if="isRssButton"
31
+ class="d-flex justify-content-center"
32
+ >
20
33
  <a
21
34
  class="btn btn-bigRound"
22
35
  :title="$t('Subscribe to this participant')"
23
36
  :aria-label="$t('Subscribe to this participant')"
24
37
  :href="rssUrl"
38
+ rel="noopener"
25
39
  target="_blank"
26
40
  >
27
- <div class="saooti-rss-bounty"></div>
41
+ <div class="saooti-rss-bounty" />
28
42
  </a>
29
43
  </div>
30
44
  <div class="d-flex">
31
45
  <EditBox
32
- :participant="participant"
33
46
  v-if="editRight && isEditBox"
34
- @participantUpdate="updateParticipant"
47
+ :participant="participant"
35
48
  class="flex-grow-1"
36
- ></EditBox>
49
+ @participantUpdate="updateParticipant"
50
+ />
37
51
  <ShareButtons
38
- :participantId="participantId"
39
52
  v-if="isShareButtons"
40
- ></ShareButtons>
53
+ :participant-id="participantId"
54
+ />
41
55
  </div>
42
56
  </div>
43
57
  <PodcastFilterList
44
- :participantId="participantId"
58
+ v-if="!lightStyle"
59
+ :participant-id="participantId"
45
60
  :name="name"
46
- :categoryFilter="true"
61
+ :category-filter="true"
47
62
  :reload="reload"
48
- v-if="!lightStyle"
49
63
  />
50
64
  <PodcastList
65
+ v-else
51
66
  :first="0"
52
67
  :size="15"
53
- :participantId="participantId"
68
+ :participant-id="participantId"
54
69
  :reload="reload"
55
- v-else
56
70
  />
57
71
  </div>
58
- <div class="d-flex justify-content-center" v-if="!loaded">
59
- <div class="spinner-border mr-3"></div>
60
- <h3 class="mt-2">{{ $t('Loading content ...') }}</h3>
72
+ <div
73
+ v-if="!loaded"
74
+ class="d-flex justify-content-center"
75
+ >
76
+ <div class="spinner-border me-3" />
77
+ <h3 class="mt-2">
78
+ {{ $t('Loading content ...') }}
79
+ </h3>
61
80
  </div>
62
- <div class="text-center" v-if="error">
81
+ <div
82
+ v-if="error"
83
+ class="text-center"
84
+ >
63
85
  <h3>{{ $t("Animator doesn't exist") }}</h3>
64
86
  </div>
65
87
  </div>
66
88
  </template>
67
89
 
68
- <style lang="scss">
69
- @media (min-width: 950px) {
70
- .participant-desc {
71
- max-width: 50%;
72
- line-height: 1.5em;
73
- }
74
- }
75
- </style>
76
-
77
90
  <script lang="ts">
78
- // @ is an alias to /src
79
- import EditBox from '@/components/display/edit/EditBox.vue';
80
- import ShareButtons from '../display/sharing/ShareButtons.vue';
81
91
  const octopusApi = require('@saooti/octopus-api');
82
- import PodcastFilterList from '../display/podcasts/PodcastFilterList.vue';
83
- import PodcastList from '../display/podcasts/PodcastList.vue';
84
92
  import { state } from '../../store/paramStore';
85
93
  import { displayMethods } from '../mixins/functions';
94
+ import { Participant } from '@/store/class/participant';
86
95
 
87
- import { defineComponent } from 'vue'
96
+ import { defineComponent, defineAsyncComponent } from 'vue';
97
+ const ShareButtons = defineAsyncComponent(() => import('../display/sharing/ShareButtons.vue'));
98
+ const PodcastFilterList = defineAsyncComponent(() => import('../display/podcasts/PodcastFilterList.vue'));
99
+ const EditBox = defineAsyncComponent(() => import('@/components/display/edit/EditBox.vue'));
100
+ const PodcastList = defineAsyncComponent(() => import('../display/podcasts/PodcastList.vue'));
88
101
  export default defineComponent({
89
102
  components: {
90
103
  ShareButtons,
@@ -92,68 +105,60 @@ export default defineComponent({
92
105
  EditBox,
93
106
  PodcastList,
94
107
  },
95
-
96
108
  mixins: [displayMethods],
97
-
98
- mounted() {
99
- this.getParticipantDetails();
109
+ props: {
110
+ participantId: { default: undefined, type: Number},
100
111
  },
101
-
102
- props: ['participantId'],
103
112
  emits: ['participantTitle'],
104
-
105
113
  data() {
106
114
  return {
107
- loaded: false,
108
- participant: undefined as any,
109
- error: false,
110
- reload: false,
115
+ loaded: false as boolean,
116
+ participant: undefined as Participant|undefined,
117
+ error: false as boolean,
118
+ reload: false as boolean,
111
119
  };
112
120
  },
113
-
114
121
  computed: {
115
- organisationId() {
122
+ organisationId(): string {
116
123
  return state.generalParameters.organisationId;
117
124
  },
118
- authenticated():boolean {
125
+ authenticated(): boolean {
119
126
  return state.generalParameters.authenticated;
120
127
  },
121
- isEditBox() {
128
+ isEditBox(): boolean {
122
129
  return state.podcastPage.EditBox;
123
130
  },
124
- isShareButtons() {
131
+ isShareButtons(): boolean {
125
132
  return state.podcastPage.ShareButtons;
126
133
  },
127
- lightStyle() {
134
+ lightStyle(): boolean {
128
135
  return state.intervenantPage.lightStyle;
129
136
  },
130
- isRssButton() {
137
+ isRssButton(): boolean {
131
138
  return state.intervenantPage.rssButton;
132
139
  },
133
- rssUrl():any {
140
+ titlePage(): string|undefined {
141
+ return state.intervenantPage.titlePage;
142
+ },
143
+ rssUrl(): string {
134
144
  return (
135
145
  state.generalParameters.ApiUri + 'rss/participant/' + this.participantId
136
146
  );
137
147
  },
138
- description():string {
139
- let description;
140
- description = this.participant.description || '';
141
- if (state.generalParameters.isIE11)
142
- return description.substring(0, 50) + '...';
143
- return description;
148
+ description(): string {
149
+ if(!this.participant){return '';}
150
+ return this.participant.description || '';
144
151
  },
145
-
146
- name():string {
147
- const fullName = (
152
+ name(): string {
153
+ if(!this.participant){return '';}
154
+ return (
148
155
  (this.participant.firstName || '') +
149
156
  ' ' +
150
157
  (this.participant.lastName || '')
151
158
  ).trim();
152
- if (state.generalParameters.isIE11)
153
- return fullName.substring(0, 50) + '...';
154
- return fullName;
155
159
  },
156
- editRight() {
160
+ editRight(): boolean {
161
+ if(!this.participant || !this.participant.orga ){return false;}
157
162
  if (
158
163
  (this.authenticated &&
159
164
  this.organisationId === this.participant.orga.id) ||
@@ -163,9 +168,16 @@ export default defineComponent({
163
168
  return false;
164
169
  },
165
170
  },
166
-
171
+ watch: {
172
+ participant(): void {
173
+ this.reload = !this.reload;
174
+ },
175
+ },
176
+ mounted() {
177
+ this.getParticipantDetails();
178
+ },
167
179
  methods: {
168
- async getParticipantDetails() {
180
+ async getParticipantDetails(): Promise<void> {
169
181
  this.loaded = false;
170
182
  try {
171
183
  const data = await octopusApi.fetchParticipant(this.participantId);
@@ -177,15 +189,19 @@ export default defineComponent({
177
189
  this.loaded = true;
178
190
  }
179
191
  },
180
- updateParticipant(participant:any) {
192
+ updateParticipant(participant: Participant): void {
181
193
  this.participant = participant;
182
194
  this.$emit('participantTitle', this.name);
183
195
  },
184
196
  },
185
- watch: {
186
- participant() {
187
- this.reload = !this.reload;
188
- },
189
- },
190
- });
197
+ })
191
198
  </script>
199
+
200
+ <style lang="scss">
201
+ @media (min-width: 950px) {
202
+ .participant-desc {
203
+ max-width: 50%;
204
+ line-height: 1.5em;
205
+ }
206
+ }
207
+ </style>
@@ -1,69 +1,82 @@
1
1
  <template>
2
2
  <div class="page-box">
3
- <h1>{{ $t('All participants') }}</h1>
3
+ <h1 v-if="undefined === titlePage">
4
+ {{ $t('All participants') }}
5
+ </h1>
6
+ <h1 v-else>
7
+ {{ titlePage }}
8
+ </h1>
4
9
  <ProductorSearch
5
- :organisationId="organisationId"
6
- :searchPattern="searchPattern"
10
+ :organisation-id="organisationId"
11
+ :search-pattern="searchPattern"
7
12
  type="participant"
8
13
  @updateOrganisationId="updateOrganisationId"
9
14
  @updateSearchPattern="updateSearchPattern"
10
15
  />
11
16
  <ParticipantList
12
- :showCount="true"
17
+ :show-count="true"
13
18
  :first="first"
14
19
  :size="size"
15
20
  :query="searchPattern"
16
- :organisationId="organisationId"
21
+ :organisation-id="organisationId"
17
22
  />
18
23
  </div>
19
24
  </template>
20
- <style lang="scss"></style>
25
+
21
26
  <script lang="ts">
22
- // @ is an alias to /src
23
27
  import ParticipantList from '../display/participant/ParticipantList.vue';
24
28
  import ProductorSearch from '../display/filter/ProductorSearch.vue';
25
-
29
+ import { state } from '../../store/paramStore';
26
30
  import { defineComponent } from 'vue'
27
31
  export default defineComponent({
28
32
  components: {
29
33
  ProductorSearch,
30
34
  ParticipantList,
31
35
  },
32
-
33
- created() {
34
- if (this.$route.query.first) {
35
- this.first = this.$route.query.first;
36
- } else {
37
- this.first = 0;
38
- }
39
- if (this.$route.query.size) {
40
- this.size = this.$route.query.size;
41
- } else {
42
- this.size = 12;
43
- }
44
- if (this.$route.query.productor) {
45
- this.organisationId = this.$route.query.productor;
46
- } else if (this.$store.state.filter.organisationId) {
47
- this.organisationId = this.$store.state.filter.organisationId;
48
- }
36
+ props: {
37
+ firstRoute: { default: 0, type: Number},
38
+ sizeRoute: { default: 12, type: Number},
39
+ productor: { default: undefined, type: String},
49
40
  },
50
41
 
51
42
  data() {
52
43
  return {
53
- first: undefined as any,
54
- size: undefined as any,
44
+ first: 0 as number,
45
+ size: 12 as number,
55
46
  searchPattern: '',
56
- organisationId: undefined as any,
47
+ organisationId: undefined as string | undefined,
57
48
  };
58
49
  },
59
50
 
51
+ computed: {
52
+ titlePage(): string|undefined {
53
+ return state.intervenantsPage.titlePage;
54
+ },
55
+ },
56
+
57
+ created() {
58
+ if (this.firstRoute) {
59
+ this.first = this.firstRoute;
60
+ }
61
+ if (this.sizeRoute) {
62
+ this.size = this.sizeRoute;
63
+ }
64
+ if (this.productor) {
65
+ this.organisationId = this.productor;
66
+ } else if (this.$store.state.filter.organisationId) {
67
+ this.organisationId = this.$store.state.filter.organisationId;
68
+ }
69
+ },
70
+
60
71
  methods: {
61
- updateOrganisationId(value: any) {
72
+ updateOrganisationId(value: string): void {
62
73
  this.organisationId = value;
63
74
  },
64
- updateSearchPattern(value: string) {
75
+ updateSearchPattern(value: string): void {
65
76
  this.searchPattern = value;
66
77
  },
67
78
  },
68
- });
79
+ })
69
80
  </script>
81
+
82
+ <style lang="scss"></style>