@saooti/octopus-sdk 30.0.87 → 30.0.90

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/README.md CHANGED
@@ -583,4 +583,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
583
583
  * 30.0.84 Une émission non visible n'apparaît pas dans la page émission
584
584
  * 30.0.85 PB en cliquant sur le bouton "tous les épisodes de l'organisation" dans la page d'un épisode
585
585
  * 30.0.86 Podcastmaker newest
586
- * 30.0.87 Podcastmaker newest (swiper list)
586
+ * 30.0.87 Podcastmaker newest (swiper list)
587
+ * 30.0.88 Podcastmaker newest (swiper list)
588
+ * 30.0.89 Podcastmaker newest (swiper list)
589
+ * 30.0.90 Podcastmaker newest (swiper list)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "30.0.87",
3
+ "version": "30.0.90",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -2,7 +2,18 @@
2
2
  <div
3
3
  class="d-flex flex-column p-3"
4
4
  >
5
- <h2>{{ title }}</h2>
5
+ <div class="d-flex align-items-center mb-2">
6
+ <h2 class="mb-0">
7
+ {{ title }}
8
+ </h2>
9
+ <router-link
10
+ v-if="isButtonNextTitle"
11
+ class="btn admin-button m-1 fw-bold saooti-right"
12
+ :title="buttonText"
13
+ :to="refTo"
14
+ @click="handleSeeMoreButton"
15
+ />
16
+ </div>
6
17
  <div class="d-flex justify-content-between">
7
18
  <div class="d-flex">
8
19
  <button
@@ -44,6 +55,7 @@
44
55
  </div>
45
56
  <slot name="list-inline" />
46
57
  <router-link
58
+ v-if="!isButtonNextTitle"
47
59
  class="btn btn-link align-self-center width-fit-content m-4"
48
60
  :to="refTo"
49
61
  @click="handleSeeMoreButton"
@@ -80,6 +92,7 @@ export default defineComponent({
80
92
  iabId: { default: undefined, type: Number},
81
93
  rubriqueId: { default: () => [], type: Array as ()=> Array<number> },
82
94
  noRubriquageId: { default: () => [], type: Array as ()=> Array<number> },
95
+ isButtonNextTitle: {default: false, type:Boolean}
83
96
  },
84
97
  emits:['sortChrono','sortPopular', 'displayPrevious', 'displayNext'],
85
98
  data() {
@@ -10,6 +10,7 @@
10
10
  :iab-id="iabId"
11
11
  :rubrique-id="rubriqueId"
12
12
  :no-rubriquage-id="noRubriquageId"
13
+ :is-button-next-title="true"
13
14
  @sortChrono="sortChrono"
14
15
  @sortPopular="sortPopular"
15
16
  >
@@ -18,14 +19,12 @@
18
19
  :loading-text="loading?$t('Loading podcasts ...'):undefined"
19
20
  />
20
21
  <swiper
21
- v-show="loaded"
22
+ v-if="!loading"
22
23
  :slides-per-view="numberItem"
23
24
  :space-between="10"
24
- :slides-per-group="numberItem"
25
- :loop="true"
25
+ :loop="allPodcasts.length>=numberItem"
26
26
  :navigation="true"
27
27
  :modules="modules"
28
- class="mySwiper"
29
28
  >
30
29
  <swiper-slide
31
30
  v-for="p in allPodcasts"
@@ -85,7 +84,6 @@ export default defineComponent({
85
84
  data() {
86
85
  return {
87
86
  loading: true as boolean,
88
- loaded: true as boolean,
89
87
  popularSort: false as boolean,
90
88
  allPodcasts: [] as Array<Podcast>,
91
89
  modules: [Navigation],
@@ -130,13 +128,14 @@ export default defineComponent({
130
128
 
131
129
 
132
130
  mounted() {
131
+ this.handleResize();
133
132
  this.fetchNext();
134
133
  },
135
134
  methods: {
136
135
  handleResize(): void {
137
136
  if (!this.$el) return;
138
137
  const width = (this.$el as HTMLElement).offsetWidth;
139
- const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.7);
138
+ const sixteen = domHelper.convertRemToPixels(this.sizeItem + 0.5);
140
139
  this.numberItem = Math.floor(width / sixteen);
141
140
  },
142
141
  async fetchNext(): Promise<void> {
@@ -152,11 +151,10 @@ export default defineComponent({
152
151
  sort: this.popularSort ? 'POPULARITY' : 'DATE',
153
152
  query: this.query,
154
153
  });
155
- this.loading = false;
156
- this.loaded = true;
157
154
  this.allPodcasts = this.allPodcasts.concat(
158
155
  data.result.filter((pod: Podcast|null) => null !== pod)
159
156
  );
157
+ this.loading = false;
160
158
  },
161
159
  sortPopular(): void {
162
160
  if (this.popularSort) return;
@@ -172,7 +170,6 @@ export default defineComponent({
172
170
  },
173
171
  reset(): void {
174
172
  this.loading = true;
175
- this.loaded = true;
176
173
  this.allPodcasts.length = 0;
177
174
  },
178
175
  },
@@ -183,7 +180,6 @@ export default defineComponent({
183
180
  .swiper {
184
181
  width: 100%;
185
182
  height: 100%;
186
- padding: 50px 10px;
187
183
  }
188
184
  .swiper-button-next, .swiper-button-prev{
189
185
  color: $octopus-primary-color !important;