@saooti/octopus-sdk 41.0.0-SNAPSHOT → 41.0.0
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.ts +2 -1
- package/package.json +3 -1
- package/src/App.vue +3 -7
- package/src/components/composable/player/usePlayerLive.ts +1 -1
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +15 -8
- package/src/components/display/categories/CategoryChooser.vue +2 -0
- package/src/components/display/comments/item/CommentItem.vue +4 -0
- package/src/components/display/edit/EditBox.vue +4 -0
- package/src/components/display/emission/EmissionList.vue +5 -8
- package/src/components/display/filter/AdvancedSearch.vue +0 -3
- package/src/components/display/list/ListPaginate.vue +4 -12
- package/src/components/display/live/LiveItem.vue +2 -3
- package/src/components/display/participant/ParticipantList.vue +6 -9
- package/src/components/display/playlist/PlaylistList.vue +5 -8
- package/src/components/display/playlist/PodcastList.vue +16 -7
- package/src/components/display/podcasts/PodcastFilterList.vue +19 -8
- package/src/components/display/podcasts/PodcastList.vue +8 -9
- package/src/components/display/podcasts/PodcastModuleBox.vue +1 -1
- package/src/components/display/sharing/SharePlayer.vue +1 -1
- package/src/components/display/sharing/SharePlayerTypes.vue +3 -3
- package/src/components/form/ClassicInputText.vue +1 -1
- package/src/components/form/ClassicMultiselect.vue +9 -1
- package/src/components/misc/ClassicPopover.vue +7 -2
- package/src/components/misc/FooterSection.vue +0 -16
- package/src/components/misc/TopBar.vue +2 -1
- package/src/components/pages/EmissionPage.vue +14 -0
- package/src/components/pages/ParticipantPage.vue +14 -0
- package/src/components/pages/PlaylistPage.vue +17 -4
- package/src/components/pages/PodcastPage.vue +2 -1
- package/src/helper/loadScript.ts +4 -4
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/FilterStore.ts +1 -1
- package/src/stores/VastStore.ts +2 -2
package/index.ts
CHANGED
|
@@ -108,7 +108,7 @@ import {useMetaTitleWatch} from "./src/components/composable/useMetaTitleWatch.t
|
|
|
108
108
|
import {useOrganisationFilter} from "./src/components/composable/useOrganisationFilter.ts";
|
|
109
109
|
import {useInit} from "./src/components/composable/useInit.ts";
|
|
110
110
|
import {useErrorHandler} from "./src/components/composable/useErrorHandler.ts";
|
|
111
|
-
|
|
111
|
+
import { useSimplePageParam } from "./src/components/composable/route/useSimplePageParam";
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
//helper
|
|
@@ -157,6 +157,7 @@ export {
|
|
|
157
157
|
useOrganisationFilter,
|
|
158
158
|
useInit,
|
|
159
159
|
useErrorHandler,
|
|
160
|
+
useSimplePageParam,
|
|
160
161
|
debounce,
|
|
161
162
|
useVastStore,
|
|
162
163
|
useSaveFetchStore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "41.0.0
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"serve": "vite preview",
|
|
9
9
|
"build": "vite build",
|
|
10
10
|
"dev": "vite",
|
|
11
|
+
"bundle":"vite-bundle-visualizer",
|
|
11
12
|
"proxy_authentifié": "node proxy.ts",
|
|
12
13
|
"proxy_non_authentifié": "node proxy.ts false",
|
|
13
14
|
"lint": "eslint --fix src",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"video.js": "^8.23.3",
|
|
54
55
|
"videojs-quality-selector-hls": "^1.1.1",
|
|
55
56
|
"vite": "^6.3.5",
|
|
57
|
+
"vite-bundle-visualizer": "^1.2.1",
|
|
56
58
|
"vue": "^3.5.16",
|
|
57
59
|
"vue-i18n": "^11.1.5",
|
|
58
60
|
"vue-material-design-icons": "^5.3.1",
|
package/src/App.vue
CHANGED
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
<router-view />
|
|
9
9
|
<PlayerComponent />
|
|
10
10
|
</main>
|
|
11
|
-
<
|
|
12
|
-
<FooterOctopus />
|
|
13
|
-
</ClassicLazy>
|
|
11
|
+
<FooterOctopus />
|
|
14
12
|
</template>
|
|
15
13
|
</div>
|
|
16
14
|
</template>
|
|
17
15
|
<script setup lang="ts">
|
|
18
16
|
import TopBar from "@/components/misc/TopBar.vue";
|
|
17
|
+
import FooterOctopus from "@/components/misc/FooterSection.vue";
|
|
19
18
|
import PlayerComponent from "@/components/misc/player/PlayerComponent.vue";
|
|
20
|
-
import ClassicLazy from "@/components/misc/ClassicLazy.vue";
|
|
21
19
|
import {useInit} from "./components/composable/useInit";
|
|
22
20
|
import {useMetaTitle} from "./components/composable/useMetaTitle";
|
|
23
21
|
import {useOrganisationFilter} from "./components/composable/useOrganisationFilter";
|
|
@@ -25,9 +23,7 @@ import { useAuthStore } from "./stores/AuthStore";
|
|
|
25
23
|
import { defineAsyncComponent, getCurrentInstance, onBeforeMount, ref, watch } from "vue";
|
|
26
24
|
import { useRoute } from "vue-router";
|
|
27
25
|
import { useI18n } from "vue-i18n";
|
|
28
|
-
|
|
29
|
-
() => import("@/components/misc/FooterSection.vue"),
|
|
30
|
-
);
|
|
26
|
+
|
|
31
27
|
const CategoryFilter = defineAsyncComponent(
|
|
32
28
|
() => import("@/components/display/categories/CategoryFilter.vue"),
|
|
33
29
|
);
|
|
@@ -16,7 +16,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
16
16
|
const audioElement: Ref<HTMLAudioElement | null>= ref(null);
|
|
17
17
|
const hls: Ref<any>= ref(null);
|
|
18
18
|
const hlsRetryTimeout: Ref<ReturnType<typeof setTimeout> | undefined>= ref(undefined);
|
|
19
|
-
const playPromise: Ref<
|
|
19
|
+
const playPromise: Ref<Promise<void>|undefined>= ref(undefined);
|
|
20
20
|
const errorHls= ref(false);
|
|
21
21
|
|
|
22
22
|
|
|
@@ -3,10 +3,10 @@ import { useVastStore } from "../../../stores/VastStore";
|
|
|
3
3
|
import { loadScript } from "../../../helper/loadScript";
|
|
4
4
|
import {nextTick, Ref, ref, watch} from 'vue';
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
|
-
let adsLoader:
|
|
7
|
-
let adsManager:
|
|
8
|
-
let adDisplayContainer:
|
|
9
|
-
let adsRequest:
|
|
6
|
+
let adsLoader: google.ima.AdsLoader;
|
|
7
|
+
let adsManager:google.ima.AdsManager;
|
|
8
|
+
let adDisplayContainer:google.ima.AdDisplayContainer;
|
|
9
|
+
let adsRequest: google.ima.AdsRequest;
|
|
10
10
|
export const usePlayerVast = ()=>{
|
|
11
11
|
const imaLoaded = ref(false);
|
|
12
12
|
const isContentFinished = ref(false);
|
|
@@ -83,7 +83,7 @@ export const usePlayerVast = ()=>{
|
|
|
83
83
|
adsRequest.adTagUrl = vastUrl;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function onAdsManagerLoaded(adsManagerLoadedEvent:
|
|
86
|
+
function onAdsManagerLoaded(adsManagerLoadedEvent: google.ima.AdsManagerLoadedEvent) {
|
|
87
87
|
const adsRenderingSettings = new google.ima.AdsRenderingSettings();
|
|
88
88
|
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;
|
|
89
89
|
adsManager = adsManagerLoadedEvent.getAdsManager(audioContainer.value, adsRenderingSettings);
|
|
@@ -117,7 +117,7 @@ export const usePlayerVast = ()=>{
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
function onAdError(adErrorEvent:
|
|
120
|
+
function onAdError(adErrorEvent: google.ima.AdErrorEvent) {
|
|
121
121
|
console.log(adErrorEvent.getError());
|
|
122
122
|
destroyAdManager();
|
|
123
123
|
}
|
|
@@ -132,7 +132,7 @@ export const usePlayerVast = ()=>{
|
|
|
132
132
|
isAdRequested.value = false;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
function onAdEvent(adEvent:
|
|
135
|
+
function onAdEvent(adEvent: google.ima.AdEvent) {
|
|
136
136
|
const ad = adEvent.getAd();
|
|
137
137
|
if(ad){
|
|
138
138
|
vastStore.updateCurrentAd(ad);
|
|
@@ -9,7 +9,7 @@ import dayjs from "dayjs";
|
|
|
9
9
|
|
|
10
10
|
export const useAdvancedParamInit = (props: any, isEmission: boolean)=>{
|
|
11
11
|
|
|
12
|
-
const { searchPattern,organisationId, searchMinSize, paginateFirst, initSearchPattern, initOrga} = useSimplePageParam(props);
|
|
12
|
+
const { searchPattern,organisationId, searchMinSize, paginateFirst, initSearchPattern, initOrga} = useSimplePageParam(props, false, true);
|
|
13
13
|
const { isEditRights, isPodcastmaker } = useOrgaComputed();
|
|
14
14
|
const { stringifyRubriquesFilter } = useRubriquesFilterParam();
|
|
15
15
|
|
|
@@ -12,14 +12,14 @@ export const useRouteUpdateParams = ()=>{
|
|
|
12
12
|
return ['podcasts', 'emissions'].includes(route.name?.toString()??"");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function updatePaginateSize(ps:number){
|
|
16
|
-
if(checkPage()){
|
|
15
|
+
function updatePaginateSize(ps:number, force= false){
|
|
16
|
+
if(force ||checkPage()){
|
|
17
17
|
router.push({query: {...route.query, ...{ps:ps, pr:1}}});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function updateRouteParam(update: {[key:string]: string|undefined}){
|
|
22
|
-
if(checkPage()){
|
|
21
|
+
function updateRouteParam(update: {[key:string]: string|undefined}, force= false){
|
|
22
|
+
if(force || checkPage()){
|
|
23
23
|
router.push({query: {...route.query, ...update}});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -2,7 +2,7 @@ import { useFilterStore } from '../../../stores/FilterStore';
|
|
|
2
2
|
import { useRouteUpdateParams } from './useRouteUpdateParams';
|
|
3
3
|
import { computed, onMounted, Ref, ref, watch } from "vue";
|
|
4
4
|
|
|
5
|
-
export const useSimplePageParam = (props:
|
|
5
|
+
export const useSimplePageParam = (props: {readonly [key:string]: string|number}, force=false, advancedSearch=false)=>{
|
|
6
6
|
|
|
7
7
|
const { updateRouteParam } = useRouteUpdateParams();
|
|
8
8
|
|
|
@@ -12,18 +12,21 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
12
12
|
const searchPattern = ref("");
|
|
13
13
|
const organisationId: Ref<string|undefined> = ref(undefined);
|
|
14
14
|
|
|
15
|
-
const searchMinSize = computed(() =>
|
|
15
|
+
const searchMinSize = computed(() => getMinSize((props.routeQuery as string)));
|
|
16
16
|
const paginateFirst = computed(() => {
|
|
17
17
|
if(!props.pr){
|
|
18
18
|
return 0;
|
|
19
19
|
}
|
|
20
|
-
return Math.max((props.pr - 1 ) * props.ps, 0);
|
|
20
|
+
return Math.max(((props.pr as number) - 1 ) * (props.ps as number), 0);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
watch(searchPattern, () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
if(!advancedSearch){
|
|
25
|
+
const query = getMinSize(searchPattern.value);
|
|
26
|
+
updateRouteParam({
|
|
27
|
+
q: query.length ? query : undefined,
|
|
28
|
+
}, force);
|
|
29
|
+
}
|
|
27
30
|
});
|
|
28
31
|
|
|
29
32
|
onMounted(() => {
|
|
@@ -32,11 +35,14 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
32
35
|
isInit.value = true;
|
|
33
36
|
})
|
|
34
37
|
|
|
38
|
+
function getMinSize(param:string){
|
|
39
|
+
return param.length>3 ?param : ""
|
|
40
|
+
}
|
|
35
41
|
function initSearchPattern(){
|
|
36
|
-
searchPattern.value = props.routeQuery ?? "";
|
|
42
|
+
searchPattern.value = (props.routeQuery as string) ?? "";
|
|
37
43
|
}
|
|
38
44
|
function initOrga(){
|
|
39
|
-
organisationId.value = filterStore.filterOrgaId ?? props.routeOrga;
|
|
45
|
+
organisationId.value = filterStore.filterOrgaId ?? (props.routeOrga as string);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
|
|
@@ -47,6 +53,7 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
47
53
|
paginateFirst,
|
|
48
54
|
initSearchPattern,
|
|
49
55
|
initOrga,
|
|
56
|
+
updateRouteParam,
|
|
50
57
|
isInit
|
|
51
58
|
}
|
|
52
59
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:multiple="multiple"
|
|
14
14
|
:min-search-length="1"
|
|
15
15
|
:width="width"
|
|
16
|
+
:height="height"
|
|
16
17
|
:is-disabled="isDisabled"
|
|
17
18
|
:no-deselect="noDeselect"
|
|
18
19
|
:display-required="displayRequired"
|
|
@@ -32,6 +33,7 @@ import { useI18n } from "vue-i18n";
|
|
|
32
33
|
const props = defineProps({
|
|
33
34
|
defaultanswer: { default: "", type: String },
|
|
34
35
|
width: { default: "100%", type: String },
|
|
36
|
+
height: { default: undefined, type: String },
|
|
35
37
|
multiple: { default: false, type: Boolean },
|
|
36
38
|
isDisabled: { default: false, type: Boolean },
|
|
37
39
|
initCategories: {
|
|
@@ -152,8 +152,8 @@ watch(changePaginate, () => {
|
|
|
152
152
|
dfirst.value = props.first;
|
|
153
153
|
dsize.value = props.size;
|
|
154
154
|
});
|
|
155
|
-
watch(changed, () =>
|
|
156
|
-
watch(dsize, () =>
|
|
155
|
+
watch(changed, () =>fetchContent(true));
|
|
156
|
+
watch(dsize, () =>fetchContent(true));
|
|
157
157
|
watch(dfirst, () =>{
|
|
158
158
|
if (
|
|
159
159
|
!emissions.value[dfirst.value] ||
|
|
@@ -165,21 +165,17 @@ watch(dfirst, () =>{
|
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
onMounted(()=>{
|
|
168
|
-
fetchContent(
|
|
168
|
+
fetchContent(false);
|
|
169
169
|
if (displayRubriquage.value) {
|
|
170
170
|
fetchRubriques();
|
|
171
171
|
}
|
|
172
172
|
})
|
|
173
173
|
|
|
174
174
|
//Methods
|
|
175
|
-
function reloadList() {
|
|
176
|
-
dfirst.value = 0;
|
|
177
|
-
fetchContent(true);
|
|
178
|
-
}
|
|
179
175
|
async function fetchContent(reset: boolean): Promise<void> {
|
|
180
176
|
loading.value = true;
|
|
181
177
|
const param: FetchParam = {
|
|
182
|
-
first: dfirst.value,
|
|
178
|
+
first: reset? 0: dfirst.value,
|
|
183
179
|
size: dsize.value,
|
|
184
180
|
query: props.query,
|
|
185
181
|
organisationId: organisation.value,
|
|
@@ -212,6 +208,7 @@ function afterFetching(
|
|
|
212
208
|
data: { count: number; result: Array<Emission>; sort: string },
|
|
213
209
|
): void {
|
|
214
210
|
if (reset) {
|
|
211
|
+
dfirst.value = 0;
|
|
215
212
|
emissions.value.length = 0;
|
|
216
213
|
}
|
|
217
214
|
if (dfirst.value > emissions.value.length) {
|
|
@@ -184,9 +184,6 @@ watch(()=>props.searchPattern, (value: string) => {
|
|
|
184
184
|
if(search.length <= 3){
|
|
185
185
|
valSort = props.isEmission? "LAST_PODCAST_DESC" : "DATE";
|
|
186
186
|
}
|
|
187
|
-
if (valSort !== props.sort) {
|
|
188
|
-
emit("update:sort", valSort);
|
|
189
|
-
}
|
|
190
187
|
updateRouteParamAdvanced({
|
|
191
188
|
q: search.length ? search : undefined,
|
|
192
189
|
s: valSort,
|
|
@@ -54,7 +54,7 @@ import PaginateParams from "./PaginateParams.vue";
|
|
|
54
54
|
import PaginateSection from "./PaginateSection.vue";
|
|
55
55
|
import {useResizePhone} from "../../composable/useResizePhone";
|
|
56
56
|
import { useRouteUpdateParams } from "../../composable/route/useRouteUpdateParams";
|
|
57
|
-
import { computed,
|
|
57
|
+
import { computed, watch } from "vue";
|
|
58
58
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
59
59
|
import { useI18n } from "vue-i18n";
|
|
60
60
|
|
|
@@ -72,13 +72,12 @@ const props = defineProps({
|
|
|
72
72
|
isMobile: { default: false, type: Boolean },
|
|
73
73
|
justSizeChosen: { default: false, type: Boolean },
|
|
74
74
|
playerResponsive: { default: false, type: Boolean },
|
|
75
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
75
76
|
})
|
|
76
77
|
|
|
77
78
|
//Emits
|
|
78
79
|
const emit = defineEmits(["update:first", "update:rowsPerPage", "update:isMobile"]);
|
|
79
80
|
|
|
80
|
-
//Data
|
|
81
|
-
const internSizeChange = ref(false);
|
|
82
81
|
|
|
83
82
|
//Composables
|
|
84
83
|
const { t } = useI18n();
|
|
@@ -100,11 +99,7 @@ const rangeSize = computed(() => {
|
|
|
100
99
|
//Watch
|
|
101
100
|
watch(isPhone, () => {emit("update:isMobile", isPhone.value);}, {immediate: true});
|
|
102
101
|
watch(()=>props.first, () => {
|
|
103
|
-
|
|
104
|
-
internSizeChange.value = false;
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
updateRouteParam({pr:(Math.floor(props.first / props.rowsPerPage) + 1).toString()});
|
|
102
|
+
updateRouteParam({pr:(Math.floor(props.first / props.rowsPerPage) + 1).toString()}, props.forceUpdateParameters);
|
|
108
103
|
});
|
|
109
104
|
|
|
110
105
|
//Methods
|
|
@@ -117,11 +112,8 @@ function changeFirst(firstValue: number) {
|
|
|
117
112
|
}
|
|
118
113
|
function changeSize(sizeValue: number) {
|
|
119
114
|
scrollToTop();
|
|
120
|
-
if (0 !== props.first) {
|
|
121
|
-
internSizeChange.value = true;
|
|
122
|
-
}
|
|
123
115
|
emit("update:rowsPerPage", sizeValue);
|
|
124
|
-
updatePaginateSize(sizeValue);
|
|
116
|
+
updatePaginateSize(sizeValue, props.forceUpdateParameters);
|
|
125
117
|
}
|
|
126
118
|
function scrollToTop() {
|
|
127
119
|
const element = document.getElementById(props.id);
|
|
@@ -75,11 +75,10 @@ async function fetchStatus(): Promise<void> {
|
|
|
75
75
|
api: 9,
|
|
76
76
|
path: "conference/info/" + props.fetchConference.conferenceId,
|
|
77
77
|
});
|
|
78
|
-
|
|
79
|
-
if (newStatus !== props.fetchConference.status) {
|
|
78
|
+
if (confInfo.status !== props.fetchConference.status) {
|
|
80
79
|
emit("updateItem", {
|
|
81
80
|
...props.fetchConference,
|
|
82
|
-
...
|
|
81
|
+
...confInfo,
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -103,9 +103,9 @@ watch(changePaginate, () => {
|
|
|
103
103
|
dfirst.value = props.first;
|
|
104
104
|
dsize.value = props.size;
|
|
105
105
|
});
|
|
106
|
-
watch(()=>props.query, () =>
|
|
107
|
-
watch(organisation, () =>
|
|
108
|
-
watch(dsize, () =>
|
|
106
|
+
watch(()=>props.query, () => fetchContent(true));
|
|
107
|
+
watch(organisation, () => fetchContent(true));
|
|
108
|
+
watch(dsize, () => fetchContent(true));
|
|
109
109
|
watch(dfirst, () => {
|
|
110
110
|
if (
|
|
111
111
|
!participants.value[dfirst.value] ||
|
|
@@ -115,14 +115,10 @@ watch(dfirst, () => {
|
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
onBeforeMount(()=>fetchContent(
|
|
118
|
+
onBeforeMount(()=>fetchContent(false))
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
//Methods
|
|
122
|
-
function reloadList() {
|
|
123
|
-
dfirst.value = 0;
|
|
124
|
-
fetchContent(true);
|
|
125
|
-
}
|
|
126
122
|
async function fetchContent(reset: boolean): Promise<void> {
|
|
127
123
|
loading.value = true;
|
|
128
124
|
try {
|
|
@@ -131,7 +127,7 @@ async function fetchContent(reset: boolean): Promise<void> {
|
|
|
131
127
|
api: 0,
|
|
132
128
|
path: "participant/search",
|
|
133
129
|
parameters: {
|
|
134
|
-
first: dfirst.value,
|
|
130
|
+
first: reset? 0: dfirst.value,
|
|
135
131
|
size: dsize.value,
|
|
136
132
|
query: props.query,
|
|
137
133
|
organisationId: organisation.value,
|
|
@@ -141,6 +137,7 @@ async function fetchContent(reset: boolean): Promise<void> {
|
|
|
141
137
|
},
|
|
142
138
|
);
|
|
143
139
|
if (reset) {
|
|
140
|
+
dfirst.value = 0;
|
|
144
141
|
participants.value.length = 0;
|
|
145
142
|
}
|
|
146
143
|
displayCount.value = data.count;
|
|
@@ -98,8 +98,8 @@ watch(changePaginate, () => {
|
|
|
98
98
|
dfirst.value = props.first;
|
|
99
99
|
dsize.value = props.size;
|
|
100
100
|
});
|
|
101
|
-
watch(changed, () =>
|
|
102
|
-
watch(dsize, () =>
|
|
101
|
+
watch(changed, () => fetchContent(true));
|
|
102
|
+
watch(dsize, () =>fetchContent(true));
|
|
103
103
|
watch(dfirst, () => {
|
|
104
104
|
if (
|
|
105
105
|
!playlists.value[dfirst.value] ||
|
|
@@ -109,18 +109,14 @@ watch(dfirst, () => {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
onMounted(()=>fetchContent(
|
|
112
|
+
onMounted(()=>fetchContent(false))
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
//Methods
|
|
116
|
-
function reloadList() {
|
|
117
|
-
dfirst.value = 0;
|
|
118
|
-
fetchContent(true);
|
|
119
|
-
}
|
|
120
116
|
async function fetchContent(reset: boolean): Promise<void> {
|
|
121
117
|
loading.value = true;
|
|
122
118
|
const param = {
|
|
123
|
-
first: dfirst.value,
|
|
119
|
+
first: reset ? 0 : dfirst.value,
|
|
124
120
|
size: dsize.value,
|
|
125
121
|
query: props.query,
|
|
126
122
|
organisationId: organisation.value,
|
|
@@ -144,6 +140,7 @@ function afterFetching(
|
|
|
144
140
|
data: { count: number; result: Array<Playlist>; sort: string },
|
|
145
141
|
): void {
|
|
146
142
|
if (reset) {
|
|
143
|
+
dfirst.value = 0;
|
|
147
144
|
playlists.value.length = 0;
|
|
148
145
|
}
|
|
149
146
|
if (dfirst.value > playlists.value.length) {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
/>
|
|
13
13
|
<ListPaginate
|
|
14
14
|
id="podcastPlaylistListPaginate"
|
|
15
|
-
v-model:first="
|
|
16
|
-
v-model:rows-per-page="
|
|
15
|
+
v-model:first="dfirst"
|
|
16
|
+
v-model:rows-per-page="dsize"
|
|
17
17
|
v-model:is-mobile="isMobile"
|
|
18
18
|
:text-count="
|
|
19
19
|
podcasts.length > 1
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
: undefined
|
|
30
30
|
"
|
|
31
31
|
:player-responsive="true"
|
|
32
|
+
:force-update-parameters="true"
|
|
32
33
|
>
|
|
33
34
|
<template #list>
|
|
34
35
|
<div class="octopus-element-list">
|
|
@@ -73,14 +74,20 @@ import { useI18n } from "vue-i18n";
|
|
|
73
74
|
//Props
|
|
74
75
|
const props = defineProps({
|
|
75
76
|
playlist: { default: () => ({}), type: Object as () => Playlist },
|
|
77
|
+
first: { default: 0, type: Number },
|
|
78
|
+
size: { default: 30, type: Number },
|
|
79
|
+
query: { default: undefined, type: String },
|
|
76
80
|
})
|
|
77
81
|
|
|
82
|
+
//Emits
|
|
83
|
+
const emit = defineEmits(["update:query"]);
|
|
84
|
+
|
|
78
85
|
//Data
|
|
79
86
|
const loading = ref(true);
|
|
80
87
|
const podcasts: Ref<Array<Podcast>> = ref([]);
|
|
81
88
|
const podcastsQuery: Ref<Array<Podcast>> = ref([]);
|
|
82
|
-
const
|
|
83
|
-
const
|
|
89
|
+
const dfirst = ref(props.first);
|
|
90
|
+
const dsize = ref(props.size);
|
|
84
91
|
const searchPattern = ref("");
|
|
85
92
|
const isMobile = ref(false);
|
|
86
93
|
|
|
@@ -96,18 +103,19 @@ const podcastsDisplay = computed(() => {
|
|
|
96
103
|
if (isMobile.value) {
|
|
97
104
|
return podcastsQuery.value.slice(
|
|
98
105
|
0,
|
|
99
|
-
Math.min(
|
|
106
|
+
Math.min(dfirst.value + dsize.value, podcasts.value.length),
|
|
100
107
|
);
|
|
101
108
|
}
|
|
102
109
|
return podcastsQuery.value.slice(
|
|
103
|
-
|
|
104
|
-
Math.min(
|
|
110
|
+
dfirst.value,
|
|
111
|
+
Math.min(dfirst.value + dsize.value, podcasts.value.length),
|
|
105
112
|
);
|
|
106
113
|
});
|
|
107
114
|
const editRight = computed(() =>isEditRights(props.playlist.organisation?.id));
|
|
108
115
|
|
|
109
116
|
//Watch
|
|
110
117
|
watch(searchPattern,() => {
|
|
118
|
+
emit('update:query', searchPattern.value);
|
|
111
119
|
if ("" !== searchPattern.value) {
|
|
112
120
|
podcastsQuery.value = podcasts.value.filter((el: Podcast) => {
|
|
113
121
|
return el.title
|
|
@@ -141,6 +149,7 @@ async function fetchContent(): Promise<void> {
|
|
|
141
149
|
});
|
|
142
150
|
}
|
|
143
151
|
podcastsQuery.value = podcasts.value;
|
|
152
|
+
searchPattern.value = props.query ?? "";
|
|
144
153
|
} catch (error) {
|
|
145
154
|
handle403(error as AxiosError);
|
|
146
155
|
}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<h3 class="mb-2">
|
|
4
4
|
{{ titleFilter }}
|
|
5
5
|
</h3>
|
|
6
|
-
<div class="d-flex align-items-
|
|
6
|
+
<div class="d-flex align-items-stretch flex-wrap mb-2">
|
|
7
7
|
<div id="podcast-filter-list-category-chooser" class="w-50-responsive pe-3">
|
|
8
8
|
<CategoryChooser
|
|
9
|
+
height="100%"
|
|
9
10
|
:defaultanswer="t('No category filter')"
|
|
10
11
|
@selected="onCategorySelected"
|
|
11
12
|
/>
|
|
@@ -18,17 +19,19 @@
|
|
|
18
19
|
/>
|
|
19
20
|
</div>
|
|
20
21
|
<PodcastList
|
|
21
|
-
:first="
|
|
22
|
-
:size="
|
|
22
|
+
:first="dfirst"
|
|
23
|
+
:size="dsize"
|
|
23
24
|
:iab-id="iabId"
|
|
24
25
|
:query="query"
|
|
25
26
|
:participant-id="participantId"
|
|
26
27
|
:emission-id="emissionId"
|
|
27
28
|
:organisation-id="productorId"
|
|
29
|
+
:sort-criteria="sort"
|
|
28
30
|
:reload="reloadList"
|
|
29
31
|
:include-hidden="editRight"
|
|
30
32
|
:show-count="showCount"
|
|
31
33
|
:display-sort-text="false"
|
|
34
|
+
:force-update-parameters="forceUpdateParameters"
|
|
32
35
|
@fetch="fetch"
|
|
33
36
|
/>
|
|
34
37
|
</section>
|
|
@@ -47,6 +50,9 @@ const CategoryChooser = defineAsyncComponent(
|
|
|
47
50
|
|
|
48
51
|
//Props
|
|
49
52
|
const props = defineProps({
|
|
53
|
+
first: { default: 0, type: Number },
|
|
54
|
+
size: { default: 30, type: Number },
|
|
55
|
+
query: { default: undefined, type: String },
|
|
50
56
|
participantId: { default: undefined, type: Number },
|
|
51
57
|
name: { default: undefined, type: String },
|
|
52
58
|
emissionId: { default: undefined, type: Number },
|
|
@@ -55,15 +61,16 @@ const props = defineProps({
|
|
|
55
61
|
editRight: { default: false, type: Boolean },
|
|
56
62
|
productorId: { default: () => [], type: Array as () => Array<string> },
|
|
57
63
|
showCount: { default: false, type: Boolean },
|
|
64
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
58
65
|
})
|
|
59
66
|
|
|
60
67
|
//Emits
|
|
61
|
-
const emit = defineEmits(["fetch"]);
|
|
68
|
+
const emit = defineEmits(["fetch", "update:query"]);
|
|
62
69
|
|
|
63
70
|
//Data
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const searchPattern = ref("");
|
|
71
|
+
const dfirst = ref(props.first);
|
|
72
|
+
const dsize = ref(props.size);
|
|
73
|
+
const searchPattern = ref(props.query ?? "");
|
|
67
74
|
const reloadList = ref(false);
|
|
68
75
|
const iabId : Ref<number | undefined>= ref(undefined);
|
|
69
76
|
|
|
@@ -76,12 +83,16 @@ const titleFilter = computed(() => {
|
|
|
76
83
|
? t("All podcast button", { name: props.name })
|
|
77
84
|
: t("All podcast emission button");
|
|
78
85
|
});
|
|
79
|
-
const query = computed(() => searchPattern.value.length
|
|
86
|
+
const query = computed(() => searchPattern.value.length > 3 ? searchPattern.value : "");
|
|
87
|
+
const sort = computed(() => !query.value.length ? "DATE" : "SCORE");
|
|
80
88
|
|
|
81
89
|
//Watch
|
|
82
90
|
watch(()=>props.reload, () => {
|
|
83
91
|
reloadList.value = !reloadList.value;
|
|
84
92
|
});
|
|
93
|
+
watch(searchPattern, () => {
|
|
94
|
+
emit('update:query', searchPattern.value);
|
|
95
|
+
});
|
|
85
96
|
|
|
86
97
|
//Methods
|
|
87
98
|
function onCategorySelected(category: Category | undefined): void {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"
|
|
20
20
|
:just-size-chosen="justSizeChosen"
|
|
21
21
|
:player-responsive="true"
|
|
22
|
+
:force-update-parameters="forceUpdateParameters"
|
|
22
23
|
>
|
|
23
24
|
<template #list>
|
|
24
25
|
<div class="octopus-element-list">
|
|
@@ -85,6 +86,7 @@ const props = defineProps({
|
|
|
85
86
|
justSizeChosen: { default: false, type: Boolean },
|
|
86
87
|
withVideo: { default: undefined, type: Boolean },
|
|
87
88
|
includeTag:{ default: () => [], type: Array as () => Array<string> },
|
|
89
|
+
forceUpdateParameters: { default: false, type: Boolean },
|
|
88
90
|
})
|
|
89
91
|
|
|
90
92
|
//Emits
|
|
@@ -148,9 +150,9 @@ watch(changePaginate, () => {
|
|
|
148
150
|
dfirst.value = props.first;
|
|
149
151
|
dsize.value = props.size;
|
|
150
152
|
});
|
|
151
|
-
watch(changed, () =>
|
|
152
|
-
watch(()=>props.reload, () =>
|
|
153
|
-
watch(dsize, () =>
|
|
153
|
+
watch(changed, () => fetchContent(true));
|
|
154
|
+
watch(()=>props.reload, () => fetchContent(true));
|
|
155
|
+
watch(dsize, () => fetchContent(true));
|
|
154
156
|
watch(dfirst, () => {
|
|
155
157
|
if (
|
|
156
158
|
!podcasts.value[dfirst.value] ||
|
|
@@ -160,17 +162,13 @@ watch(dfirst, () => {
|
|
|
160
162
|
}
|
|
161
163
|
});
|
|
162
164
|
|
|
163
|
-
onBeforeMount(()=>fetchContent(
|
|
165
|
+
onBeforeMount(()=>fetchContent(false))
|
|
164
166
|
|
|
165
167
|
//Methods
|
|
166
|
-
function reloadList() {
|
|
167
|
-
dfirst.value = 0;
|
|
168
|
-
fetchContent(true);
|
|
169
|
-
}
|
|
170
168
|
async function fetchContent(reset: boolean): Promise<void> {
|
|
171
169
|
loading.value = true;
|
|
172
170
|
const param: FetchParam = {
|
|
173
|
-
first: dfirst.value,
|
|
171
|
+
first: reset ? 0 : dfirst.value,
|
|
174
172
|
size: dsize.value,
|
|
175
173
|
organisationId: organisation.value,
|
|
176
174
|
emissionId: props.emissionId,
|
|
@@ -213,6 +211,7 @@ function afterFetching(
|
|
|
213
211
|
data: { count: number; result: Array<Podcast>; sort: string },
|
|
214
212
|
): void {
|
|
215
213
|
if (reset) {
|
|
214
|
+
dfirst.value = 0;
|
|
216
215
|
podcasts.value.length = 0;
|
|
217
216
|
}
|
|
218
217
|
if (dfirst.value > podcasts.value.length) {
|
|
@@ -252,7 +252,7 @@ const isDebriefing = computed(() => {
|
|
|
252
252
|
);
|
|
253
253
|
});
|
|
254
254
|
const isOctopusAndAnimator = computed(() => {
|
|
255
|
-
return !isPodcastmaker && editRight && authStore.isRoleLive;
|
|
255
|
+
return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;
|
|
256
256
|
});
|
|
257
257
|
const podcastNotValid = computed(() => {
|
|
258
258
|
return (
|
|
@@ -85,9 +85,9 @@ const optionsSelect = computed(() => {
|
|
|
85
85
|
{ name: t("Default version"), value: "default", condition: true },
|
|
86
86
|
{ name: t("Large version"), value: "largeMore", condition: props.podcast?.podcastId, },
|
|
87
87
|
{
|
|
88
|
-
name: t("Minimalist length version"),
|
|
88
|
+
name: props.podcast?.podcastId ? t("Minimalist length version"): t("Large version"),
|
|
89
89
|
value: "large",
|
|
90
|
-
condition:
|
|
90
|
+
condition: true,
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
name: t("Emission version"),
|
|
@@ -137,7 +137,7 @@ onMounted(()=>{
|
|
|
137
137
|
function isNumeric(value: string): boolean {
|
|
138
138
|
return /^-?\d+$/.test(value);
|
|
139
139
|
}
|
|
140
|
-
function selectChange($event:
|
|
140
|
+
function selectChange($event: Event) {
|
|
141
141
|
const val = $event.target.value;
|
|
142
142
|
if (!val) {
|
|
143
143
|
return;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
'multiselect-no-deselect': noDeselect,
|
|
6
6
|
'form-margin': displayLabel,
|
|
7
7
|
}"
|
|
8
|
-
:style="{ width: width }"
|
|
8
|
+
:style="{ width: width, height: height }"
|
|
9
9
|
>
|
|
10
10
|
<label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
|
|
11
11
|
label
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"
|
|
29
29
|
:filter="fakeSearch"
|
|
30
30
|
:selectable="() => !maxOptionsSelected"
|
|
31
|
+
:style="{height: height }"
|
|
31
32
|
:class="{ 'border border-danger': textDanger?.length }"
|
|
32
33
|
@open="onSearch"
|
|
33
34
|
@search="onSearch"
|
|
@@ -93,6 +94,7 @@ const props = defineProps({
|
|
|
93
94
|
multiple: { default: false, type: Boolean },
|
|
94
95
|
isDisabled: { default: false, type: Boolean },
|
|
95
96
|
width: { default: "100%", type: String },
|
|
97
|
+
height: { default: undefined, type: String },
|
|
96
98
|
maxElement: { default: 50, type: Number },
|
|
97
99
|
minSearchLength: { default: 3, type: Number },
|
|
98
100
|
optionChosen: { default: undefined, type: Object as () => unknown },
|
|
@@ -179,6 +181,11 @@ function onOptionDeselect(event: unknown): void {
|
|
|
179
181
|
}
|
|
180
182
|
emit("selected", optionSelected.value);
|
|
181
183
|
}
|
|
184
|
+
|
|
185
|
+
//Expose
|
|
186
|
+
defineExpose({
|
|
187
|
+
afterSearch
|
|
188
|
+
});
|
|
182
189
|
</script>
|
|
183
190
|
<style lang="scss">
|
|
184
191
|
@use "vue-select/dist/vue-select.css";
|
|
@@ -204,6 +211,7 @@ function onOptionDeselect(event: unknown): void {
|
|
|
204
211
|
|
|
205
212
|
.vs__dropdown-toggle {
|
|
206
213
|
padding: 0;
|
|
214
|
+
height: 100%;
|
|
207
215
|
}
|
|
208
216
|
|
|
209
217
|
.vs__search:focus {
|
|
@@ -72,7 +72,7 @@ const router= useRouter();
|
|
|
72
72
|
const popoverId = computed(() => "popover" + props.target);
|
|
73
73
|
const positionInlineStyle = computed(() => `left: ${posX.value}px; top: ${posY.value}px;max-height:${maxHeight.value}`);
|
|
74
74
|
const displayPopover = computed(() => show.value && !props.disable);
|
|
75
|
-
const isTopLayerPopover = computed(() => (props.isTopLayer || "octopus-modal"===props.relativeClass) && HTMLElement.prototype
|
|
75
|
+
const isTopLayerPopover = computed(() => (props.isTopLayer || "octopus-modal"===props.relativeClass) && Object.hasOwn(HTMLElement.prototype, "popover"));
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
//Watch
|
|
@@ -265,7 +265,7 @@ function clearDataBlur(e: FocusEvent) {
|
|
|
265
265
|
if (!(myElement as HTMLAnchorElement).href) {
|
|
266
266
|
return clearClick();
|
|
267
267
|
}
|
|
268
|
-
if (myElement.classList.contains("
|
|
268
|
+
if (myElement.classList.contains("realLink")) {
|
|
269
269
|
myElement.click();
|
|
270
270
|
} else {
|
|
271
271
|
router.push((myElement as HTMLAnchorElement).pathname);
|
|
@@ -295,6 +295,11 @@ function clearData() {
|
|
|
295
295
|
posX.value = 0;
|
|
296
296
|
posY.value = 0;
|
|
297
297
|
}
|
|
298
|
+
|
|
299
|
+
//Expose
|
|
300
|
+
defineExpose({
|
|
301
|
+
clearClick
|
|
302
|
+
});
|
|
298
303
|
</script>
|
|
299
304
|
<style lang="scss">
|
|
300
305
|
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
|
|
75
75
|
<script setup lang="ts">
|
|
76
76
|
import cookiesHelper from "../../helper/cookiesHelper";
|
|
77
|
-
import { useRubriquesFilterComputed } from "../composable/route/useRubriquesFilterComputed";
|
|
78
77
|
import ClassicSelect from "../form/ClassicSelect.vue";
|
|
79
78
|
import AcpmImage from "./AcpmImage.vue";
|
|
80
79
|
import { state } from "../../stores/ParamSdkStore";
|
|
@@ -103,7 +102,6 @@ const reset = ref(false);
|
|
|
103
102
|
const organisationId: Ref<string | undefined> = ref(undefined);
|
|
104
103
|
|
|
105
104
|
//Composables
|
|
106
|
-
const { rubriqueQueryParam } = useRubriquesFilterComputed();
|
|
107
105
|
const generalStore = useGeneralStore();
|
|
108
106
|
const filterStore = useFilterStore();
|
|
109
107
|
const authStore = useAuthStore();
|
|
@@ -140,20 +138,6 @@ watch(()=>filterStore.filterOrgaId, () => {
|
|
|
140
138
|
|
|
141
139
|
|
|
142
140
|
//Methods
|
|
143
|
-
function getQueriesRouter(routeName: string) {
|
|
144
|
-
if (
|
|
145
|
-
"podcasts" !== routeName &&
|
|
146
|
-
"emissions" !== routeName &&
|
|
147
|
-
"home" !== routeName
|
|
148
|
-
) {
|
|
149
|
-
return { productor: filterStore.filterOrgaId };
|
|
150
|
-
}
|
|
151
|
-
return {
|
|
152
|
-
productor: filterStore.filterOrgaId,
|
|
153
|
-
iabId: filterStore.filterIab?.id,
|
|
154
|
-
rubriquesId: rubriqueQueryParam.value,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
141
|
function changeLanguage(): void {
|
|
158
142
|
cookiesHelper.setCookie("octopus-language", language.value);
|
|
159
143
|
loadLocaleMessages(
|
|
@@ -93,7 +93,8 @@ watch(()=>generalStore.contentToDisplay, async () => {
|
|
|
93
93
|
needToBlur.value = false;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const widthAsked = window.innerWidth > 960 ? "1600":"1000";
|
|
97
|
+
const proxyUrl = useProxyImageUrl(generalStore.contentToDisplay.imageUrl,widthAsked, undefined, true);
|
|
97
98
|
try {
|
|
98
99
|
const result = await axios.get(proxyUrl);
|
|
99
100
|
headerBackgroundImage.value = `background-image: url('${result.data}');`;
|
|
@@ -70,12 +70,17 @@
|
|
|
70
70
|
:emission-id="emissionId"
|
|
71
71
|
/>
|
|
72
72
|
<PodcastFilterList
|
|
73
|
+
v-if="isInit"
|
|
74
|
+
v-model:query="searchPattern"
|
|
73
75
|
class="mx-2"
|
|
76
|
+
:first="paginateFirst"
|
|
77
|
+
:size="ps"
|
|
74
78
|
:show-count="true"
|
|
75
79
|
:emission-id="emissionId"
|
|
76
80
|
:category-filter="false"
|
|
77
81
|
:edit-right="editRight"
|
|
78
82
|
:productor-id="[emission.orga.id]"
|
|
83
|
+
:force-update-parameters="true"
|
|
79
84
|
@fetch="podcastsFetched"
|
|
80
85
|
/>
|
|
81
86
|
</section>
|
|
@@ -110,6 +115,7 @@ import { useFilterStore } from "../../stores/FilterStore";
|
|
|
110
115
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
111
116
|
import { useI18n } from "vue-i18n";
|
|
112
117
|
import { useRoute } from "vue-router";
|
|
118
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
113
119
|
const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/ShareAnonymous.vue"));
|
|
114
120
|
const PodcastFilterList = defineAsyncComponent(
|
|
115
121
|
() => import("../display/podcasts/PodcastFilterList.vue"),
|
|
@@ -143,6 +149,9 @@ const PodcastmakerHeader = defineAsyncComponent(
|
|
|
143
149
|
//Props
|
|
144
150
|
const props = defineProps({
|
|
145
151
|
emissionId: { default: undefined, type: Number },
|
|
152
|
+
pr: { default: 0, type: Number },
|
|
153
|
+
ps: { default: 30, type: Number },
|
|
154
|
+
routeQuery: { default: "", type: String },
|
|
146
155
|
})
|
|
147
156
|
|
|
148
157
|
|
|
@@ -163,6 +172,11 @@ const authStore = useAuthStore();
|
|
|
163
172
|
const filterStore = useFilterStore();
|
|
164
173
|
const generalStore= useGeneralStore();
|
|
165
174
|
const route= useRoute();
|
|
175
|
+
const {
|
|
176
|
+
searchPattern,
|
|
177
|
+
paginateFirst,
|
|
178
|
+
isInit
|
|
179
|
+
} = useSimplePageParam(props, true);
|
|
166
180
|
|
|
167
181
|
|
|
168
182
|
//Computed
|
|
@@ -47,12 +47,17 @@
|
|
|
47
47
|
</section>
|
|
48
48
|
<!-- productorId define to avoid overwrite #12817 -->
|
|
49
49
|
<PodcastFilterList
|
|
50
|
+
v-if="isInit"
|
|
51
|
+
v-model:query="searchPattern"
|
|
52
|
+
:first="paginateFirst"
|
|
53
|
+
:size="ps"
|
|
50
54
|
:participant-id="participantId"
|
|
51
55
|
:name="name"
|
|
52
56
|
:category-filter="true"
|
|
53
57
|
:productor-id="['']"
|
|
54
58
|
:reload="reload"
|
|
55
59
|
:show-count="true"
|
|
60
|
+
:force-update-parameters="true"
|
|
56
61
|
/>
|
|
57
62
|
</template>
|
|
58
63
|
<ClassicLoading
|
|
@@ -77,6 +82,7 @@ import { computed, defineAsyncComponent, ref, Ref, watch } from "vue";
|
|
|
77
82
|
import { AxiosError } from "axios";
|
|
78
83
|
import { useI18n } from "vue-i18n";
|
|
79
84
|
import { useRoute } from "vue-router";
|
|
85
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
80
86
|
const ShareSocialsButtons = defineAsyncComponent(
|
|
81
87
|
() => import("../display/sharing/ShareSocialsButtons.vue"),
|
|
82
88
|
);
|
|
@@ -92,6 +98,9 @@ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/Sha
|
|
|
92
98
|
//Props
|
|
93
99
|
const props = defineProps({
|
|
94
100
|
participantId: { default: undefined, type: Number },
|
|
101
|
+
pr: { default: 0, type: Number },
|
|
102
|
+
ps: { default: 30, type: Number },
|
|
103
|
+
routeQuery: { default: "", type: String },
|
|
95
104
|
});
|
|
96
105
|
|
|
97
106
|
|
|
@@ -110,6 +119,11 @@ const { isEditRights } = useOrgaComputed();
|
|
|
110
119
|
const { updatePathParams } = useSeoTitleUrl();
|
|
111
120
|
const {handle403} = useErrorHandler();
|
|
112
121
|
const filterStore = useFilterStore();
|
|
122
|
+
const {
|
|
123
|
+
searchPattern,
|
|
124
|
+
paginateFirst,
|
|
125
|
+
isInit
|
|
126
|
+
} = useSimplePageParam(props, true);
|
|
113
127
|
|
|
114
128
|
|
|
115
129
|
//Computed
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
width="250"
|
|
19
19
|
height="250"
|
|
20
20
|
aria-hidden="true"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
alt=""
|
|
23
22
|
:title="t('Playlist name image', { name: name })"
|
|
24
23
|
class="img-box float-start me-3 mb-3"
|
|
25
24
|
/>
|
|
@@ -42,7 +41,13 @@
|
|
|
42
41
|
:organisation-id="playlist.organisation.id"
|
|
43
42
|
/>
|
|
44
43
|
<section class="module-box">
|
|
45
|
-
<PodcastList
|
|
44
|
+
<PodcastList
|
|
45
|
+
v-if="isInit"
|
|
46
|
+
v-model:query="searchPattern"
|
|
47
|
+
:first="paginateFirst"
|
|
48
|
+
:size="ps"
|
|
49
|
+
:playlist="playlist"
|
|
50
|
+
/>
|
|
46
51
|
</section>
|
|
47
52
|
</div>
|
|
48
53
|
</template>
|
|
@@ -71,6 +76,7 @@ import {defineAsyncComponent, ref, Ref, computed, watch, onBeforeUnmount } from
|
|
|
71
76
|
import { AxiosError } from "axios";
|
|
72
77
|
import { useI18n } from "vue-i18n";
|
|
73
78
|
import { useRoute } from "vue-router";
|
|
79
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
74
80
|
const ShareSocialsButtons = defineAsyncComponent(
|
|
75
81
|
() => import("../display/sharing/ShareSocialsButtons.vue"),
|
|
76
82
|
);
|
|
@@ -89,6 +95,9 @@ const ShareAnonymous = defineAsyncComponent(() => import("../display/sharing/Sha
|
|
|
89
95
|
//Props
|
|
90
96
|
const props = defineProps({
|
|
91
97
|
playlistId: { default: undefined, type: Number },
|
|
98
|
+
pr: { default: 0, type: Number },
|
|
99
|
+
ps: { default: 30, type: Number },
|
|
100
|
+
routeQuery: { default: "", type: String },
|
|
92
101
|
});
|
|
93
102
|
|
|
94
103
|
|
|
@@ -108,7 +117,11 @@ const {handle403} = useErrorHandler();
|
|
|
108
117
|
const authStore = useAuthStore();
|
|
109
118
|
const filterStore = useFilterStore();
|
|
110
119
|
const generalStore = useGeneralStore();
|
|
111
|
-
|
|
120
|
+
const {
|
|
121
|
+
searchPattern,
|
|
122
|
+
paginateFirst,
|
|
123
|
+
isInit
|
|
124
|
+
} = useSimplePageParam(props, true);
|
|
112
125
|
|
|
113
126
|
|
|
114
127
|
//Computed
|
|
@@ -255,7 +255,8 @@ async function fetchConferenceStatus() {
|
|
|
255
255
|
api: 9,
|
|
256
256
|
path: "conference/info/" + podcast.value?.conferenceId,
|
|
257
257
|
});
|
|
258
|
-
|
|
258
|
+
|
|
259
|
+
fetchConference.value = {...fetchConference.value, ...data};
|
|
259
260
|
} catch {
|
|
260
261
|
//Do nothing
|
|
261
262
|
}
|
package/src/helper/loadScript.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function loadScript(src: string, async:boolean, callback:
|
|
1
|
+
function loadScript(src: string, async:boolean, callback: (isLoaded:boolean) => void) {
|
|
2
2
|
const firstElement = document.getElementsByTagName('head')[0] || document.documentElement,
|
|
3
3
|
scriptElement = document.createElement('script');
|
|
4
4
|
scriptElement.type = 'text/javascript';
|
|
@@ -6,13 +6,13 @@ function loadScript(src: string, async:boolean, callback: any) {
|
|
|
6
6
|
scriptElement.async = async;
|
|
7
7
|
scriptElement.addEventListener('load', function() {
|
|
8
8
|
if(callback && typeof callback === 'function') {
|
|
9
|
-
callback(true
|
|
9
|
+
callback(true);
|
|
10
10
|
}
|
|
11
11
|
}, false);
|
|
12
|
-
scriptElement.addEventListener('error', function(
|
|
12
|
+
scriptElement.addEventListener('error', function() {
|
|
13
13
|
firstElement.removeChild(scriptElement);
|
|
14
14
|
if(callback && typeof callback === 'function') {
|
|
15
|
-
callback(false
|
|
15
|
+
callback(false);
|
|
16
16
|
}
|
|
17
17
|
}, false);
|
|
18
18
|
firstElement.insertBefore(scriptElement, firstElement.firstChild);
|
package/src/router/router.ts
CHANGED
|
@@ -144,9 +144,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
144
144
|
component: EmissionPage,
|
|
145
145
|
props: (route: RouteLocationNormalized) => ({
|
|
146
146
|
emissionId: parseInt(route.params.emissionId.toString(), 10),
|
|
147
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
148
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
149
|
+
routeQuery: route.query.q ?? "",
|
|
147
150
|
}),
|
|
148
151
|
meta:{
|
|
149
|
-
title: ""
|
|
152
|
+
title: "",
|
|
153
|
+
noScroll:true
|
|
150
154
|
}
|
|
151
155
|
},
|
|
152
156
|
{
|
|
@@ -177,9 +181,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
177
181
|
component: ParticipantPage,
|
|
178
182
|
props: (route: RouteLocationNormalized) => ({
|
|
179
183
|
participantId: parseInt(route.params.participantId.toString(), 10),
|
|
184
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
185
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
186
|
+
routeQuery: route.query.q ?? "",
|
|
180
187
|
}),
|
|
181
188
|
meta:{
|
|
182
|
-
title: ""
|
|
189
|
+
title: "",
|
|
190
|
+
noScroll:true
|
|
183
191
|
}
|
|
184
192
|
},
|
|
185
193
|
{
|
|
@@ -266,9 +274,13 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
266
274
|
component: PlaylistPage,
|
|
267
275
|
props: (route: RouteLocationNormalized) => ({
|
|
268
276
|
playlistId: parseInt(route.params.playlistId.toString(), 10),
|
|
277
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
278
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
279
|
+
routeQuery: route.query.q ?? "",
|
|
269
280
|
}),
|
|
270
281
|
meta:{
|
|
271
|
-
title: ""
|
|
282
|
+
title: "",
|
|
283
|
+
noScroll:true
|
|
272
284
|
}
|
|
273
285
|
},
|
|
274
286
|
//Fake route to avoid errors
|
|
@@ -321,7 +333,8 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
321
333
|
const router = createRouter({
|
|
322
334
|
history: createWebHistory(),
|
|
323
335
|
routes: routes,
|
|
324
|
-
scrollBehavior()
|
|
336
|
+
scrollBehavior(to, from) {
|
|
337
|
+
if (to.name === from.name && to.meta.noScroll) return false;
|
|
325
338
|
return { left: 0, top: 0 };
|
|
326
339
|
},
|
|
327
340
|
});
|
package/src/stores/AuthStore.ts
CHANGED
|
@@ -5,19 +5,19 @@ import { defineStore } from "pinia";
|
|
|
5
5
|
import { KeycloakInfo } from "@/stores/class/user/person";
|
|
6
6
|
import { VideoConfig } from "@/stores/class/config/videoConfig";
|
|
7
7
|
import classicApi from "../api/classicApi";
|
|
8
|
-
|
|
8
|
+
interface AuthParam{
|
|
9
|
+
accessToken?: string;
|
|
10
|
+
refreshToken?: string;
|
|
11
|
+
expiration?: Date|string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
}
|
|
9
14
|
interface AuthState {
|
|
10
15
|
authReload: number;
|
|
11
16
|
authName: string;
|
|
12
17
|
authOrgaId?: string;
|
|
13
18
|
authOrgaName?: string;
|
|
14
19
|
authRole: Array<string>;
|
|
15
|
-
authParam:
|
|
16
|
-
accessToken?: string;
|
|
17
|
-
refreshToken?: string;
|
|
18
|
-
expiration?: Date;
|
|
19
|
-
clientId?: string;
|
|
20
|
-
};
|
|
20
|
+
authParam:AuthParam;
|
|
21
21
|
authProfile?: Profile;
|
|
22
22
|
authOrganisation: Organisation;
|
|
23
23
|
authVideoConfig: VideoConfig;
|
|
@@ -115,25 +115,25 @@ export const useAuthStore = defineStore("AuthStore", {
|
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
actions: {
|
|
118
|
-
authUpdate(authentication:
|
|
118
|
+
authUpdate(authentication: {name?:string, organisationId?:string,organisationName?:string, role?:Array<string>}) {
|
|
119
119
|
this.authName = authentication.name ?? this.authName;
|
|
120
120
|
this.authOrgaId = authentication.organisationId ?? this.authOrgaId;
|
|
121
121
|
this.authOrgaName = authentication.organisationName ?? this.authOrgaName;
|
|
122
122
|
this.authRole = authentication.role ?? this.authRole;
|
|
123
123
|
},
|
|
124
|
-
authUpdateParam(oAuthParam:
|
|
124
|
+
authUpdateParam(oAuthParam: AuthParam) {
|
|
125
125
|
this.authParam = oAuthParam;
|
|
126
126
|
},
|
|
127
|
-
authUpdateProfile(profile:
|
|
127
|
+
authUpdateProfile(profile: Profile) {
|
|
128
128
|
this.authProfile = profile;
|
|
129
129
|
this.authName = profile.firstname + " " + profile.lastname;
|
|
130
130
|
},
|
|
131
|
-
authUpdateOrganisation(organisation:
|
|
131
|
+
authUpdateOrganisation(organisation: Organisation) {
|
|
132
132
|
this.authOrganisation = organisation;
|
|
133
133
|
const saveFetchStore = useSaveFetchStore();
|
|
134
134
|
saveFetchStore.forceUpdateAttributes(
|
|
135
135
|
organisation.id,
|
|
136
|
-
organisation.attributes
|
|
136
|
+
organisation.attributes??{}
|
|
137
137
|
);
|
|
138
138
|
saveFetchStore.forceUpdateData(organisation.id, organisation);
|
|
139
139
|
},
|
|
@@ -52,7 +52,7 @@ export const useFilterStore = defineStore("FilterStore", {
|
|
|
52
52
|
this.filterRubrique = rubriqueFilter;
|
|
53
53
|
},
|
|
54
54
|
filterUpdateRubriqueDisplay(rubriques: Array<Rubrique>) {
|
|
55
|
-
this.filterRubriqueDisplay = rubriques;
|
|
55
|
+
this.filterRubriqueDisplay = rubriques.filter(rubrique=> rubrique);
|
|
56
56
|
},
|
|
57
57
|
filterUpdateMedia(filter: {
|
|
58
58
|
type?: string;
|
package/src/stores/VastStore.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
|
|
2
2
|
import { AdPosition } from "./class/adserver/adPosition";
|
|
3
3
|
|
|
4
4
|
interface VastState {
|
|
5
|
-
currentAd:
|
|
5
|
+
currentAd: google.ima.Ad|undefined;
|
|
6
6
|
isAdPlaying: boolean;
|
|
7
7
|
isAdPaused: boolean;
|
|
8
8
|
isAdSkippable: boolean;
|
|
@@ -79,7 +79,7 @@ export const useVastStore = defineStore("VastStore", {
|
|
|
79
79
|
) {
|
|
80
80
|
this.adPositionsPodcasts[podcastId] = adPositions;
|
|
81
81
|
},
|
|
82
|
-
updateCurrentAd(currentAd:
|
|
82
|
+
updateCurrentAd(currentAd: google.ima.Ad) {
|
|
83
83
|
this.currentAd = currentAd;
|
|
84
84
|
this.isAdSkipped = false;
|
|
85
85
|
},
|