@saooti/octopus-sdk 37.0.6 → 37.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.ts +22 -22
- package/package.json +26 -22
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/transition.scss +34 -22
- package/src/components/display/aggregator/RssSection.vue +3 -3
- package/src/components/display/categories/CategoryChooser.vue +73 -60
- package/src/components/display/categories/CategoryFilter.vue +134 -90
- package/src/components/display/categories/CategoryList.vue +76 -62
- package/src/components/display/comments/AddCommentModal.vue +44 -44
- package/src/components/display/comments/CommentBasicView.vue +38 -30
- package/src/components/display/comments/CommentInput.vue +121 -106
- package/src/components/display/comments/CommentItem.vue +144 -102
- package/src/components/display/comments/CommentList.vue +117 -85
- package/src/components/display/comments/CommentParentInfo.vue +18 -15
- package/src/components/display/comments/CommentPlayer.vue +39 -41
- package/src/components/display/comments/CommentSection.vue +68 -53
- package/src/components/display/edit/EditBox.vue +7 -7
- package/src/components/display/edit/EditBoxRadio.vue +3 -4
- package/src/components/display/edit/EditCommentBox.vue +34 -36
- package/src/components/display/emission/EmissionInlineList.vue +75 -63
- package/src/components/display/emission/EmissionItem.vue +47 -35
- package/src/components/display/emission/EmissionList.vue +118 -83
- package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
- package/src/components/display/filter/AdvancedSearch.vue +81 -73
- package/src/components/display/filter/CategorySearchFilter.vue +27 -25
- package/src/components/display/filter/DateFilter.vue +38 -38
- package/src/components/display/filter/MonetizableFilter.vue +16 -14
- package/src/components/display/filter/ProductorSearch.vue +55 -47
- package/src/components/display/filter/RubriqueChoice.vue +42 -27
- package/src/components/display/filter/RubriqueFilter.vue +130 -85
- package/src/components/display/filter/SearchOrder.vue +16 -11
- package/src/components/display/list/ListPaginate.vue +72 -70
- package/src/components/display/list/PaginateParams.vue +29 -30
- package/src/components/display/list/PaginateSection.vue +210 -0
- package/src/components/display/list/SwiperList.vue +28 -32
- package/src/components/display/live/CountDown.vue +12 -14
- package/src/components/display/live/LiveHorizontalList.vue +60 -50
- package/src/components/display/live/LiveItem.vue +42 -26
- package/src/components/display/live/LiveList.vue +92 -65
- package/src/components/display/live/RadioCurrently.vue +47 -42
- package/src/components/display/live/RadioImage.vue +40 -42
- package/src/components/display/live/RadioItem.vue +15 -22
- package/src/components/display/live/RadioList.vue +24 -21
- package/src/components/display/live/RadioPlanning.vue +105 -68
- package/src/components/display/organisation/OrganisationChooser.vue +58 -42
- package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
- package/src/components/display/participant/ParticipantItem.vue +89 -77
- package/src/components/display/participant/ParticipantList.vue +90 -60
- package/src/components/display/playlist/PlaylistItem.vue +32 -35
- package/src/components/display/playlist/PlaylistList.vue +70 -52
- package/src/components/display/playlist/PodcastList.vue +61 -50
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
- package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
- package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
- package/src/components/display/podcasts/PodcastImage.vue +129 -131
- package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
- package/src/components/display/podcasts/PodcastItem.vue +96 -90
- package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
- package/src/components/display/podcasts/PodcastList.vue +115 -84
- package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
- package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
- package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
- package/src/components/display/podcasts/TagList.vue +33 -37
- package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
- package/src/components/display/rubriques/RubriqueList.vue +117 -89
- package/src/components/display/sharing/PlayerParameters.vue +45 -42
- package/src/components/display/sharing/QrCode.vue +52 -46
- package/src/components/display/sharing/ShareButtons.vue +18 -18
- package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
- package/src/components/display/sharing/ShareDistribution.vue +101 -67
- package/src/components/display/sharing/SharePlayer.vue +207 -127
- package/src/components/display/sharing/SharePlayerColors.vue +15 -15
- package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
- package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
- package/src/components/display/sharing/SubscribeButtons.vue +83 -32
- package/src/components/display/studio/RecordingItemButton.vue +3 -3
- package/src/components/form/ClassicCheckbox.vue +32 -31
- package/src/components/form/ClassicDatePicker.vue +47 -49
- package/src/components/form/ClassicInputText.vue +99 -98
- package/src/components/form/ClassicLoading.vue +11 -14
- package/src/components/form/ClassicMultiselect.vue +125 -126
- package/src/components/form/ClassicRadio.vue +15 -18
- package/src/components/form/ClassicSearch.vue +17 -23
- package/src/components/form/ClassicSelect.vue +35 -27
- package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
- package/src/components/misc/AcpmImage.vue +6 -6
- package/src/components/misc/ClassicAccordion.vue +73 -0
- package/src/components/misc/ClassicNav.vue +117 -0
- package/src/components/misc/ClassicPopover.vue +212 -0
- package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
- package/src/components/misc/ErrorMessage.vue +9 -17
- package/src/components/misc/FooterSection.vue +198 -0
- package/src/components/misc/HomeDropdown.vue +60 -60
- package/src/components/misc/LeftMenu.vue +115 -79
- package/src/components/misc/ProgressBar.vue +36 -32
- package/src/components/misc/SnackBar.vue +169 -0
- package/src/components/misc/TopBar.vue +162 -116
- package/src/components/misc/modal/ClassicModal.vue +99 -103
- package/src/components/misc/modal/ClipboardModal.vue +21 -23
- package/src/components/misc/modal/MessageModal.vue +22 -28
- package/src/components/misc/modal/NewsletterModal.vue +139 -113
- package/src/components/misc/modal/QrCodeModal.vue +14 -17
- package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
- package/src/components/misc/player/PlayerCompact.vue +47 -62
- package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
- package/src/components/misc/player/PlayerLarge.vue +62 -61
- package/src/components/misc/player/PlayerProgressBar.vue +40 -30
- package/src/components/misc/player/PlayerTimeline.vue +32 -36
- package/src/components/misc/player/radio/RadioHistory.vue +62 -59
- package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
- package/src/components/mixins/cookies.ts +11 -10
- package/src/components/mixins/displayMethods.ts +5 -4
- package/src/components/mixins/handle403.ts +9 -9
- package/src/components/mixins/imageProxy.ts +14 -7
- package/src/components/mixins/init.ts +31 -16
- package/src/components/mixins/orgaComputed.ts +7 -7
- package/src/components/mixins/organisationFilter.ts +36 -22
- package/src/components/mixins/player/playerComment.ts +46 -37
- package/src/components/mixins/player/playerDisplay.ts +122 -87
- package/src/components/mixins/player/playerLive.ts +65 -43
- package/src/components/mixins/player/playerLogic.ts +133 -88
- package/src/components/mixins/player/playerTranscript.ts +48 -30
- package/src/components/mixins/radio/fetchRadioData.ts +40 -23
- package/src/components/mixins/selenium.ts +2 -2
- package/src/components/mixins/tagOfMixins.ts +11 -11
- package/src/components/pages/CategoryPage.vue +43 -0
- package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
- package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
- package/src/components/pages/Error403Page.vue +20 -19
- package/src/components/pages/HomePage.vue +144 -0
- package/src/components/pages/LivesPage.vue +66 -0
- package/src/components/pages/PageNotFound.vue +33 -22
- package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
- package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
- package/src/components/pages/PlaylistPage.vue +175 -0
- package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
- package/src/components/pages/PodcastPage.vue +365 -0
- package/src/components/pages/PodcastsPage.vue +152 -0
- package/src/components/pages/RadioPage.vue +131 -0
- package/src/components/pages/RubriquePage.vue +45 -0
- package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +10 -4
- package/src/helper/useEventListener.ts +7 -8
- package/src/i18n.ts +31 -30
- package/src/locale/de.ts +272 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +332 -324
- package/src/locale/es.ts +334 -318
- package/src/locale/fr.ts +339 -324
- package/src/locale/it.ts +341 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +324 -319
- package/src/main.ts +28 -31
- package/src/router/router.ts +218 -198
- package/src/shims-tsx.d.ts +1 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/stores/ApiStore.ts +44 -44
- package/src/stores/AuthStore.ts +21 -15
- package/src/stores/CommentStore.ts +13 -11
- package/src/stores/FilterStore.ts +25 -15
- package/src/stores/GeneralStore.ts +15 -15
- package/src/stores/ParamSdkStore.ts +179 -137
- package/src/stores/PlayerStore.ts +139 -125
- package/src/stores/class/adserver/adserverConfig.ts +1 -1
- package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
- package/src/stores/class/cartouchier/cartouche.ts +4 -4
- package/src/stores/class/cartouchier/cartouchier.ts +2 -2
- package/src/stores/class/conference/conference.ts +10 -9
- package/src/stores/class/conference/conferenceMessage.ts +2 -2
- package/src/stores/class/conference/conferenceParticipant.ts +1 -1
- package/src/stores/class/conference/studioCall.ts +6 -6
- package/src/stores/class/contract/contractOrganisation.ts +5 -5
- package/src/stores/class/ftp/ftpEmission.ts +9 -9
- package/src/stores/class/ftp/testFtpEmission.ts +4 -4
- package/src/stores/class/general/audioView.ts +19 -19
- package/src/stores/class/general/category.ts +1 -1
- package/src/stores/class/general/classicSelectType.ts +2 -3
- package/src/stores/class/general/customPlayer.ts +8 -8
- package/src/stores/class/general/emission.ts +20 -20
- package/src/stores/class/general/fetchParam.ts +8 -2
- package/src/stores/class/general/initState.ts +31 -31
- package/src/stores/class/general/interfacePageable.ts +13 -13
- package/src/stores/class/general/ituneCategory.ts +4 -4
- package/src/stores/class/general/listReturn.ts +12 -12
- package/src/stores/class/general/media.ts +7 -7
- package/src/stores/class/general/organisation.ts +9 -9
- package/src/stores/class/general/pageable.ts +10 -10
- package/src/stores/class/general/participant.ts +7 -7
- package/src/stores/class/general/player.ts +30 -28
- package/src/stores/class/general/playlist.ts +17 -19
- package/src/stores/class/general/podcast.ts +19 -19
- package/src/stores/class/general/sortPageable.ts +4 -4
- package/src/stores/class/general/soundcastCategory.ts +7 -7
- package/src/stores/class/ouestFrance/ofTag.ts +34 -34
- package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
- package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
- package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +6 -6
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +54 -54
- package/src/stores/class/rss/rssEmission.ts +13 -13
- package/src/stores/class/rss/rssInfo.ts +7 -7
- package/src/stores/class/rubrique/rubriquage.ts +2 -2
- package/src/stores/class/rubrique/rubrique.ts +1 -1
- package/src/stores/class/stat/statArrayIncome.ts +5 -5
- package/src/stores/class/stat/statArrayObject.ts +26 -26
- package/src/stores/class/stat/statGraph.ts +6 -6
- package/src/stores/class/user/person.ts +4 -2
- package/src/stores/class/user/profile.ts +4 -2
- package/src/stores/class/user/userKeycloak.ts +4 -5
- package/src/components/display/list/Paginate.vue +0 -181
- package/src/components/misc/Accordion.vue +0 -78
- package/src/components/misc/Footer.vue +0 -169
- package/src/components/misc/Nav.vue +0 -119
- package/src/components/misc/Popover.vue +0 -193
- package/src/components/misc/Snackbar.vue +0 -168
- package/src/components/pages/Category.vue +0 -41
- package/src/components/pages/Home.vue +0 -125
- package/src/components/pages/Lives.vue +0 -64
- package/src/components/pages/Playlist.vue +0 -164
- package/src/components/pages/Podcast.vue +0 -307
- package/src/components/pages/Podcasts.vue +0 -146
- package/src/components/pages/Radio.vue +0 -122
- package/src/components/pages/Rubrique.vue +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="octopus-progress c-hand-auto mt-1"
|
|
4
|
-
:class="isAmbiance?'ambiance-progress':''"
|
|
4
|
+
:class="isAmbiance ? 'ambiance-progress' : ''"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
7
|
class="octopus-progress-bar"
|
|
@@ -15,39 +15,40 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { usePlayerStore } from
|
|
19
|
-
import { mapState, mapActions } from
|
|
20
|
-
import dayjs from
|
|
21
|
-
import { defineComponent } from
|
|
18
|
+
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
19
|
+
import { mapState, mapActions } from "pinia";
|
|
20
|
+
import dayjs from "dayjs";
|
|
21
|
+
import { defineComponent } from "vue";
|
|
22
22
|
export default defineComponent({
|
|
23
|
-
name:
|
|
23
|
+
name: "RadioProgressBar",
|
|
24
24
|
|
|
25
|
-
components: {
|
|
26
|
-
|
|
27
|
-
emits: ['updateNotListenTime'],
|
|
25
|
+
components: {},
|
|
26
|
+
emits: ["updateNotListenTime"],
|
|
28
27
|
data() {
|
|
29
28
|
return {
|
|
30
|
-
percentInterval: undefined as ReturnType<typeof setTimeout
|
|
29
|
+
percentInterval: undefined as ReturnType<typeof setTimeout> | undefined,
|
|
31
30
|
};
|
|
32
31
|
},
|
|
33
|
-
|
|
32
|
+
|
|
34
33
|
computed: {
|
|
35
|
-
...mapState(usePlayerStore, [
|
|
36
|
-
isAmbiance(): boolean{
|
|
37
|
-
return !this.playerRadio?.podcast?.podcastId
|
|
34
|
+
...mapState(usePlayerStore, ["playerRadio", "playerElapsed"]),
|
|
35
|
+
isAmbiance(): boolean {
|
|
36
|
+
return !this.playerRadio?.podcast?.podcastId;
|
|
38
37
|
},
|
|
39
|
-
percentProgress(): number{
|
|
40
|
-
if(!this.playerElapsed){
|
|
38
|
+
percentProgress(): number {
|
|
39
|
+
if (!this.playerElapsed) {
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
41
42
|
return this.playerElapsed * 100;
|
|
42
43
|
},
|
|
43
44
|
},
|
|
44
|
-
mounted(){
|
|
45
|
+
mounted() {
|
|
45
46
|
this.handlePercentInterval();
|
|
46
47
|
},
|
|
47
|
-
methods:{
|
|
48
|
-
...mapActions(usePlayerStore, [
|
|
49
|
-
handlePercentInterval(/* clear: boolean */): void{
|
|
50
|
-
|
|
48
|
+
methods: {
|
|
49
|
+
...mapActions(usePlayerStore, ["playerUpdateElapsed"]),
|
|
50
|
+
handlePercentInterval(/* clear: boolean */): void {
|
|
51
|
+
/* if(clear){
|
|
51
52
|
clearInterval((this.percentInterval as unknown as number));
|
|
52
53
|
this.percentInterval = undefined;
|
|
53
54
|
return;
|
|
@@ -56,24 +57,32 @@ export default defineComponent({
|
|
|
56
57
|
this.calculatePercent();
|
|
57
58
|
}, 1000);
|
|
58
59
|
},
|
|
59
|
-
calculatePercent(): void{
|
|
60
|
-
if(!this.playerRadio?.metadata){
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
calculatePercent(): void {
|
|
61
|
+
if (!this.playerRadio?.metadata) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const actualMilliSecondsPlayed = dayjs()
|
|
65
|
+
.subtract(18, "second")
|
|
66
|
+
.diff(dayjs(this.playerRadio.metadata.startDate));
|
|
67
|
+
const percentPlayed =
|
|
68
|
+
actualMilliSecondsPlayed /
|
|
69
|
+
(this.playerRadio?.metadata.mediaDuration * 1000);
|
|
70
|
+
this.playerUpdateElapsed(
|
|
71
|
+
percentPlayed,
|
|
72
|
+
this.playerRadio?.metadata.mediaDuration,
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
68
77
|
</script>
|
|
69
78
|
<style lang="scss">
|
|
70
|
-
@import
|
|
71
|
-
.octopus-app{
|
|
72
|
-
.ambiance-progress{
|
|
79
|
+
@import "../../../../assets/progressbar.scss";
|
|
80
|
+
.octopus-app {
|
|
81
|
+
.ambiance-progress {
|
|
73
82
|
background-color: #d1d1d1;
|
|
74
|
-
.octopus-progress-bar{
|
|
83
|
+
.octopus-progress-bar {
|
|
75
84
|
background-color: #747474;
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
}
|
|
79
|
-
</style>
|
|
88
|
+
</style>
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export default{
|
|
1
|
+
export default {
|
|
2
2
|
methods: {
|
|
3
|
-
setCookie(name: string, value: string, domain= ""): void {
|
|
3
|
+
setCookie(name: string, value: string, domain = ""): void {
|
|
4
4
|
const date = new Date();
|
|
5
5
|
date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
|
|
6
|
-
const expires =
|
|
7
|
-
document.cookie =
|
|
6
|
+
const expires = "; expires=" + date.toUTCString();
|
|
7
|
+
document.cookie =
|
|
8
|
+
name + "=" + (value || "") + expires + domain + "; path=/";
|
|
8
9
|
},
|
|
9
|
-
getCookie(name: string): string|null {
|
|
10
|
-
const nameEQ = name +
|
|
11
|
-
const ca = document.cookie.split(
|
|
12
|
-
for (
|
|
10
|
+
getCookie(name: string): string | null {
|
|
11
|
+
const nameEQ = name + "=";
|
|
12
|
+
const ca = document.cookie.split(";");
|
|
13
|
+
for (const cookieValue of ca) {
|
|
13
14
|
let c = cookieValue;
|
|
14
|
-
while (c.charAt(0) ==
|
|
15
|
+
while (c.charAt(0) == " ") c = c.substring(1, c.length);
|
|
15
16
|
if (0 === c.indexOf(nameEQ))
|
|
16
17
|
return c.substring(nameEQ.length, c.length);
|
|
17
18
|
}
|
|
18
19
|
return null;
|
|
19
20
|
},
|
|
20
21
|
},
|
|
21
|
-
};
|
|
22
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export default{
|
|
1
|
+
export default {
|
|
3
2
|
methods: {
|
|
4
3
|
urlify(text: string): string {
|
|
5
4
|
const urlRegex = /[^"](https?:\/\/[^\s<]+)/g;
|
|
6
|
-
if (!text) return
|
|
5
|
+
if (!text) return "";
|
|
7
6
|
return text.replace(urlRegex, (url: string) => {
|
|
8
|
-
return
|
|
7
|
+
return (
|
|
8
|
+
'<a href="' + url + '" target="_blank" rel="noopener">' + url + "</a>"
|
|
9
|
+
);
|
|
9
10
|
});
|
|
10
11
|
},
|
|
11
12
|
async onCopyCode(link: string, callback: () => void): Promise<void> {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { AxiosError } from
|
|
2
|
-
import { defineComponent } from
|
|
3
|
-
import { useAuthStore } from
|
|
4
|
-
import { mapState } from
|
|
1
|
+
import { AxiosError } from "axios";
|
|
2
|
+
import { defineComponent } from "vue";
|
|
3
|
+
import { useAuthStore } from "@/stores/AuthStore";
|
|
4
|
+
import { mapState } from "pinia";
|
|
5
5
|
export const handle403 = defineComponent({
|
|
6
6
|
computed: {
|
|
7
|
-
...mapState(useAuthStore, [
|
|
7
|
+
...mapState(useAuthStore, ["authOrgaId"]),
|
|
8
8
|
},
|
|
9
9
|
methods: {
|
|
10
10
|
handle403(error: AxiosError): void {
|
|
11
11
|
if (403 === error.response?.status) {
|
|
12
|
-
if(undefined===this.authOrgaId){
|
|
12
|
+
if (undefined === this.authOrgaId) {
|
|
13
13
|
window.location.href = window.location.origin + "/sso/login";
|
|
14
|
-
}else{
|
|
14
|
+
} else {
|
|
15
15
|
this.$router.push({
|
|
16
|
-
path:
|
|
16
|
+
path: "/main/pub/error",
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
|
-
});
|
|
22
|
+
});
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { state } from
|
|
1
|
+
import { state } from "../../stores/ParamSdkStore";
|
|
2
2
|
export default {
|
|
3
3
|
methods: {
|
|
4
|
-
proxyImageUrl(url:string, width:string, height?:string): string{
|
|
5
|
-
if(!url){
|
|
4
|
+
proxyImageUrl(url: string, width: string, height?: string): string {
|
|
5
|
+
if (!url) {
|
|
6
6
|
return "";
|
|
7
7
|
}
|
|
8
|
-
if(state.octopusApi.imageUrl && url.includes(
|
|
9
|
-
const size = height ? "height="+height:"width="+width;
|
|
10
|
-
return
|
|
8
|
+
if (state.octopusApi.imageUrl && url.includes("http")) {
|
|
9
|
+
const size = height ? "height=" + height : "width=" + width;
|
|
10
|
+
return (
|
|
11
|
+
state.octopusApi.imageUrl +
|
|
12
|
+
"image/" +
|
|
13
|
+
btoa(url) +
|
|
14
|
+
"?" +
|
|
15
|
+
size +
|
|
16
|
+
"&useWebp=true"
|
|
17
|
+
);
|
|
11
18
|
}
|
|
12
19
|
return url;
|
|
13
20
|
},
|
|
14
21
|
},
|
|
15
|
-
};
|
|
22
|
+
};
|
|
@@ -1,26 +1,41 @@
|
|
|
1
|
-
|
|
2
1
|
import { Category } from "@/stores/class/general/category";
|
|
3
|
-
import orgaFilter from
|
|
4
|
-
import octopusApi from
|
|
5
|
-
import { state } from
|
|
6
|
-
import { useGeneralStore } from
|
|
7
|
-
import { mapActions } from
|
|
8
|
-
import { defineComponent } from
|
|
2
|
+
import orgaFilter from "../mixins/organisationFilter";
|
|
3
|
+
import octopusApi from "@saooti/octopus-api";
|
|
4
|
+
import { state } from "../../stores/ParamSdkStore";
|
|
5
|
+
import { useGeneralStore } from "@/stores/GeneralStore";
|
|
6
|
+
import { mapActions } from "pinia";
|
|
7
|
+
import { defineComponent } from "vue";
|
|
9
8
|
export default defineComponent({
|
|
10
9
|
mixins: [orgaFilter],
|
|
11
10
|
methods: {
|
|
12
|
-
...mapActions(useGeneralStore, [
|
|
11
|
+
...mapActions(useGeneralStore, ["storedUpdateCategories"]),
|
|
13
12
|
async initSdk() {
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
if (
|
|
14
|
+
0 === (state.generalParameters.allCategories as Array<Category>).length
|
|
15
|
+
) {
|
|
16
|
+
octopusApi
|
|
17
|
+
.fetchDataWithParams<Array<Category>>(
|
|
18
|
+
0,
|
|
19
|
+
`iab/list${
|
|
20
|
+
state.octopusApi.organisationId
|
|
21
|
+
? "/" + state.octopusApi.organisationId
|
|
22
|
+
: ""
|
|
23
|
+
}`,
|
|
24
|
+
{ lang: this.$i18n.locale },
|
|
25
|
+
)
|
|
26
|
+
.then((data: Array<Category>) => {
|
|
27
|
+
this.storedUpdateCategories(data);
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
this.storedUpdateCategories(
|
|
31
|
+
state.generalParameters.allCategories as Array<Category>,
|
|
32
|
+
);
|
|
20
33
|
}
|
|
21
|
-
const captcha =
|
|
34
|
+
const captcha = document.getElementsByClassName(
|
|
35
|
+
"grecaptcha-badge",
|
|
36
|
+
)[0] as HTMLElement;
|
|
22
37
|
if (captcha) {
|
|
23
|
-
captcha.style.display =
|
|
38
|
+
captcha.style.display = "none";
|
|
24
39
|
}
|
|
25
40
|
},
|
|
26
41
|
},
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { state } from
|
|
2
|
-
import { useFilterStore } from
|
|
3
|
-
import { mapState } from
|
|
4
|
-
import { defineComponent } from
|
|
1
|
+
import { state } from "../../stores/ParamSdkStore";
|
|
2
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
3
|
+
import { mapState } from "pinia";
|
|
4
|
+
import { defineComponent } from "vue";
|
|
5
5
|
export const orgaComputed = defineComponent({
|
|
6
6
|
computed: {
|
|
7
|
-
...mapState(useFilterStore, [
|
|
8
|
-
|
|
7
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
8
|
+
myOrganisationId(): string | undefined {
|
|
9
9
|
return state.generalParameters.organisationId;
|
|
10
10
|
},
|
|
11
11
|
authenticated(): boolean {
|
|
12
|
-
return
|
|
12
|
+
return state.generalParameters.authenticated as boolean;
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
});
|
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
import { handle403 } from '../mixins/handle403';
|
|
1
|
+
import { handle403 } from "../mixins/handle403";
|
|
3
2
|
import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
|
|
4
|
-
import octopusApi from
|
|
5
|
-
import { useFilterStore } from
|
|
6
|
-
import { mapActions } from
|
|
7
|
-
import { defineComponent } from
|
|
8
|
-
import { AxiosError } from
|
|
9
|
-
import { Organisation } from
|
|
3
|
+
import octopusApi from "@saooti/octopus-api";
|
|
4
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
5
|
+
import { mapActions } from "pinia";
|
|
6
|
+
import { defineComponent } from "vue";
|
|
7
|
+
import { AxiosError } from "axios";
|
|
8
|
+
import { Organisation } from "@/stores/class/general/organisation";
|
|
10
9
|
export default defineComponent({
|
|
11
10
|
mixins: [handle403],
|
|
12
11
|
methods: {
|
|
13
|
-
...mapActions(useFilterStore, [
|
|
12
|
+
...mapActions(useFilterStore, ["filterUpdateOrga"]),
|
|
14
13
|
async selectOrganisation(organisationId: string): Promise<void> {
|
|
15
14
|
try {
|
|
16
|
-
const response = await octopusApi.fetchData<Organisation>(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const response = await octopusApi.fetchData<Organisation>(
|
|
16
|
+
0,
|
|
17
|
+
`organisation/${organisationId}`,
|
|
18
|
+
);
|
|
19
|
+
const data = await octopusApi.fetchDataWithParams<Array<Rubriquage>>(
|
|
20
|
+
0,
|
|
21
|
+
"rubriquage/find/" + organisationId,
|
|
22
|
+
{
|
|
23
|
+
sort: "HOMEPAGEORDER",
|
|
24
|
+
homePageOrder: true,
|
|
25
|
+
},
|
|
26
|
+
true,
|
|
27
|
+
);
|
|
28
|
+
const isLive = await octopusApi.fetchData<boolean>(
|
|
29
|
+
0,
|
|
30
|
+
"organisation/liveEnabled/" + organisationId,
|
|
31
|
+
);
|
|
22
32
|
this.filterUpdateOrga({
|
|
23
33
|
orgaId: organisationId,
|
|
24
34
|
imgUrl: response.imageUrl,
|
|
25
35
|
name: response.name,
|
|
26
|
-
rubriquageArray: data.filter((element: Rubriquage)=>{
|
|
36
|
+
rubriquageArray: data.filter((element: Rubriquage) => {
|
|
27
37
|
return element.rubriques.length;
|
|
28
38
|
}),
|
|
29
|
-
isLive: isLive
|
|
39
|
+
isLive: isLive,
|
|
30
40
|
});
|
|
31
41
|
const queries = this.$route.query;
|
|
32
|
-
this.$router.replace({
|
|
42
|
+
this.$router.replace({
|
|
43
|
+
query: { ...queries, ...{ productor: organisationId } },
|
|
44
|
+
});
|
|
33
45
|
} catch (error) {
|
|
34
|
-
this.handle403(
|
|
46
|
+
this.handle403(error as AxiosError);
|
|
35
47
|
}
|
|
36
48
|
},
|
|
37
|
-
removeSelectedOrga(): void{
|
|
49
|
+
removeSelectedOrga(): void {
|
|
38
50
|
if (this.$route.query.productor) {
|
|
39
|
-
this.$router.push({
|
|
51
|
+
this.$router.push({
|
|
52
|
+
query: { ...this.$route.query, ...{ productor: undefined } },
|
|
53
|
+
});
|
|
40
54
|
}
|
|
41
55
|
this.filterUpdateOrga({ orgaId: undefined });
|
|
42
|
-
}
|
|
56
|
+
},
|
|
43
57
|
},
|
|
44
58
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { state } from
|
|
2
|
-
import octopusApi from
|
|
3
|
-
import { CommentPodcast } from
|
|
4
|
-
import { defineComponent } from
|
|
5
|
-
import { usePlayerStore } from
|
|
6
|
-
import { useCommentStore } from
|
|
7
|
-
import { mapState } from
|
|
8
|
-
import { FetchParam } from
|
|
9
|
-
import { InterfacePageable } from
|
|
1
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
2
|
+
import octopusApi from "@saooti/octopus-api";
|
|
3
|
+
import { CommentPodcast } from "@/stores/class/general/comment";
|
|
4
|
+
import { defineComponent } from "vue";
|
|
5
|
+
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
6
|
+
import { useCommentStore } from "@/stores/CommentStore";
|
|
7
|
+
import { mapState } from "pinia";
|
|
8
|
+
import { FetchParam } from "@/stores/class/general/fetchParam";
|
|
9
|
+
import { InterfacePageable } from "@/stores/class/general/interfacePageable";
|
|
10
10
|
export const playerComment = defineComponent({
|
|
11
11
|
data() {
|
|
12
12
|
return {
|
|
@@ -14,9 +14,13 @@ export const playerComment = defineComponent({
|
|
|
14
14
|
};
|
|
15
15
|
},
|
|
16
16
|
computed: {
|
|
17
|
-
...mapState(useCommentStore, [
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
...mapState(useCommentStore, [
|
|
18
|
+
"commentActualPodcastId",
|
|
19
|
+
"commentTotalCount",
|
|
20
|
+
"commentLoaded",
|
|
21
|
+
]),
|
|
22
|
+
...mapState(usePlayerStore, ["playerPodcast", "playerLive"]),
|
|
23
|
+
organisationId(): string | undefined {
|
|
20
24
|
return state.generalParameters.organisationId;
|
|
21
25
|
},
|
|
22
26
|
},
|
|
@@ -28,13 +32,14 @@ export const playerComment = defineComponent({
|
|
|
28
32
|
},
|
|
29
33
|
methods: {
|
|
30
34
|
editRight(organisation: string): boolean {
|
|
31
|
-
return (
|
|
35
|
+
return (
|
|
36
|
+
(true === state.generalParameters.isCommments &&
|
|
37
|
+
this.organisationId === organisation) ||
|
|
38
|
+
true === state.generalParameters.isAdmin
|
|
39
|
+
);
|
|
32
40
|
},
|
|
33
|
-
initCommentCurrentPodcast(podcastId?: number): Array<number>{
|
|
34
|
-
if (
|
|
35
|
-
podcastId &&
|
|
36
|
-
this.commentActualPodcastId === podcastId
|
|
37
|
-
) {
|
|
41
|
+
initCommentCurrentPodcast(podcastId?: number): Array<number> {
|
|
42
|
+
if (podcastId && this.commentActualPodcastId === podcastId) {
|
|
38
43
|
this.comments = this.commentLoaded;
|
|
39
44
|
if (
|
|
40
45
|
this.commentLoaded &&
|
|
@@ -45,7 +50,12 @@ export const playerComment = defineComponent({
|
|
|
45
50
|
}
|
|
46
51
|
return [0, 0];
|
|
47
52
|
},
|
|
48
|
-
async fetchComments(
|
|
53
|
+
async fetchComments(
|
|
54
|
+
first: number,
|
|
55
|
+
count: number,
|
|
56
|
+
podcastId?: number,
|
|
57
|
+
organisation?: string,
|
|
58
|
+
) {
|
|
49
59
|
const size = 50;
|
|
50
60
|
while (0 === first || this.comments.length < count) {
|
|
51
61
|
const param: FetchParam = {
|
|
@@ -53,15 +63,19 @@ export const playerComment = defineComponent({
|
|
|
53
63
|
size: size,
|
|
54
64
|
podcastId: podcastId,
|
|
55
65
|
};
|
|
56
|
-
if (!this.editRight(organisation? organisation :
|
|
57
|
-
param.status = [
|
|
66
|
+
if (!this.editRight(organisation ? organisation : "")) {
|
|
67
|
+
param.status = ["Valid"];
|
|
58
68
|
}
|
|
59
|
-
const data = await octopusApi.postDataPublic<
|
|
69
|
+
const data = await octopusApi.postDataPublic<
|
|
70
|
+
InterfacePageable<CommentPodcast>
|
|
71
|
+
>(2, "getRootCom", param);
|
|
60
72
|
first += size;
|
|
61
73
|
count = data.totalElements;
|
|
62
|
-
this.comments = this.comments
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
this.comments = this.comments
|
|
75
|
+
.concat(data.content)
|
|
76
|
+
.filter((c: CommentPodcast) => {
|
|
77
|
+
return null !== c;
|
|
78
|
+
});
|
|
65
79
|
}
|
|
66
80
|
},
|
|
67
81
|
async initComments(refresh = false): Promise<void> {
|
|
@@ -73,24 +87,19 @@ export const playerComment = defineComponent({
|
|
|
73
87
|
podcastId = this.playerLive.podcastId;
|
|
74
88
|
organisation = this.playerLive.organisation.id;
|
|
75
89
|
}
|
|
76
|
-
if (
|
|
77
|
-
refresh &&
|
|
78
|
-
podcastId &&
|
|
79
|
-
this.commentActualPodcastId !== podcastId
|
|
80
|
-
) {
|
|
90
|
+
if (refresh && podcastId && this.commentActualPodcastId !== podcastId) {
|
|
81
91
|
return;
|
|
82
92
|
}
|
|
83
|
-
const param= this.initCommentCurrentPodcast(podcastId);
|
|
84
|
-
|
|
85
|
-
|
|
93
|
+
const param = this.initCommentCurrentPodcast(podcastId);
|
|
94
|
+
const first = param[0];
|
|
95
|
+
const count = param[1];
|
|
86
96
|
if (
|
|
87
|
-
(!podcastId ||
|
|
88
|
-
this.commentActualPodcastId === podcastId) &&
|
|
97
|
+
(!podcastId || this.commentActualPodcastId === podcastId) &&
|
|
89
98
|
0 === first
|
|
90
|
-
){
|
|
99
|
+
) {
|
|
91
100
|
return;
|
|
92
101
|
}
|
|
93
102
|
await this.fetchComments(first, count, podcastId, organisation);
|
|
94
103
|
},
|
|
95
104
|
},
|
|
96
|
-
})
|
|
105
|
+
});
|