@saooti/octopus-sdk 37.0.58 → 37.0.60
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 +2 -2
- package/index.ts +1 -0
- package/package.json +2 -1
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +1 -1
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/style.css +5 -5
- package/src/App.vue +16 -2
- package/src/assets/bootstrap.scss +1 -1
- package/src/components/display/emission/EmissionList.vue +14 -2
- package/src/components/display/participant/ParticipantList.vue +14 -2
- package/src/components/display/playlist/PlaylistList.vue +14 -2
- package/src/components/display/playlist/PodcastList.vue +14 -2
- package/src/components/display/podcasts/PodcastList.vue +14 -2
- package/src/components/display/sharing/ShareButtonsIntern.vue +1 -1
- package/src/components/misc/ClassicLazy.vue +82 -0
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/pages/EmissionPage.vue +1 -1
- package/src/components/pages/HomePage.vue +22 -10
- package/src/components/pages/PodcastPage.vue +22 -10
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.
|
|
3
|
+
"version": "37.0.60",
|
|
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",
|
|
Binary file
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<glyph unicode="" glyph-name="send" horiz-adv-x="820" d="M425 422.657l-334.37-33.308-88.397-281.845c-7.687-23.062 5.126-47.402 28.184-55.087 10.249-3.843 21.778-2.562 32.029 2.562l734.080 354.87c20.499 10.251 29.465 34.587 19.218 56.37-3.843 8.968-10.251 15.373-19.218 19.216l-732.799 356.151c-21.778 10.251-47.4 1.281-58.93-20.499-5.126-10.249-6.405-21.778-2.56-32.027l88.397-281.843 334.37-32.029c14.094-1.279 25.622-14.094 23.062-29.465 0-12.811-10.249-21.778-23.062-23.062v0z" />
|
|
47
47
|
<glyph unicode="" glyph-name="search" horiz-adv-x="820" d="M803.702 129.737l-132.279 132.279c47.436 63.527 73.349 142.309 73.349 223.599 0 99.052-38.451 192.253-108.247 262.677-70.214 70.841-164.042 109.71-264.14 109.71-98.634 0-191.836-38.869-262.677-109.71s-109.71-164.251-109.71-262.886c0-100.097 39.078-193.925 109.71-264.14 70.423-69.796 163.624-108.247 262.677-108.247 81.29 0 160.072 25.912 223.599 73.349l132.279-132.279c10.24-10.24 23.823-16.091 37.824-16.091s27.375 5.642 37.824 16.091 16.091 23.823 16.091 37.824c-0.418 14.001-6.060 27.375-16.3 37.824zM637.152 485.406c0-146.071-118.696-264.766-264.766-264.766s-264.766 118.696-264.766 264.766c0 143.563 121.203 264.766 264.766 264.766 145.862 0 264.766-118.696 264.766-264.766z" />
|
|
48
48
|
<glyph unicode="" glyph-name="facebook" horiz-adv-x="820" d="M666.262 960.001h-132.917c-148.868 0-245.632-98.892-245.632-252.011v-115.906h-132.917c-11.695 0-21.269-9.569-21.269-21.269v-168.008c0-11.698 9.569-21.267 21.269-21.267h132.917v-424.274c0-11.698 9.569-21.267 21.269-21.267h174.389c11.698 0 21.269 9.569 21.269 21.267v425.337h156.312c11.698 0 21.267 9.569 21.267 21.267v168.008c0 5.318-2.129 10.632-6.377 14.885s-9.569 6.377-14.887 6.377h-157.374v97.827c0 46.786 11.698 71.244 72.307 71.244h89.319c11.698 0 21.267 9.569 21.267 21.269v155.247c0 11.695-8.506 21.269-20.203 21.269z" />
|
|
49
|
-
<glyph unicode="" glyph-name="twitter" d="
|
|
49
|
+
<glyph unicode="" glyph-name="twitter" d="M2.632 927.298l395.466-528.706-398.099-429.89h89.501l348.286 376.229 281.463-376.229h304.75l-417.538 558.472 370.357 400.123h-89.501l-320.747-346.666-259.189 346.666h-304.75zM134.252 861.285h139.922l618.207-826.571h-139.922l-618.207 826.571z" />
|
|
50
50
|
<glyph unicode="" glyph-name="remove" horiz-adv-x="820" d="M58.572 799.427l702.857-702.857zM761.43 38.001c-17.569 0-29.29 5.862-41 17.569l-702.857 702.857c-23.431 23.431-23.431 58.569 0 81.999s58.569 23.431 81.999 0l702.857-702.857c23.431-23.431 23.431-58.569 0-81.999-11.71-11.71-23.431-17.569-41-17.569zM761.43 799.427l-702.857-702.857zM58.572 38.001c-17.569 0-29.29 5.862-41 17.569-23.431 23.431-23.431 58.569 0 81.999l702.857 702.857c23.431 23.431 58.569 23.431 81.999 0s23.431-58.569 0-81.999l-702.857-702.857c-11.71-11.71-23.431-17.569-41-17.569z" />
|
|
51
51
|
<glyph unicode="" glyph-name="rss" horiz-adv-x="820" d="M170.835 140.497c0-37.741-30.593-68.334-68.334-68.334s-68.334 30.595-68.334 68.334c0 37.741 30.593 68.334 68.334 68.334s68.334-30.595 68.334-68.334zM102.501 37.998c-54.666 0-102.501 47.833-102.501 102.501s47.833 102.501 102.501 102.501 102.501-47.833 102.501-102.501-47.833-102.501-102.501-102.501zM102.501 174.664c-20.499 0-34.165-13.666-34.165-34.167s13.666-34.165 34.165-34.165 34.165 13.666 34.165 34.165-13.666 34.165-34.165 34.165zM478.335 37.998c-41 0-68.334 27.334-68.334 68.334 0 191.335-150.335 341.667-341.667 341.667-41 0-68.334 27.334-68.334 68.334s27.334 68.334 68.334 68.334c266.502 0 478.336-211.836 478.336-478.336 0-41-27.334-68.334-68.334-68.334zM751.668 37.998c-41 0-68.334 27.334-68.334 68.334 0 341.667-273.335 615.002-615.002 615.002-41 0-68.334 27.334-68.334 68.334s27.334 68.334 68.334 68.334c416.837 0 751.669-334.834 751.669-751.669 0-41-27.334-68.334-68.334-68.334z" />
|
|
52
52
|
<glyph unicode="" glyph-name="stop" horiz-adv-x="820" d="M75.524 851.067h668.949c41.617 0 75.528-33.91 75.528-75.528v-655.077c0-41.617-33.91-75.528-75.528-75.528h-668.949c-41.615 0-75.526 33.91-75.526 75.528v655.077c0 41.617 33.91 75.526 75.526 75.526z" />
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'icomoon';
|
|
3
|
-
src: url('/css/fonts/icomoon.eot?
|
|
4
|
-
src: url('/css/fonts/icomoon.eot?
|
|
5
|
-
url('/css/fonts/icomoon.ttf?
|
|
6
|
-
url('/css/fonts/icomoon.woff?
|
|
7
|
-
url('/css/fonts/icomoon.svg?
|
|
3
|
+
src: url('/css/fonts/icomoon.eot?yi2y5s');
|
|
4
|
+
src: url('/css/fonts/icomoon.eot?yi2y5s#iefix') format('embedded-opentype'),
|
|
5
|
+
url('/css/fonts/icomoon.ttf?yi2y5s') format('truetype'),
|
|
6
|
+
url('/css/fonts/icomoon.woff?yi2y5s') format('woff'),
|
|
7
|
+
url('/css/fonts/icomoon.svg?yi2y5s#icomoon') format('svg');
|
|
8
8
|
font-weight: normal;
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-display: block;
|
package/src/App.vue
CHANGED
|
@@ -8,16 +8,22 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<CategoryFilter />
|
|
10
10
|
<router-view />
|
|
11
|
-
<
|
|
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"]),
|
|
@@ -227,7 +227,7 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
|
|
|
227
227
|
}
|
|
228
228
|
.btn-twitter {
|
|
229
229
|
background: #d2ecfc !important;
|
|
230
|
-
color: #1da1f2 !important;
|
|
230
|
+
//color: #1da1f2 !important;
|
|
231
231
|
&:hover {
|
|
232
232
|
background: #bbe3fb !important;
|
|
233
233
|
}
|
|
@@ -19,9 +19,19 @@
|
|
|
19
19
|
class="emission-list"
|
|
20
20
|
:class="smallItems ? 'three-emissions' : 'two-emissions'"
|
|
21
21
|
>
|
|
22
|
-
<
|
|
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
|
-
|
|
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],
|
|
@@ -17,9 +17,19 @@
|
|
|
17
17
|
>
|
|
18
18
|
<template #list>
|
|
19
19
|
<div class="podcast-list">
|
|
20
|
-
<
|
|
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
|
-
|
|
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
|
-
<
|
|
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
|
-
|
|
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
|
-
<
|
|
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
|
-
|
|
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],
|
|
@@ -21,9 +21,19 @@
|
|
|
21
21
|
>
|
|
22
22
|
<template #list>
|
|
23
23
|
<div class="podcast-list">
|
|
24
|
-
<
|
|
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
|
-
|
|
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],
|
|
@@ -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>
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page-box">
|
|
3
3
|
<template v-if="0 === rubriquageFilter.length">
|
|
4
|
-
<
|
|
4
|
+
<ClassicLazy
|
|
5
5
|
v-for="c in categories"
|
|
6
6
|
:key="c.id"
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
|
|
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
|
-
<
|
|
18
|
+
<ClassicLazy
|
|
14
19
|
v-for="r in rubriqueToShow"
|
|
15
20
|
:key="r.rubriqueId"
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
|
|
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
|
-
<
|
|
50
|
-
:
|
|
51
|
-
:
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
:
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
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],
|