@saooti/octopus-sdk 41.0.14-SNAPSHOT → 41.0.14
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/eslint.config.mjs +5 -3
- package/index.ts +7 -1
- package/package.json +3 -2
- package/plateform.conf +1 -1
- package/src/App.vue +3 -7
- package/src/api/classicApi.ts +1 -1
- package/src/components/composable/player/usePlayerLive.ts +2 -2
- package/src/components/composable/player/usePlayerLogic.ts +2 -1
- package/src/components/composable/radio/usefetchRadioData.ts +29 -12
- package/src/components/composable/route/useSimplePageParam.ts +6 -1
- package/src/components/display/categories/CategoryChooser.vue +4 -0
- package/src/components/display/comments/CommentList.vue +1 -1
- package/src/components/display/emission/EmissionList.vue +2 -1
- package/src/components/display/emission/EmissionPresentationItem.vue +14 -6
- package/src/components/display/filter/AdvancedSearch.vue +2 -2
- package/src/components/display/filter/DateFilter.vue +15 -2
- package/src/components/display/live/RadioCurrently.vue +2 -5
- package/src/components/display/organisation/OrganisationChooserLight.vue +34 -36
- package/src/components/display/podcasts/PodcastPlayButton.vue +6 -1
- package/src/components/display/rubriques/RubriqueChooser.vue +24 -2
- package/src/components/display/rubriques/RubriqueList.vue +18 -0
- package/src/components/display/sharing/PlayerParameters.vue +0 -8
- package/src/components/display/sharing/SharePlayer.vue +0 -5
- package/src/components/display/sharing/SubscribeButtons.vue +4 -2
- package/src/components/form/ClassicCheckbox.vue +29 -4
- package/src/components/form/ClassicInputText.vue +14 -6
- package/src/components/form/ClassicMultiselect.vue +35 -7
- package/src/components/misc/ClassicAccordion.vue +4 -4
- package/src/components/misc/ClassicLazy.vue +25 -14
- package/src/components/misc/ClassicNav.vue +3 -0
- package/src/components/misc/ClassicSpinner.vue +1 -1
- package/src/components/misc/FooterSection.vue +18 -20
- package/src/components/misc/HomeDropdown.vue +3 -110
- package/src/components/misc/MobileMenu.vue +59 -64
- package/src/components/misc/TopBar.vue +2 -10
- package/src/components/misc/TopBarMainContent.vue +8 -12
- package/src/components/misc/UserButtonContent.vue +159 -0
- package/src/components/misc/modal/ClassicModal.vue +4 -0
- package/src/components/misc/player/PlayerCompact.vue +1 -0
- package/src/components/misc/player/PlayerComponent.vue +1 -0
- package/src/components/misc/player/elements/PlayerImage.vue +0 -1
- package/src/components/misc/player/elements/PlayerTitle.vue +3 -3
- package/src/components/misc/player/radio/RadioHistory.vue +3 -2
- package/src/components/misc/player/video/PlayerVideo.vue +2 -2
- package/src/components/pages/HomePage.vue +5 -4
- package/src/components/pages/PageLogout.vue +1 -6
- package/src/components/pages/PodcastPage.vue +0 -1
- package/src/components/pages/PodcastsPage.vue +1 -1
- package/src/components/pages/VideoPage.vue +5 -2
- package/src/helper/equals.ts +26 -0
- package/src/locale/de.ts +6 -5
- package/src/locale/en.ts +6 -5
- package/src/locale/es.ts +6 -5
- package/src/locale/fr.ts +6 -5
- package/src/locale/it.ts +6 -5
- package/src/locale/sl.ts +6 -5
- package/src/router/router.ts +10 -74
- package/src/router/utils.ts +112 -0
- package/src/stores/AuthStore.ts +5 -0
- package/src/stores/FilterStore.ts +126 -71
- package/src/stores/PlayerStore.ts +11 -1
- package/src/stores/class/conference/conference.ts +2 -0
- package/src/stores/class/general/player.ts +2 -2
- package/src/style/_variables.scss +6 -0
- package/src/style/general.scss +18 -1
- package/src/helper/radio/radioHelper.ts +0 -15
package/eslint.config.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import eslint from '@eslint/js';
|
|
2
|
-
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
3
2
|
import eslintPluginVue from 'eslint-plugin-vue';
|
|
4
3
|
import globals from 'globals';
|
|
5
4
|
import typescriptEslint from 'typescript-eslint';
|
|
@@ -23,7 +22,10 @@ export default typescriptEslint.config(
|
|
|
23
22
|
},
|
|
24
23
|
rules: {
|
|
25
24
|
// your rules
|
|
25
|
+
"curly": ['error'],
|
|
26
|
+
"no-console": ['warn', { allow: ['warn', 'error'] }],
|
|
27
|
+
"no-warning-comments": ['warn'],
|
|
28
|
+
"no-duplicate-imports": ['warn']
|
|
26
29
|
},
|
|
27
|
-
}
|
|
28
|
-
eslintConfigPrettier
|
|
30
|
+
}
|
|
29
31
|
);
|
package/index.ts
CHANGED
|
@@ -120,6 +120,7 @@ import cookiesHelper from "./src/helper/cookiesHelper.ts";
|
|
|
120
120
|
import downloadHelper from "./src/helper/downloadHelper.ts";
|
|
121
121
|
import displayHelper from "./src/helper/displayHelper.ts";
|
|
122
122
|
import debounce from "./src/helper/debounceHelper.ts";
|
|
123
|
+
import { deepEqual } from "./src/helper/equals.ts";
|
|
123
124
|
|
|
124
125
|
//stores
|
|
125
126
|
import {useVastStore} from "./src/stores/VastStore.ts";
|
|
@@ -147,6 +148,9 @@ export const getRadiolineIcon = () => import("./src/components/icons/RadiolineIc
|
|
|
147
148
|
export const getTuninIcon = () => import("./src/components/icons/TuninIcon.vue");
|
|
148
149
|
export const getXIcon = () => import("./src/components/icons/XIcon.vue");
|
|
149
150
|
|
|
151
|
+
// Routing
|
|
152
|
+
import { setupRouter } from './src/router/utils';
|
|
153
|
+
|
|
150
154
|
export {
|
|
151
155
|
useResizePhone,
|
|
152
156
|
useTagOf,
|
|
@@ -175,6 +179,8 @@ export {
|
|
|
175
179
|
ModuleApi,
|
|
176
180
|
classicApi,
|
|
177
181
|
cookiesHelper,
|
|
182
|
+
deepEqual,
|
|
178
183
|
downloadHelper,
|
|
179
|
-
displayHelper
|
|
184
|
+
displayHelper,
|
|
185
|
+
setupRouter
|
|
180
186
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "41.0.14
|
|
3
|
+
"version": "41.0.14",
|
|
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",
|
|
@@ -31,7 +32,6 @@
|
|
|
31
32
|
"axios": "^1.9.0",
|
|
32
33
|
"dayjs": "^1.11.13",
|
|
33
34
|
"emoji-mart-vue-fast": "^15.0.4",
|
|
34
|
-
"eslint-config-prettier": "^10.1.5",
|
|
35
35
|
"express": "^5.1.0",
|
|
36
36
|
"globals": "^16.2.0",
|
|
37
37
|
"hls.js": "^1.6.5",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"video.js": "^8.23.3",
|
|
54
54
|
"videojs-quality-selector-hls": "^1.1.1",
|
|
55
55
|
"vite": "^6.3.5",
|
|
56
|
+
"vite-bundle-visualizer": "^1.2.1",
|
|
56
57
|
"vue": "^3.5.16",
|
|
57
58
|
"vue-i18n": "^11.1.5",
|
|
58
59
|
"vue-material-design-icons": "^5.3.1",
|
package/plateform.conf
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
preprod.saooti.org
|
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
|
);
|
package/src/api/classicApi.ts
CHANGED
|
@@ -51,8 +51,8 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function playLive() {
|
|
54
|
-
if (!playerStore.
|
|
55
|
-
playerStore.playerUpdatePlayerHlsUrl(`${apiStore.hlsUrl}live
|
|
54
|
+
if (!playerStore.playerHlsIdentifier) return;
|
|
55
|
+
playerStore.playerUpdatePlayerHlsUrl(`${apiStore.hlsUrl}live/${playerStore.playerHlsIdentifier}/index.m3u8`);
|
|
56
56
|
playHls();
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -11,7 +11,8 @@ import fetchHelper from "../../../helper/fetchHelper";
|
|
|
11
11
|
import classicApi from "../../../api/classicApi";
|
|
12
12
|
import dayjs from "dayjs";
|
|
13
13
|
import { FetchParam } from "@/stores/class/general/fetchParam";
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
export const usePlayerLogic = (forceHide: Ref<boolean, boolean>) => {
|
|
15
16
|
const hlsReady= ref(false);
|
|
16
17
|
|
|
17
18
|
const { listenTime, onPlay, setDownloadId, onTimeUpdateProgress, playLive, endingLive, playRadio} = usePlayerLive(hlsReady);
|
|
@@ -2,17 +2,19 @@ import classicApi from "../../../api/classicApi";
|
|
|
2
2
|
import { MediaRadio, MetadataRadio, NextAdvertising } from '@/stores/class/general/player';
|
|
3
3
|
import { Podcast } from '@/stores/class/general/podcast';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
|
-
import radioHelper from "../../../helper/radio/radioHelper";
|
|
6
5
|
import {onBeforeUnmount, Ref, ref} from 'vue';
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
7
|
export const useFetchRadio = ()=>{
|
|
8
8
|
|
|
9
9
|
const radioInterval : Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
|
|
10
|
+
|
|
11
|
+
const {t} = useI18n();
|
|
10
12
|
|
|
11
13
|
async function fetchRadioMetadata(
|
|
12
14
|
canalId: number,
|
|
13
15
|
previousTitle: string,
|
|
14
16
|
callbackMetadata: (
|
|
15
|
-
metadata: MediaRadio,
|
|
17
|
+
metadata: MediaRadio|undefined,
|
|
16
18
|
podcast: Podcast | undefined,
|
|
17
19
|
history: Array<MediaRadio>
|
|
18
20
|
) => void,
|
|
@@ -33,15 +35,19 @@ export const useFetchRadio = ()=>{
|
|
|
33
35
|
callbackAdvertising(metadata.nextAdvertising);
|
|
34
36
|
}
|
|
35
37
|
const arrayMetadata = metadata.previously;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
if(null!==metadata.currently){
|
|
39
|
+
arrayMetadata.unshift(metadata.currently);
|
|
40
|
+
for (let index = 0, len = arrayMetadata.length; index < len; index++) {
|
|
41
|
+
if (
|
|
42
|
+
dayjs().valueOf() - 18000 >
|
|
43
|
+
dayjs(arrayMetadata[index].startDate).valueOf()
|
|
44
|
+
) {
|
|
45
|
+
await useCallbackIfNewMetadata(previousTitle, arrayMetadata, index, len,callbackMetadata);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
44
48
|
}
|
|
49
|
+
}else{
|
|
50
|
+
callbackMetadata(undefined, undefined, arrayMetadata);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
async function useCallbackIfNewMetadata(previousTitle: string, arrayMetadata: Array<MediaRadio>, index:number, len: number, callbackMetadata: (
|
|
@@ -63,11 +69,22 @@ export const useFetchRadio = ()=>{
|
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
|
-
function displayTitle(metadata: MediaRadio): string {
|
|
67
|
-
|
|
72
|
+
function displayTitle(metadata: MediaRadio|undefined): string {
|
|
73
|
+
if(!metadata){
|
|
74
|
+
return t("Silent stream");
|
|
75
|
+
}
|
|
76
|
+
let title = "";
|
|
77
|
+
if (metadata?.title) {
|
|
78
|
+
title += metadata.title;
|
|
79
|
+
}
|
|
80
|
+
if (metadata?.artist) {
|
|
81
|
+
title += " - " + metadata.artist;
|
|
82
|
+
}
|
|
83
|
+
return title;
|
|
68
84
|
}
|
|
69
85
|
|
|
70
86
|
|
|
87
|
+
|
|
71
88
|
onBeforeUnmount(() => {
|
|
72
89
|
clearInterval(radioInterval.value as unknown as number);
|
|
73
90
|
})
|
|
@@ -29,11 +29,16 @@ export const useSimplePageParam = (props: {readonly [key:string]: string|number}
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
// When changing global organisation, update organisation here
|
|
33
|
+
watch(() => filterStore.filterOrgaId, () => {
|
|
34
|
+
organisationId.value = filterStore.filterOrgaId;
|
|
35
|
+
});
|
|
36
|
+
|
|
32
37
|
onMounted(() => {
|
|
33
38
|
initOrga();
|
|
34
39
|
initSearchPattern();
|
|
35
40
|
isInit.value = true;
|
|
36
|
-
})
|
|
41
|
+
});
|
|
37
42
|
|
|
38
43
|
function getMinSize(param:string){
|
|
39
44
|
return param.length>3 ?param : ""
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
:is-disabled="isDisabled"
|
|
18
18
|
:no-deselect="noDeselect"
|
|
19
19
|
:display-required="displayRequired"
|
|
20
|
+
:popover="popover"
|
|
21
|
+
:popover-relative-class="popoverRelativeClass"
|
|
20
22
|
@on-search="onSearchCategory"
|
|
21
23
|
@selected="onCategorySelected"
|
|
22
24
|
/>
|
|
@@ -52,6 +54,8 @@ const props = defineProps({
|
|
|
52
54
|
displayLabel: { default: false, type: Boolean },
|
|
53
55
|
textDanger :{ default: undefined, type: String },
|
|
54
56
|
displayRequired: { default: false, type: Boolean },
|
|
57
|
+
popover: { default: undefined, type: String },
|
|
58
|
+
popoverRelativeClass: { default: undefined, type: String },
|
|
55
59
|
})
|
|
56
60
|
|
|
57
61
|
//Emits
|
|
@@ -116,8 +116,8 @@ const { t } = useI18n();
|
|
|
116
116
|
const {handle403} = useErrorHandler();
|
|
117
117
|
|
|
118
118
|
//Computed
|
|
119
|
-
const changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);
|
|
120
119
|
const isNotAnAnswerList = computed(() => undefined === props.answerToComment);
|
|
120
|
+
const changed = computed(() => `${props.size}|${props.reload}|${dsize.value}|${props.stateFilter}|${props.podcast?.podcastId}|${props.organisationId}`);
|
|
121
121
|
const sortChoice = computed(() =>{
|
|
122
122
|
return [
|
|
123
123
|
{ title: t("The most recent"), value: "DATE_DESC" },
|
|
@@ -122,8 +122,9 @@ const displayArray = computed(() => {
|
|
|
122
122
|
});
|
|
123
123
|
const displayRubriquage = computed(() => state.emissionsPage.rubriquage);
|
|
124
124
|
const changePaginate = computed(() => `${props.first}|${props.size}`);
|
|
125
|
+
/** Computed property to track for configuration changes */
|
|
125
126
|
const changed = computed(() => {
|
|
126
|
-
return `${props.organisationId}|${props.query}|${props.monetisable}|${props.includeHidden}
|
|
127
|
+
return `${props.organisationId}|${props.query}|${props.monetisable}|${props.includeHidden}|\
|
|
127
128
|
${props.iabId}|${props.rubriqueId}|${props.rubriquageId}|${props.before}|${props.after}|${props.sort}|${props.noRubriquageId}`;
|
|
128
129
|
});
|
|
129
130
|
const sortText = computed(() => {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
:class="isVertical ? 'flex-column' : ''"
|
|
14
14
|
>
|
|
15
15
|
<img
|
|
16
|
-
v-lazy="useProxyImageUrl(emission.imageUrl,
|
|
17
|
-
:width="
|
|
18
|
-
:height="
|
|
16
|
+
v-lazy="useProxyImageUrl(emission.imageUrl, tailleImage)"
|
|
17
|
+
:width="tailleImage"
|
|
18
|
+
:height="tailleImage"
|
|
19
19
|
:class="isVertical ? 'img-box-bigger' : ''"
|
|
20
20
|
class="img-box"
|
|
21
21
|
aria-hidden="true"
|
|
@@ -49,7 +49,7 @@ import {useResizePhone} from "../../composable/useResizePhone";
|
|
|
49
49
|
import { Emission } from "@/stores/class/general/emission";
|
|
50
50
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
51
51
|
import displayHelper from "../../../helper/displayHelper";
|
|
52
|
-
import { nextTick, useTemplateRef, watch } from "vue";
|
|
52
|
+
import { nextTick, useTemplateRef, watch, computed } from "vue";
|
|
53
53
|
import { useI18n } from "vue-i18n";
|
|
54
54
|
|
|
55
55
|
//Props
|
|
@@ -69,6 +69,13 @@ const { t } = useI18n();
|
|
|
69
69
|
const { isPhone } = useResizePhone();
|
|
70
70
|
const { useProxyImageUrl } = useImageProxy();
|
|
71
71
|
|
|
72
|
+
// Computed
|
|
73
|
+
// Calcul de la taille de l'image
|
|
74
|
+
const tailleImage = computed(() => {
|
|
75
|
+
// L'élément fait 400 de large à la verticale, mais on prend en compte les bordures
|
|
76
|
+
return props.isVertical ? '396' : '250';
|
|
77
|
+
});
|
|
78
|
+
|
|
72
79
|
//Watch
|
|
73
80
|
watch(isPhone, async () => {
|
|
74
81
|
nextTick(() => {
|
|
@@ -114,8 +121,9 @@ function urlify(text:string|undefined){
|
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
.img-box-bigger {
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
// L'élément fait 400 de large à la verticale, mais on prend en compte les bordures
|
|
125
|
+
width: 396px;
|
|
126
|
+
height: 396px;
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
129
|
</style>
|
|
@@ -173,7 +173,7 @@ const isSelectValidity = computed(() => {
|
|
|
173
173
|
|
|
174
174
|
//Watch
|
|
175
175
|
watch(organisation, async () => {
|
|
176
|
-
const hidden =undefined !== organisation.value && organisationRight.value
|
|
176
|
+
const hidden = undefined !== organisation.value && organisationRight.value && !props.isEmission;
|
|
177
177
|
if (hidden !== props.includeHidden) {
|
|
178
178
|
updateIncludeHidden(hidden);
|
|
179
179
|
}
|
|
@@ -190,7 +190,6 @@ watch(()=>props.searchPattern, (value: string) => {
|
|
|
190
190
|
});
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
-
|
|
194
193
|
//Methods
|
|
195
194
|
function updateMonetisable(value: string): void {
|
|
196
195
|
emit("update:monetisable", value);
|
|
@@ -253,6 +252,7 @@ function clickShowFilters(): void {
|
|
|
253
252
|
showFilters.value = !showFilters.value;
|
|
254
253
|
}
|
|
255
254
|
</script>
|
|
255
|
+
|
|
256
256
|
<style lang="scss">
|
|
257
257
|
.octopus-app {
|
|
258
258
|
.advanced-search-container {
|
|
@@ -28,7 +28,7 @@ import ClassicDatePicker from "../../form/ClassicDatePicker.vue";
|
|
|
28
28
|
import { ref, watch } from "vue";
|
|
29
29
|
import { useI18n } from "vue-i18n";
|
|
30
30
|
|
|
31
|
-
//Props
|
|
31
|
+
//Props
|
|
32
32
|
const props = defineProps({
|
|
33
33
|
isEmission: { default: false, type: Boolean },
|
|
34
34
|
fromDate: { default: undefined, type: String },
|
|
@@ -38,7 +38,7 @@ const props = defineProps({
|
|
|
38
38
|
//Emits
|
|
39
39
|
const emit = defineEmits(["updateDates"]);
|
|
40
40
|
|
|
41
|
-
//Data
|
|
41
|
+
//Data
|
|
42
42
|
const isActive = ref([false, false]);
|
|
43
43
|
const internDates = ref([
|
|
44
44
|
dayjs().subtract(10, "days").startOf("day").toDate(),
|
|
@@ -50,6 +50,17 @@ const { t } = useI18n();
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
//Watch
|
|
53
|
+
watch(isActive, () => {
|
|
54
|
+
emit("updateDates", {
|
|
55
|
+
from: isActive.value[0]
|
|
56
|
+
? dayjs(internDates.value[0]).toISOString()
|
|
57
|
+
: undefined,
|
|
58
|
+
to: isActive.value[1]
|
|
59
|
+
? dayjs(internDates.value[1]).toISOString()
|
|
60
|
+
: undefined,
|
|
61
|
+
});
|
|
62
|
+
}, { deep: true });
|
|
63
|
+
|
|
53
64
|
watch(()=>props.toDate, () => {
|
|
54
65
|
isActive.value[1] = undefined !== props.toDate;
|
|
55
66
|
if (props.toDate && props.toDate !== internDates.value[1].toISOString()) {
|
|
@@ -75,6 +86,8 @@ watch(()=>props.fromDate, () => {
|
|
|
75
86
|
|
|
76
87
|
|
|
77
88
|
//Methods
|
|
89
|
+
|
|
90
|
+
|
|
78
91
|
function updateDate(index: number, value: Date): void {
|
|
79
92
|
internDates.value[index] = value;
|
|
80
93
|
if (
|
|
@@ -72,10 +72,7 @@ const currentlyPlayingString = computed(() => {
|
|
|
72
72
|
if (playingRadio.value && playerStore.playerRadio) {
|
|
73
73
|
return displayTitle(playerStore.playerRadio.metadata);
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
return displayTitle(currentMetadata.value);
|
|
77
|
-
}
|
|
78
|
-
return "";
|
|
75
|
+
return displayTitle(currentMetadata.value);
|
|
79
76
|
});
|
|
80
77
|
|
|
81
78
|
onMounted(()=>{
|
|
@@ -102,7 +99,7 @@ async function fetchCurrentlyPlaying(): Promise<void> {
|
|
|
102
99
|
updateMetadata,
|
|
103
100
|
);
|
|
104
101
|
}
|
|
105
|
-
function updateMetadata(metadata: MediaRadio, podcast?: Podcast): void {
|
|
102
|
+
function updateMetadata(metadata: MediaRadio|undefined, podcast?: Podcast): void {
|
|
106
103
|
currentMetadata.value = metadata;
|
|
107
104
|
currentPodcast.value = podcast;
|
|
108
105
|
}
|
|
@@ -1,66 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<ClassicSelect
|
|
3
|
+
v-if="init && organisation"
|
|
4
|
+
:text-init="actual"
|
|
5
|
+
:display-label="false"
|
|
6
|
+
id-select="organisation-chooser-footer"
|
|
7
|
+
:label="t('select productor')"
|
|
8
|
+
:transparent="true"
|
|
9
|
+
:options="[
|
|
10
|
+
{ title: organisation.name, value: organisation.id },
|
|
11
|
+
{ title: t('No organisation filter'), value: 'NONE' },
|
|
12
|
+
]"
|
|
13
|
+
class="my-1"
|
|
14
|
+
@update:text-init="updateOrganisation"
|
|
15
|
+
/>
|
|
15
16
|
</template>
|
|
16
17
|
|
|
17
18
|
<script setup lang="ts">
|
|
18
19
|
import ClassicSelect from "../../form/ClassicSelect.vue";
|
|
19
20
|
import { Organisation } from "@/stores/class/general/organisation";
|
|
20
21
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
21
|
-
import {
|
|
22
|
+
import { computed, ref, watch } from "vue";
|
|
22
23
|
import { useI18n } from "vue-i18n";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//Props
|
|
26
|
-
const props = defineProps({
|
|
27
|
-
value: { default: undefined, type: String },
|
|
28
|
-
reset: { default: false, type: Boolean },
|
|
29
|
-
})
|
|
24
|
+
import { useFilterStore } from "../../../stores/FilterStore";
|
|
30
25
|
|
|
31
26
|
//Emits
|
|
32
27
|
const emit = defineEmits(["selected"]);
|
|
33
28
|
|
|
34
29
|
//Data
|
|
35
|
-
const
|
|
36
|
-
const organisation: Ref<Organisation | undefined> = ref(undefined);
|
|
30
|
+
const organisation = ref<Organisation|undefined>(undefined);
|
|
37
31
|
const init = ref(false);
|
|
38
32
|
|
|
39
33
|
//Composables
|
|
40
34
|
const { t } = useI18n();
|
|
41
35
|
const SaveFetchStore = useSaveFetchStore();
|
|
36
|
+
const filterStore = useFilterStore();
|
|
42
37
|
|
|
38
|
+
// Computed
|
|
39
|
+
const actual = computed(() => {
|
|
40
|
+
if (filterStore.filterOrgaId) {
|
|
41
|
+
return filterStore.filterOrgaId;
|
|
42
|
+
} else {
|
|
43
|
+
return 'NONE';
|
|
44
|
+
}
|
|
45
|
+
});
|
|
43
46
|
|
|
44
47
|
//Watch
|
|
45
|
-
watch(()=>
|
|
46
|
-
|
|
47
|
-
fetchOrganisation();
|
|
48
|
-
}
|
|
48
|
+
watch(()=>filterStore.realOrgaId, async () => {
|
|
49
|
+
fetchOrganisation();
|
|
49
50
|
}, {deep: true, immediate: true});
|
|
50
|
-
watch(()=>props.reset, async () => {
|
|
51
|
-
actual.value = "NONE";
|
|
52
|
-
});
|
|
53
|
-
watch(actual, async () => {
|
|
54
|
-
emit("selected","NONE" === actual.value ? undefined : organisation.value);
|
|
55
|
-
});
|
|
56
51
|
|
|
57
52
|
//Methods
|
|
58
53
|
async function fetchOrganisation(): Promise<void> {
|
|
59
|
-
if (!
|
|
54
|
+
if (!filterStore.realOrgaId) {
|
|
60
55
|
return;
|
|
61
56
|
}
|
|
62
|
-
organisation.value = await SaveFetchStore.getOrgaData(
|
|
63
|
-
actual.value = organisation.value.id;
|
|
57
|
+
organisation.value = await SaveFetchStore.getOrgaData(filterStore.realOrgaId);
|
|
64
58
|
init.value = true;
|
|
65
59
|
}
|
|
60
|
+
|
|
61
|
+
function updateOrganisation(value: string): void {
|
|
62
|
+
emit("selected", "NONE" === value ? undefined : organisation.value);
|
|
63
|
+
}
|
|
66
64
|
</script>
|
|
@@ -211,7 +211,10 @@ function play(isVideo: boolean): void {
|
|
|
211
211
|
playerStore.playerPlay(
|
|
212
212
|
{
|
|
213
213
|
...props.podcast,
|
|
214
|
-
...{
|
|
214
|
+
...{
|
|
215
|
+
conferenceId: props.fetchConference?.conferenceId,
|
|
216
|
+
hlsIdentifier: props.fetchConference?.hlsIdentifier,
|
|
217
|
+
},
|
|
215
218
|
},
|
|
216
219
|
isVideo,
|
|
217
220
|
);
|
|
@@ -225,6 +228,8 @@ function play(isVideo: boolean): void {
|
|
|
225
228
|
position: absolute;
|
|
226
229
|
inset: 0;
|
|
227
230
|
background-color:var(--octopus-background-transparent);
|
|
231
|
+
// Allow pointer events to go through (allow click on image beneath blur)
|
|
232
|
+
pointer-events: none;
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
.live-image-status {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:display-label="displayLabel"
|
|
8
8
|
:label="label ?? t('By rubric')"
|
|
9
9
|
:text-danger="textDanger"
|
|
10
|
-
:placeholder="
|
|
10
|
+
:placeholder="placeholderText"
|
|
11
11
|
:max-element="maxElement"
|
|
12
12
|
:multiple="multiple"
|
|
13
13
|
:min-search-length="1"
|
|
@@ -30,8 +30,14 @@ import { useI18n } from "vue-i18n";
|
|
|
30
30
|
const props = defineProps({
|
|
31
31
|
defaultanswer: { default: "", type: String },
|
|
32
32
|
width: { default: "100%", type: String },
|
|
33
|
+
/**
|
|
34
|
+
* Active la sélection multiple
|
|
35
|
+
*/
|
|
33
36
|
multiple: { default: false, type: Boolean },
|
|
34
37
|
reset: { default: false, type: Boolean },
|
|
38
|
+
/**
|
|
39
|
+
* Les rubriques à afficher
|
|
40
|
+
*/
|
|
35
41
|
allRubriques: { default: () => [], type: Array as () => Array<Rubrique> },
|
|
36
42
|
rubriqueSelected: { default: undefined, type: Number },
|
|
37
43
|
rubriqueSelectedArray: {
|
|
@@ -46,6 +52,10 @@ const props = defineProps({
|
|
|
46
52
|
label:{default: undefined, type: String },
|
|
47
53
|
displayLabel: { default: false, type: Boolean },
|
|
48
54
|
textDanger :{ default: undefined, type: String },
|
|
55
|
+
/**
|
|
56
|
+
* Le texte affiché là où l'utilisateur doit effectuer sa saisie
|
|
57
|
+
*/
|
|
58
|
+
placeholder: { type: String, required: false, default: undefined }
|
|
49
59
|
})
|
|
50
60
|
|
|
51
61
|
|
|
@@ -55,7 +65,9 @@ const emit = defineEmits([
|
|
|
55
65
|
"update:rubriqueSelectedArray",
|
|
56
66
|
"selected"
|
|
57
67
|
]);
|
|
58
|
-
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
//Composables
|
|
59
71
|
const { t } = useI18n();
|
|
60
72
|
|
|
61
73
|
|
|
@@ -102,6 +114,16 @@ const model = computed({
|
|
|
102
114
|
},
|
|
103
115
|
})
|
|
104
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Le texte à afficher dans la saisie de l'utilisateur
|
|
119
|
+
*/
|
|
120
|
+
const placeholderText = computed(() => {
|
|
121
|
+
if (props.placeholder) {
|
|
122
|
+
return props.placeholder;
|
|
123
|
+
} else {
|
|
124
|
+
return t('Type string to filter by categories');
|
|
125
|
+
}
|
|
126
|
+
});
|
|
105
127
|
|
|
106
128
|
//Watch
|
|
107
129
|
watch(()=>props.rubriqueSelected, () => {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-inline-flex w-100 mb-3 px-3 hide-phone">
|
|
3
3
|
<div ref="rubriqueListContainer" class="rubrique-list-container">
|
|
4
|
+
|
|
5
|
+
<!-- Liste déroulante pour sélectionner le rubriquage -->
|
|
4
6
|
<select
|
|
5
7
|
v-model="rubriquage"
|
|
6
8
|
:title="t('By topic')"
|
|
@@ -15,6 +17,8 @@
|
|
|
15
17
|
{{ myRubriquage.title }}
|
|
16
18
|
</option>
|
|
17
19
|
</select>
|
|
20
|
+
|
|
21
|
+
<!-- Boutons de sélection de la rubrique -->
|
|
18
22
|
<button
|
|
19
23
|
v-for="rubrique in rubriqueDisplay"
|
|
20
24
|
:id="'rubrique' + rubrique.rubriqueId"
|
|
@@ -25,6 +29,8 @@
|
|
|
25
29
|
{{ rubrique.name }}
|
|
26
30
|
</button>
|
|
27
31
|
</div>
|
|
32
|
+
|
|
33
|
+
<!-- Bouton pour afficher les rubriques cachées -->
|
|
28
34
|
<button
|
|
29
35
|
v-show="hidenRubriques.length"
|
|
30
36
|
id="rubriques-dropdown"
|
|
@@ -33,6 +39,8 @@
|
|
|
33
39
|
>
|
|
34
40
|
<PlusIcon />
|
|
35
41
|
</button>
|
|
42
|
+
|
|
43
|
+
<!-- Popup de sélection des rubriques cachées -->
|
|
36
44
|
<ClassicPopover
|
|
37
45
|
ref="popoverRubrique"
|
|
38
46
|
target="rubriques-dropdown"
|
|
@@ -43,6 +51,7 @@
|
|
|
43
51
|
v-if="hidenRubriques.length"
|
|
44
52
|
class="rubrique-chooser-minwidth"
|
|
45
53
|
:all-rubriques="hidenRubriques"
|
|
54
|
+
:placeholder="rubriqueChooserText"
|
|
46
55
|
@selected="addFilterFromPopover($event)"
|
|
47
56
|
/>
|
|
48
57
|
</ClassicPopover>
|
|
@@ -107,6 +116,15 @@ const rubriquageDisplay = computed(() => {
|
|
|
107
116
|
});
|
|
108
117
|
});
|
|
109
118
|
|
|
119
|
+
// Retourne le texte à afficher dans le RubriqueChooser
|
|
120
|
+
const rubriqueChooserText = computed(() => {
|
|
121
|
+
if (!rubriquage.value) {
|
|
122
|
+
return '';
|
|
123
|
+
}
|
|
124
|
+
let topic = rubriquage.value.title;
|
|
125
|
+
return t('Enter name of topic', { topic });
|
|
126
|
+
});
|
|
127
|
+
|
|
110
128
|
|
|
111
129
|
//Watch
|
|
112
130
|
watch(()=>filterStore.filterRubrique, () => {
|