@saooti/octopus-sdk 31.0.34 → 31.0.37

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 (85) hide show
  1. package/README.md +6 -1
  2. package/index.ts +8 -2
  3. package/package.json +1 -1
  4. package/public/img/403.jpeg +0 -0
  5. package/public/img/404.svg +242 -0
  6. package/src/assets/bootstrap-diff.scss +25 -24
  7. package/src/assets/general.scss +57 -2
  8. package/src/assets/modal.scss +5 -4
  9. package/src/assets/share.scss +2 -0
  10. package/src/components/display/categories/CategoryFilter.vue +12 -26
  11. package/src/components/display/categories/CategoryList.vue +14 -20
  12. package/src/components/display/comments/AddCommentModal.vue +19 -36
  13. package/src/components/display/comments/CommentBasicView.vue +2 -5
  14. package/src/components/display/comments/CommentInput.vue +8 -21
  15. package/src/components/display/comments/CommentItem.vue +1 -1
  16. package/src/components/display/comments/CommentList.vue +10 -21
  17. package/src/components/display/comments/CommentPlayer.vue +0 -3
  18. package/src/components/display/comments/CommentSection.vue +6 -14
  19. package/src/components/display/emission/EmissionInlineList.vue +5 -10
  20. package/src/components/display/emission/EmissionItem.vue +5 -10
  21. package/src/components/display/emission/EmissionList.vue +66 -68
  22. package/src/components/display/filter/AdvancedSearch.vue +19 -45
  23. package/src/components/display/filter/CategoryFilter.vue +11 -20
  24. package/src/components/display/filter/MonetizableFilter.vue +7 -14
  25. package/src/components/display/filter/ProductorSearch.vue +69 -78
  26. package/src/components/display/filter/RubriqueChoice.vue +1 -4
  27. package/src/components/display/filter/RubriqueFilter.vue +1 -5
  28. package/src/components/display/list/ListPaginate.vue +150 -0
  29. package/src/components/display/list/Paginate.vue +219 -0
  30. package/src/components/display/live/LiveHorizontalList.vue +56 -40
  31. package/src/components/display/organisation/OrganisationChooser.vue +7 -12
  32. package/src/components/display/participant/ParticipantItem.vue +6 -17
  33. package/src/components/display/participant/ParticipantList.vue +53 -46
  34. package/src/components/display/playlist/PlaylistItem.vue +1 -4
  35. package/src/components/display/playlist/PlaylistList.vue +60 -63
  36. package/src/components/display/playlist/PodcastList.vue +74 -101
  37. package/src/components/display/podcasts/AnimatorsItem.vue +17 -28
  38. package/src/components/display/podcasts/ParticipantDescription.vue +3 -11
  39. package/src/components/display/podcasts/PodcastFilterList.vue +8 -16
  40. package/src/components/display/podcasts/PodcastImage.vue +86 -92
  41. package/src/components/display/podcasts/PodcastItem.vue +1 -2
  42. package/src/components/display/podcasts/PodcastItemInfo.vue +10 -10
  43. package/src/components/display/podcasts/PodcastList.vue +61 -81
  44. package/src/components/display/podcasts/PodcastModuleBox.vue +19 -25
  45. package/src/components/display/podcasts/PodcastSwiperList.vue +2 -3
  46. package/src/components/display/podcasts/TagList.vue +0 -2
  47. package/src/components/display/sharing/QrCode.vue +2 -11
  48. package/src/components/display/sharing/ShareButtons.vue +44 -329
  49. package/src/components/display/sharing/ShareButtonsIntern.vue +209 -0
  50. package/src/components/display/sharing/SharePlayer.vue +21 -53
  51. package/src/components/display/sharing/SplitButton.vue +42 -0
  52. package/src/components/display/sharing/SubscribeButtons.vue +46 -39
  53. package/src/components/misc/Footer.vue +1 -4
  54. package/src/components/misc/HomeDropdown.vue +26 -24
  55. package/src/components/misc/LeftMenu.vue +3 -7
  56. package/src/components/misc/TopBar.vue +9 -16
  57. package/src/components/misc/modal/ClipboardModal.vue +1 -1
  58. package/src/components/misc/modal/MessageModal.vue +1 -1
  59. package/src/components/misc/modal/QrCodeModal.vue +1 -1
  60. package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
  61. package/src/components/mixins/organisationFilter.ts +6 -0
  62. package/src/components/mixins/player/playerLive.ts +1 -1
  63. package/src/components/pages/Category.vue +1 -1
  64. package/src/components/pages/Emission.vue +0 -6
  65. package/src/components/pages/Emissions.vue +1 -1
  66. package/src/components/pages/Error403Page.vue +44 -8
  67. package/src/components/pages/PageNotFound.vue +55 -0
  68. package/src/components/pages/Participant.vue +0 -15
  69. package/src/components/pages/Participants.vue +1 -1
  70. package/src/components/pages/Playlist.vue +2 -2
  71. package/src/components/pages/Playlists.vue +1 -1
  72. package/src/components/pages/Podcast.vue +1 -3
  73. package/src/components/pages/Podcasts.vue +11 -8
  74. package/src/components/pages/Rubrique.vue +1 -1
  75. package/src/locale/de.ts +3 -0
  76. package/src/locale/en.ts +9 -0
  77. package/src/locale/es.ts +3 -0
  78. package/src/locale/fr.ts +10 -1
  79. package/src/locale/it.ts +3 -0
  80. package/src/locale/sl.ts +3 -0
  81. package/src/router/router.ts +2 -0
  82. package/src/sass/_variables.scss +0 -1
  83. package/src/store/class/general/playlist.ts +1 -1
  84. package/src/store/paramStore.ts +7 -11
  85. package/src/store/typeAppStore.ts +20 -2
@@ -107,7 +107,7 @@ export default defineComponent({
107
107
  editRight(): boolean {
108
108
  if (
109
109
  (state.generalParameters.isPlaylist &&
110
- this.organisationId === this.playlist.organisation.id) ||
110
+ this.organisationId === this.playlist.organisation?.id) ||
111
111
  state.generalParameters.isAdmin
112
112
  )
113
113
  return true;
@@ -117,8 +117,6 @@ export default defineComponent({
117
117
  return 0 !== Object.keys(this.playlist.podcasts).length;
118
118
  },
119
119
  },
120
-
121
-
122
120
  mounted() {
123
121
  const playlistDesc = (this.$refs.descriptionPlaylist as HTMLElement);
124
122
  const playlistDescContainer = (this.$refs.descriptionPlaylistContainer as HTMLElement);
@@ -129,6 +127,5 @@ export default defineComponent({
129
127
  playlistDescContainer.classList.add('after-emission-description');
130
128
  }
131
129
  },
132
- methods: {},
133
130
  })
134
131
  </script>
@@ -1,46 +1,38 @@
1
1
  <template>
2
- <div class="d-flex flex-column align-items-center">
3
- <ClassicLoading
4
- :loading-text="loading?$t('Loading content ...'):undefined"
5
- />
6
- <div
7
- v-if="loaded && playlists.length > 1"
8
- class="text-secondary mb-2"
9
- >
10
- {{ $t('Number playlists', { nb: displayCount }) +" "+ $t('sort by score') }}
11
- </div>
12
- <ul class="emission-list two-emissions">
13
- <PlaylistItem
14
- v-for="p in playlists"
15
- :key="p.playlistId"
16
- :playlist="p"
17
- />
18
- </ul>
19
- <button
20
- v-show="!allFetched && loaded"
21
- class="btn"
22
- :class="buttonPlus ? 'btn-primary align-self-center width-fit-content m-4':'btn-more'"
23
- :disabled="inFetching"
24
- :title="$t('See more')"
25
- @click="displayMore"
26
- >
27
- <template v-if="buttonPlus">
28
- {{ $t('See more') }}
29
- </template>
30
- <div
31
- :class="buttonPlus?'ms-1':''"
32
- class="saooti-more"
33
- />
34
- </button>
35
- </div>
2
+ <ListPaginate
3
+ id="playlistListPaginate"
4
+ v-model:first="dfirst"
5
+ v-model:rowsPerPage="dsize"
6
+ v-model:isMobile="isMobile"
7
+ :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })} ${$t('sort by score')}`: undefined"
8
+ :total-count="totalCount"
9
+ :loading="loading"
10
+ :loading-text="loading?$t('Loading content ...'):undefined"
11
+ >
12
+ <template #list>
13
+ <ul
14
+ class="emission-list two-emissions"
15
+ >
16
+ <template
17
+ v-for="p in displayArray"
18
+ :key="p.playlistId"
19
+ >
20
+ <PlaylistItem
21
+ v-if="-1!==p.playlistId"
22
+ :playlist="p"
23
+ />
24
+ </template>
25
+ </ul>
26
+ </template>
27
+ </ListPaginate>
36
28
  </template>
37
29
 
38
30
  <script lang="ts">
31
+ import ListPaginate from '../list/ListPaginate.vue';
39
32
  import { handle403 } from '../../mixins/handle403';
40
33
  import octopusApi from '@saooti/octopus-api';
41
34
  import PlaylistItem from './PlaylistItem.vue';
42
- import { state } from '../../../store/paramStore';
43
- import ClassicLoading from '../../form/ClassicLoading.vue';
35
+ import { emptyPlaylistData } from '@/store/typeAppStore';
44
36
  import { Playlist } from '@/store/class/general/playlist';
45
37
  import { defineComponent } from 'vue'
46
38
  import { AxiosError } from 'axios';
@@ -49,14 +41,14 @@ export default defineComponent({
49
41
 
50
42
  components: {
51
43
  PlaylistItem,
52
- ClassicLoading
44
+ ListPaginate
53
45
  },
54
46
 
55
47
  mixins: [handle403],
56
48
 
57
49
  props: {
58
50
  first: { default: 0, type: Number },
59
- size: { default: 12, type: Number },
51
+ size: { default: 30, type: Number },
60
52
  query: { default: undefined, type: String},
61
53
  organisationId: { default: undefined, type: String},
62
54
  },
@@ -64,57 +56,60 @@ export default defineComponent({
64
56
  data() {
65
57
  return {
66
58
  loading: true as boolean,
67
- loaded: true as boolean,
68
59
  dfirst: this.first as number,
69
60
  dsize: this.size as number,
70
61
  totalCount: 0 as number,
71
62
  displayCount: 0 as number,
72
63
  playlists: [] as Array<Playlist>,
73
- inFetching: false as boolean,
64
+ isMobile: false as boolean,
74
65
  };
75
66
  },
76
67
 
77
68
 
78
69
  computed: {
79
- allFetched(): boolean {
80
- return this.dfirst >= this.totalCount;
81
- },
82
- buttonPlus(): boolean {
83
- return (state.generalParameters.buttonPlus as boolean);
84
- },
70
+ displayArray(): Array<Playlist>{
71
+ if(this.isMobile){
72
+ return this.playlists;
73
+ }
74
+ return this.playlists.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
75
+ },
85
76
  changed(): string {
86
77
  return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
87
78
  },
88
- filterOrga(): string {
89
- return this.$store.state.filter.organisationId;
90
- },
91
79
  sort(): string {
92
80
  if (!this.query) return 'NAME';
93
81
  return 'SCORE';
94
82
  },
95
83
  organisation(): string|undefined {
96
84
  if (this.organisationId) return this.organisationId;
97
- if (this.filterOrga) return this.filterOrga;
85
+ if (this.$store.state.filter.organisationId) return this.$store.state.filter.organisationId;
98
86
  return undefined;
99
87
  },
100
88
  },
101
89
  watch: {
102
90
  changed(): void {
103
- this.fetchContent(true);
91
+ this.reloadList();
104
92
  },
93
+ dsize():void{
94
+ this.reloadList();
95
+ },
96
+ dfirst(): void{
97
+ if(!this.playlists[this.dfirst] || -1===this.playlists[this.dfirst].playlistId){
98
+ this.fetchContent(false);
99
+ }
100
+ },
105
101
  },
106
102
 
107
103
  mounted() {
108
104
  this.fetchContent(true);
109
105
  },
110
106
  methods: {
107
+ reloadList(){
108
+ this.dfirst = 0;
109
+ this.fetchContent(true);
110
+ },
111
111
  async fetchContent(reset: boolean): Promise<void> {
112
- this.inFetching = true;
113
- if (reset) {
114
- this.dfirst = 0;
115
- this.loading = true;
116
- this.loaded = false;
117
- }
112
+ this.loading = true;
118
113
  const param = {
119
114
  first: this.dfirst,
120
115
  size: this.dsize,
@@ -132,20 +127,22 @@ export default defineComponent({
132
127
  afterFetching(reset: boolean, data: {count: number, result: Array<Playlist>, sort: string}): void {
133
128
  if (reset) {
134
129
  this.playlists.length = 0;
135
- this.dfirst = 0;
136
130
  }
137
- this.loading = false;
138
- this.loaded = true;
131
+ if(this.dfirst > this.playlists.length){
132
+ for (let i = this.playlists.length-1, len = this.dfirst + this.dsize; i < len; i++) {
133
+ this.playlists.push(emptyPlaylistData());
134
+ }
135
+ }
139
136
  this.displayCount = data.count;
140
- this.playlists = this.playlists.concat(data.result).filter((e: Playlist | null) => {
137
+ const responsePlaylists = data.result.filter((e: Playlist | null) => {
141
138
  if (null === e) {
142
139
  this.displayCount--;
143
140
  }
144
141
  return null !== e;
145
142
  });
146
- this.dfirst += this.dsize;
143
+ this.playlists = this.playlists.slice(0, this.dfirst).concat(responsePlaylists).concat(this.playlists.slice(this.dfirst+this.dsize, this.playlists.length));
147
144
  this.totalCount = data.count;
148
- this.inFetching = false;
145
+ this.loading = false;
149
146
  },
150
147
  displayMore(): void {
151
148
  this.fetchContent(false);
@@ -1,67 +1,53 @@
1
1
  <template>
2
- <div class="d-flex flex-column align-items-center">
3
- <h2
4
- class="mt-3 align-self-baseline"
5
- >
6
- <template v-if="notEmptyPlaylist">
7
- {{ $t('Podcasts in the playlist') }}
8
- </template>
9
- <template v-else>
10
- {{ $t('No podcasts in the playlist') }}
11
- </template>
2
+ <div>
3
+ <h2 class="mt-3 align-self-baseline">
4
+ {{ titleList }}
12
5
  </h2>
13
- <ClassicLoading
14
- :loading-text="loading?$t('Loading podcasts ...'):undefined"
15
- :error-text="loaded && !podcasts.length && notEmptyPlaylist?$t(`No podcast match your query`):undefined"
16
- />
17
- <div
18
- v-if="loaded && podcasts.length > 1"
19
- class="text-secondary mb-4"
20
- >
21
- {{ $t('Number podcasts', { nb: podcasts.length }) +" "+ $t('sort by score') }}
22
- </div>
23
6
  <ClassicSearch
24
- v-if="notEmptyPlaylist"
7
+ v-if="!loading && notEmptyPlaylist"
25
8
  v-model:textInit="searchPattern"
26
9
  class="width-600 align-self-baseline"
27
10
  id-checkbox="podcast-list-search"
28
11
  :label="$t('Search')"
29
12
  />
30
- <ul
31
- v-show="loaded"
32
- class="podcast-list"
33
- >
34
- <PodcastItem
35
- v-for="p in podcastsDisplay"
36
- :key="p.podcastId"
37
- :podcast="p"
38
- />
39
- </ul>
40
- <button
41
- v-show="size < podcasts.length && loaded"
42
- class="btn"
43
- :class="buttonPlus ? 'btn-primary align-self-center width-fit-content m-4':'btn-more'"
44
- :title="$t('See more')"
45
- @click="displayMore"
13
+ <ListPaginate
14
+ id="podcastPlaylistListPaginate"
15
+ v-model:first="first"
16
+ v-model:rowsPerPage="size"
17
+ v-model:isMobile="isMobile"
18
+ :text-count="podcasts.length > 1 ? `${$t('Number podcasts', { nb: podcasts.length })} ${$t('sort by score')}` : undefined"
19
+ :total-count="podcasts.length"
20
+ :loading="loading"
21
+ :loading-text="loading?$t('Loading podcasts ...'):undefined"
22
+ :error-text="!loading && !podcasts.length && notEmptyPlaylist?$t(`No podcast match your query`):undefined"
46
23
  >
47
- <template v-if="buttonPlus">
48
- {{ $t('See more') }}
24
+ <template #list>
25
+ <ul
26
+ class="podcast-list"
27
+ >
28
+ <template
29
+ v-for="p in podcastsDisplay"
30
+ :key="p.podcastId"
31
+ >
32
+ <PodcastItem
33
+ v-if="-1!==p.podcastId"
34
+ :podcast="p"
35
+ />
36
+ </template>
37
+ </ul>
49
38
  </template>
50
- <div
51
- :class="buttonPlus?'ms-1':''"
52
- class="saooti-more"
53
- />
54
- </button>
39
+ </ListPaginate>
55
40
  </div>
56
41
  </template>
57
42
 
58
43
  <script lang="ts">
44
+ import ListPaginate from '../list/ListPaginate.vue';
59
45
  import { handle403 } from '../../mixins/handle403';
46
+ import { orgaComputed } from '../../mixins/orgaComputed';
60
47
  import octopusApi from '@saooti/octopus-api';
61
48
  import PodcastItem from '../podcasts/PodcastItem.vue';
62
49
  import { state } from '../../../store/paramStore';
63
50
  import ClassicSearch from '../../form/ClassicSearch.vue';
64
- import ClassicLoading from '../../form/ClassicLoading.vue';
65
51
  import { Podcast } from '@/store/class/general/podcast';
66
52
  import { Playlist } from '@/store/class/general/playlist';
67
53
  import { defineComponent } from 'vue'
@@ -72,10 +58,10 @@ export default defineComponent({
72
58
  components: {
73
59
  PodcastItem,
74
60
  ClassicSearch,
75
- ClassicLoading
61
+ ListPaginate
76
62
  },
77
63
 
78
- mixins: [handle403],
64
+ mixins: [handle403, orgaComputed],
79
65
 
80
66
  props: {
81
67
  playlist: { default: ()=>({}), type: Object as ()=>Playlist},
@@ -84,37 +70,33 @@ export default defineComponent({
84
70
  data() {
85
71
  return {
86
72
  loading: true as boolean,
87
- loaded: true as boolean,
88
73
  podcasts: [] as Array<Podcast>,
89
74
  podcastsQuery: [] as Array<Podcast>,
90
- size: 12 as number,
75
+ size: 30 as number,
76
+ first: 0 as number,
91
77
  searchPattern: '' as string,
78
+ isMobile: false as boolean,
92
79
  };
93
80
  },
94
81
 
95
82
 
96
83
  computed: {
84
+ titleList(): string{
85
+ return this.notEmptyPlaylist ? this.$t('Podcasts in the playlist') : this.$t('No podcasts in the playlist');
86
+ },
97
87
  notEmptyPlaylist(): boolean {
98
88
  return 0 !== Object.keys(this.playlist.podcasts).length;
99
89
  },
100
- podcastsDisplay(): Array<Podcast> {
101
- if (this.size < this.podcastsQuery.length)
102
- return this.podcastsQuery.slice(0, this.size);
103
- return this.podcastsQuery.slice(0, this.podcasts.length);
104
- },
105
- buttonPlus(): boolean {
106
- return (state.generalParameters.buttonPlus as boolean);
107
- },
108
- organisationId(): string|undefined {
109
- return state.generalParameters.organisationId;
110
- },
111
- authenticated(): boolean {
112
- return (state.generalParameters.authenticated as boolean);
113
- },
90
+ podcastsDisplay(): Array<Podcast>{
91
+ if(this.isMobile){
92
+ return this.podcastsQuery.slice(0, Math.min(this.first + this.size,this.podcasts.length));
93
+ }
94
+ return this.podcastsQuery.slice(this.first, Math.min(this.first + this.size,this.podcasts.length));
95
+ },
114
96
  editRight(): boolean {
115
97
  if (
116
98
  (this.authenticated &&
117
- this.organisationId === this.playlist.organisation.id) ||
99
+ this.myOrganisationId === this.playlist.organisation?.id) ||
118
100
  state.generalParameters.isAdmin
119
101
  )
120
102
  return true;
@@ -136,44 +118,35 @@ export default defineComponent({
136
118
  },
137
119
 
138
120
  created() {
139
- if (this.notEmptyPlaylist) {
140
- this.fetchContent();
141
- } else {
142
- this.loading = false;
143
- this.loaded = true;
144
- }
121
+ this.fetchContent();
145
122
  },
146
123
  methods: {
147
124
  async fetchContent(): Promise<void> {
148
- this.podcasts.length = 0;
149
- this.loading = true;
150
- this.loaded = false;
151
- try {
152
- const content = await octopusApi.fetchPlaylistContent(
153
- this.playlist.playlistId.toString()
154
- );
155
- for (let index = 0, len = content.length; index < len; index++) {
156
- content[index].order = this.playlist.podcasts[content[index].podcastId];
125
+ if (this.notEmptyPlaylist){
126
+ this.podcasts.length = 0;
127
+ this.loading = true;
128
+ try {
129
+ const content = await octopusApi.fetchPlaylistContent(
130
+ this.playlist.playlistId.toString()
131
+ );
132
+ for (let index = 0, len = content.length; index < len; index++) {
133
+ content[index].order = this.playlist.podcasts[content[index].podcastId];
134
+ }
135
+ this.podcasts = content;
136
+ if (!this.editRight) {
137
+ this.podcasts = this.podcasts.filter((p: Podcast|null) => {
138
+ return (
139
+ null !== p &&
140
+ (!p.availability || true === p.availability.visibility)
141
+ );
142
+ });
143
+ }
144
+ this.podcastsQuery = this.podcasts;
145
+ } catch (error) {
146
+ this.handle403((error as AxiosError));
157
147
  }
158
- this.podcasts = content;
159
- if (!this.editRight) {
160
- this.podcasts = this.podcasts.filter((p: Podcast|null) => {
161
- return (
162
- null !== p &&
163
- (!p.availability || true === p.availability.visibility)
164
- );
165
- });
166
- }
167
- this.podcastsQuery = this.podcasts;
168
- } catch (error) {
169
- this.handle403((error as AxiosError));
170
148
  }
171
149
  this.loading = false;
172
- this.loaded = true;
173
- },
174
- displayMore(event: { preventDefault: () => void }): void {
175
- event.preventDefault();
176
- this.size += 12;
177
150
  },
178
151
  },
179
152
  })
@@ -182,11 +155,11 @@ export default defineComponent({
182
155
 
183
156
  <style lang="scss">
184
157
  .octopus-app{
185
- .width-600 {
186
- width: 600px;
187
- @media (max-width: 600px) {
188
- width: 100%;
158
+ .width-600 {
159
+ width: 600px;
160
+ @media (max-width: 600px) {
161
+ width: 100%;
162
+ }
189
163
  }
190
164
  }
191
- }
192
165
  </style>
@@ -1,12 +1,9 @@
1
1
  <template>
2
2
  <div
3
- v-if="animators && 0 !== animators.length"
3
+ v-if="animator"
4
4
  class="d-flex align-items-center justify-content-start animators-item"
5
5
  >
6
6
  <router-link
7
- v-for="(animator, index) in animators"
8
- v-show="index === visibleIndex"
9
- :key="animator.participantId"
10
7
  :to="{
11
8
  name: 'participant',
12
9
  params: { participantId: animator.participantId },
@@ -15,7 +12,7 @@
15
12
  :title="$t('Participant')"
16
13
  >
17
14
  <div class="podcast-item-animator text-dark">
18
- {{ getAnimatorName(animator) }}
15
+ {{ animatorName }}
19
16
  </div>
20
17
  </router-link>
21
18
  </div>
@@ -28,35 +25,27 @@ export default defineComponent({
28
25
  name: 'AnimatorsItem',
29
26
 
30
27
  props: {
31
- animators: { default: undefined, type: Object as ()=> Array<Participant>},
32
- },
33
-
34
- data() {
35
- return {
36
- visibleIndex: 0 as number,
37
- };
38
- },
39
- methods: {
40
- getAnimatorName(animator: Participant): string {
41
- const first = animator.firstName || '';
42
- const last = animator.lastName || '';
43
- return (first + ' ' + last).trim();
44
- },
28
+ animator: { default: undefined, type: Object as ()=> Participant},
45
29
  },
30
+ computed:{
31
+ animatorName(): string{
32
+ return (`${this.animator?.firstName||''} ${this.animator?.lastName||''}`).trim();
33
+ }
34
+ }
46
35
  })
47
36
  </script>
48
37
 
49
38
  <style lang="scss">
50
39
  .octopus-app{
51
- .podcast-item-animator {
52
- display: flex;
53
- align-items: flex-start;
54
- justify-content: center;
40
+ .podcast-item-animator {
41
+ display: flex;
42
+ align-items: flex-start;
43
+ justify-content: center;
55
44
 
56
- font-size: 0.55rem;
57
- font-weight: 300;
58
- text-transform: capitalize;
59
- margin: 00.25rem 0.5rem 0;
60
- }
45
+ font-size: 0.55rem;
46
+ font-weight: 300;
47
+ text-transform: capitalize;
48
+ margin: 00.25rem 0.5rem 0;
49
+ }
61
50
  }
62
51
  </style>
@@ -67,23 +67,15 @@ export default defineComponent({
67
67
 
68
68
  computed:{
69
69
  idPopover(): string{
70
- if(this.isGuest){
71
- return "popover-guests-help";
72
- }
73
- return "popover-animators-help";
70
+ return this.isGuest ? "popover-guests-help" : "popover-animators-help";
74
71
  },
75
72
  title(): string{
76
- if(this.isGuest){
77
- return this.$t('Guests').toString();
78
- }
79
- return this.$t('Animated by').toString();
73
+ return this.isGuest ? this.$t('Guests') : this.$t('Animated by');
80
74
  }
81
75
  },
82
76
  methods: {
83
77
  getName(person: Participant): string {
84
- const first = person.firstName || '';
85
- const last = person.lastName || '';
86
- return (first + ' ' + last).trim();
78
+ return (`${person.firstName||''} ${person.lastName||''}`).trim();
87
79
  },
88
80
  },
89
81
  })
@@ -1,13 +1,6 @@
1
1
  <template>
2
2
  <div class="p-3">
3
- <h2>
4
- <template v-if="name">
5
- {{ $t('All podcast button', { name: name }) }}
6
- </template>
7
- <template v-else>
8
- {{ $t('All podcast emission button') }}
9
- </template>
10
- </h2>
3
+ <h2>{{ titleFilter }}</h2>
11
4
  <div class="d-flex align-items-center flex-wrap">
12
5
  <div
13
6
  class="d-flex align-items-center flex-grow-1 me-3"
@@ -66,16 +59,19 @@ export default defineComponent({
66
59
  data() {
67
60
  return {
68
61
  first: 0 as number,
69
- size: 12 as number,
62
+ size: 30 as number,
70
63
  searchPattern: '' as string,
71
64
  iabId: undefined as number | undefined,
72
65
  reloadList: false as boolean,
73
66
  };
74
67
  },
68
+
75
69
  computed: {
70
+ titleFilter():string{
71
+ return this.name ? this.$t('All podcast button', { name: this.name }) : this.$t('All podcast emission button');
72
+ },
76
73
  query(): string {
77
- if (this.searchPattern.length >= 3) return this.searchPattern;
78
- return '';
74
+ return this.searchPattern.length >= 3 ? this.searchPattern : '' ;
79
75
  },
80
76
  },
81
77
  watch: {
@@ -85,11 +81,7 @@ export default defineComponent({
85
81
  },
86
82
  methods: {
87
83
  onCategorySelected(category: Category|undefined): void {
88
- if (category && category.id) {
89
- this.iabId = category.id;
90
- return;
91
- }
92
- this.iabId = undefined;
84
+ this.iabId = category && category.id ? category.id : undefined;
93
85
  },
94
86
  fetch(podcasts: Array<Podcast>): void {
95
87
  this.$emit('fetch', podcasts);