@saooti/octopus-sdk 40.2.2-SNAPSHOT → 40.2.2
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/plateform.conf +1 -1
- package/src/components/composable/useImageProxy.ts +4 -2
- package/src/components/display/podcasts/PodcastImage.vue +17 -9
- package/src/components/display/sharing/QrCode.vue +11 -8
- package/src/components/display/sharing/SharePlayerTypes.vue +6 -4
- package/src/components/misc/TopBar.vue +89 -99
- package/src/components/misc/TopBarMainContent.vue +2 -3
- package/src/locale/de.ts +1 -0
- package/src/locale/en.ts +1 -0
- package/src/locale/es.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/locale/it.ts +1 -0
- package/src/locale/sl.ts +1 -0
package/package.json
CHANGED
package/plateform.conf
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
@@ -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
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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("
|
|
5
|
+
{{ $t("Color of the QR Code") }}
|
|
6
6
|
</div>
|
|
7
7
|
<VSwatches
|
|
8
8
|
v-model:model-value="color"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:data-color="color"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
|
-
<qrcode-
|
|
18
|
+
<qrcode-svg
|
|
19
19
|
:value="url"
|
|
20
20
|
:size="size"
|
|
21
21
|
level="H"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
import { VSwatches } from "vue3-swatches";
|
|
35
35
|
import "vue3-swatches/dist/style.css";
|
|
36
36
|
import SnackBar from "../../misc/SnackBar.vue";
|
|
37
|
-
import
|
|
37
|
+
import { QrcodeSvg } from "qrcode.vue";
|
|
38
38
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
39
39
|
import { mapActions } from "pinia";
|
|
40
40
|
import { defineComponent } from "vue";
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
|
|
44
44
|
components: {
|
|
45
45
|
SnackBar,
|
|
46
|
-
|
|
46
|
+
QrcodeSvg,
|
|
47
47
|
VSwatches,
|
|
48
48
|
},
|
|
49
49
|
props: {
|
|
@@ -62,12 +62,15 @@ export default defineComponent({
|
|
|
62
62
|
methods: {
|
|
63
63
|
...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
|
|
64
64
|
download(): void {
|
|
65
|
-
const link = document.createElement("a");
|
|
66
|
-
link.download = "qrcode.png";
|
|
67
65
|
const canvas = document.getElementsByClassName("myQrCode");
|
|
68
66
|
if (canvas && canvas.length > 0 && canvas[0]) {
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
var svgData = canvas[0].outerHTML;
|
|
68
|
+
var svgBlob = new Blob([svgData], {type:"image/svg+xml;charset=utf-8"});
|
|
69
|
+
var svgUrl = URL.createObjectURL(svgBlob);
|
|
70
|
+
var downloadLink = document.createElement("a");
|
|
71
|
+
downloadLink.href = svgUrl;
|
|
72
|
+
downloadLink.download = "qrcode.svg";
|
|
73
|
+
downloadLink.click();
|
|
71
74
|
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
72
75
|
this.$t("Download started"),
|
|
73
76
|
);
|
|
@@ -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
|
-
|
|
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="
|
|
4
|
-
:
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
</
|
|
26
|
-
</
|
|
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,72 @@ export default defineComponent({
|
|
|
140
162
|
</script>
|
|
141
163
|
|
|
142
164
|
<style lang="scss">
|
|
143
|
-
|
|
144
|
-
|
|
145
165
|
.octopus-app {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
+
&.header-img-bg{
|
|
179
|
+
background-position: center -20vw;
|
|
168
180
|
background-repeat: no-repeat;
|
|
169
181
|
background-size: cover;
|
|
170
|
-
width: 100%;
|
|
171
|
-
position: absolute;
|
|
172
|
-
transition: height 0.7s;
|
|
173
182
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&.content-top-bar.scrolled {
|
|
185
|
-
height: 5rem;
|
|
186
|
-
|
|
187
|
-
.page-element-bg {
|
|
188
|
-
height: 5rem;
|
|
189
|
-
}
|
|
183
|
+
&.header-color-bg{
|
|
184
|
+
background: var(--octopus-primary);
|
|
185
|
+
background: linear-gradient(
|
|
186
|
+
90deg,
|
|
187
|
+
var(--octopus-primary) 0%,
|
|
188
|
+
var(--octopus-tertiary) 100%
|
|
189
|
+
);
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
position: relative;
|
|
191
|
+
&.header-color-bg, &.scrolled{
|
|
192
|
+
box-shadow: 0 2px 15px 5px var(--octopus-shadow) !important;
|
|
194
193
|
}
|
|
195
|
-
|
|
194
|
+
}
|
|
195
|
+
.header-content-bg{
|
|
196
|
+
background-position: center calc(calc(var(--header-size) * -1) - 20vw);
|
|
197
|
+
background-repeat: no-repeat;
|
|
198
|
+
background-size: cover;
|
|
199
|
+
width: 100%;
|
|
200
|
+
display: flex;
|
|
201
|
+
transition: height 0.7s;
|
|
202
|
+
height: calc(var(--header-additional-content-size) - var(--header-size));
|
|
196
203
|
&.scrolled {
|
|
197
|
-
|
|
198
|
-
position: sticky;
|
|
199
|
-
top: 0;
|
|
204
|
+
height: 0rem;
|
|
200
205
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
206
|
+
}
|
|
207
|
+
.header-additional-content{
|
|
208
|
+
display: flex;
|
|
209
|
+
flex-direction: column;
|
|
210
|
+
flex-grow: 1;
|
|
211
|
+
}
|
|
212
|
+
.header-additional-content, .header-opacity{
|
|
213
|
+
background: oklch(0 0 0 / 0.5);
|
|
214
|
+
}
|
|
215
|
+
.header-force-blur .header-additional-content, .header-force-blur .header-opacity{
|
|
216
|
+
backdrop-filter: blur(8px);
|
|
217
|
+
}
|
|
218
|
+
.header-content{
|
|
219
|
+
*:focus-visible {
|
|
220
|
+
box-shadow: 0 0 10px 1px white !important;
|
|
204
221
|
}
|
|
205
|
-
|
|
206
222
|
h1 {
|
|
207
223
|
color: white !important;
|
|
208
224
|
font-size: 1.8rem;
|
|
209
225
|
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 {
|
|
226
|
+
@media (width <= 550px) {
|
|
226
227
|
font-size: 1rem;
|
|
227
228
|
margin: 1rem 0.5rem 0.5rem;
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
-
&.content-top-bar {
|
|
231
|
-
height: 13rem;
|
|
232
|
-
|
|
233
|
-
.page-element-bg {
|
|
234
|
-
height: 13rem;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
230
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
231
|
.admin-button:hover,
|
|
242
232
|
.share-btn:hover {
|
|
243
233
|
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
|
-
|
|
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
package/src/locale/en.ts
CHANGED
package/src/locale/es.ts
CHANGED
package/src/locale/fr.ts
CHANGED
package/src/locale/it.ts
CHANGED