@saooti/octopus-sdk 40.2.3-SNAPSHOT → 40.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "40.2.3-SNAPSHOT",
3
+ "version": "40.2.4",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/plateform.conf CHANGED
@@ -1 +1 @@
1
- preprod.saooti.org
1
+ dev2.saooti.org
@@ -3,7 +3,7 @@ export const useImageProxy = ()=>{
3
3
 
4
4
  const apiStore = useApiStore();
5
5
 
6
- function useProxyImageUrl(url: string|undefined, width: string, height?: string): string {
6
+ function useProxyImageUrl(url: string|undefined, width: string, height?: string, blur=false): string {
7
7
  if (!url) {
8
8
  return "";
9
9
  }
@@ -13,10 +13,12 @@ export const useImageProxy = ()=>{
13
13
  return (
14
14
  apiStore.imageUrl +
15
15
  "image/" +
16
+ (blur ? "noRedirect/":"")+
16
17
  encode +
17
18
  "?" +
18
19
  size +
19
- "&useWebp=true"
20
+ "&useWebp=true"+
21
+ (blur ? "&blur=true":"")
20
22
  );
21
23
  }
22
24
  return url;
@@ -175,35 +175,9 @@ export default defineComponent({
175
175
  margin-right: -18px;
176
176
  animation: fadein 1s;
177
177
  }
178
-
179
- @keyframes fadein {
180
- from {
181
- opacity: 0;
182
- }
183
-
184
- to {
185
- opacity: 1;
186
- }
187
- }
188
-
189
- @keyframes fadein {
190
- from {
191
- opacity: 0;
192
- }
193
-
194
- to {
195
- opacity: 1;
196
- }
197
- }
198
-
199
178
  @keyframes fadein {
200
- from {
201
- opacity: 0;
202
- }
203
-
204
- to {
205
- opacity: 1;
206
- }
179
+ from { opacity: 0; }
180
+ to { opacity: 1; }
207
181
  }
208
182
  }
209
183
  </style>
@@ -3,15 +3,23 @@
3
3
  v-if="podcast"
4
4
  class="img-box img-box-podcast mb-3 flex-column justify-content-start align-items-start position-relative flex-shrink-0 float-start"
5
5
  >
6
- <img
7
- v-lazy="useProxyImageUrl(podcast.imageUrl, '270')"
8
- width="270"
9
- height="270"
10
- role="presentation"
11
- alt=""
12
- class="img-box img-box-podcast"
13
- :title="$t('Episode name image', { name: podcast.title })"
14
- />
6
+ <router-link
7
+ :to="{
8
+ name: 'podcast',
9
+ params: { podcastId: podcast.podcastId },
10
+ }"
11
+ :title="$t('Episode name page', { name: podcast.title })"
12
+ >
13
+ <img
14
+ v-lazy="useProxyImageUrl(podcast.imageUrl, '270')"
15
+ width="270"
16
+ height="270"
17
+ role="presentation"
18
+ alt=""
19
+ class="img-box img-box-podcast"
20
+ :title="$t('Episode name image', { name: podcast.title })"
21
+ />
22
+ </router-link>
15
23
  <div
16
24
  v-if="isPodcastmaker"
17
25
  :class="mainRubrique ? 'mainRubrique' : 'notMainRubrique'"
@@ -2,7 +2,7 @@
2
2
  <div class="d-flex flex-column align-items-center">
3
3
  <div class="d-flex align-items-center mb-3">
4
4
  <div class="form-label me-3">
5
- {{ $t("Choose color") }}
5
+ {{ $t("Color of the QR Code") }}
6
6
  </div>
7
7
  <VSwatches
8
8
  v-model:model-value="color"
@@ -123,14 +123,16 @@ export default defineComponent({
123
123
  },
124
124
  },
125
125
  created() {
126
- if (this.isVideoPodcast) {
127
- this.$emit("update:iFrameModel", "video");
128
- }
129
126
  if (this.isLive) {
130
127
  return;
131
128
  }
132
129
  this.initCustomPlayers();
133
130
  },
131
+ mounted(){
132
+ if (this.isVideoPodcast) {
133
+ this.$emit("update:iFrameModel", "video");
134
+ }
135
+ },
134
136
  methods: {
135
137
  isNumeric(value: string): boolean {
136
138
  return /^-?\d+$/.test(value);
@@ -190,7 +192,7 @@ export default defineComponent({
190
192
  const customPlayersForType = await this.fetchPlayerPaginate(type);
191
193
  this.customPlayers = this.customPlayers.concat(customPlayersForType);
192
194
  if (
193
- "video" !== this.iFrameModel &&
195
+ !this.isVideoPodcast &&
194
196
  selectIfPossible &&
195
197
  customPlayersForType?.[0]?.selected
196
198
  ) {
@@ -1,29 +1,31 @@
1
1
  <template>
2
2
  <header
3
- class="top-bar-container"
4
- :class="{ scrolled: scrolled, 'content-top-bar': isContentToDisplay }"
3
+ class="header-saooti-play"
4
+ :style="headerBackgroundImage"
5
+ :class="[contentToDisplay ? 'header-img-bg':'header-color-bg', scrolled? 'scrolled':'', needToBlur ? 'header-force-blur':'']"
5
6
  >
6
7
  <TopBarMainContent
7
- class="top-bar-z-index"
8
8
  :is-phone="isPhone"
9
9
  :scrolled="scrolled"
10
10
  :title-display="titleToDisplay"
11
+ style="height: var(--header-size);"
12
+ :class="headerBackgroundImage.length ? 'header-opacity':''"
11
13
  />
12
- <template v-if="contentToDisplay">
13
- <div class="page-element-bg" :style="backgroundDisplay" />
14
- <h1 v-if="!scrolled" class="text-truncate top-bar-z-index">
14
+ </header>
15
+ <div v-if="contentToDisplay" class="header-content-bg" :style="headerBackgroundImage" :class="{ scrolled: scrolled, 'header-force-blur':needToBlur }" >
16
+ <div class="header-additional-content header-content">
17
+ <h1 v-if="!scrolled" class="text-truncate">
15
18
  {{ titleToDisplay }}
16
19
  </h1>
17
20
  <SubscribeButtons
18
21
  v-if="!isGarRole"
19
22
  v-show="!scrolled"
20
- class="top-bar-z-index"
21
23
  :emission="emissionObject"
22
24
  :playlist-id="contentToDisplay?.playlistId"
23
25
  :window-width="windowWidth"
24
26
  />
25
- </template>
26
- </header>
27
+ </div>
28
+ </div>
27
29
  </template>
28
30
 
29
31
  <script lang="ts">
@@ -38,6 +40,7 @@ import { Emission } from "@/stores/class/general/emission";
38
40
  import {useResizePhone} from "../composable/useResizePhone";
39
41
  import { Playlist } from "@/stores/class/general/playlist";
40
42
  import { Canal } from "@/stores/class/radio/canal";
43
+ import axios from "axios";
41
44
  const SubscribeButtons = defineAsyncComponent(
42
45
  () => import("../display/sharing/SubscribeButtons.vue"),
43
46
  );
@@ -58,6 +61,8 @@ export default defineComponent({
58
61
  scrolled: false as boolean,
59
62
  oldScrollY: 0 as number,
60
63
  minScroll: 0 as number,
64
+ headerBackgroundImage: "" as string,
65
+ needToBlur: false as boolean,
61
66
  };
62
67
  },
63
68
  computed: {
@@ -71,15 +76,6 @@ export default defineComponent({
71
76
  "radio" === this.$route.name
72
77
  );
73
78
  },
74
- backgroundDisplay(): string {
75
- if (!this.contentToDisplay) {
76
- return "";
77
- }
78
- return `background-image: url('${this.useProxyImageUrl(
79
- this.contentToDisplay.imageUrl,
80
- "270",
81
- )}');`;
82
- },
83
79
  titleToDisplay(): string {
84
80
  if ((this.contentToDisplay as Podcast)?.podcastId) {
85
81
  return (this.contentToDisplay as Podcast).emission.name;
@@ -105,6 +101,32 @@ export default defineComponent({
105
101
  return null;
106
102
  },
107
103
  },
104
+ watch:{
105
+ contentToDisplay: {
106
+ deep: true,
107
+ immediate: true,
108
+ async handler() {
109
+ if(!this.contentToDisplay){
110
+ this.headerBackgroundImage = "";
111
+ this.needToBlur = false;
112
+ return;
113
+ }
114
+ const proxyUrl = this.useProxyImageUrl(this.contentToDisplay.imageUrl,"270", undefined, true);
115
+ try {
116
+ const result = await axios.get(proxyUrl);
117
+ this.headerBackgroundImage = `background-image: url('${result.data}');`;
118
+ if(result.data !== this.contentToDisplay.imageUrl){
119
+ this.needToBlur = false;
120
+ }else{
121
+ this.needToBlur = true;
122
+ }
123
+ } catch {
124
+ this.headerBackgroundImage = this.contentToDisplay.imageUrl ? `background-image: url('${this.contentToDisplay.imageUrl}');` : "";
125
+ this.needToBlur = true;
126
+ }
127
+ },
128
+ },
129
+ },
108
130
  mounted() {
109
131
  window.addEventListener("scroll", this.handleScroll);
110
132
  },
@@ -140,104 +162,78 @@ export default defineComponent({
140
162
  </script>
141
163
 
142
164
  <style lang="scss">
143
-
144
-
145
165
  .octopus-app {
146
- .top-bar-container {
147
- *:focus-visible {
148
- box-shadow: 0 0 10px 1px white !important;
149
- }
150
-
151
- background: var(--octopus-primary);
152
- background: linear-gradient(
153
- 90deg,
154
- var(--octopus-primary) 0%,
155
- var(--octopus-tertiary) 100%
156
- );
157
- width: 100%;
158
- height: 5rem;
159
- display: flex;
160
- flex-direction: column;
161
- transition: height 0.7s;
162
- box-shadow: 0 2px 15px 5px var(--octopus-shadow) !important;
163
-
164
- .page-element-bg {
165
- opacity: 0.5;
166
- filter: blur(8px);
167
- background-position: center;
166
+ --header-size: 5rem;
167
+ --header-additional-content-size: 22rem;
168
+ @media (width <= 650px) {
169
+ --header-size: 3.5rem;
170
+ }
171
+ @media (width <= 550px) {
172
+ --header-additional-content-size: 13rem;
173
+ }
174
+ .header-saooti-play{
175
+ z-index: 11;
176
+ position: sticky;
177
+ top: 0;
178
+ background-color: black;
179
+ &.header-img-bg{
180
+ background-position: center -20vw;
168
181
  background-repeat: no-repeat;
169
182
  background-size: cover;
170
- width: 100%;
171
- position: absolute;
172
- transition: height 0.7s;
173
183
  }
174
-
175
- &.content-top-bar {
176
- height: 22rem;
177
- background: black;
178
-
179
- .page-element-bg {
180
- height: 22rem;
181
- }
184
+ &.header-color-bg{
185
+ background: var(--octopus-primary);
186
+ background: linear-gradient(
187
+ 90deg,
188
+ var(--octopus-primary) 0%,
189
+ var(--octopus-tertiary) 100%
190
+ );
182
191
  }
183
-
184
- &.content-top-bar.scrolled {
185
- height: 5rem;
186
-
187
- .page-element-bg {
188
- height: 5rem;
189
- }
192
+ &.header-color-bg, &.scrolled{
193
+ box-shadow: 0 2px 15px 5px var(--octopus-shadow) !important;
190
194
  }
191
-
192
- &:not(.scrolled) {
193
- position: relative;
195
+ }
196
+ .header-content-bg{
197
+ background-position: center calc(calc(var(--header-size) * -1) - 20vw);
198
+ background-repeat: no-repeat;
199
+ background-size: cover;
200
+ width: 100%;
201
+ display: flex;
202
+ background-color: black;
203
+ transition: height 0.7s;
204
+ height: calc(var(--header-additional-content-size) - var(--header-size));
205
+ @starting-style {
206
+ height: 0rem;
194
207
  }
195
-
196
208
  &.scrolled {
197
- z-index: 11;
198
- position: sticky;
199
- top: 0;
209
+ height: 0rem;
200
210
  }
201
-
202
- .top-bar-z-index {
203
- z-index: 1;
211
+ }
212
+ .header-additional-content{
213
+ display: flex;
214
+ flex-direction: column;
215
+ flex-grow: 1;
216
+ width: 100%;
217
+ }
218
+ .header-additional-content, .header-opacity{
219
+ background: oklch(0 0 0 / 0.5);
220
+ }
221
+ .header-force-blur .header-additional-content, .header-force-blur .header-opacity{
222
+ backdrop-filter: blur(8px);
223
+ }
224
+ .header-content{
225
+ *:focus-visible {
226
+ box-shadow: 0 0 10px 1px white !important;
204
227
  }
205
-
206
228
  h1 {
207
229
  color: white !important;
208
230
  font-size: 1.8rem;
209
231
  margin: 2rem 5rem;
210
- }
211
-
212
- @media (width <= 650px) {
213
- height: 3.5rem;
214
-
215
- &.content-top-bar.scrolled {
216
- height: 3.5rem;
217
-
218
- .page-element-bg {
219
- height: 3.5rem;
220
- }
221
- }
222
- }
223
-
224
- @media (width <= 550px) {
225
- h1 {
232
+ @media (width <= 550px) {
226
233
  font-size: 1rem;
227
234
  margin: 1rem 0.5rem 0.5rem;
228
235
  }
229
-
230
- &.content-top-bar {
231
- height: 13rem;
232
-
233
- .page-element-bg {
234
- height: 13rem;
235
- }
236
- }
237
236
  }
238
-
239
-
240
-
241
237
  .admin-button:hover,
242
238
  .share-btn:hover {
243
239
  background: white;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="top-bar-grid" :class="{ scrolled: titleIsDisplayed }">
2
+ <div class="top-bar-grid header-content" :class="{ scrolled: titleIsDisplayed }">
3
3
  <router-link
4
4
  class="top-bar-logo d-flex align-items-center"
5
5
  :to="{
@@ -294,8 +294,7 @@ export default defineComponent({
294
294
  .top-bar-grid {
295
295
  display: grid;
296
296
  grid-template-columns: 1fr 5fr;
297
- margin-top: 0.5rem;
298
- padding: 0 1rem;
297
+ padding: 0.5rem 1rem 0 1rem;
299
298
 
300
299
  &.scrolled {
301
300
  grid-template-columns: 1fr 2fr 1fr;
package/src/locale/de.ts CHANGED
@@ -414,4 +414,5 @@ export default {
414
414
  "And paste it in your newsletter":"Und fügen Sie es in Ihren Newsletter ein 😉",
415
415
  "Code copied!":"Code kopiert!",
416
416
  "Copied!":"Kopiert!",
417
+ "Color of the QR Code": "Farbe des QR-Codes",
417
418
  }
package/src/locale/en.ts CHANGED
@@ -417,4 +417,5 @@ export default {
417
417
  "And paste it in your newsletter":"And paste it in your newsletter 😉",
418
418
  "Code copied!":"Code copied!",
419
419
  "Copied!":"Copied!",
420
+ "Color of the QR Code": "Color of the QR Code",
420
421
  };
package/src/locale/es.ts CHANGED
@@ -415,4 +415,5 @@ export default {
415
415
  "And paste it in your newsletter":"Y pégalo en tu boletín informativo 😉",
416
416
  "Code copied!":"¡Código copiado!",
417
417
  "Copied!":"¡Copiado!",
418
+ "Color of the QR Code": "Color del código QR",
418
419
  }
package/src/locale/fr.ts CHANGED
@@ -424,4 +424,5 @@ export default {
424
424
  "And paste it in your newsletter":"Et collez-le dans votre newsletter 😉",
425
425
  "Code copied!":"Code copié !",
426
426
  "Copied!":"Copié !",
427
+ "Color of the QR Code": "Couleur du Qr Code",
427
428
  };
package/src/locale/it.ts CHANGED
@@ -411,4 +411,5 @@ export default{
411
411
  "And paste it in your newsletter":"E incollalo nella tua newsletter 😉",
412
412
  "Code copied!":"Codice copiato!",
413
413
  "Copied!":"Copiato!",
414
+ "Color of the QR Code": "Colore del codice QR",
414
415
  };
package/src/locale/sl.ts CHANGED
@@ -406,4 +406,5 @@ export default {
406
406
  "And paste it in your newsletter":"In ga prilepite v svoje glasilo 😉",
407
407
  "Code copied!":"Koda kopirana!",
408
408
  "Copied!":"Kopirano!",
409
+ "Color of the QR Code": "Barva kode QR",
409
410
  }