@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
|
@@ -4,23 +4,19 @@
|
|
|
4
4
|
v-model:first="dfirst"
|
|
5
5
|
v-model:rowsPerPage="dsize"
|
|
6
6
|
v-model:isMobile="isMobile"
|
|
7
|
-
:text-count="
|
|
7
|
+
:text-count="
|
|
8
|
+
displayCount > 1
|
|
9
|
+
? `${$t('Number playlists', { nb: displayCount })}`
|
|
10
|
+
: undefined
|
|
11
|
+
"
|
|
8
12
|
:total-count="totalCount"
|
|
9
13
|
:loading="loading"
|
|
10
|
-
:loading-text="loading
|
|
14
|
+
:loading-text="loading ? $t('Loading content ...') : undefined"
|
|
11
15
|
>
|
|
12
16
|
<template #list>
|
|
13
|
-
<div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<template
|
|
17
|
-
v-for="p in displayArray"
|
|
18
|
-
:key="p.playlistId"
|
|
19
|
-
>
|
|
20
|
-
<PlaylistItem
|
|
21
|
-
v-if="0!==p.playlistId"
|
|
22
|
-
:playlist="p"
|
|
23
|
-
/>
|
|
17
|
+
<div class="emission-list two-emissions">
|
|
18
|
+
<template v-for="p in displayArray" :key="p.playlistId">
|
|
19
|
+
<PlaylistItem v-if="0 !== p.playlistId" :playlist="p" />
|
|
24
20
|
</template>
|
|
25
21
|
</div>
|
|
26
22
|
</template>
|
|
@@ -28,21 +24,21 @@
|
|
|
28
24
|
</template>
|
|
29
25
|
|
|
30
26
|
<script lang="ts">
|
|
31
|
-
import ListPaginate from
|
|
32
|
-
import { handle403 } from
|
|
33
|
-
import octopusApi from
|
|
34
|
-
import PlaylistItem from
|
|
35
|
-
import { Playlist, emptyPlaylistData } from
|
|
36
|
-
import { useFilterStore } from
|
|
37
|
-
import { mapState } from
|
|
38
|
-
import { defineComponent } from
|
|
39
|
-
import { AxiosError } from
|
|
27
|
+
import ListPaginate from "../list/ListPaginate.vue";
|
|
28
|
+
import { handle403 } from "../../mixins/handle403";
|
|
29
|
+
import octopusApi from "@saooti/octopus-api";
|
|
30
|
+
import PlaylistItem from "./PlaylistItem.vue";
|
|
31
|
+
import { Playlist, emptyPlaylistData } from "@/stores/class/general/playlist";
|
|
32
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
33
|
+
import { mapState } from "pinia";
|
|
34
|
+
import { defineComponent } from "vue";
|
|
35
|
+
import { AxiosError } from "axios";
|
|
40
36
|
export default defineComponent({
|
|
41
|
-
name:
|
|
37
|
+
name: "PlaylistList",
|
|
42
38
|
|
|
43
39
|
components: {
|
|
44
40
|
PlaylistItem,
|
|
45
|
-
ListPaginate
|
|
41
|
+
ListPaginate,
|
|
46
42
|
},
|
|
47
43
|
|
|
48
44
|
mixins: [handle403],
|
|
@@ -50,8 +46,8 @@ export default defineComponent({
|
|
|
50
46
|
props: {
|
|
51
47
|
first: { default: 0, type: Number },
|
|
52
48
|
size: { default: 30, type: Number },
|
|
53
|
-
query: { default: undefined, type: String},
|
|
54
|
-
organisationId: { default: undefined, type: String},
|
|
49
|
+
query: { default: undefined, type: String },
|
|
50
|
+
organisationId: { default: undefined, type: String },
|
|
55
51
|
},
|
|
56
52
|
|
|
57
53
|
data() {
|
|
@@ -65,44 +61,50 @@ export default defineComponent({
|
|
|
65
61
|
isMobile: false as boolean,
|
|
66
62
|
};
|
|
67
63
|
},
|
|
68
|
-
|
|
64
|
+
|
|
69
65
|
computed: {
|
|
70
|
-
...mapState(useFilterStore, [
|
|
71
|
-
displayArray(): Array<Playlist>{
|
|
72
|
-
if(this.isMobile){
|
|
66
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
67
|
+
displayArray(): Array<Playlist> {
|
|
68
|
+
if (this.isMobile) {
|
|
73
69
|
return this.playlists;
|
|
74
70
|
}
|
|
75
|
-
return this.playlists.slice(
|
|
76
|
-
|
|
71
|
+
return this.playlists.slice(
|
|
72
|
+
this.dfirst,
|
|
73
|
+
Math.min(this.dfirst + this.dsize, this.totalCount),
|
|
74
|
+
);
|
|
75
|
+
},
|
|
77
76
|
changed(): string {
|
|
78
77
|
return `${this.first}|${this.size}|${this.organisationId}|${this.query}`;
|
|
79
78
|
},
|
|
80
79
|
sort(): string {
|
|
81
|
-
return !this.query ?
|
|
80
|
+
return !this.query ? "NAME" : "SCORE";
|
|
82
81
|
},
|
|
83
|
-
organisation(): string|undefined {
|
|
84
|
-
return this.organisationId ?this.organisationId: this.filterOrgaId;
|
|
82
|
+
organisation(): string | undefined {
|
|
83
|
+
return this.organisationId ? this.organisationId : this.filterOrgaId;
|
|
85
84
|
},
|
|
86
85
|
},
|
|
87
86
|
watch: {
|
|
88
87
|
changed(): void {
|
|
89
88
|
this.reloadList();
|
|
90
89
|
},
|
|
91
|
-
dsize():void{
|
|
90
|
+
dsize(): void {
|
|
92
91
|
this.reloadList();
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
},
|
|
93
|
+
dfirst(): void {
|
|
94
|
+
if (
|
|
95
|
+
!this.playlists[this.dfirst] ||
|
|
96
|
+
0 === this.playlists[this.dfirst].playlistId
|
|
97
|
+
) {
|
|
98
|
+
this.fetchContent(false);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
99
101
|
},
|
|
100
102
|
|
|
101
103
|
mounted() {
|
|
102
104
|
this.fetchContent(true);
|
|
103
105
|
},
|
|
104
106
|
methods: {
|
|
105
|
-
reloadList(){
|
|
107
|
+
reloadList() {
|
|
106
108
|
this.dfirst = 0;
|
|
107
109
|
this.fetchContent(true);
|
|
108
110
|
},
|
|
@@ -113,22 +115,33 @@ export default defineComponent({
|
|
|
113
115
|
size: this.dsize,
|
|
114
116
|
query: this.query,
|
|
115
117
|
organisationId: this.organisation,
|
|
116
|
-
type:"NONE",
|
|
118
|
+
type: "NONE",
|
|
117
119
|
sort: this.sort,
|
|
118
120
|
};
|
|
119
121
|
try {
|
|
120
|
-
const data = await octopusApi.fetchDataWithParams<{
|
|
122
|
+
const data = await octopusApi.fetchDataWithParams<{
|
|
123
|
+
count: number;
|
|
124
|
+
result: Array<Playlist>;
|
|
125
|
+
sort: string;
|
|
126
|
+
}>(0, "playlist/search", param, true);
|
|
121
127
|
this.afterFetching(reset, data);
|
|
122
128
|
} catch (error) {
|
|
123
|
-
this.handle403(
|
|
129
|
+
this.handle403(error as AxiosError);
|
|
124
130
|
}
|
|
125
131
|
},
|
|
126
|
-
afterFetching(
|
|
132
|
+
afterFetching(
|
|
133
|
+
reset: boolean,
|
|
134
|
+
data: { count: number; result: Array<Playlist>; sort: string },
|
|
135
|
+
): void {
|
|
127
136
|
if (reset) {
|
|
128
137
|
this.playlists.length = 0;
|
|
129
138
|
}
|
|
130
|
-
if(this.dfirst > this.playlists.length){
|
|
131
|
-
for (
|
|
139
|
+
if (this.dfirst > this.playlists.length) {
|
|
140
|
+
for (
|
|
141
|
+
let i = this.playlists.length - 1, len = this.dfirst + this.dsize;
|
|
142
|
+
i < len;
|
|
143
|
+
i++
|
|
144
|
+
) {
|
|
132
145
|
this.playlists.push(emptyPlaylistData());
|
|
133
146
|
}
|
|
134
147
|
}
|
|
@@ -139,7 +152,12 @@ export default defineComponent({
|
|
|
139
152
|
}
|
|
140
153
|
return null !== e;
|
|
141
154
|
});
|
|
142
|
-
this.playlists = this.playlists
|
|
155
|
+
this.playlists = this.playlists
|
|
156
|
+
.slice(0, this.dfirst)
|
|
157
|
+
.concat(responsePlaylists)
|
|
158
|
+
.concat(
|
|
159
|
+
this.playlists.slice(this.dfirst + this.dsize, this.playlists.length),
|
|
160
|
+
);
|
|
143
161
|
this.totalCount = data.count;
|
|
144
162
|
this.loading = false;
|
|
145
163
|
},
|
|
@@ -147,5 +165,5 @@ export default defineComponent({
|
|
|
147
165
|
this.fetchContent(false);
|
|
148
166
|
},
|
|
149
167
|
},
|
|
150
|
-
})
|
|
151
|
-
</script>
|
|
168
|
+
});
|
|
169
|
+
</script>
|
|
@@ -15,24 +15,24 @@
|
|
|
15
15
|
v-model:first="first"
|
|
16
16
|
v-model:rowsPerPage="size"
|
|
17
17
|
v-model:isMobile="isMobile"
|
|
18
|
-
:text-count="
|
|
18
|
+
:text-count="
|
|
19
|
+
podcasts.length > 1
|
|
20
|
+
? `${$t('Number podcasts', { nb: podcasts.length })}`
|
|
21
|
+
: undefined
|
|
22
|
+
"
|
|
19
23
|
:total-count="podcasts.length"
|
|
20
24
|
:loading="loading"
|
|
21
|
-
:loading-text="loading
|
|
22
|
-
:error-text="
|
|
25
|
+
:loading-text="loading ? $t('Loading podcasts ...') : undefined"
|
|
26
|
+
:error-text="
|
|
27
|
+
!loading && !podcasts.length && notEmptyPlaylist
|
|
28
|
+
? $t(`No podcast match your query`)
|
|
29
|
+
: undefined
|
|
30
|
+
"
|
|
23
31
|
>
|
|
24
32
|
<template #list>
|
|
25
|
-
<div
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<template
|
|
29
|
-
v-for="p in podcastsDisplay"
|
|
30
|
-
:key="p.podcastId"
|
|
31
|
-
>
|
|
32
|
-
<PodcastItem
|
|
33
|
-
v-if="0!==p.podcastId"
|
|
34
|
-
:podcast="p"
|
|
35
|
-
/>
|
|
33
|
+
<div class="podcast-list">
|
|
34
|
+
<template v-for="p in podcastsDisplay" :key="p.podcastId">
|
|
35
|
+
<PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
|
|
36
36
|
</template>
|
|
37
37
|
</div>
|
|
38
38
|
</template>
|
|
@@ -41,30 +41,30 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script lang="ts">
|
|
44
|
-
import ListPaginate from
|
|
45
|
-
import { handle403 } from
|
|
46
|
-
import { orgaComputed } from
|
|
47
|
-
import octopusApi from
|
|
48
|
-
import PodcastItem from
|
|
49
|
-
import { state } from
|
|
50
|
-
import ClassicSearch from
|
|
51
|
-
import { Podcast } from
|
|
52
|
-
import { Playlist } from
|
|
53
|
-
import { defineComponent } from
|
|
54
|
-
import { AxiosError } from
|
|
44
|
+
import ListPaginate from "../list/ListPaginate.vue";
|
|
45
|
+
import { handle403 } from "../../mixins/handle403";
|
|
46
|
+
import { orgaComputed } from "../../mixins/orgaComputed";
|
|
47
|
+
import octopusApi from "@saooti/octopus-api";
|
|
48
|
+
import PodcastItem from "../podcasts/PodcastItem.vue";
|
|
49
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
50
|
+
import ClassicSearch from "../../form/ClassicSearch.vue";
|
|
51
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
52
|
+
import { Playlist } from "@/stores/class/general/playlist";
|
|
53
|
+
import { defineComponent } from "vue";
|
|
54
|
+
import { AxiosError } from "axios";
|
|
55
55
|
export default defineComponent({
|
|
56
|
-
name:
|
|
56
|
+
name: "PodcastList",
|
|
57
57
|
|
|
58
58
|
components: {
|
|
59
59
|
PodcastItem,
|
|
60
60
|
ClassicSearch,
|
|
61
|
-
ListPaginate
|
|
61
|
+
ListPaginate,
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
mixins: [handle403, orgaComputed],
|
|
65
65
|
|
|
66
66
|
props: {
|
|
67
|
-
playlist: { default: ()=>({}), type: Object as ()=>Playlist},
|
|
67
|
+
playlist: { default: () => ({}), type: Object as () => Playlist },
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
data() {
|
|
@@ -74,34 +74,43 @@ export default defineComponent({
|
|
|
74
74
|
podcastsQuery: [] as Array<Podcast>,
|
|
75
75
|
size: 30 as number,
|
|
76
76
|
first: 0 as number,
|
|
77
|
-
searchPattern:
|
|
77
|
+
searchPattern: "" as string,
|
|
78
78
|
isMobile: false as boolean,
|
|
79
79
|
};
|
|
80
80
|
},
|
|
81
81
|
|
|
82
|
-
|
|
83
82
|
computed: {
|
|
84
|
-
titleList(): string{
|
|
85
|
-
return this.notEmptyPlaylist
|
|
83
|
+
titleList(): string {
|
|
84
|
+
return this.notEmptyPlaylist
|
|
85
|
+
? this.$t("Podcasts in the playlist")
|
|
86
|
+
: this.$t("No podcasts in the playlist");
|
|
86
87
|
},
|
|
87
88
|
notEmptyPlaylist(): boolean {
|
|
88
|
-
return 0 !== Object.keys(this.playlist.samplingViews??[]).length;
|
|
89
|
+
return 0 !== Object.keys(this.playlist.samplingViews ?? []).length;
|
|
89
90
|
},
|
|
90
|
-
podcastsDisplay(): Array<Podcast>{
|
|
91
|
-
if(this.isMobile){
|
|
92
|
-
return this.podcastsQuery.slice(
|
|
91
|
+
podcastsDisplay(): Array<Podcast> {
|
|
92
|
+
if (this.isMobile) {
|
|
93
|
+
return this.podcastsQuery.slice(
|
|
94
|
+
0,
|
|
95
|
+
Math.min(this.first + this.size, this.podcasts.length),
|
|
96
|
+
);
|
|
93
97
|
}
|
|
94
|
-
return this.podcastsQuery.slice(
|
|
95
|
-
|
|
98
|
+
return this.podcastsQuery.slice(
|
|
99
|
+
this.first,
|
|
100
|
+
Math.min(this.first + this.size, this.podcasts.length),
|
|
101
|
+
);
|
|
102
|
+
},
|
|
96
103
|
editRight(): boolean {
|
|
97
|
-
return (
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
return (
|
|
105
|
+
(true === this.authenticated &&
|
|
106
|
+
this.myOrganisationId === this.playlist.organisation?.id) ||
|
|
107
|
+
true === state.generalParameters.isAdmin
|
|
108
|
+
);
|
|
100
109
|
},
|
|
101
110
|
},
|
|
102
111
|
watch: {
|
|
103
112
|
searchPattern(): void {
|
|
104
|
-
if (
|
|
113
|
+
if ("" !== this.searchPattern) {
|
|
105
114
|
this.podcastsQuery = this.podcasts.filter((el: Podcast) => {
|
|
106
115
|
return el.title
|
|
107
116
|
.toLowerCase()
|
|
@@ -118,13 +127,16 @@ export default defineComponent({
|
|
|
118
127
|
},
|
|
119
128
|
methods: {
|
|
120
129
|
async fetchContent(): Promise<void> {
|
|
121
|
-
if (this.notEmptyPlaylist){
|
|
130
|
+
if (this.notEmptyPlaylist) {
|
|
122
131
|
this.podcasts.length = 0;
|
|
123
132
|
this.loading = true;
|
|
124
133
|
try {
|
|
125
|
-
this.podcasts = await octopusApi.fetchData<Array<Podcast>>(
|
|
134
|
+
this.podcasts = await octopusApi.fetchData<Array<Podcast>>(
|
|
135
|
+
0,
|
|
136
|
+
"playlist/" + this.playlist.playlistId + "/content",
|
|
137
|
+
);
|
|
126
138
|
if (!this.editRight) {
|
|
127
|
-
this.podcasts = this.podcasts.filter((p: Podcast|null) => {
|
|
139
|
+
this.podcasts = this.podcasts.filter((p: Podcast | null) => {
|
|
128
140
|
return (
|
|
129
141
|
null !== p &&
|
|
130
142
|
(!p.availability || true === p.availability.visibility)
|
|
@@ -133,18 +145,17 @@ export default defineComponent({
|
|
|
133
145
|
}
|
|
134
146
|
this.podcastsQuery = this.podcasts;
|
|
135
147
|
} catch (error) {
|
|
136
|
-
this.handle403(
|
|
148
|
+
this.handle403(error as AxiosError);
|
|
137
149
|
}
|
|
138
150
|
}
|
|
139
151
|
this.loading = false;
|
|
140
152
|
},
|
|
141
153
|
},
|
|
142
|
-
})
|
|
154
|
+
});
|
|
143
155
|
</script>
|
|
144
156
|
|
|
145
|
-
|
|
146
157
|
<style lang="scss">
|
|
147
|
-
.octopus-app{
|
|
158
|
+
.octopus-app {
|
|
148
159
|
.width-600 {
|
|
149
160
|
width: 600px;
|
|
150
161
|
@media (max-width: 600px) {
|
|
@@ -152,4 +163,4 @@ export default defineComponent({
|
|
|
152
163
|
}
|
|
153
164
|
}
|
|
154
165
|
}
|
|
155
|
-
</style>
|
|
166
|
+
</style>
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
class="d-flex flex-column p-3 playlist-inline-podcast"
|
|
5
5
|
>
|
|
6
6
|
<h2>{{ title }}</h2>
|
|
7
|
-
<div
|
|
8
|
-
v-if="!overflowScroll"
|
|
9
|
-
class="d-flex justify-content-end hide-phone"
|
|
10
|
-
>
|
|
7
|
+
<div v-if="!overflowScroll" class="d-flex justify-content-end hide-phone">
|
|
11
8
|
<button
|
|
12
9
|
class="btn admin-button m-1 saooti-left"
|
|
13
10
|
:class="{ disabled: !previousAvailable }"
|
|
@@ -22,7 +19,7 @@
|
|
|
22
19
|
/>
|
|
23
20
|
</div>
|
|
24
21
|
<ClassicLoading
|
|
25
|
-
:loading-text="loading
|
|
22
|
+
:loading-text="loading ? $t('Loading podcasts ...') : undefined"
|
|
26
23
|
/>
|
|
27
24
|
<transition-group
|
|
28
25
|
:name="transitionName"
|
|
@@ -49,34 +46,32 @@
|
|
|
49
46
|
params: { playlistId: playlistId.toString() },
|
|
50
47
|
}"
|
|
51
48
|
>
|
|
52
|
-
{{ $t(
|
|
53
|
-
<div
|
|
54
|
-
class="ms-1 saooti-more"
|
|
55
|
-
/>
|
|
49
|
+
{{ $t("See more") }}
|
|
50
|
+
<div class="ms-1 saooti-more" />
|
|
56
51
|
</router-link>
|
|
57
52
|
</div>
|
|
58
53
|
</template>
|
|
59
54
|
|
|
60
55
|
<script lang="ts">
|
|
61
|
-
import octopusApi from
|
|
62
|
-
import domHelper from
|
|
63
|
-
import PodcastItem from
|
|
64
|
-
import ClassicLoading from
|
|
56
|
+
import octopusApi from "@saooti/octopus-api";
|
|
57
|
+
import domHelper from "../../../helper/dom";
|
|
58
|
+
import PodcastItem from "../podcasts/PodcastItem.vue";
|
|
59
|
+
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
65
60
|
const PHONE_WIDTH = 960;
|
|
66
|
-
import { state } from
|
|
67
|
-
import { Podcast } from
|
|
68
|
-
import { Playlist } from
|
|
69
|
-
import { defineComponent } from
|
|
61
|
+
import { state } from "../../../stores/ParamSdkStore";
|
|
62
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
63
|
+
import { Playlist } from "@/stores/class/general/playlist";
|
|
64
|
+
import { defineComponent } from "vue";
|
|
70
65
|
export default defineComponent({
|
|
71
|
-
name:
|
|
72
|
-
|
|
66
|
+
name: "PodcastPlaylistInlineList",
|
|
67
|
+
|
|
73
68
|
components: {
|
|
74
69
|
PodcastItem,
|
|
75
|
-
ClassicLoading
|
|
70
|
+
ClassicLoading,
|
|
76
71
|
},
|
|
77
72
|
|
|
78
73
|
props: {
|
|
79
|
-
playlistId: { default: undefined, type: Number},
|
|
74
|
+
playlistId: { default: undefined, type: Number },
|
|
80
75
|
},
|
|
81
76
|
|
|
82
77
|
data() {
|
|
@@ -86,27 +81,29 @@ export default defineComponent({
|
|
|
86
81
|
first: 0 as number,
|
|
87
82
|
size: 5 as number,
|
|
88
83
|
totalCount: 0 as number,
|
|
89
|
-
playlist: undefined as Playlist|undefined,
|
|
84
|
+
playlist: undefined as Playlist | undefined,
|
|
90
85
|
allPodcasts: [] as Array<Podcast>,
|
|
91
86
|
direction: 1 as number,
|
|
92
87
|
alignLeft: false as boolean,
|
|
93
88
|
};
|
|
94
89
|
},
|
|
95
90
|
computed: {
|
|
96
|
-
title(): string{
|
|
97
|
-
return this.playlist?.title??"";
|
|
91
|
+
title(): string {
|
|
92
|
+
return this.playlist?.title ?? "";
|
|
98
93
|
},
|
|
99
94
|
podcasts(): Array<Podcast> {
|
|
100
95
|
return this.allPodcasts.slice(this.index, this.index + this.size);
|
|
101
96
|
},
|
|
102
97
|
sizeItem(): number {
|
|
103
|
-
return state.generalParameters.podcastItem
|
|
98
|
+
return state.generalParameters.podcastItem
|
|
99
|
+
? state.generalParameters.podcastItem
|
|
100
|
+
: 13;
|
|
104
101
|
},
|
|
105
102
|
overflowScroll(): boolean {
|
|
106
|
-
return
|
|
103
|
+
return state.emissionPage.overflowScroll as boolean;
|
|
107
104
|
},
|
|
108
105
|
isInlineAnimation(): boolean {
|
|
109
|
-
return
|
|
106
|
+
return state.generalParameters.isInlineAnimation as boolean;
|
|
110
107
|
},
|
|
111
108
|
previousAvailable(): boolean {
|
|
112
109
|
return this.index > 0;
|
|
@@ -115,7 +112,7 @@ export default defineComponent({
|
|
|
115
112
|
return this.index + this.size < this.totalCount;
|
|
116
113
|
},
|
|
117
114
|
transitionName(): string {
|
|
118
|
-
return this.direction > 0 ?
|
|
115
|
+
return this.direction > 0 ? "out-left" : "out-right";
|
|
119
116
|
},
|
|
120
117
|
},
|
|
121
118
|
watch: {
|
|
@@ -124,13 +121,13 @@ export default defineComponent({
|
|
|
124
121
|
this.fetchContent();
|
|
125
122
|
},
|
|
126
123
|
},
|
|
127
|
-
|
|
124
|
+
|
|
128
125
|
created() {
|
|
129
|
-
window.addEventListener(
|
|
126
|
+
window.addEventListener("resize", this.handleResize);
|
|
130
127
|
},
|
|
131
128
|
|
|
132
129
|
unmounted() {
|
|
133
|
-
window.removeEventListener(
|
|
130
|
+
window.removeEventListener("resize", this.handleResize);
|
|
134
131
|
},
|
|
135
132
|
|
|
136
133
|
mounted() {
|
|
@@ -141,11 +138,23 @@ export default defineComponent({
|
|
|
141
138
|
async fetchContent(): Promise<void> {
|
|
142
139
|
this.allPodcasts.length = 0;
|
|
143
140
|
this.loading = true;
|
|
144
|
-
this.playlist = await octopusApi.fetchData<Playlist>(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
this.playlist = await octopusApi.fetchData<Playlist>(
|
|
142
|
+
0,
|
|
143
|
+
"playlist/" + this.playlistId,
|
|
144
|
+
);
|
|
145
|
+
this.allPodcasts = await octopusApi.fetchData<Array<Podcast>>(
|
|
146
|
+
0,
|
|
147
|
+
"playlist/" + this.playlistId + "/content",
|
|
148
|
+
);
|
|
149
|
+
if (
|
|
150
|
+
!(
|
|
151
|
+
(state.generalParameters.authenticated &&
|
|
152
|
+
state.generalParameters.organisationId ===
|
|
153
|
+
this.playlist?.organisation?.id) ||
|
|
154
|
+
state.generalParameters.isAdmin
|
|
155
|
+
)
|
|
156
|
+
) {
|
|
157
|
+
this.allPodcasts = this.allPodcasts.filter((p: Podcast | null) => {
|
|
149
158
|
return (
|
|
150
159
|
null !== p &&
|
|
151
160
|
(!p.availability || true === p.availability.visibility)
|
|
@@ -187,5 +196,5 @@ export default defineComponent({
|
|
|
187
196
|
this.allPodcasts.length = 0;
|
|
188
197
|
},
|
|
189
198
|
},
|
|
190
|
-
})
|
|
191
|
-
</script>
|
|
199
|
+
});
|
|
200
|
+
</script>
|
|
@@ -18,31 +18,33 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script lang="ts">
|
|
21
|
-
import { Participant } from
|
|
22
|
-
import { useFilterStore } from
|
|
23
|
-
import { mapState } from
|
|
24
|
-
import { defineComponent } from
|
|
21
|
+
import { Participant } from "@/stores/class/general/participant";
|
|
22
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
23
|
+
import { mapState } from "pinia";
|
|
24
|
+
import { defineComponent } from "vue";
|
|
25
25
|
export default defineComponent({
|
|
26
|
-
name:
|
|
26
|
+
name: "AnimatorsItem",
|
|
27
27
|
|
|
28
28
|
props: {
|
|
29
|
-
animator: { default: undefined, type: Object as ()=> Participant},
|
|
29
|
+
animator: { default: undefined, type: Object as () => Participant },
|
|
30
30
|
},
|
|
31
|
-
computed:{
|
|
32
|
-
...mapState(useFilterStore, [
|
|
33
|
-
animatorName(): string{
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
31
|
+
computed: {
|
|
32
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
33
|
+
animatorName(): string {
|
|
34
|
+
return `${this.animator?.firstName ?? ""} ${
|
|
35
|
+
this.animator?.lastName ?? ""
|
|
36
|
+
}`.trim();
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
38
40
|
</script>
|
|
39
41
|
|
|
40
42
|
<style lang="scss">
|
|
41
|
-
.octopus-app{
|
|
43
|
+
.octopus-app {
|
|
42
44
|
.podcast-item-animator {
|
|
43
45
|
font-size: 0.55rem;
|
|
44
46
|
font-weight: 300;
|
|
45
47
|
text-transform: capitalize;
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
|
-
</style>
|
|
50
|
+
</style>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="participants.length"
|
|
4
|
-
class="comma"
|
|
5
|
-
>
|
|
2
|
+
<div v-if="participants.length" class="comma">
|
|
6
3
|
{{ title }}
|
|
7
4
|
<span class="mx-1">:</span>
|
|
8
5
|
<router-link
|
|
@@ -23,34 +20,36 @@
|
|
|
23
20
|
</template>
|
|
24
21
|
|
|
25
22
|
<script lang="ts">
|
|
26
|
-
import { Participant } from
|
|
27
|
-
import { useFilterStore } from
|
|
28
|
-
import { mapState } from
|
|
29
|
-
import { defineComponent } from
|
|
23
|
+
import { Participant } from "@/stores/class/general/participant";
|
|
24
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
25
|
+
import { mapState } from "pinia";
|
|
26
|
+
import { defineComponent } from "vue";
|
|
30
27
|
export default defineComponent({
|
|
31
|
-
name:
|
|
28
|
+
name: "ParticipantDescription",
|
|
32
29
|
|
|
33
|
-
components:{
|
|
34
|
-
},
|
|
30
|
+
components: {},
|
|
35
31
|
|
|
36
32
|
props: {
|
|
37
|
-
participants: {
|
|
38
|
-
|
|
33
|
+
participants: {
|
|
34
|
+
default: () => [],
|
|
35
|
+
type: Array as () => Array<Participant>,
|
|
36
|
+
},
|
|
37
|
+
isGuest: { default: false, type: Boolean },
|
|
39
38
|
},
|
|
40
39
|
|
|
41
|
-
computed:{
|
|
42
|
-
...mapState(useFilterStore, [
|
|
43
|
-
idPopover(): string{
|
|
40
|
+
computed: {
|
|
41
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
42
|
+
idPopover(): string {
|
|
44
43
|
return this.isGuest ? "popover-guests-help" : "popover-animators-help";
|
|
45
44
|
},
|
|
46
|
-
title(): string{
|
|
47
|
-
return this.isGuest ? this.$t(
|
|
48
|
-
}
|
|
45
|
+
title(): string {
|
|
46
|
+
return this.isGuest ? this.$t("Guests") : this.$t("Animated by");
|
|
47
|
+
},
|
|
49
48
|
},
|
|
50
49
|
methods: {
|
|
51
50
|
getName(person: Participant): string {
|
|
52
|
-
return
|
|
51
|
+
return `${person.firstName ?? ""} ${person.lastName ?? ""}`.trim();
|
|
53
52
|
},
|
|
54
53
|
},
|
|
55
|
-
})
|
|
56
|
-
</script>
|
|
54
|
+
});
|
|
55
|
+
</script>
|