@saooti/octopus-sdk 36.0.51 → 36.0.53
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/package.json +1 -1
- package/src/components/display/list/ListPaginate.vue +2 -2
- package/src/components/display/sharing/QrCode.vue +7 -10
- package/src/components/display/sharing/ShareButtons.vue +19 -1
- package/src/components/display/sharing/ShareButtonsIntern.vue +6 -5
- package/src/components/display/sharing/SharePlayer.vue +5 -9
- package/src/components/display/sharing/SharePlayerRadio.vue +5 -10
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/misc/modal/NewsletterModal.vue +5 -7
- package/src/components/pages/Emission.vue +1 -0
- package/src/components/pages/Playlist.vue +1 -0
- package/src/components/pages/Podcast.vue +3 -2
- package/src/components/pages/Radio.vue +1 -1
- package/src/stores/SaveFetchStore.ts +27 -0
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
v-if="!justSizeChosen"
|
|
13
13
|
class="d-flex justify-content-between align-items-center flex-grow-1 w-100"
|
|
14
14
|
>
|
|
15
|
-
<div class="text-secondary">
|
|
16
|
-
<template v-if="textCount
|
|
15
|
+
<div class="text-secondary me-3">
|
|
16
|
+
<template v-if="textCount">
|
|
17
17
|
{{ textCount }}
|
|
18
18
|
</template>
|
|
19
19
|
</div>
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
<script lang="ts">
|
|
32
32
|
import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
|
|
33
33
|
import { state } from '../../../stores/ParamSdkStore';
|
|
34
|
-
import octopusApi from '@saooti/octopus-api';
|
|
35
34
|
import Snackbar from '../../misc/Snackbar.vue';
|
|
36
35
|
import QrcodeVue from 'qrcode.vue';
|
|
36
|
+
import { useSaveFetchStore } from '@/stores/SaveFetchStore';
|
|
37
37
|
import { useAuthStore } from '@/stores/AuthStore';
|
|
38
|
-
import { mapState } from 'pinia';
|
|
38
|
+
import { mapState, mapActions } from 'pinia';
|
|
39
39
|
import { defineComponent } from 'vue'
|
|
40
40
|
export default defineComponent({
|
|
41
41
|
name: 'QrCode',
|
|
@@ -68,6 +68,7 @@ export default defineComponent({
|
|
|
68
68
|
this.initColor();
|
|
69
69
|
},
|
|
70
70
|
methods:{
|
|
71
|
+
...mapActions(useSaveFetchStore, ['getOrgaAttributes']),
|
|
71
72
|
download(): void{
|
|
72
73
|
const link = document.createElement('a');
|
|
73
74
|
link.download = 'qrcode.png';
|
|
@@ -84,14 +85,10 @@ export default defineComponent({
|
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
87
|
if (!state.generalParameters.authenticated) return;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
|
|
92
|
-
}
|
|
93
|
-
if (Object.prototype.hasOwnProperty.call(data,'COLOR')) {
|
|
94
|
-
this.otherColor = (data.COLOR as string);
|
|
88
|
+
const orgaId = ""!==this.authOrganisation.id ? this.authOrganisation.id : state.generalParameters.organisationId;
|
|
89
|
+
const attributes = await this.getOrgaAttributes(orgaId??"");
|
|
90
|
+
if (Object.prototype.hasOwnProperty.call(attributes,'COLOR')) {
|
|
91
|
+
this.otherColor = (attributes.COLOR as string);
|
|
95
92
|
}
|
|
96
93
|
},
|
|
97
94
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="module-box">
|
|
2
|
+
<div class="module-box" v-if="!isLoading && (authenticated || !noSharing)">
|
|
3
3
|
<div class="d-flex align-items-center mb-3">
|
|
4
4
|
<h2 class="big-h2 mb-0">
|
|
5
5
|
{{ $t('Share') }}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
/>
|
|
22
22
|
</div>
|
|
23
23
|
<ShareButtonsIntern
|
|
24
|
+
:no-sharing="noSharing"
|
|
24
25
|
:podcast="podcast"
|
|
25
26
|
:emission="emission"
|
|
26
27
|
:playlist="playlist"
|
|
@@ -31,6 +32,8 @@
|
|
|
31
32
|
</template>
|
|
32
33
|
|
|
33
34
|
<script lang="ts">
|
|
35
|
+
import { useSaveFetchStore } from '@/stores/SaveFetchStore';
|
|
36
|
+
import { mapActions } from 'pinia';
|
|
34
37
|
import { Emission } from '@/stores/class/general/emission';
|
|
35
38
|
import { Podcast } from '@/stores/class/general/podcast';
|
|
36
39
|
import { state } from '../../../stores/ParamSdkStore';
|
|
@@ -52,10 +55,25 @@ export default defineComponent({
|
|
|
52
55
|
participantId: { default: undefined, type: Number},
|
|
53
56
|
organisationId: { default: undefined, type: String},
|
|
54
57
|
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
noSharing: true as boolean,
|
|
61
|
+
isLoading: true as boolean
|
|
62
|
+
};
|
|
63
|
+
},
|
|
55
64
|
computed: {
|
|
56
65
|
authenticated(): boolean {
|
|
57
66
|
return (state.generalParameters.authenticated as boolean);
|
|
58
67
|
},
|
|
59
68
|
},
|
|
69
|
+
async created(){
|
|
70
|
+
if(!this.organisationId){return;}
|
|
71
|
+
const attributes = await this.getOrgaAttributes(this.organisationId);
|
|
72
|
+
this.noSharing = 'true'===attributes.noSharing;
|
|
73
|
+
this.isLoading = false;
|
|
74
|
+
},
|
|
75
|
+
methods:{
|
|
76
|
+
...mapActions(useSaveFetchStore, ['getOrgaAttributes']),
|
|
77
|
+
}
|
|
60
78
|
})
|
|
61
79
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex align-items-center justify-content-between">
|
|
3
|
-
<div class="d-flex flex-column me-2" v-if="!isGarStudent">
|
|
3
|
+
<div class="d-flex flex-column me-2" v-if="!isGarStudent && !noSharing">
|
|
4
4
|
<div class="h4 mb-2">
|
|
5
5
|
{{ $t('Social networks') }}
|
|
6
6
|
</div>
|
|
@@ -142,6 +142,7 @@ export default defineComponent({
|
|
|
142
142
|
mixins: [displayMethods],
|
|
143
143
|
|
|
144
144
|
props: {
|
|
145
|
+
noSharing: { default: false, type: Boolean},
|
|
145
146
|
podcast: { default: undefined, type: Object as ()=> Podcast},
|
|
146
147
|
emission: { default: undefined, type: Object as ()=> Emission},
|
|
147
148
|
playlist: { default: undefined, type: Object as ()=>Playlist},
|
|
@@ -191,17 +192,17 @@ export default defineComponent({
|
|
|
191
192
|
if (this.participantId){
|
|
192
193
|
return api +'participant/' + this.participantId + '.rss';
|
|
193
194
|
}
|
|
194
|
-
if (this.organisationId){
|
|
195
|
-
return api +'productor/' + this.organisationId + '.rss';
|
|
196
|
-
}
|
|
197
195
|
if(this.playlist){
|
|
198
196
|
return api +'playlist/' + this.playlist.playlistId + '.rss';
|
|
199
197
|
}
|
|
198
|
+
if (this.organisationId){
|
|
199
|
+
return api +'productor/' + this.organisationId + '.rss';
|
|
200
|
+
}
|
|
200
201
|
return '';
|
|
201
202
|
},
|
|
202
203
|
},
|
|
203
204
|
async created(){
|
|
204
|
-
if(this.
|
|
205
|
+
if(undefined!==this.participantId){
|
|
205
206
|
this.displayRss = await octopusApi.fetchDataPublic<boolean>(0,`rss/participants/allowed/${this.organisationId}`);
|
|
206
207
|
}else{
|
|
207
208
|
this.displayRss = true;
|
|
@@ -90,7 +90,8 @@ import { Podcast } from '@/stores/class/general/podcast';
|
|
|
90
90
|
import { Emission } from '@/stores/class/general/emission';
|
|
91
91
|
import { Playlist } from '@/stores/class/general/playlist';
|
|
92
92
|
import { useAuthStore } from '@/stores/AuthStore';
|
|
93
|
-
import {
|
|
93
|
+
import { useSaveFetchStore } from '@/stores/SaveFetchStore';
|
|
94
|
+
import { mapState, mapActions } from 'pinia';
|
|
94
95
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
95
96
|
const ShareModalPlayer = defineAsyncComponent(() => import('../../misc/modal/ShareModalPlayer.vue'));
|
|
96
97
|
const PlayerParameters = defineAsyncComponent(() => import('./PlayerParameters.vue'));
|
|
@@ -241,13 +242,15 @@ export default defineComponent({
|
|
|
241
242
|
}
|
|
242
243
|
},
|
|
243
244
|
async created() {
|
|
244
|
-
|
|
245
|
+
const orgaId = ""!==this.authOrganisation.id ? this.authOrganisation.id : state.generalParameters.organisationId;
|
|
246
|
+
this.orgaAttributes = await this.getOrgaAttributes(orgaId??"");
|
|
245
247
|
this.initColor();
|
|
246
248
|
if (this.isLiveReadyToRecord) {
|
|
247
249
|
this.iFrameModel = 'large';
|
|
248
250
|
}
|
|
249
251
|
},
|
|
250
252
|
methods: {
|
|
253
|
+
...mapActions(useSaveFetchStore, ['getOrgaAttributes']),
|
|
251
254
|
getIframeNumber(): string{
|
|
252
255
|
return this.displayChoiceAllEpisodes && 'all' === this.episodeNumbers ? '/0' : '/' + this.iFrameNumber;
|
|
253
256
|
},
|
|
@@ -291,13 +294,6 @@ export default defineComponent({
|
|
|
291
294
|
}
|
|
292
295
|
return url;
|
|
293
296
|
},
|
|
294
|
-
async fetchOrgaAttributes(): Promise<void>{
|
|
295
|
-
if(""!==this.authOrganisation.id && this.authOrganisation.attributes && Object.keys(this.authOrganisation.attributes).length > 1){
|
|
296
|
-
this.orgaAttributes = this.authOrganisation.attributes;
|
|
297
|
-
}else{
|
|
298
|
-
this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
297
|
initColor(): void {
|
|
302
298
|
if(!this.orgaAttributes){return;}
|
|
303
299
|
this.color = Object.prototype.hasOwnProperty.call(this.orgaAttributes,'COLOR') ? (this.orgaAttributes.COLOR as string) : '#40a372';
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
<script lang="ts">
|
|
38
38
|
import { orgaComputed } from '../../mixins/orgaComputed';
|
|
39
39
|
import { state } from '../../../stores/ParamSdkStore';
|
|
40
|
-
import
|
|
40
|
+
import { useSaveFetchStore } from '@/stores/SaveFetchStore';
|
|
41
41
|
import { useAuthStore } from '@/stores/AuthStore';
|
|
42
|
-
import { mapState } from 'pinia';
|
|
42
|
+
import { mapState, mapActions } from 'pinia';
|
|
43
43
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
44
44
|
import { Canal } from '@/stores/class/radio/canal';
|
|
45
45
|
const ShareModalPlayer = defineAsyncComponent(() => import('../../misc/modal/ShareModalPlayer.vue'));
|
|
@@ -76,17 +76,12 @@ export default defineComponent({
|
|
|
76
76
|
|
|
77
77
|
},
|
|
78
78
|
async created() {
|
|
79
|
-
|
|
79
|
+
const orgaId = ""!==this.authOrganisation.id ? this.authOrganisation.id : state.generalParameters.organisationId;
|
|
80
|
+
this.orgaAttributes = await this.getOrgaAttributes(orgaId??"");
|
|
80
81
|
this.initColor();
|
|
81
82
|
},
|
|
82
83
|
methods: {
|
|
83
|
-
|
|
84
|
-
if(""!==this.authOrganisation.id && this.authOrganisation.attributes && Object.keys(this.authOrganisation.attributes).length > 1){
|
|
85
|
-
this.orgaAttributes = this.authOrganisation.attributes;
|
|
86
|
-
}else{
|
|
87
|
-
this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
84
|
+
...mapActions(useSaveFetchStore, ['getOrgaAttributes']),
|
|
90
85
|
initColor(): void {
|
|
91
86
|
if(!this.orgaAttributes){return;}
|
|
92
87
|
this.color = Object.prototype.hasOwnProperty.call(this.orgaAttributes,'COLOR') ? (this.orgaAttributes.COLOR as string) : '#40a372';
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:reset="reset"
|
|
30
30
|
@selected="onOrganisationSelected"
|
|
31
31
|
/>
|
|
32
|
-
<div class="d-flex justify-content-end flex-grow-1">
|
|
32
|
+
<div class="d-flex justify-content-end align-items-center flex-grow-1">
|
|
33
33
|
<template
|
|
34
34
|
v-for="link in routerLinkArray"
|
|
35
35
|
:key="link.routeName"
|
|
@@ -102,8 +102,9 @@ import { Participant } from '@/stores/class/general/participant';
|
|
|
102
102
|
import { Podcast } from '@/stores/class/general/podcast';
|
|
103
103
|
import { state } from '../../../stores/ParamSdkStore';
|
|
104
104
|
import { defineComponent } from 'vue';
|
|
105
|
+
import { useSaveFetchStore } from '@/stores/SaveFetchStore';
|
|
105
106
|
import { useAuthStore } from '@/stores/AuthStore';
|
|
106
|
-
import { mapState } from 'pinia';
|
|
107
|
+
import { mapState, mapActions } from 'pinia';
|
|
107
108
|
import octopusApi from '@saooti/octopus-api';
|
|
108
109
|
import { Emission } from '@/stores/class/general/emission';
|
|
109
110
|
import { Playlist } from '@/stores/class/general/playlist';
|
|
@@ -279,6 +280,7 @@ export default defineComponent({
|
|
|
279
280
|
this.initData();
|
|
280
281
|
},
|
|
281
282
|
methods: {
|
|
283
|
+
...mapActions(useSaveFetchStore, ['getOrgaAttributes']),
|
|
282
284
|
closePopup(): void {
|
|
283
285
|
this.$emit('close');
|
|
284
286
|
},
|
|
@@ -296,12 +298,8 @@ export default defineComponent({
|
|
|
296
298
|
(this.$refs.snackbar as InstanceType<typeof Snackbar>).open(this.$t('Data in clipboard'));
|
|
297
299
|
},
|
|
298
300
|
async initData(): Promise<void> {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
attributes = this.authOrganisation.attributes;
|
|
302
|
-
}else{
|
|
303
|
-
attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
|
|
304
|
-
}
|
|
301
|
+
const orgaId = ""!==this.authOrganisation.id ? this.authOrganisation.id : state.generalParameters.organisationId;
|
|
302
|
+
const attributes = await this.getOrgaAttributes(orgaId??"");
|
|
305
303
|
if (Object.prototype.hasOwnProperty.call(attributes,'podcastmakerUrl')) {
|
|
306
304
|
this.shareUrl = attributes.podcastmakerUrl + window.location.pathname+window.location.search;
|
|
307
305
|
}
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
<ShareButtons
|
|
34
34
|
v-if="pageParameters.isShareButtons"
|
|
35
35
|
:podcast="podcast"
|
|
36
|
+
:organisation-id="podcast.organisation.id"
|
|
36
37
|
/>
|
|
37
38
|
<SubscribeButtons
|
|
38
39
|
v-if="pageParameters.isShareButtons && countLink >= 1"
|
|
@@ -225,10 +226,10 @@ export default defineComponent({
|
|
|
225
226
|
|
|
226
227
|
methods: {
|
|
227
228
|
async fetchConferencePublic(){
|
|
228
|
-
const data = await octopusApi.fetchData<string>(9, 'conference/realstatus/'+this.podcast
|
|
229
|
+
const data = await octopusApi.fetchData<string>(9, 'conference/realstatus/'+this.podcast?.conferenceId);
|
|
229
230
|
this.fetchConference = {
|
|
230
231
|
status: data,
|
|
231
|
-
conferenceId: this.podcast
|
|
232
|
+
conferenceId: this.podcast?.conferenceId,
|
|
232
233
|
title:'',
|
|
233
234
|
};
|
|
234
235
|
},
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { defineStore } from 'pinia';
|
|
3
|
+
import octopusApi from '@saooti/octopus-api';
|
|
4
|
+
import { useAuthStore } from '@/stores/AuthStore';
|
|
5
|
+
|
|
6
|
+
interface SaveFetchState{
|
|
7
|
+
orgaPublicAttributes: {[key:string]: {[key: string]:string|number|boolean|undefined}},
|
|
8
|
+
}
|
|
9
|
+
export const useSaveFetchStore = defineStore('SaveFetchStore', {
|
|
10
|
+
state: (): SaveFetchState => ({
|
|
11
|
+
orgaPublicAttributes:{}
|
|
12
|
+
}),
|
|
13
|
+
actions:{
|
|
14
|
+
async getOrgaAttributes(orgaId: string): Promise<{ [key: string]: string | number | boolean | undefined; }>{
|
|
15
|
+
if(this.orgaPublicAttributes[orgaId]){
|
|
16
|
+
return this.orgaPublicAttributes[orgaId];
|
|
17
|
+
}
|
|
18
|
+
const authStore = useAuthStore();
|
|
19
|
+
if(orgaId === authStore.authOrganisation.id && authStore.authOrganisation.attributes && Object.keys(authStore.authOrganisation.attributes).length > 1){
|
|
20
|
+
this.orgaPublicAttributes[orgaId] = authStore.authOrganisation.attributes;
|
|
21
|
+
}else{
|
|
22
|
+
this.orgaPublicAttributes[orgaId] = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+orgaId);
|
|
23
|
+
}
|
|
24
|
+
return this.orgaPublicAttributes[orgaId];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})
|