@saooti/octopus-sdk 41.0.14-SNAPSHOT → 41.0.15

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 (70) hide show
  1. package/eslint.config.mjs +5 -3
  2. package/index.ts +8 -1
  3. package/package.json +4 -2
  4. package/plateform.conf +1 -1
  5. package/src/App.vue +3 -7
  6. package/src/api/classicApi.ts +1 -1
  7. package/src/components/composable/player/usePlayerLive.ts +2 -2
  8. package/src/components/composable/player/usePlayerLogic.ts +2 -1
  9. package/src/components/composable/radio/usefetchRadioData.ts +29 -12
  10. package/src/components/composable/route/useSimplePageParam.ts +6 -1
  11. package/src/components/display/categories/CategoryChooser.vue +4 -0
  12. package/src/components/display/comments/CommentList.vue +1 -1
  13. package/src/components/display/emission/EmissionList.vue +2 -1
  14. package/src/components/display/emission/EmissionPresentationItem.vue +14 -6
  15. package/src/components/display/filter/AdvancedSearch.vue +2 -2
  16. package/src/components/display/filter/DateFilter.vue +15 -2
  17. package/src/components/display/live/RadioCurrently.vue +2 -5
  18. package/src/components/display/organisation/OrganisationChooserLight.vue +34 -36
  19. package/src/components/display/podcasts/PodcastPlayButton.vue +6 -1
  20. package/src/components/display/rubriques/RubriqueChooser.vue +24 -2
  21. package/src/components/display/rubriques/RubriqueList.vue +18 -0
  22. package/src/components/display/sharing/PlayerParameters.vue +0 -8
  23. package/src/components/display/sharing/SharePlayer.vue +0 -5
  24. package/src/components/display/sharing/SubscribeButtons.vue +4 -2
  25. package/src/components/form/ClassicCheckbox.vue +30 -5
  26. package/src/components/form/ClassicInputText.vue +32 -12
  27. package/src/components/form/ClassicMultiselect.vue +35 -7
  28. package/src/components/misc/ClassicAccordion.vue +4 -4
  29. package/src/components/misc/ClassicHelpButton.vue +44 -0
  30. package/src/components/misc/ClassicLazy.vue +25 -14
  31. package/src/components/misc/ClassicNav.vue +3 -0
  32. package/src/components/misc/ClassicSpinner.vue +1 -1
  33. package/src/components/misc/FooterSection.vue +17 -20
  34. package/src/components/misc/HomeDropdown.vue +3 -110
  35. package/src/components/misc/MobileMenu.vue +59 -64
  36. package/src/components/misc/TopBar.vue +2 -10
  37. package/src/components/misc/TopBarMainContent.vue +8 -12
  38. package/src/components/misc/UserButtonContent.vue +159 -0
  39. package/src/components/misc/modal/ClassicModal.vue +4 -0
  40. package/src/components/misc/player/PlayerCompact.vue +1 -0
  41. package/src/components/misc/player/PlayerComponent.vue +1 -0
  42. package/src/components/misc/player/elements/PlayerImage.vue +0 -1
  43. package/src/components/misc/player/elements/PlayerTitle.vue +3 -3
  44. package/src/components/misc/player/radio/RadioHistory.vue +3 -2
  45. package/src/components/misc/player/video/PlayerVideo.vue +2 -2
  46. package/src/components/pages/HomePage.vue +5 -4
  47. package/src/components/pages/PageLogout.vue +1 -6
  48. package/src/components/pages/PodcastPage.vue +0 -1
  49. package/src/components/pages/PodcastsPage.vue +1 -1
  50. package/src/components/pages/VideoPage.vue +5 -2
  51. package/src/helper/equals.ts +26 -0
  52. package/src/locale/de.ts +6 -5
  53. package/src/locale/en.ts +6 -5
  54. package/src/locale/es.ts +6 -5
  55. package/src/locale/fr.ts +6 -5
  56. package/src/locale/it.ts +6 -5
  57. package/src/locale/sl.ts +6 -5
  58. package/src/router/router.ts +10 -74
  59. package/src/router/utils.ts +112 -0
  60. package/src/stores/AuthStore.ts +7 -2
  61. package/src/stores/FilterStore.ts +126 -71
  62. package/src/stores/PlayerStore.ts +11 -1
  63. package/src/stores/class/conference/conference.ts +2 -0
  64. package/src/stores/class/general/organisation.ts +2 -2
  65. package/src/stores/class/general/player.ts +2 -2
  66. package/src/style/_variables.scss +6 -0
  67. package/src/style/general.scss +18 -1
  68. package/tsconfig.json +6 -2
  69. package/typings/index.d.ts +1 -0
  70. package/src/helper/radio/radioHelper.ts +0 -15
@@ -32,143 +32,36 @@
32
32
  :left-pos="true"
33
33
  :is-top-layer="true"
34
34
  >
35
- <nav :aria-label="t('User menu')">
36
- <ul class="p-0 m-0">
37
- <template v-if="!isAuthenticated">
38
- <li class="li-style-none">
39
- <a class="octopus-dropdown-item realLink" :href="pathLogin">
40
- {{ t("Login") }}
41
- </a>
42
- </li>
43
- <li class="li-style-none">
44
- <router-link
45
- v-if="!state.generalParameters.podcastmaker"
46
- class="octopus-dropdown-item"
47
- to="/main/pub/create"
48
- >
49
- {{ t("Create an account") }}
50
- </router-link>
51
- </li>
52
- </template>
53
- <template v-else>
54
- <li v-for="routerBack in routerBackoffice" :key="routerBack.path" class="li-style-none">
55
- <router-link
56
- v-if="!state.generalParameters.podcastmaker && routerBack.condition"
57
- :class="routerBack.class"
58
- :to="routerBack.path"
59
- >
60
- {{ routerBack.title }}
61
- </router-link>
62
- </li>
63
- <template v-if="helpLinks.length">
64
- <hr />
65
- <li v-for="helpLink in helpLinks" :key="helpLink.title" class="li-style-none">
66
- <a
67
- :href="helpLink.href"
68
- class="octopus-dropdown-item realLink"
69
- rel="noreferrer noopener"
70
- target="_blank"
71
- :title="t('New window', {text: helpLink.title})"
72
- >
73
- {{ helpLink.title }}
74
- <OpenInNewIcon class="ms-1" :size="15"/>
75
- </a>
76
- </li>
77
- </template>
78
- <hr />
79
- <li class="li-style-none">
80
- <a class="octopus-dropdown-item c-hand" href="/logout">
81
- {{ t("Logout") }}
82
- </a>
83
- </li>
84
- </template>
85
- <li class="li-style-none">
86
- <router-link
87
- v-if="!authStore.isGarRole"
88
- class="octopus-dropdown-item"
89
- to="/main/pub/contact"
90
- >
91
- {{ t("Contact") }}
92
- </router-link>
93
- </li>
94
- </ul>
95
- </nav>
35
+ <UserButtonContent :isEducation="isEducation" :navLabel="t('User menu')"/>
96
36
  </ClassicPopover>
97
37
  </div>
98
38
  </template>
99
39
 
100
40
  <script setup lang="ts">
101
- import OpenInNewIcon from "vue-material-design-icons/OpenInNew.vue";
41
+ import UserButtonContent from "./UserButtonContent.vue";
102
42
  import AppsIcon from "vue-material-design-icons/Apps.vue";
103
43
  import AccountIcon from "vue-material-design-icons/Account.vue";
104
44
  import DownloadIcon from "vue-material-design-icons/Download.vue";
105
- import { state } from "../../stores/ParamSdkStore";
106
45
  import ClassicPopover from "../misc/ClassicPopover.vue";
107
46
  import { useAuthStore } from "../../stores/AuthStore";
108
47
  import { computed } from "vue";
109
- import { useApiStore } from "../../stores/ApiStore";
110
48
  import { useI18n } from "vue-i18n";
111
49
  import { useRoute, useRouter } from "vue-router";
112
50
 
113
51
  //Props
114
- const props = defineProps({
52
+ defineProps({
115
53
  isEducation: { default: false, type: Boolean },
116
54
  mobileMenuDisplay: { default: false, type: Boolean },
117
- scrolled: { default: false, type: Boolean },
118
55
  })
119
56
 
120
57
  //Composables
121
58
  const { t } = useI18n();
122
59
  const authStore = useAuthStore();
123
- const apiStore = useApiStore();
124
60
  const route = useRoute();
125
61
  const router = useRouter();
126
62
 
127
63
  //Computed
128
- const isAuthenticated = computed(() => undefined !== authStore.authProfile?.userId);
129
64
  const isAuthenticatedWithOrga = computed(() => undefined !== authStore.authOrgaId);
130
- const pathLogin = computed(() => "/sso/login?redirect_url="+encodeURI(apiStore.frontendUrl + route.fullPath));
131
- const organisationsAvailable = computed(() => authStore.authProfile?.organisations ?? []);
132
- const helpLinks = computed(() => {
133
- if (authStore.isGarRole || props.isEducation) {
134
- return [];
135
- }
136
- return [
137
- { title:t("Help"), href: "https://help.octopus.saooti.com/Aide/"},
138
- { title: t("TutoMag"), href: "https://help.octopus.saooti.com/" },
139
- ];
140
- });
141
- const routerBackoffice = computed(() => {
142
- return [
143
- {
144
- title: t("My space"),
145
- class: "octopus-dropdown-item show-small-phone-flex",
146
- path: "/main/priv/backoffice",
147
- condition: isAuthenticatedWithOrga.value,
148
- },
149
- {
150
- title: t("Upload"),
151
- class: "octopus-dropdown-item show-small-phone-flex",
152
- path: "/main/priv/upload",
153
- condition: isAuthenticatedWithOrga.value && authStore.isRoleContribution,
154
- },
155
- {
156
- title: t("Edit my profile"),
157
- class: "octopus-dropdown-item",
158
- path: "/main/priv/edit/profile",
159
- condition: true,
160
- },
161
- {
162
- title: t("Edit my organisation"),
163
- class: "octopus-dropdown-item",
164
- path: "/main/priv/edit/organisation",
165
- condition:
166
- isAuthenticatedWithOrga.value &&
167
- (authStore.isRoleOrganisation || 1 < organisationsAvailable.value.length),
168
- },
169
- ];
170
- });
171
-
172
65
 
173
66
  //Methods
174
67
  function goToAdministration() {
@@ -18,39 +18,11 @@
18
18
  :left-pos="true"
19
19
  :is-top-layer="true"
20
20
  >
21
- <template v-for="link in routerLinkArray" :key="link.routeName">
22
- <router-link
23
- v-if="link.condition"
24
- :class="
25
- 'home' === link.routeName
26
- ? 'octopus-dropdown-item show-phone-flex'
27
- : 'octopus-dropdown-item'
28
- "
29
- :to="{
30
- name: link.routeName,
31
- query: getQueriesRouter(link.routeName),
32
- }"
33
- >
34
- {{ link.title }}
35
- </router-link>
36
- </template>
37
- <a
38
- v-if="!isAuthenticatedWithOrga"
39
- class="octopus-dropdown-item realLink"
40
- :href="pathLogin"
41
- >
42
- {{ t("Login") }}
43
- </a>
44
- <a v-else class="octopus-dropdown-item c-hand" href="/logout">
45
- {{ t("Logout") }}
46
- </a>
47
- <router-link
48
- v-if="!authStore.isGarRole"
49
- class="octopus-dropdown-item"
50
- to="/main/pub/contact"
51
- >
52
- {{ t("Contact") }}
53
- </router-link>
21
+ <UserButtonContent
22
+ :isEducation="isEducation"
23
+ :navLabel="t('User menu')"
24
+ :specificRoutes="routerLinkArray"
25
+ :displayUserContent="displayUserContent"/>
54
26
  </ClassicPopover>
55
27
  </div>
56
28
  </template>
@@ -61,21 +33,22 @@ import { useRubriquesFilterComputed } from "../composable/route/useRubriquesFilt
61
33
  import { state } from "../../stores/ParamSdkStore";
62
34
  import { defineAsyncComponent, ref, computed } from "vue";
63
35
  import { useFilterStore } from "../../stores/FilterStore";
64
- import { useAuthStore } from "../../stores/AuthStore";
65
- import { useApiStore } from "../../stores/ApiStore";
66
36
  import { useI18n } from "vue-i18n";
67
- import { useRoute } from "vue-router";
37
+ import { useResizePhone } from "../composable/useResizePhone";
38
+ import { useAuthStore } from "../../stores/AuthStore";
68
39
  const ClassicPopover = defineAsyncComponent(
69
40
  () => import("../misc/ClassicPopover.vue"),
70
41
  );
71
-
42
+ const UserButtonContent = defineAsyncComponent(
43
+ () => import("./UserButtonContent.vue"),
44
+ );
72
45
 
73
46
  //Props
74
47
  const props = defineProps({
75
48
  isEducation: { default: false, type: Boolean },
76
49
  show: { default: false, type: Boolean },
77
50
  notPodcastAndEmission: { default: false, type: Boolean },
78
- scrolled: { default: false, type: Boolean },
51
+ inContentDisplayPage: { default: false, type: Boolean },
79
52
  })
80
53
 
81
54
  //Data
@@ -84,61 +57,87 @@ const firstLoaded = ref(false);
84
57
  //Composables
85
58
  const { t } = useI18n();
86
59
  const { rubriqueQueryParam } = useRubriquesFilterComputed();
87
- const authStore = useAuthStore();
88
- const apiStore = useApiStore();
89
60
  const filterStore = useFilterStore();
90
- const route = useRoute();
61
+ const authStore = useAuthStore();
62
+ const { windowWidth } = useResizePhone();
91
63
 
92
64
 
93
65
  //Computed
94
66
  const isAuthenticatedWithOrga = computed(() => undefined !== authStore.authOrgaId);
95
- const pathLogin = computed(() => "/sso/login?redirect_url="+encodeURI(apiStore.frontendUrl + route.fullPath));
67
+ const displayUserContent = computed(() =>{
68
+ if(isAuthenticatedWithOrga.value){
69
+ return 500>=windowWidth.value;
70
+ }
71
+ return props.show;
72
+ });
96
73
  const routerLinkArray = computed(() =>{
97
74
  return [
98
- {
99
- title: t("My space"),
100
- routeName: "backoffice",
101
- condition: isAuthenticatedWithOrga.value,
75
+ {
76
+ title: t("Home"),
77
+ path:{
78
+ name: "home",
79
+ query: getQueriesRouter(false),
80
+ },
81
+ class:"octopus-dropdown-item show-phone-flex",
82
+ condition: true
102
83
  },
103
- { title: t("Home"), routeName: "home", condition: true },
104
84
  {
105
85
  title: t("Radio & Live"),
106
- routeName: "lives",
86
+ path:{
87
+ name: "lives",
88
+ query: getQueriesRouter(true),
89
+ },
90
+ class: "octopus-dropdown-item",
107
91
  condition:
108
92
  state.generalParameters.isLiveTab &&
109
93
  ((filterStore.filterOrgaId && filterStore.filterLive) || !filterStore.filterOrgaId),
110
94
  },
111
95
  {
112
96
  title: t("Podcasts"),
113
- routeName: "podcasts",
97
+ path:{
98
+ name: "podcasts",
99
+ query: getQueriesRouter(false),
100
+ },
101
+ class: "octopus-dropdown-item",
114
102
  condition: !props.notPodcastAndEmission,
115
103
  },
116
104
  {
117
105
  title: t("Emissions"),
118
- routeName: "emissions",
106
+ path:{
107
+ name: "emissions",
108
+ query: getQueriesRouter(false),
109
+ },
110
+ class: "octopus-dropdown-item",
119
111
  condition: !props.notPodcastAndEmission,
120
112
  },
121
113
  {
122
114
  title: t("Productors"),
123
- routeName: "productors",
115
+ path:{
116
+ name: "productors",
117
+ query: getQueriesRouter(true),
118
+ },
119
+ class: "octopus-dropdown-item",
124
120
  condition:
125
121
  !state.generalParameters.podcastmaker && (!filterStore.filterOrgaId || props.isEducation),
126
122
  },
127
123
  {
128
124
  title: t("Playlists"),
129
- routeName: "playlists",
125
+ path:{
126
+ name: "playlists",
127
+ query: getQueriesRouter(true),
128
+ },
129
+ class: "octopus-dropdown-item",
130
130
  condition: true,
131
131
  },
132
132
  {
133
133
  title: t("Speakers"),
134
- routeName: "participants",
134
+ path:{
135
+ name: "participants",
136
+ query: getQueriesRouter(true),
137
+ },
138
+ class: "octopus-dropdown-item",
135
139
  condition: true,
136
140
  },
137
- {
138
- title: t("Create an account"),
139
- routeName: "createAccount",
140
- condition: !isAuthenticatedWithOrga.value,
141
- },
142
141
  ];
143
142
  });
144
143
 
@@ -153,12 +152,8 @@ function handleMenuClick() {
153
152
  document.getElementById("mobile-menu-dropdown")?.click();
154
153
  }, 200);
155
154
  }
156
- function getQueriesRouter(routeName: string) {
157
- if (
158
- "podcasts" !== routeName &&
159
- "emissions" !== routeName &&
160
- "home" !== routeName
161
- ) {
155
+ function getQueriesRouter(onlyProductor:boolean) {
156
+ if (onlyProductor) {
162
157
  return { productor: filterStore.filterOrgaId };
163
158
  }
164
159
  return {
@@ -3,7 +3,7 @@
3
3
  role="banner"
4
4
  class="header-saooti-play"
5
5
  :style="headerBackgroundImage"
6
- :class="[generalStore.contentToDisplay ? 'header-img-bg':'header-color-bg', scrolled? 'scrolled':'', needToBlur ? 'header-force-blur':'']"
6
+ :class="[generalStore.contentToDisplay ? 'header-img-bg':'bg-gradient', scrolled? 'scrolled':'', needToBlur ? 'header-force-blur':'']"
7
7
  >
8
8
  <TopBarMainContent
9
9
  :is-phone="isPhone"
@@ -160,15 +160,7 @@ function handleScroll(): void {
160
160
  background-repeat: no-repeat;
161
161
  background-size: cover;
162
162
  }
163
- &.header-color-bg{
164
- background: var(--octopus-primary);
165
- background: linear-gradient(
166
- 90deg,
167
- var(--octopus-primary) 0%,
168
- var(--octopus-tertiary) 100%
169
- );
170
- }
171
- &.header-color-bg, &.scrolled{
163
+ &.bg-gradient, &.scrolled{
172
164
  box-shadow: 0 2px 15px 5px var(--octopus-shadow) !important;
173
165
  }
174
166
  }
@@ -13,22 +13,20 @@
13
13
  :src="logoUrl"
14
14
  aria-hidden="true"
15
15
  alt=""
16
-
17
16
  width="140"
18
17
  height="50"
19
18
  title="Logo"
20
19
  :class="generalStore.platformEducation ? 'education-logo' : 'octopus-logo'"
21
- />
20
+ >
22
21
  <img
23
22
  v-else
24
23
  :src="useProxyImageUrl(imgUrl, '', '80')"
25
24
  aria-hidden="true"
26
25
  alt=""
27
-
28
26
  class="client-logo"
29
27
  title="Logo"
30
28
  :class="generalStore.platformEducation ? 'education-logo' : ''"
31
- />
29
+ >
32
30
  </router-link>
33
31
  <h1 v-if="titleIsDisplayed" class="text-truncate m-0 align-self-center">
34
32
  {{ titleDisplay }}
@@ -46,14 +44,13 @@
46
44
  v-if="authStore.isGarRole"
47
45
  :src="logoUrl"
48
46
  aria-hidden="true"
49
- alt=""
50
-
47
+ alt=""
51
48
  width="100"
52
49
  height="29"
53
50
  class="ms-2"
54
51
  title="Logo"
55
52
  :class="generalStore.platformEducation ? 'education-logo' : 'octopus-logo'"
56
- />
53
+ >
57
54
  <a
58
55
  v-else
59
56
  href="https://www.saooti.com/"
@@ -64,14 +61,14 @@
64
61
  <img
65
62
  :src="logoUrl"
66
63
  aria-hidden="true"
67
- alt=""
64
+ alt=""
68
65
 
69
66
  title="Saooti"
70
67
  width="100"
71
68
  height="29"
72
69
  class="ms-2"
73
70
  :class="generalStore.platformEducation ? 'education-logo' : 'octopus-logo'"
74
- />
71
+ >
75
72
  </a>
76
73
  </template>
77
74
  <div role="navigation" class="d-flex align-items-center justify-content-end flex-grow-1">
@@ -128,20 +125,19 @@
128
125
  {{ link.title }}
129
126
  </router-link>
130
127
  </li>
131
- </template>
128
+ </template>
132
129
  </ul>
133
130
  </nav>
134
131
  </ClassicPopover>
132
+
135
133
  <MobileMenu
136
134
  :is-education="generalStore.platformEducation"
137
135
  :show="mobileMenuDisplay"
138
136
  :not-podcast-and-emission="inContentDisplayPage && !scrolled"
139
- :scrolled="scrolled"
140
137
  />
141
138
  <HomeDropdown
142
139
  :is-education="generalStore.platformEducation"
143
140
  :mobile-menu-display="mobileMenuDisplay"
144
- :scrolled="scrolled"
145
141
  />
146
142
  <router-link
147
143
  v-show="!isPhone && !inContentDisplayPage"
@@ -0,0 +1,159 @@
1
+ <template>
2
+ <nav :aria-label="navLabel">
3
+ <ul class="p-0 m-0">
4
+ <template v-if="specificRoutes.length">
5
+ <li v-for="routerBack in specificRoutes" :key="routerBack.path" class="li-style-none">
6
+ <router-link
7
+ v-if="!state.generalParameters.podcastmaker && routerBack.condition"
8
+ :class="routerBack.class"
9
+ :to="routerBack.path"
10
+ >
11
+ {{ routerBack.title }}
12
+ </router-link>
13
+ </li>
14
+ <hr v-if="displayUserContent"/>
15
+ </template>
16
+ <template v-if="displayUserContent">
17
+ <template v-if="!isAuthenticated">
18
+ <li class="li-style-none">
19
+ <a class="octopus-dropdown-item realLink" :href="pathLogin">
20
+ {{ t("Login") }}
21
+ </a>
22
+ </li>
23
+ <li class="li-style-none">
24
+ <router-link
25
+ v-if="!state.generalParameters.podcastmaker"
26
+ class="octopus-dropdown-item"
27
+ to="/main/pub/create"
28
+ >
29
+ {{ t("Create an account") }}
30
+ </router-link>
31
+ </li>
32
+ </template>
33
+ <template v-else>
34
+ <li v-for="routeBackoffice in routerBackoffice" :key="routeBackoffice.path" class="li-style-none">
35
+ <router-link
36
+ v-if="!state.generalParameters.podcastmaker && routeBackoffice.condition"
37
+ :class="routeBackoffice.class"
38
+ :to="routeBackoffice.path"
39
+ >
40
+ {{ routeBackoffice.title }}
41
+ </router-link>
42
+ </li>
43
+ <hr />
44
+ <template v-if="helpLinks.length">
45
+ <li v-for="helpLink in helpLinks" :key="helpLink.title" class="li-style-none">
46
+ <a
47
+ :href="helpLink.href"
48
+ class="octopus-dropdown-item realLink"
49
+ rel="noreferrer noopener"
50
+ target="_blank"
51
+ :title="t('New window', {text: helpLink.title})"
52
+ >
53
+ {{ helpLink.title }}
54
+ <OpenInNewIcon class="ms-1" :size="15"/>
55
+ </a>
56
+ </li>
57
+ <hr />
58
+ </template>
59
+ <li class="li-style-none">
60
+ <a class="octopus-dropdown-item c-hand" href="/logout">
61
+ {{ t("Logout") }}
62
+ </a>
63
+ </li>
64
+ </template>
65
+ <li class="li-style-none">
66
+ <router-link
67
+ v-if="!authStore.isGarRole"
68
+ class="octopus-dropdown-item"
69
+ to="/main/pub/contact"
70
+ >
71
+ {{ t("Contact") }}
72
+ </router-link>
73
+ </li>
74
+ </template>
75
+ </ul>
76
+ </nav>
77
+ </template>
78
+
79
+ <script setup lang="ts">
80
+ import OpenInNewIcon from "vue-material-design-icons/OpenInNew.vue";
81
+ import { state } from "../../stores/ParamSdkStore";
82
+ import { useAuthStore } from "../../stores/AuthStore";
83
+ import { computed } from "vue";
84
+ import { useApiStore } from "../../stores/ApiStore";
85
+ import { useI18n } from "vue-i18n";
86
+ import { RouteLocationAsPathGeneric, RouteLocationAsRelativeGeneric, useRoute } from "vue-router";
87
+
88
+ //Interface
89
+ interface RouteInfo{
90
+ title: string;
91
+ class: string;
92
+ path: string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric;
93
+ condition: boolean
94
+ }
95
+
96
+ //Props
97
+ const props = defineProps({
98
+ isEducation: { default: false, type: Boolean },
99
+ navLabel: { default: "", type: String },
100
+ specificRoutes: { default: ()=>[], type: Array as ()=> Array<RouteInfo> },
101
+ displayUserContent: { default: true, type: Boolean },
102
+ })
103
+
104
+ //Composables
105
+ const { t } = useI18n();
106
+ const authStore = useAuthStore();
107
+ const apiStore = useApiStore();
108
+ const route = useRoute();
109
+
110
+ //Computed
111
+ const isAuthenticated = computed(() => undefined !== authStore.authProfile?.userId);
112
+ const pathLogin = computed(() => "/sso/login?redirect_url="+encodeURI(apiStore.frontendUrl + route.fullPath));
113
+ const isAuthenticatedWithOrga = computed(() => undefined !== authStore.authOrgaId);
114
+ const organisationsAvailable = computed(() => authStore.authProfile?.organisations ?? []);
115
+
116
+ const helpLinks = computed(() => {
117
+ if (authStore.isGarRole || props.isEducation) {
118
+ return [];
119
+ }
120
+ return [
121
+ { title:t("Help"), href: "https://help.octopus.saooti.com/Aide/"},
122
+ { title: t("TutoMag"), href: "https://help.octopus.saooti.com/" },
123
+ ];
124
+ });
125
+ const routerBackoffice = computed(() => {
126
+ if(!isAuthenticated.value){
127
+ return [];
128
+ }
129
+ return [
130
+ {
131
+ title: t("My space"),
132
+ class: "octopus-dropdown-item show-small-screen",
133
+ path: "/main/priv/backoffice",
134
+ condition: isAuthenticatedWithOrga.value,
135
+ },
136
+ {
137
+ title: t("Upload"),
138
+ class: "octopus-dropdown-item show-small-screen",
139
+ path: "/main/priv/upload",
140
+ condition: isAuthenticatedWithOrga.value && authStore.isRoleContribution,
141
+ },
142
+ {
143
+ title: t("Edit my profile"),
144
+ class: "octopus-dropdown-item",
145
+ path: "/main/priv/edit/profile",
146
+ condition: true,
147
+ },
148
+ {
149
+ title: t("Edit my organisation"),
150
+ class: "octopus-dropdown-item",
151
+ path: "/main/priv/edit/organisation",
152
+ condition:
153
+ isAuthenticatedWithOrga.value &&
154
+ (authStore.isRoleOrganisation || 1 < organisationsAvailable.value.length),
155
+ },
156
+ ];
157
+ });
158
+
159
+ </script>
@@ -48,8 +48,11 @@ import { useI18n } from "vue-i18n";
48
48
  //Props
49
49
  defineProps({
50
50
  idModal: { default: undefined, type: String },
51
+ /** The title of the modal */
51
52
  titleModal: { default: undefined, type: String },
53
+ /** If false, the modal won't display a close button (default: true) */
52
54
  closable: { default: true, type: Boolean },
55
+ /** If true, the modal can be reduced to show only the header (default: false) */
53
56
  canBeReduced: { default: false, type: Boolean },
54
57
  })
55
58
 
@@ -79,6 +82,7 @@ function closePopup(): void {
79
82
  emit("close");
80
83
  }
81
84
  </script>
85
+
82
86
  <style lang="scss">
83
87
 
84
88
  .octopus-app .octopus-modal.octopus-modal-top-layer{
@@ -39,6 +39,7 @@
39
39
  </button>
40
40
  </div>
41
41
  </template>
42
+
42
43
  <script setup lang="ts">
43
44
  import ChevronUpIcon from "vue-material-design-icons/ChevronUp.vue";
44
45
  import WindowCloseIcon from "vue-material-design-icons/WindowClose.vue";
@@ -52,6 +52,7 @@
52
52
  </template>
53
53
  </section>
54
54
  </template>
55
+
55
56
  <script setup lang="ts">
56
57
  import {usePlayerLogic} from "../../composable/player/usePlayerLogic";
57
58
  import { usePlayerStore } from "../../../stores/PlayerStore";
@@ -22,7 +22,6 @@
22
22
  :height="imageWidth"
23
23
  aria-hidden="true"
24
24
  alt=""
25
-
26
25
  :title="t('Episode name image', { name: podcastDisplay?.title })"
27
26
  class="player-image"
28
27
  :class="imageWidth > 50 ? 'big-player-image' : ''"
@@ -89,7 +89,7 @@ onUnmounted(()=>{
89
89
  async function fetchCurrentlyPlaying(): Promise<void> {
90
90
  fetchRadioMetadata(
91
91
  playerStore.playerRadio?.canalId ?? 0,
92
- playerStore.playerRadio?.metadata.title ?? "",
92
+ playerStore.playerRadio?.metadata?.title ?? "",
93
93
  updateMetadata,
94
94
  updateAdvertising,
95
95
  );
@@ -98,11 +98,11 @@ function updateAdvertising(nextAdvertising: NextAdvertising): void {
98
98
  playerStore.playerRadioUpdateNextAdvertising(nextAdvertising);
99
99
  }
100
100
  function updateMetadata(
101
- metadata: MediaRadio,
101
+ metadata: MediaRadio|undefined,
102
102
  podcast: Podcast | undefined,
103
103
  history: Array<MediaRadio>,
104
104
  ): void {
105
- playerStore.playerMetadata(metadata, history);
105
+ playerStore.playerMetadata(metadata, history); //TODO
106
106
  playerStore.playerRadioPodcast(podcast);
107
107
  }
108
108
  </script>