@saooti/octopus-sdk 35.2.9 → 35.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "35.2.9",
3
+ "version": "35.2.10",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -17,27 +17,29 @@
17
17
  :title="r.name"
18
18
  :button-text="$t('All podcast button', { name: r.name })"
19
19
  />
20
- <PodcastInlineList
21
- v-if="!tooManyRubrique"
22
- :no-rubriquage-id="[rubriqueDisplay[0].rubriquageId]"
23
- :rubrique-id="rubriqueId"
24
- :title="$t('Without rubric')"
25
- :button-text="$t('All podcast button', { name: $t('Without rubric') })"
26
- />
27
- <router-link
28
- v-else
29
- :to="{
30
- name: 'podcasts',
31
- query: { productor: filterOrgaId,
32
- iabId: filterIab?.id,
33
- rubriquesId: this.rubriqueQueryParam },
34
- }"
35
- class="btn btn-primary align-self-center width-fit-content mt-5 m-auto"
36
- >
37
- {{
38
- $t('See more')
39
- }}
40
- </router-link>
20
+ <template v-if="rubriqueDisplay && rubriqueDisplay.length > 0">
21
+ <PodcastInlineList
22
+ v-if="rubriqueDisplay.length < rubriqueMaxDisplay"
23
+ :no-rubriquage-id="[rubriqueDisplay[0].rubriquageId]"
24
+ :rubrique-id="rubriqueId"
25
+ :title="$t('Without rubric')"
26
+ :button-text="$t('All podcast button', { name: $t('Without rubric') })"
27
+ />
28
+ <router-link
29
+ v-else
30
+ :to="{
31
+ name: 'podcasts',
32
+ query: { productor: filterOrgaId,
33
+ iabId: filterIab?.id,
34
+ rubriquesId: this.rubriqueQueryParam },
35
+ }"
36
+ class="btn btn-primary align-self-center width-fit-content mt-5 m-auto"
37
+ >
38
+ {{
39
+ $t('See more')
40
+ }}
41
+ </router-link>
42
+ </template>
41
43
  </template>
42
44
  </div>
43
45
  </template>
@@ -73,14 +75,11 @@ export default defineComponent({
73
75
  }
74
76
  return undefined;
75
77
  },
76
- tooManyRubrique(): boolean{
77
- return this.rubriqueDisplay && this.rubriqueDisplay.length >this.rubriqueMaxDisplay;
78
- },
79
78
  rubriqueDisplay(): Array<Rubrique>{
80
79
  return this.filterRubriqueDisplay.filter((rubrique: Rubrique) => 0 !== rubrique.podcastCount );
81
80
  },
82
81
  rubriqueToShow(): Array<Rubrique>{
83
- if(!this.tooManyRubrique){
82
+ if(!this.rubriqueDisplay || this.rubriqueDisplay.length < this.rubriqueMaxDisplay){
84
83
  return this.rubriqueDisplay ?? [];
85
84
  }
86
85
  return this.rubriqueDisplay.slice(0, this.rubriqueMaxDisplay);