@saooti/octopus-sdk 33.0.8 → 33.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/src/App.vue +4 -3
  4. package/src/api/classicCrud.ts +1 -1
  5. package/src/assets/form.scss +11 -0
  6. package/src/assets/general.scss +2 -2
  7. package/src/assets/multiselect.scss +0 -1
  8. package/src/assets/share.scss +0 -1
  9. package/src/assets/transition.scss +0 -3
  10. package/src/components/display/categories/CategoryList.vue +1 -1
  11. package/src/components/display/comments/AddCommentModal.vue +1 -1
  12. package/src/components/display/comments/CommentInput.vue +2 -2
  13. package/src/components/display/emission/EmissionList.vue +1 -2
  14. package/src/components/display/emission/EmissionPlayerItem.vue +4 -4
  15. package/src/components/display/filter/ProductorSearch.vue +1 -1
  16. package/src/components/display/list/Paginate.vue +1 -1
  17. package/src/components/display/live/LiveHorizontalList.vue +1 -2
  18. package/src/components/display/organisation/OrganisationChooser.vue +1 -1
  19. package/src/components/display/participant/ParticipantList.vue +1 -2
  20. package/src/components/display/playlist/PlaylistList.vue +1 -2
  21. package/src/components/display/podcasts/PodcastImage.vue +4 -4
  22. package/src/components/display/podcasts/PodcastList.vue +2 -3
  23. package/src/components/display/podcasts/PodcastSwiperList.vue +1 -1
  24. package/src/components/display/sharing/QrCode.vue +2 -2
  25. package/src/components/display/sharing/SharePlayer.vue +3 -3
  26. package/src/components/misc/HomeDropdown.vue +2 -2
  27. package/src/components/misc/LeftMenu.vue +2 -4
  28. package/src/components/misc/TopBar.vue +1 -1
  29. package/src/components/misc/modal/ClipboardModal.vue +2 -1
  30. package/src/components/misc/modal/NewsletterModal.vue +2 -2
  31. package/src/components/misc/player/Player.vue +43 -48
  32. package/src/components/misc/player/PlayerCompact.vue +2 -2
  33. package/src/components/misc/player/PlayerTimeline.vue +1 -1
  34. package/src/components/mixins/handle403.ts +1 -1
  35. package/src/components/mixins/player/playerComment.ts +1 -1
  36. package/src/components/mixins/player/playerDisplay.ts +2 -2
  37. package/src/components/mixins/player/playerLive.ts +5 -5
  38. package/src/components/mixins/player/playerLogic.ts +27 -24
  39. package/src/components/pages/Lives.vue +1 -1
  40. package/src/store/AppStore.ts +33 -88
  41. package/src/store/PlayerStore.ts +77 -0
  42. package/src/store/class/general/emission.ts +17 -0
  43. package/src/store/class/general/participant.ts +7 -0
  44. package/src/store/class/general/playlist.ts +13 -0
  45. package/src/store/class/general/podcast.ts +30 -1
  46. package/src/store/classStore/typeAppStore.ts +79 -0
  47. package/src/store/classStore/typeAuthStore.ts +44 -0
  48. package/src/store/classStore/typePlayerStore.ts +14 -0
  49. package/vite.config.js +1 -0
  50. package/src/store/typeAppStore.ts +0 -339
package/README.md CHANGED
@@ -695,4 +695,5 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
695
695
  * 33.0.5 Change recaptcha
696
696
  * 33.0.6 Crédits
697
697
  * 33.0.7 Test refactor podcastmaker with scss variables
698
+ * 33.1.0 Refacto store
698
699
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "33.0.8",
3
+ "version": "33.1.0",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/src/App.vue CHANGED
@@ -10,7 +10,8 @@
10
10
  :is-education="false"
11
11
  />
12
12
  <LeftMenu
13
- v-model:displayMenu="displayMenu"
13
+ v-if="displayMenu"
14
+ @close="displayMenu=false"
14
15
  :is-education="false"
15
16
  />
16
17
  <CategoryFilter />
@@ -21,7 +22,6 @@
21
22
 
22
23
  <script lang="ts">
23
24
  import TopBar from '@/components/misc/TopBar.vue';
24
- import LeftMenu from '@/components/misc/LeftMenu.vue';
25
25
  import Footer from '@/components/misc/Footer.vue';
26
26
  import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
27
27
  import { state } from './store/paramStore';
@@ -29,8 +29,9 @@ import { Rubriquage } from './store/class/rubrique/rubriquage';
29
29
  import { RubriquageFilter } from './store/class/rubrique/rubriquageFilter';
30
30
  import { Rubrique } from './store/class/rubrique/rubrique';
31
31
  import { initSDK } from './components/mixins/init';
32
- import { defineComponent } from 'vue'
32
+ import { defineAsyncComponent, defineComponent } from 'vue'
33
33
  import { Category } from './store/class/general/category';
34
+ const LeftMenu = defineAsyncComponent(() => import('@/components/misc/LeftMenu.vue'));
34
35
  export default defineComponent({
35
36
  name: 'App',
36
37
 
@@ -1,4 +1,4 @@
1
- import { StoreState } from "@/store/typeAppStore";
1
+ import { StoreState } from "@/store/classStore/typeAppStore";
2
2
  import axios from "axios";
3
3
  enum ModuleApi {
4
4
  DEFAULT = 0,
@@ -77,4 +77,15 @@
77
77
  .vc-select select{
78
78
  padding: 0 20px 0 8px !important;
79
79
  }
80
+ .vc-date{
81
+ .vc-month,.vc-day,.vc-year{
82
+ color: $octopus-primary-color !important;
83
+ }
84
+ }
85
+ .vc-highlight{
86
+ background-color: $octopus-primary-color !important;
87
+ }
88
+ .vc-select select:focus{
89
+ border-color: $octopus-primary-color !important;
90
+ }
80
91
  }
@@ -116,11 +116,11 @@ body{
116
116
  border-radius: 1rem;
117
117
  flex-grow: 1;
118
118
  overflow: auto;
119
- box-shadow: 0px 12px 48px 6px $primaryColorMoreTransparent !important;
119
+ box-shadow: 0px 12px 48px 6px $primaryColorReallyTransparent !important;
120
120
  @media (max-width: 500px){
121
121
  margin: 0.3rem;
122
122
  padding: 0.8rem;
123
- box-shadow:0px 6px 20px 3px $primaryColorMoreTransparent !important;
123
+ box-shadow:0px 6px 20px 3px $primaryColorReallyTransparent !important;
124
124
  }
125
125
  }
126
126
 
@@ -1,5 +1,4 @@
1
1
  /* Added styles */
2
- @import '../sass/_variables.scss';
3
2
  .octopus-app{
4
3
 
5
4
  .default-multiselect-width {
@@ -1,4 +1,3 @@
1
- @import '../sass/_variables.scss';
2
1
  .octopus-app{
3
2
  .page-box-absolute{
4
3
  position: absolute;
@@ -1,7 +1,4 @@
1
1
  .octopus-app{
2
- .transition-height {
3
- transition: height 1s;
4
- }
5
2
  .arrow-transform {
6
3
  transform: rotate(180deg);
7
4
  }
@@ -171,7 +171,7 @@ export default defineComponent({
171
171
  })
172
172
  </script>
173
173
  <style lang="scss">
174
- @import '../../../sass/_variables.scss';
174
+ @import '@scss/_variables.scss';
175
175
  .octopus-app{
176
176
  .category-list-container {
177
177
  display: inline-flex;
@@ -117,7 +117,7 @@ export default defineComponent({
117
117
  methods: {
118
118
  initAuthenticatedName():void{
119
119
  if (!state.generalParameters.authenticated) { return; }
120
- this.name = (`${this.$store.state.profile.firstname||''} ${this.$store.state.profile.lastname||''}`).trim();
120
+ this.name = (`${this.$store.state.auth?.profile.firstname||''} ${this.$store.state.auth?.profile.lastname||''}`).trim();
121
121
  this.isVerify = true;
122
122
  },
123
123
  async handleSuccess(token: string) {
@@ -163,7 +163,7 @@ export default defineComponent({
163
163
  true === state.generalParameters.isAdmin;
164
164
  },
165
165
  userId(): string|undefined {
166
- return state.generalParameters.authenticated ? this.$store.state.profile.userId : undefined;
166
+ return state.generalParameters.authenticated ? this.$store.state.auth?.profile.userId : undefined;
167
167
  },
168
168
  phase(): string|undefined {
169
169
  if(undefined === this.podcast){
@@ -290,7 +290,7 @@ export default defineComponent({
290
290
  </script>
291
291
 
292
292
  <style lang="scss">
293
- @import '../../../sass/_variables.scss';
293
+ @import '@scss/_variables.scss';
294
294
  .octopus-app{
295
295
  .comment-input-container {
296
296
  textarea::placeholder {
@@ -52,12 +52,11 @@ import ListPaginate from '../list/ListPaginate.vue';
52
52
  import octopusApi from '@saooti/octopus-api';
53
53
  import { handle403 } from '../../mixins/handle403';
54
54
  import { state } from '../../../store/paramStore';
55
- import { Emission } from '@/store/class/general/emission';
55
+ import { Emission, emptyEmissionData } from '@/store/class/general/emission';
56
56
  import { Rubrique } from '@/store/class/rubrique/rubrique';
57
57
  import { defineComponent, defineAsyncComponent } from 'vue';
58
58
  import { FetchParam } from '@/store/class/general/fetchParam';
59
59
  import { AxiosError } from 'axios';
60
- import { emptyEmissionData } from '@/store/typeAppStore';
61
60
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
62
61
  const EmissionItem = defineAsyncComponent(() => import('./EmissionItem.vue'));
63
62
  const EmissionPlayerItem = defineAsyncComponent(() => import('./EmissionPlayerItem.vue'));
@@ -176,7 +176,7 @@ export default defineComponent({
176
176
  return (state.emissionsPage.titleInImage as boolean);
177
177
  },
178
178
  authenticated(): boolean {
179
- return this.$store.state.authentication.isAuthenticated;
179
+ return state.generalParameters.authenticated??false;
180
180
  },
181
181
  organisationId(): string|undefined {
182
182
  return state.generalParameters.organisationId;
@@ -226,13 +226,13 @@ export default defineComponent({
226
226
  },
227
227
  play(podcast: Podcast): void {
228
228
  if (podcast === this.$store.state.player.podcast) {
229
- this.$store.commit('playerPause', false);
229
+ this.$store.commit('player/pause', false);
230
230
  } else {
231
- this.$store.commit('playerPlayPodcast', podcast);
231
+ this.$store.commit('player/playPodcast', podcast);
232
232
  }
233
233
  },
234
234
  pause(): void {
235
- this.$store.commit('playerPause', true);
235
+ this.$store.commit('player/pause', true);
236
236
  },
237
237
  },
238
238
  })
@@ -142,7 +142,7 @@ export default defineComponent({
142
142
  </script>
143
143
 
144
144
  <style lang="scss">
145
- @import '../../../sass/_variables.scss';
145
+ @import '@scss/_variables.scss';
146
146
  .octopus-app{
147
147
  .filter-speech-bubble {
148
148
  position: absolute;
@@ -202,7 +202,7 @@ export default defineComponent({
202
202
  });
203
203
  </script>
204
204
  <style lang="scss">
205
- @import '../../../sass/_variables.scss';
205
+ @import '@scss/_variables.scss';
206
206
  .octopus-app .paginate{
207
207
  display: flex;
208
208
  justify-content: flex-end;
@@ -37,9 +37,8 @@
37
37
  import ListPaginate from '../list/ListPaginate.vue';
38
38
  import octopusApi from '@saooti/octopus-api';
39
39
  import PodcastItem from '../podcasts/PodcastItem.vue';
40
- import { Podcast } from '@/store/class/general/podcast';
40
+ import { Podcast, emptyPodcastData } from '@/store/class/general/podcast';
41
41
  import { defineComponent } from 'vue'
42
- import { emptyPodcastData } from '@/store/typeAppStore';
43
42
  export default defineComponent({
44
43
  name: 'LiveHorizontalList',
45
44
 
@@ -183,7 +183,7 @@ export default defineComponent({
183
183
  async created() {
184
184
  if (
185
185
  this.authenticated &&
186
- undefined === this.$store.state.organisation.imageUrl
186
+ undefined === this.$store.state.auth?.organisation.imageUrl
187
187
  ) {
188
188
  const data = await octopusApi.fetchData<Organisation>(0,`organisation/${this.myOrganisationId ?this.myOrganisationId:""}`);
189
189
  this.myImage = data.imageUrl;
@@ -32,8 +32,7 @@ import ListPaginate from '../list/ListPaginate.vue';
32
32
  import { handle403 } from '../../mixins/handle403';
33
33
  import octopusApi from '@saooti/octopus-api';
34
34
  import ParticipantItem from './ParticipantItem.vue';
35
- import { Participant } from '@/store/class/general/participant';
36
- import { emptyParticipantData } from '@/store/typeAppStore';
35
+ import { Participant, emptyParticipantData } from '@/store/class/general/participant';
37
36
  import { defineComponent } from 'vue'
38
37
  import { AxiosError } from 'axios';
39
38
  export default defineComponent({
@@ -32,8 +32,7 @@ import ListPaginate from '../list/ListPaginate.vue';
32
32
  import { handle403 } from '../../mixins/handle403';
33
33
  import octopusApi from '@saooti/octopus-api';
34
34
  import PlaylistItem from './PlaylistItem.vue';
35
- import { emptyPlaylistData } from '@/store/typeAppStore';
36
- import { Playlist } from '@/store/class/general/playlist';
35
+ import { Playlist, emptyPlaylistData } from '@/store/class/general/playlist';
37
36
  import { defineComponent } from 'vue'
38
37
  import { AxiosError } from 'axios';
39
38
  export default defineComponent({
@@ -88,7 +88,7 @@
88
88
  <script lang="ts">
89
89
  import { mapState } from 'vuex';
90
90
  import { state } from '../../../store/paramStore';
91
- import {StoreState} from '@/store/typeAppStore';
91
+ import {StoreState} from '@/store/classStore/typeAppStore';
92
92
  import { Podcast } from '@/store/class/general/podcast';
93
93
  import { Conference } from '@/store/class/conference/conference';
94
94
  import { imageProxy } from '../../mixins/functions';
@@ -251,13 +251,13 @@ export default defineComponent({
251
251
  return;
252
252
  }
253
253
  if(this.playingPodcast){
254
- this.$store.commit('playerPause', "PLAYING"===this.$store.state.player.status);
254
+ this.$store.commit('player/pause', "PLAYING"===this.$store.state.player.status);
255
255
  return;
256
256
  }
257
257
  if (!this.recordingLive) {
258
- this.$store.commit('playerPlayPodcast', this.podcast);
258
+ this.$store.commit('player/playPodcast', this.podcast);
259
259
  }else{
260
- this.$store.commit('playerPlayPodcast', {
260
+ this.$store.commit('player/playPodcast', {
261
261
  title: this.podcast.title,
262
262
  audioUrl: this.podcast.audioUrl,
263
263
  duration: this.podcast.duration,
@@ -35,11 +35,10 @@ import { handle403 } from '../../mixins/handle403';
35
35
  import octopusApi from '@saooti/octopus-api';
36
36
  import PodcastItem from './PodcastItem.vue';
37
37
  import { state } from '../../../store/paramStore';
38
- import { Podcast } from '@/store/class/general/podcast';
38
+ import { Podcast, emptyPodcastData } from '@/store/class/general/podcast';
39
39
  import { defineComponent } from 'vue'
40
40
  import { FetchParam } from '@/store/class/general/fetchParam';
41
41
  import { AxiosError } from 'axios';
42
- import { emptyPodcastData } from '@/store/typeAppStore';
43
42
  export default defineComponent({
44
43
  name: 'PodcastList',
45
44
 
@@ -155,7 +154,7 @@ export default defineComponent({
155
154
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
156
155
  includeHidden: this.includeHidden,
157
156
  validity: undefined !== this.notValid?!this.notValid: undefined,
158
- publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.profile.userId:undefined
157
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined
159
158
  };
160
159
  try {
161
160
  const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
@@ -175,7 +175,7 @@ export default defineComponent({
175
175
  })
176
176
  </script>
177
177
  <style lang="scss">
178
- @import '../../../sass/_variables.scss';
178
+ @import '@scss/_variables.scss';
179
179
  .swiper {
180
180
  width: 100%;
181
181
  height: 100%;
@@ -81,8 +81,8 @@ export default defineComponent({
81
81
  }
82
82
  if (!state.generalParameters.authenticated) return;
83
83
  let data;
84
- if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
85
- data = this.$store.state.organisation.attributes;
84
+ if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
85
+ data = this.$store.state.auth?.organisation.attributes;
86
86
  }else{
87
87
  data= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
88
88
  }
@@ -299,8 +299,8 @@ export default defineComponent({
299
299
  return url;
300
300
  },
301
301
  async fetchOrgaAttributes(): Promise<void>{
302
- if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
303
- this.orgaAttributes = this.$store.state.organisation.attributes;
302
+ if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
303
+ this.orgaAttributes = this.$store.state.auth?.organisation.attributes;
304
304
  }else{
305
305
  this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
306
306
  }
@@ -315,7 +315,7 @@ export default defineComponent({
315
315
  </script>
316
316
 
317
317
  <style lang="scss">
318
- @import '../../../sass/_variables.scss';
318
+ @import '@scss/_variables.scss';
319
319
  .octopus-app{
320
320
  .sticker {
321
321
  align-self: center;
@@ -94,7 +94,7 @@ export default defineComponent({
94
94
  },
95
95
  computed: {
96
96
  organisationsAvailable(): Array<Organisation>{
97
- return this.$store.state.profile.organisations?? [];
97
+ return this.$store.state.auth?.profile.organisations?? [];
98
98
  },
99
99
  helpLinks(){
100
100
  return [
@@ -113,7 +113,7 @@ export default defineComponent({
113
113
  return (state.generalParameters.podcastmaker as boolean);
114
114
  },
115
115
  authenticated(): boolean {
116
- return this.$store.state.authentication.isAuthenticated;
116
+ return state.generalParameters.authenticated??false;
117
117
  },
118
118
  },
119
119
 
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div
3
- v-show="displayMenu"
4
3
  class="left-menu-container"
5
4
  @mouseleave="onMenuClick"
6
5
  >
@@ -61,10 +60,9 @@ export default defineComponent({
61
60
  },
62
61
  mixins:[orgaFilter],
63
62
  props: {
64
- displayMenu: { default: false, type: Boolean},
65
63
  isEducation: { default: false, type: Boolean},
66
64
  },
67
- emits: ['update:displayMenu'],
65
+ emits: ['close'],
68
66
  data() {
69
67
  return {
70
68
  organisationId: undefined as string|undefined,
@@ -127,7 +125,7 @@ export default defineComponent({
127
125
  rubriquesId: this.rubriqueQueryParam}
128
126
  },
129
127
  onMenuClick() {
130
- this.$emit('update:displayMenu', false);
128
+ this.$emit('close');
131
129
  },
132
130
  async onOrganisationSelected(organisation: Organisation|undefined) {
133
131
  if (organisation?.id) {
@@ -53,7 +53,7 @@
53
53
  />
54
54
  <div class="d-flex flex-column">
55
55
  <div class="hosted-by">
56
- <span>{{ $t('Hosted by') }}</span><span class="ms-1 me-1 primary-darker">Saooti</span>
56
+ {{ $t('Hosted by') }}<span class="ms-1 me-1 primary-darker">Saooti</span>
57
57
  </div>
58
58
  <div class="d-flex justify-content-end flex-nowrap">
59
59
  <HomeDropdown :is-education="isEducation" />
@@ -41,6 +41,7 @@
41
41
  import { Emission } from '@/store/class/general/emission';
42
42
  import { displayMethods } from '../../mixins/functions';
43
43
  import { defineComponent, defineAsyncComponent } from 'vue';
44
+ import { state } from '@/store/paramStore';
44
45
  const RssSection = defineAsyncComponent(() => import('@/components/display/aggregator/RssSection.vue'));
45
46
  export default defineComponent({
46
47
  name: 'ClipboardModal',
@@ -56,7 +57,7 @@ export default defineComponent({
56
57
  emits: ['close', 'copy'],
57
58
  computed: {
58
59
  authenticated(): boolean {
59
- return this.$store.state.authentication.isAuthenticated;
60
+ return state.generalParameters.authenticated??false;
60
61
  },
61
62
  },
62
63
  mounted(){
@@ -302,8 +302,8 @@ export default defineComponent({
302
302
  },
303
303
  async initData(): Promise<void> {
304
304
  let attributes;
305
- if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
306
- attributes = this.$store.state.organisation.attributes;
305
+ if(this.$store.state.auth?.organisation?.attributes && Object.keys(this.$store.state.auth?.organisation.attributes).length > 1){
306
+ attributes = this.$store.state.auth?.organisation.attributes;
307
307
  }else{
308
308
  attributes = await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+state.generalParameters.organisationId);
309
309
  }
@@ -1,60 +1,55 @@
1
1
  <template>
2
2
  <div
3
- class="w-100 transition-height bg-dark"
3
+ class="player-container"
4
4
  :style="{ height: playerHeight }"
5
+ @transitionend="onHidden"
5
6
  >
6
- <div
7
- class="player-container"
8
- :style="{ height: playerHeight }"
9
- @transitionend="onHidden"
10
- >
11
- <template v-if="display">
12
- <audio
13
- id="audio-player"
14
- :src="!live? audioUrlToPlay: undefined"
15
- autoplay
16
- @timeupdate="onTimeUpdate"
17
- @ended="onFinished"
18
- @playing="onPlay"
19
- @durationChange="onTimeUpdate"
20
- @error="onError"
21
- @seeked="onSeeked"
22
- />
23
- <PlayerCompact
24
- v-if="!largeVersion"
25
- v-model:notListenTime="notListenTime"
26
- :player-error="playerError"
27
- :hls-ready="hlsReady"
28
- :comments="comments"
29
- :display-alert-bar="displayAlertBar"
30
- :percent-live-progress="percentLiveProgress"
31
- :duration-live-position="durationLivePosition"
32
- :listen-time="listenTime"
33
- @stopPlayer="stopPlayer"
34
- @changePlayerLargeVersion="largeVersion = true"
35
- />
36
- <PlayerLarge
37
- v-else
38
- v-model:notListenTime="notListenTime"
39
- :player-error="playerError"
40
- :hls-ready="hlsReady"
41
- :comments="comments"
42
- :display-alert-bar="displayAlertBar"
43
- :percent-live-progress="percentLiveProgress"
44
- :duration-live-position="durationLivePosition"
45
- :listen-time="listenTime"
46
- @stopPlayer="stopPlayer"
47
- @changePlayerLargeVersion="largeVersion = false"
48
- />
49
- </template>
50
- </div>
7
+ <template v-if="display">
8
+ <audio
9
+ id="audio-player"
10
+ :src="!live? audioUrlToPlay: undefined"
11
+ autoplay
12
+ @timeupdate="onTimeUpdate"
13
+ @ended="onFinished"
14
+ @playing="onPlay"
15
+ @durationChange="onTimeUpdate"
16
+ @error="onError"
17
+ @seeked="onSeeked"
18
+ />
19
+ <PlayerCompact
20
+ v-if="!largeVersion"
21
+ v-model:notListenTime="notListenTime"
22
+ :player-error="playerError"
23
+ :hls-ready="hlsReady"
24
+ :comments="comments"
25
+ :display-alert-bar="displayAlertBar"
26
+ :percent-live-progress="percentLiveProgress"
27
+ :duration-live-position="durationLivePosition"
28
+ :listen-time="listenTime"
29
+ @stopPlayer="stopPlayer"
30
+ @changePlayerLargeVersion="largeVersion = true"
31
+ />
32
+ <PlayerLarge
33
+ v-else
34
+ v-model:notListenTime="notListenTime"
35
+ :player-error="playerError"
36
+ :hls-ready="hlsReady"
37
+ :comments="comments"
38
+ :display-alert-bar="displayAlertBar"
39
+ :percent-live-progress="percentLiveProgress"
40
+ :duration-live-position="durationLivePosition"
41
+ :listen-time="listenTime"
42
+ @stopPlayer="stopPlayer"
43
+ @changePlayerLargeVersion="largeVersion = false"
44
+ />
45
+ </template>
51
46
  </div>
52
47
  </template>
53
48
  <script lang="ts">
54
49
  import { mapState } from 'vuex';
55
50
  import { CommentPodcast } from '@/store/class/general/comment';
56
51
  import { playerLogic } from '../../mixins/player/playerLogic';
57
- import { StoreState } from '@/store/typeAppStore';
52
+ import { StoreState } from '@/store/classStore/typeAppStore';
58
53
  import PlayerCompact from '../player/PlayerCompact.vue';
59
54
  import PlayerLarge from '../player/PlayerLarge.vue';
60
55
  import { defineComponent } from 'vue';
@@ -108,7 +103,7 @@ export default defineComponent({
108
103
  methods: {
109
104
  onHidden(): void {
110
105
  if (this.forceHide) {
111
- this.$store.commit('playerPlayPodcast');
106
+ this.$store.commit('player/playPodcast');
112
107
  this.forceHide = false;
113
108
  }
114
109
  },
@@ -60,12 +60,12 @@
60
60
  </div>
61
61
  <button
62
62
  :title="$t('Enlarge')"
63
- class="btn play-button-box saooti-up"
63
+ class="btn play-button-box btn-transparent text-light saooti-up"
64
64
  @click="changePlayerLargeVersion"
65
65
  />
66
66
  <button
67
67
  :title="$t('Close')"
68
- class="btn play-button-box saooti-remove"
68
+ class="btn play-button-box btn-transparent text-light saooti-remove"
69
69
  @click="stopPlayer"
70
70
  />
71
71
  <PlayerTimeline
@@ -34,7 +34,7 @@ export default defineComponent({
34
34
  })
35
35
  </script>
36
36
  <style lang="scss">
37
- @import '../../../sass/_variables.scss';
37
+ @import '@scss/_variables.scss';
38
38
  .octopus-app{
39
39
  .player-container {
40
40
  .timeline-button {
@@ -4,7 +4,7 @@ export const handle403 = defineComponent({
4
4
  methods: {
5
5
  handle403(error: AxiosError): void {
6
6
  if (403 === error.response?.status) {
7
- if(!this.$store.state.authentication.isAuthenticated){
7
+ if(undefined===this.$store.state.auth){
8
8
  window.location.href = window.location.origin + "/sso/login";
9
9
  }else{
10
10
  this.$router.push({
@@ -3,7 +3,7 @@ import { mapState } from 'vuex';
3
3
  import { state } from '../../../store/paramStore';
4
4
  import octopusApi from '@saooti/octopus-api';
5
5
  import { CommentPodcast } from '@/store/class/general/comment';
6
- import { StoreState } from '@/store/typeAppStore';
6
+ import { StoreState } from '@/store/classStore/typeAppStore';
7
7
  import { defineComponent } from 'vue';
8
8
  import { FetchParam } from '@/store/class/general/fetchParam';
9
9
  import { InterfacePageable } from '@/store/class/general/interfacePageable';
@@ -107,10 +107,10 @@ export const playerDisplay = defineComponent({
107
107
  }
108
108
  },
109
109
  onPlay(): void {
110
- this.$store.commit('playerPause', false);
110
+ this.$store.commit('player/pause', false);
111
111
  },
112
112
  onPause(): void {
113
- this.$store.commit('playerPause', true);
113
+ this.$store.commit('player/pause', true);
114
114
  },
115
115
  }
116
116
  });