@saooti/octopus-sdk 37.0.57 → 37.0.59

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/index.html CHANGED
@@ -17,13 +17,13 @@
17
17
  <!-- built files will be auto injected -->
18
18
  </body>
19
19
  <!-- Test digiteka video -->
20
- <script type="text/javascript">
20
+ <!-- <script type="text/javascript">
21
21
  var _ultimedia_host = (window.location.protocol == 'https:' ? 'https' : 'http') + "://www.ultimedia.com";
22
22
  var _ultimedia_script = document.createElement("script");
23
23
 
24
24
  _ultimedia_script.setAttribute("type", "text/javascript");
25
25
  _ultimedia_script.setAttribute("src", _ultimedia_host + '/js/common/visible_player.js');
26
26
  document.getElementsByTagName('head')[0].appendChild(_ultimedia_script);
27
- </script>
27
+ </script> -->
28
28
  <script type="module" src="./src/main.ts"></script>
29
29
  </html>
package/index.ts CHANGED
@@ -30,6 +30,7 @@ export const getMessageModal = () => import("./src/components/misc/modal/Message
30
30
  export const getErrorMessage = () => import("./src/components/misc/ErrorMessage.vue");
31
31
  export const getPopover = () => import("./src/components/misc/ClassicPopover.vue");
32
32
  export const getClassicModal = () => import("./src/components/misc/modal/ClassicModal.vue");
33
+ export const getClassicLazy = () => import("./src/components/misc/ClassicLazy.vue");
33
34
 
34
35
 
35
36
  //Display
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "37.0.57",
3
+ "version": "37.0.59",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -24,6 +24,7 @@
24
24
  "@vue/cli": "^5.0.8",
25
25
  "@vue/compat": "^3.3.4",
26
26
  "@vuepic/vue-datepicker": "^7.0.0",
27
+ "@vueuse/core": "^10.5.0",
27
28
  "autoprefixer": "^10.4.16",
28
29
  "axios": "^1.5.1",
29
30
  "dayjs": "^1.11.10",
package/src/App.vue CHANGED
@@ -8,16 +8,22 @@
8
8
  />
9
9
  <CategoryFilter />
10
10
  <router-view />
11
- <FooterOctopus />
11
+ <ClassicLazy
12
+ v-if="pageFullyLoad"
13
+ :min-height="125"
14
+ :unrender="true"
15
+ >
16
+ <FooterOctopus />
17
+ </ClassicLazy>
12
18
  <PlayerComponent />
13
19
  </div>
14
20
  </template>
15
21
 
16
22
  <script lang="ts">
17
23
  import TopBar from "@/components/misc/TopBar.vue";
18
- import FooterOctopus from "@/components/misc/FooterSection.vue";
19
24
  import PlayerComponent from "@/components/misc/player/PlayerComponent.vue";
20
25
  import CategoryFilter from "@/components/display/categories/CategoryFilter.vue";
26
+ import ClassicLazy from "@/components/misc/ClassicLazy.vue";
21
27
  import { state } from "./stores/ParamSdkStore";
22
28
  import { Rubriquage } from "./stores/class/rubrique/rubriquage";
23
29
  import { RubriquageFilter } from "./stores/class/rubrique/rubriquageFilter";
@@ -31,6 +37,9 @@ import { Category } from "./stores/class/general/category";
31
37
  const LeftMenu = defineAsyncComponent(
32
38
  () => import("@/components/misc/LeftMenu.vue"),
33
39
  );
40
+ const FooterOctopus = defineAsyncComponent(
41
+ () => import("@/components/misc/FooterSection.vue"),
42
+ );
34
43
  export default defineComponent({
35
44
  name: "App",
36
45
 
@@ -40,6 +49,7 @@ export default defineComponent({
40
49
  CategoryFilter,
41
50
  FooterOctopus,
42
51
  PlayerComponent,
52
+ ClassicLazy
43
53
  },
44
54
 
45
55
  mixins: [initSDK],
@@ -49,6 +59,7 @@ export default defineComponent({
49
59
  displayMenu: false as boolean,
50
60
  reload: false as boolean,
51
61
  isInit: false as boolean,
62
+ pageFullyLoad: false as boolean
52
63
  };
53
64
  },
54
65
 
@@ -65,6 +76,9 @@ export default defineComponent({
65
76
  },
66
77
  async created() {
67
78
  await this.initApp();
79
+ setTimeout(()=>{
80
+ this.pageFullyLoad = true;
81
+ }, 2000)
68
82
  },
69
83
  methods: {
70
84
  ...mapActions(useFilterStore, ["filterUpdateIab", "filterUpdateRubrique"]),
@@ -19,9 +19,19 @@
19
19
  class="emission-list"
20
20
  :class="smallItems ? 'three-emissions' : 'two-emissions'"
21
21
  >
22
- <template v-for="e in displayArray" :key="e.emissionId">
22
+ <ClassicLazy v-for="e in displayArray" :key="e.emissionId" :minHeight="250" :unrender="true">
23
23
  <EmissionItem v-if="0 !== e.emissionId" :emission="e" />
24
- </template>
24
+ <template #preview>
25
+ <router-link
26
+ :to="{
27
+ name: 'emission',
28
+ params: { emissionId: e.emissionId }
29
+ }"
30
+ >
31
+ {{ e.name }}
32
+ </router-link>
33
+ </template>
34
+ </ClassicLazy>
25
35
  </div>
26
36
  <div
27
37
  v-else
@@ -46,6 +56,7 @@
46
56
  <script lang="ts">
47
57
  import ListPaginate from "../list/ListPaginate.vue";
48
58
  import octopusApi from "@saooti/octopus-api";
59
+ import ClassicLazy from "../../misc/ClassicLazy.vue";
49
60
  import { handle403 } from "../../mixins/handle403";
50
61
  import { state } from "../../../stores/ParamSdkStore";
51
62
  import { Emission, emptyEmissionData } from "@/stores/class/general/emission";
@@ -67,6 +78,7 @@ export default defineComponent({
67
78
  EmissionItem,
68
79
  EmissionPlayerItem,
69
80
  ListPaginate,
81
+ ClassicLazy
70
82
  },
71
83
 
72
84
  mixins: [handle403],
@@ -59,7 +59,7 @@
59
59
  {{ p.title }}
60
60
  </div>
61
61
  </router-link>
62
- <PodcastPlayBar :podcast-id="p.podcastId" :duration="p.duration" />
62
+ <PodcastPlayBar v-else :podcast-id="p.podcastId" :duration="p.duration" />
63
63
  </div>
64
64
  <button
65
65
  v-if="
@@ -99,13 +99,15 @@ import octopusApi from "@saooti/octopus-api";
99
99
  import { Emission } from "@/stores/class/general/emission";
100
100
  import { Podcast } from "@/stores/class/general/podcast";
101
101
  import { state } from "../../../stores/ParamSdkStore";
102
- import PodcastPlayBar from "../podcasts/PodcastPlayBar.vue";
103
102
  import imageProxy from "../../mixins/imageProxy";
104
103
  import displayMethods from "../../mixins/displayMethods";
105
104
  import { usePlayerStore } from "@/stores/PlayerStore";
106
105
  import { useFilterStore } from "@/stores/FilterStore";
107
106
  import { mapState, mapActions } from "pinia";
108
- import { defineComponent } from "vue";
107
+ import { defineAsyncComponent, defineComponent } from "vue";
108
+ const PodcastPlayBar = defineAsyncComponent(
109
+ () => import("../podcasts/PodcastPlayBar.vue"),
110
+ );
109
111
  export default defineComponent({
110
112
  name: "EmissionPlayerItem",
111
113
 
@@ -17,9 +17,19 @@
17
17
  >
18
18
  <template #list>
19
19
  <div class="podcast-list">
20
- <template v-for="p in displayArray" :key="p.participantId">
20
+ <ClassicLazy v-for="p in displayArray" :key="p.participantId" :minHeight="360" :unrender="true">
21
21
  <ParticipantItem v-if="0 !== p.participantId" :participant="p" />
22
- </template>
22
+ <template #preview>
23
+ <router-link
24
+ :to="{
25
+ name: 'participant',
26
+ params: { participantId: p.participantId },
27
+ }"
28
+ >
29
+ {{ p.lastName }}
30
+ </router-link>
31
+ </template>
32
+ </ClassicLazy>
23
33
  </div>
24
34
  </template>
25
35
  </ListPaginate>
@@ -27,6 +37,7 @@
27
37
 
28
38
  <script lang="ts">
29
39
  import ListPaginate from "../list/ListPaginate.vue";
40
+ import ClassicLazy from "../../misc/ClassicLazy.vue";
30
41
  import { handle403 } from "../../mixins/handle403";
31
42
  import octopusApi from "@saooti/octopus-api";
32
43
  import ParticipantItem from "./ParticipantItem.vue";
@@ -44,6 +55,7 @@ export default defineComponent({
44
55
  components: {
45
56
  ParticipantItem,
46
57
  ListPaginate,
58
+ ClassicLazy
47
59
  },
48
60
 
49
61
  mixins: [handle403],
@@ -15,15 +15,26 @@
15
15
  >
16
16
  <template #list>
17
17
  <div class="emission-list two-emissions">
18
- <template v-for="p in displayArray" :key="p.playlistId">
18
+ <ClassicLazy v-for="p in displayArray" :key="p.playlistId" :minHeight="250" :unrender="true">
19
19
  <PlaylistItem v-if="0 !== p.playlistId" :playlist="p" />
20
- </template>
20
+ <template #preview>
21
+ <router-link
22
+ :to="{
23
+ name: 'playlist',
24
+ params: { playlistId: p.playlistId },
25
+ }"
26
+ >
27
+ {{ p.title }}
28
+ </router-link>
29
+ </template>
30
+ </ClassicLazy>
21
31
  </div>
22
32
  </template>
23
33
  </ListPaginate>
24
34
  </template>
25
35
 
26
36
  <script lang="ts">
37
+ import ClassicLazy from "../../misc/ClassicLazy.vue";
27
38
  import ListPaginate from "../list/ListPaginate.vue";
28
39
  import { handle403 } from "../../mixins/handle403";
29
40
  import octopusApi from "@saooti/octopus-api";
@@ -39,6 +50,7 @@ export default defineComponent({
39
50
  components: {
40
51
  PlaylistItem,
41
52
  ListPaginate,
53
+ ClassicLazy
42
54
  },
43
55
 
44
56
  mixins: [handle403],
@@ -31,9 +31,19 @@
31
31
  >
32
32
  <template #list>
33
33
  <div class="podcast-list">
34
- <template v-for="p in podcastsDisplay" :key="p.podcastId">
34
+ <ClassicLazy v-for="p in podcastsDisplay" :key="p.podcastId" :minHeight="410" :unrender="true">
35
35
  <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
36
- </template>
36
+ <template #preview>
37
+ <router-link
38
+ :to="{
39
+ name: 'podcast',
40
+ params: { podcastId: p.podcastId }
41
+ }"
42
+ >
43
+ {{ p.title }}
44
+ </router-link>
45
+ </template>
46
+ </ClassicLazy>
37
47
  </div>
38
48
  </template>
39
49
  </ListPaginate>
@@ -48,6 +58,7 @@ import octopusApi from "@saooti/octopus-api";
48
58
  import PodcastItem from "../podcasts/PodcastItem.vue";
49
59
  import { state } from "../../../stores/ParamSdkStore";
50
60
  import ClassicSearch from "../../form/ClassicSearch.vue";
61
+ import ClassicLazy from "../../misc/ClassicLazy.vue";
51
62
  import { Podcast } from "@/stores/class/general/podcast";
52
63
  import { Playlist } from "@/stores/class/general/playlist";
53
64
  import { defineComponent } from "vue";
@@ -59,6 +70,7 @@ export default defineComponent({
59
70
  PodcastItem,
60
71
  ClassicSearch,
61
72
  ListPaginate,
73
+ ClassicLazy
62
74
  },
63
75
 
64
76
  mixins: [handle403, orgaComputed],
@@ -13,7 +13,7 @@
13
13
  >
14
14
  {{ title }}
15
15
  </router-link>
16
- <PodcastPlayBar :podcast-id="podcastId" :duration="duration" class="mx-2" />
16
+ <PodcastPlayBar v-if="isProgressBar" :podcast-id="podcastId" :duration="duration" class="mx-2" />
17
17
 
18
18
  <div class="mx-2 d-flex align-items-center justify-content-between mt-2">
19
19
  <div v-if="isPodcastmaker" class="useless-div-for-podcastmaker" />
@@ -42,9 +42,11 @@ import AnimatorsItem from "./AnimatorsItem.vue";
42
42
  import { state } from "../../../stores/ParamSdkStore";
43
43
  import { orgaComputed } from "../../mixins/orgaComputed";
44
44
  import dayjs from "dayjs";
45
- import PodcastPlayBar from "./PodcastPlayBar.vue";
46
- import { defineComponent } from "vue";
45
+ import { defineAsyncComponent, defineComponent } from "vue";
47
46
  import { Participant } from "@/stores/class/general/participant";
47
+ const PodcastPlayBar = defineAsyncComponent(
48
+ () => import("./PodcastPlayBar.vue"),
49
+ );
48
50
  export default defineComponent({
49
51
  name: "PodcastItemInfo",
50
52
 
@@ -66,6 +68,9 @@ export default defineComponent({
66
68
  },
67
69
 
68
70
  computed: {
71
+ isProgressBar(): boolean {
72
+ return state.emissionsPage.progressBar as boolean;
73
+ },
69
74
  isPodcastmaker(): boolean {
70
75
  return state.generalParameters.podcastmaker as boolean;
71
76
  },
@@ -21,9 +21,19 @@
21
21
  >
22
22
  <template #list>
23
23
  <div class="podcast-list">
24
- <template v-for="p in displayArray" :key="p.podcastId">
24
+ <ClassicLazy v-for="p in displayArray" :key="p.podcastId" :minHeight="410" :unrender="true">
25
25
  <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
26
- </template>
26
+ <template #preview>
27
+ <router-link
28
+ :to="{
29
+ name: 'podcast',
30
+ params: { podcastId: p.podcastId }
31
+ }"
32
+ >
33
+ {{ p.title }}
34
+ </router-link>
35
+ </template>
36
+ </ClassicLazy>
27
37
  </div>
28
38
  </template>
29
39
  </ListPaginate>
@@ -34,6 +44,7 @@ import ListPaginate from "../list/ListPaginate.vue";
34
44
  import { handle403 } from "../../mixins/handle403";
35
45
  import octopusApi from "@saooti/octopus-api";
36
46
  import PodcastItem from "./PodcastItem.vue";
47
+ import ClassicLazy from "../../misc/ClassicLazy.vue";
37
48
  import { state } from "../../../stores/ParamSdkStore";
38
49
  import { useAuthStore } from "@/stores/AuthStore";
39
50
  import { useFilterStore } from "@/stores/FilterStore";
@@ -48,6 +59,7 @@ export default defineComponent({
48
59
  components: {
49
60
  PodcastItem,
50
61
  ListPaginate,
62
+ ClassicLazy
51
63
  },
52
64
 
53
65
  mixins: [handle403],
@@ -93,6 +93,7 @@
93
93
  :is-guest="true"
94
94
  />
95
95
  <PodcastPlayBar
96
+ v-if="isProgressBar"
96
97
  :podcast-id="podcast.podcastId"
97
98
  :duration="podcast.duration"
98
99
  />
@@ -129,7 +130,6 @@
129
130
  </template>
130
131
 
131
132
  <script lang="ts">
132
- import PodcastPlayBar from "./PodcastPlayBar.vue";
133
133
  import PodcastImage from "./PodcastImage.vue";
134
134
  import ParticipantDescription from "./ParticipantDescription.vue";
135
135
  import TagList from "./TagList.vue";
@@ -152,6 +152,9 @@ const RecordingItemButton = defineAsyncComponent(
152
152
  const EditBox = defineAsyncComponent(
153
153
  () => import("@/components/display/edit/EditBox.vue"),
154
154
  );
155
+ const PodcastPlayBar = defineAsyncComponent(
156
+ () => import("./PodcastPlayBar.vue"),
157
+ );
155
158
  export default defineComponent({
156
159
  name: "PodcastModuleBox",
157
160
  components: {
@@ -187,6 +190,9 @@ export default defineComponent({
187
190
  isPodcastmaker(): boolean {
188
191
  return state.generalParameters.podcastmaker as boolean;
189
192
  },
193
+ isProgressBar(): boolean {
194
+ return state.emissionsPage.progressBar as boolean;
195
+ },
190
196
  date(): string {
191
197
  if (!this.podcast || 1970 === dayjs(this.podcast.pubDate).year()) {
192
198
  return "";
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-if="isProgressBar" class="d-flex align-items-center podcast-play-bar">
2
+ <div class="d-flex align-items-center podcast-play-bar">
3
3
  <div class="me-2">
4
4
  {{ playedTime }}
5
5
  </div>
@@ -20,7 +20,6 @@
20
20
  import ProgressBar from "../../misc/ProgressBar.vue";
21
21
  import DurationHelper from "../../../helper/duration";
22
22
  import displayMethods from "../../mixins/displayMethods";
23
- import { state } from "../../../stores/ParamSdkStore";
24
23
  import { usePlayerStore } from "@/stores/PlayerStore";
25
24
  import { mapState, mapActions } from "pinia";
26
25
  import { defineComponent } from "vue";
@@ -40,9 +39,6 @@ export default defineComponent({
40
39
  "playerElapsed",
41
40
  "playerTotal",
42
41
  ]),
43
- isProgressBar(): boolean {
44
- return state.emissionsPage.progressBar as boolean;
45
- },
46
42
  percentProgress(): number {
47
43
  if (this.podcastId !== this.playerPodcast?.podcastId) {
48
44
  return 0;
@@ -34,9 +34,13 @@
34
34
  </template>
35
35
 
36
36
  <script lang="ts">
37
- import ClassicPopover from "../../misc/ClassicPopover.vue";
38
- import tagOfMixins from "../../mixins/tagOfMixins";
39
- import { defineComponent } from "vue";
37
+ import { defineAsyncComponent, defineComponent } from "vue";
38
+ const ClassicPopover = defineAsyncComponent(
39
+ () => import("../../misc/ClassicPopover.vue"),
40
+ );
41
+ const tagOfMixins = defineAsyncComponent(
42
+ () => import("../../mixins/tagOfMixins"),
43
+ );
40
44
  export default defineComponent({
41
45
  name: "TagList",
42
46
  components: {
@@ -100,7 +100,7 @@
100
100
  :url-page="urlPage"
101
101
  @close="qrCode = false"
102
102
  />
103
- <SnackBar ref="snackbar" position="bottom-left" />
103
+ <SnackBar v-if="lazyLoadingSnackbar" ref="snackbar" position="bottom-left" />
104
104
  </div>
105
105
  </template>
106
106
 
@@ -111,7 +111,6 @@ import octopusApi from "@saooti/octopus-api";
111
111
  import { Emission } from "@/stores/class/general/emission";
112
112
  import { Podcast } from "@/stores/class/general/podcast";
113
113
  import { state } from "../../../stores/ParamSdkStore";
114
- import SnackBar from "../../misc/SnackBar.vue";
115
114
  import displayMethods from "../../mixins/displayMethods";
116
115
  import { defineComponent, defineAsyncComponent } from "vue";
117
116
  import { Playlist } from "@/stores/class/general/playlist";
@@ -124,6 +123,9 @@ const NewsletterModal = defineAsyncComponent(
124
123
  const QrCodeModal = defineAsyncComponent(
125
124
  () => import("../../misc/modal/QrCodeModal.vue"),
126
125
  );
126
+ const SnackBar = defineAsyncComponent(
127
+ () => import("../../misc/SnackBar.vue"),
128
+ );
127
129
  export default defineComponent({
128
130
  components: {
129
131
  ClipboardModal,
@@ -150,6 +152,7 @@ export default defineComponent({
150
152
  newsletter: false as boolean,
151
153
  qrCode: false as boolean,
152
154
  displayRss: false as boolean,
155
+ lazyLoadingSnackbar: false as boolean,
153
156
  };
154
157
  },
155
158
  computed: {
@@ -237,9 +240,16 @@ export default defineComponent({
237
240
  this.dataRSSSave = !this.dataRSSSave;
238
241
  },
239
242
  afterCopy(): void {
240
- (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
241
- this.$t("Link in clipboard"),
242
- );
243
+ if(!this.lazyLoadingSnackbar){
244
+ this.lazyLoadingSnackbar = true;
245
+ setTimeout(() => {
246
+ this.afterCopy();
247
+ }, 500);
248
+ }else{
249
+ (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
250
+ this.$t("Link in clipboard"),
251
+ );
252
+ }
243
253
  },
244
254
  },
245
255
  });
@@ -27,7 +27,7 @@
27
27
  <span :class="platform.icon" />{{ platform.title }}
28
28
  </router-link>
29
29
  </div>
30
- <SnackBar ref="snackbar" position="bottom-left" />
30
+ <SnackBar v-if="lazyLoadingSnackbar" ref="snackbar" position="bottom-left" />
31
31
  </div>
32
32
  </template>
33
33
 
@@ -56,6 +56,7 @@ export default defineComponent({
56
56
  return {
57
57
  emission: undefined as Emission | undefined,
58
58
  rss: "" as string,
59
+ lazyLoadingSnackbar: false as boolean,
59
60
  };
60
61
  },
61
62
  computed: {
@@ -128,9 +129,16 @@ export default defineComponent({
128
129
  this.rss = `${state.octopusApi.url}rss/emission/${this.emissionId}.rss`;
129
130
  },
130
131
  afterCopy(): void {
131
- (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
132
- this.$t("Link in clipboard"),
133
- );
132
+ if(!this.lazyLoadingSnackbar){
133
+ this.lazyLoadingSnackbar = true;
134
+ setTimeout(() => {
135
+ this.afterCopy();
136
+ }, 500);
137
+ }else{
138
+ (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
139
+ this.$t("Link in clipboard"),
140
+ );
141
+ }
134
142
  },
135
143
  },
136
144
  });
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <div
3
+ ref="targetEl"
4
+ :style="`min-height:${fixedMinHeight ? fixedMinHeight : minHeight}px`"
5
+ >
6
+ <slot v-if="shouldRender" />
7
+ <slot v-else name="preview" />
8
+ </div>
9
+ </template>
10
+ <script lang="ts">
11
+ import { useIntersectionObserver } from "@vueuse/core";
12
+ import { ref, nextTick } from "vue";
13
+
14
+ function onIdle(cb = () => {}) {
15
+ if ("requestIdleCallback" in window) {
16
+ window.requestIdleCallback(cb);
17
+ } else {
18
+ setTimeout(() => {
19
+ nextTick(cb);
20
+ }, 300);
21
+ }
22
+ }
23
+
24
+ export default {
25
+ props: {
26
+ renderOnIdle: Boolean,
27
+ unrender: Boolean,
28
+ minHeight: Number,
29
+ unrenderDelay: {
30
+ type: Number,
31
+ default: 10000,
32
+ },
33
+ },
34
+ setup(props) {
35
+ const shouldRender = ref(false);
36
+ const targetEl = ref();
37
+ const fixedMinHeight = ref(0);
38
+ let unrenderTimer;
39
+ let renderTimer;
40
+
41
+ const { stop } = useIntersectionObserver(
42
+ targetEl,
43
+ ([{ isIntersecting }]) => {
44
+ if (isIntersecting) {
45
+ // perhaps the user re-scrolled to a component that was set to unrender. In that case stop the unrendering timer
46
+ clearTimeout(unrenderTimer);
47
+ // if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
48
+ renderTimer = setTimeout(
49
+ () => (shouldRender.value = true),
50
+ props.unrender ? 200 : 0
51
+ );
52
+ shouldRender.value = true;
53
+ if (!props.unrender) {
54
+ stop();
55
+ }
56
+ } else if (props.unrender) {
57
+ // if the component was set to render, cancel that
58
+ clearTimeout(renderTimer);
59
+ unrenderTimer = setTimeout(() => {
60
+ fixedMinHeight.value = targetEl.value.clientHeight;
61
+ shouldRender.value = false;
62
+ }, props.unrenderDelay);
63
+ }
64
+ },
65
+ {
66
+ rootMargin: "600px",
67
+ }
68
+ );
69
+
70
+ if (props.renderOnIdle) {
71
+ onIdle(() => {
72
+ shouldRender.value = true;
73
+ if (!props.unrender) {
74
+ stop();
75
+ }
76
+ });
77
+ }
78
+
79
+ return { targetEl, shouldRender, fixedMinHeight };
80
+ },
81
+ };
82
+ </script>
@@ -14,7 +14,7 @@
14
14
  </router-link>
15
15
  </template>
16
16
  <OrganisationChooserLight
17
- v-if="!isPodcastmaker"
17
+ v-if="!isPodcastmaker && organisationId"
18
18
  width="auto"
19
19
  page="leftMenu"
20
20
  :defaultanswer="$t('No organisation filter')"
@@ -28,7 +28,7 @@
28
28
  />
29
29
  </router-link>
30
30
  <OrganisationChooserLight
31
- v-if="!isPodcastmaker"
31
+ v-if="!isPodcastmaker && organisationId"
32
32
  page="topBar"
33
33
  width="auto"
34
34
  :defaultanswer="$t('No organisation filter')"
@@ -116,7 +116,7 @@ export default defineComponent({
116
116
  EditBox,
117
117
  SubscribeButtons,
118
118
  LiveHorizontalList,
119
- ClassicLoading,
119
+ ClassicLoading
120
120
  },
121
121
  mixins: [displayMethods, handle403, orgaComputed, imageProxy],
122
122
  props: {
@@ -1,22 +1,32 @@
1
1
  <template>
2
2
  <div class="page-box">
3
3
  <template v-if="0 === rubriquageFilter.length">
4
- <PodcastInlineList
4
+ <ClassicLazy
5
5
  v-for="c in categories"
6
6
  :key="c.id"
7
- :iab-id="c.id"
8
- :title="c.name"
9
- :button-text="$t('All podcast button', { name: c.name })"
10
- />
7
+ :minHeight="650"
8
+ :unrender="true"
9
+ >
10
+ <PodcastInlineList
11
+ :iab-id="c.id"
12
+ :title="c.name"
13
+ :button-text="$t('All podcast button', { name: c.name })"
14
+ />
15
+ </ClassicLazy>
11
16
  </template>
12
17
  <template v-else>
13
- <PodcastInlineList
18
+ <ClassicLazy
14
19
  v-for="r in rubriqueToShow"
15
20
  :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
- />
21
+ :minHeight="650"
22
+ :unrender="true"
23
+ >
24
+ <PodcastInlineList
25
+ :rubrique-id="rubriqueId.concat(r.rubriqueId)"
26
+ :title="r.name"
27
+ :button-text="$t('All podcast button', { name: r.name })"
28
+ />
29
+ </ClassicLazy>
20
30
  <template v-if="rubriqueDisplay && rubriqueDisplay.length > 0">
21
31
  <PodcastInlineList
22
32
  v-if="rubriqueDisplay.length < rubriqueMaxDisplay"
@@ -48,6 +58,7 @@
48
58
 
49
59
  <script lang="ts">
50
60
  import PodcastInlineList from "../display/podcasts/PodcastInlineList.vue";
61
+ import ClassicLazy from "../misc/ClassicLazy.vue";
51
62
  import { state } from "../../stores/ParamSdkStore";
52
63
  import { RubriquageFilter } from "@/stores/class/rubrique/rubriquageFilter";
53
64
  import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
@@ -61,6 +72,7 @@ export default defineComponent({
61
72
  name: "HomePage",
62
73
  components: {
63
74
  PodcastInlineList,
75
+ ClassicLazy
64
76
  },
65
77
  data() {
66
78
  return {
@@ -46,18 +46,28 @@
46
46
  :title="$t('More episodes of this emission')"
47
47
  :button-text="$t('All podcast emission button')"
48
48
  />
49
- <PodcastInlineList
50
- :podcast-id="podcastId"
51
- :title="$t('Suggested listening')"
52
- />
53
- <PodcastInlineList
49
+ <ClassicLazy
50
+ :min-height="550"
51
+ :unrender="true"
52
+ >
53
+ <PodcastInlineList
54
+ :podcast-id="podcastId"
55
+ :title="$t('Suggested listening')"
56
+ />
57
+ </ClassicLazy>
58
+ <ClassicLazy
54
59
  v-for="c in categories"
55
60
  :key="c.id"
56
- :iab-id="c.id"
57
- :href="'/main/pub/category/' + c.id"
58
- :title="$t('More episodes of this category : ', { name: c.name })"
59
- :button-text="$t('All podcast button', { name: c.name })"
60
- />
61
+ :min-height="550"
62
+ :unrender="true"
63
+ >
64
+ <PodcastInlineList
65
+ :iab-id="c.id"
66
+ :href="'/main/pub/category/' + c.id"
67
+ :title="$t('More episodes of this category : ', { name: c.name })"
68
+ :button-text="$t('All podcast button', { name: c.name })"
69
+ />
70
+ </ClassicLazy>
61
71
  </div>
62
72
  </template>
63
73
  <ClassicLoading
@@ -76,6 +86,7 @@ import imageProxy from "../mixins/imageProxy";
76
86
  import { orgaComputed } from "../mixins/orgaComputed";
77
87
  import PodcastInlineList from "../display/podcasts/PodcastInlineList.vue";
78
88
  import PodcastModuleBox from "../display/podcasts/PodcastModuleBox.vue";
89
+ import ClassicLazy from "../misc/ClassicLazy.vue";
79
90
  import ClassicLoading from "../form/ClassicLoading.vue";
80
91
  import octopusApi from "@saooti/octopus-api";
81
92
  import crudApi from "@/api/classicCrud";
@@ -116,6 +127,7 @@ export default defineComponent({
116
127
  CommentSection,
117
128
  PodcastModuleBox,
118
129
  ClassicLoading,
130
+ ClassicLazy,
119
131
  },
120
132
 
121
133
  mixins: [handle403, orgaComputed, imageProxy],
@@ -3,15 +3,15 @@ import { Category } from "./class/general/category";
3
3
 
4
4
  const state: ParamStore = {
5
5
  generalParameters: {
6
- organisationId: /* "7e67406d-c1f5-4f98-91ca-dd45583aa1a6" */"ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c",
7
- authenticated: true,
8
- isAdmin: true,
9
- isRoleLive: true,
6
+ organisationId: undefined/* "ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c" */,
7
+ authenticated: false,
8
+ isAdmin: false,
9
+ isRoleLive: false,
10
10
  isCommments: false,
11
11
  isOrganisation: false,
12
12
  isPlaylist: false,
13
13
  isProduction: false,
14
- isContribution: true,
14
+ isContribution: false,
15
15
  ApiUri: "https://api.dev2.saooti.org/",
16
16
  podcastmaker: false,
17
17
  buttonPlus: true,