Fixes fixe update title, Fixe banner and logo picker, fixe color, fixe homepage
This commit is contained in:
@@ -178,7 +178,7 @@ onBeforeUnmount(() => {
|
|||||||
class="rounded-b-2xl -mt-3 h-12 px-36 flex flex-col items-center justify-center"
|
class="rounded-b-2xl -mt-3 h-12 px-36 flex flex-col items-center justify-center"
|
||||||
:style="{ backgroundColor: brandingStore.colors.secondary, boxShadow: '0 5px 20px rgba(0, 0, 0, 0.3)' }"
|
:style="{ backgroundColor: brandingStore.colors.secondary, boxShadow: '0 5px 20px rgba(0, 0, 0, 0.3)' }"
|
||||||
>
|
>
|
||||||
<div class="flex justify-evenly mt-3 w-full">
|
<div class="flex justify-evenly mt-4 w-full">
|
||||||
<div class="flex flex-row space-x-6 justify-center">
|
<div class="flex flex-row space-x-6 justify-center">
|
||||||
<a
|
<a
|
||||||
v-for="socialNetwork in GetSocialsUrls()"
|
v-for="socialNetwork in GetSocialsUrls()"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div v-if="isMobile">
|
<div v-if="isMobile">
|
||||||
<div class="shadow-lg rounded-2xl ">
|
<div class="shadow-lg rounded-2xl ">
|
||||||
<div class="relative z-20">
|
<div class="relative z-20">
|
||||||
<div class="min-h-8 shadow-2xl flex items-center px-2 py-2 borde "
|
<div class="shadow-2xl flex items-center px-2 py-2"
|
||||||
:style="{ backgroundColor: branding.colors.primary, color: branding.colors.onPrimary }">
|
:style="{ backgroundColor: branding.colors.primary, color: branding.colors.onPrimary }">
|
||||||
|
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
|
|||||||
@@ -23,15 +23,13 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Titre principal -->
|
<!-- Titre principal -->
|
||||||
<div v-if="isEditMode">
|
<div v-if="isEditMode">
|
||||||
<div class="text-2xl py-2"> Titre</div>
|
<div class="text-2xl py-2"> Titre</div>
|
||||||
<textarea v-model="editableMainTitle" class="w-full p-2 border rounded-md h-24"
|
<textarea v-model="editableMainTitle" class="w-full p-2 border rounded-md h-24"
|
||||||
:style="{ backgroundColor: brandingStore.colors.secondary, color: brandingStore.colors.onSecondary }"></textarea>
|
:style="{ backgroundColor: brandingStore.colors.secondary, color: brandingStore.colors.onSecondary }"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<h1 v-else-if="mainTitle" class="text-2xl font-bold text-center ">{{ mainTitle }}</h1>
|
<h1 v-else-if="mainTitle" class="text-4xl font-bold text-center ">{{ mainTitle }}</h1>
|
||||||
|
|
||||||
<!-- Image principale -->
|
<!-- Image principale -->
|
||||||
<div class="relative flex justify-center">
|
<div class="relative flex justify-center">
|
||||||
@@ -43,7 +41,9 @@
|
|||||||
</label>
|
</label>
|
||||||
<img v-else-if="mainImageUrl" :src="mainImageUrl"
|
<img v-else-if="mainImageUrl" :src="mainImageUrl"
|
||||||
alt="Image principale"
|
alt="Image principale"
|
||||||
class="rounded-md max-w-full h-auto"/>
|
class="rounded-md max-w-full h-auto cursor-pointer"
|
||||||
|
@click="openFullscreen(mainImageUrl)"/>
|
||||||
|
|
||||||
<button v-if="isEditMode" @click="deleteImage('mainImageUrl')"
|
<button v-if="isEditMode" @click="deleteImage('mainImageUrl')"
|
||||||
class="absolute top-10 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
class="absolute top-10 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
||||||
X
|
X
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<!-- 4 images côte à côte -->
|
<!-- 4 images côte à côte -->
|
||||||
|
<FullscreenImage ref="fullscreenImage" :image-url="currentImage" />
|
||||||
<div>
|
<div>
|
||||||
<div v-if="isEditMode" class="text-2xl py-2">Images</div>
|
<div v-if="isEditMode" class="text-2xl py-2">Images</div>
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-4">
|
<div class="grid grid-cols-1 gap-4 md:grid-cols-4">
|
||||||
@@ -129,9 +129,9 @@
|
|||||||
alt="Image 1"
|
alt="Image 1"
|
||||||
class="rounded-md max-w-full h-auto cursor-pointer" />
|
class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
</label>
|
</label>
|
||||||
<img v-else-if="image1Url" :src="image1Url"
|
<div v-if="image1Url" @click="openFullscreen(image1Url)">
|
||||||
alt="Image 1"
|
<img :src="image1Url" alt="Image 1" class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
class="rounded-md max-w-full h-auto" />
|
</div>
|
||||||
<button v-if="isEditMode" @click="deleteImage('image1Url')"
|
<button v-if="isEditMode" @click="deleteImage('image1Url')"
|
||||||
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
||||||
X
|
X
|
||||||
@@ -146,9 +146,9 @@
|
|||||||
alt="Image 2"
|
alt="Image 2"
|
||||||
class="rounded-md max-w-full h-auto cursor-pointer" />
|
class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
</label>
|
</label>
|
||||||
<img v-else-if="image2Url" :src="image2Url"
|
<div v-if="image2Url" @click="openFullscreen(image2Url)">
|
||||||
alt="Image 2"
|
<img :src="image2Url" alt="Image 2" class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
class="rounded-md max-w-full h-auto" />
|
</div>
|
||||||
<button v-if="isEditMode" @click="deleteImage('image2Url')"
|
<button v-if="isEditMode" @click="deleteImage('image2Url')"
|
||||||
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
||||||
X
|
X
|
||||||
@@ -163,9 +163,9 @@
|
|||||||
alt="Image 3"
|
alt="Image 3"
|
||||||
class="rounded-md max-w-full h-auto cursor-pointer" />
|
class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
</label>
|
</label>
|
||||||
<img v-else-if="image3Url" :src="image3Url"
|
<div v-if="image3Url" @click="openFullscreen(image3Url)">
|
||||||
alt="Image 3"
|
<img :src="image3Url" alt="Image 3" class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
class="rounded-md max-w-full h-auto" />
|
</div>
|
||||||
<button v-if="isEditMode" @click="deleteImage('image3Url')"
|
<button v-if="isEditMode" @click="deleteImage('image3Url')"
|
||||||
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
||||||
X
|
X
|
||||||
@@ -180,9 +180,9 @@
|
|||||||
alt="Image 4"
|
alt="Image 4"
|
||||||
class="rounded-md max-w-full h-auto cursor-pointer" />
|
class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
</label>
|
</label>
|
||||||
<img v-else-if="image4Url" :src="image4Url"
|
<div v-if="image4Url" @click="openFullscreen(image4Url)">
|
||||||
alt="Image 4"
|
<img :src="image4Url" alt="Image 4" class="rounded-md max-w-full h-auto cursor-pointer" />
|
||||||
class="rounded-md max-w-full h-auto" />
|
</div>
|
||||||
<button v-if="isEditMode" @click="deleteImage('image4Url')"
|
<button v-if="isEditMode" @click="deleteImage('image4Url')"
|
||||||
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600">
|
||||||
X
|
X
|
||||||
@@ -301,12 +301,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ref, onMounted, computed} from "vue";
|
import {ref, onMounted, computed} from "vue";
|
||||||
import { useClient } from "@/plugins/api.js";
|
import { useClient } from "@/plugins/api.js";
|
||||||
|
|
||||||
import {useBrandingStore} from "@/stores/brandingStore.js";
|
import {useBrandingStore} from "@/stores/brandingStore.js";
|
||||||
import {useAuthStore} from "@/stores/authStore.js";
|
import {useAuthStore} from "@/stores/authStore.js";
|
||||||
import { useCreatorProfileStore } from "@/stores/creatorProfileStore.js";
|
import { useCreatorProfileStore } from "@/stores/creatorProfileStore.js";
|
||||||
import { useDisplay } from "vuetify";
|
import { useDisplay } from "vuetify";
|
||||||
import { watch} from "vue";
|
import { watch} from "vue";
|
||||||
|
import FullscreenImage from "@/views/creators/FullscreenImage.vue";
|
||||||
|
|
||||||
const { smAndDown } = useDisplay();
|
const { smAndDown } = useDisplay();
|
||||||
const isMobileView = ref(smAndDown.value);
|
const isMobileView = ref(smAndDown.value);
|
||||||
@@ -322,6 +322,14 @@ const isEditMode = ref(false);
|
|||||||
|
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
|
|
||||||
|
const currentImage = ref("");
|
||||||
|
const fullscreenImage = ref(null);
|
||||||
|
|
||||||
|
function openFullscreen(imageUrl) {
|
||||||
|
currentImage.value = imageUrl;
|
||||||
|
fullscreenImage.value.open();
|
||||||
|
}
|
||||||
|
|
||||||
watch(smAndDown, (newVal) => {
|
watch(smAndDown, (newVal) => {
|
||||||
isMobileView.value = newVal;
|
isMobileView.value = newVal;
|
||||||
});
|
});
|
||||||
|
|||||||
58
src/views/creators/FullscreenImage.vue
Normal file
58
src/views/creators/FullscreenImage.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<v-dialog v-model="isVisible" fullscreen hide-overlay transition="fade-transition">
|
||||||
|
<v-card class="pa-0" :style="{ backgroundColor: brandingStore.colors.background, color: brandingStore.colors.onBackground }">
|
||||||
|
<v-btn
|
||||||
|
class="close-button"
|
||||||
|
icon
|
||||||
|
:style="{ backgroundColor: brandingStore.colors.secondary, color: brandingStore.colors.onSecondary }"
|
||||||
|
@click="close"
|
||||||
|
>
|
||||||
|
<v-icon>mdi-close</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
<v-img :src="imageUrl" class="fullscreen-image"></v-img>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {ref} from "vue";
|
||||||
|
import {useBrandingStore} from "@/stores/brandingStore.js";
|
||||||
|
|
||||||
|
const brandingStore = useBrandingStore();
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
imageUrl: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const isVisible = ref(false);
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
isVisible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
isVisible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.fullscreen-image {
|
||||||
|
height: 100vh;
|
||||||
|
width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 50px;
|
||||||
|
right: 50px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
:src="fileUrl"
|
:src="fileUrl || fallbackUrl"
|
||||||
class="mb-5 w-full transition duration-200 ease-in-out transform"
|
class="mb-5 w-full transition duration-200 ease-in-out transform"
|
||||||
alt="Aperçu de la bannière"
|
alt="Aperçu de la bannière"
|
||||||
>
|
>
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
<v-btn color="black" variant="text" @click="cancel">Annuler</v-btn>
|
<v-btn color="black" variant="text" @click="cancel">Annuler</v-btn>
|
||||||
<v-btn color="#A6147D" @click="publish">Enregistrer</v-btn>
|
<v-btn color="#A6147D" @click="publish">Enregistrer</v-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -38,6 +37,7 @@ const emits = defineEmits(['closeRequested'])
|
|||||||
|
|
||||||
const selectedFile = ref({})
|
const selectedFile = ref({})
|
||||||
const fileUrl = ref(props.creator.images.banner)
|
const fileUrl = ref(props.creator.images.banner)
|
||||||
|
const fallbackUrl = '/images/hutopymedia/banners/hutopyul.png'
|
||||||
|
|
||||||
const onFileSelected = () => {
|
const onFileSelected = () => {
|
||||||
if (selectedFile.value) {
|
if (selectedFile.value) {
|
||||||
@@ -54,12 +54,13 @@ const onFileSelected = () => {
|
|||||||
const client = useClient()
|
const client = useClient()
|
||||||
const publish = async () => {
|
const publish = async () => {
|
||||||
try {
|
try {
|
||||||
const formData = new FormData();
|
const formData = new FormData()
|
||||||
formData.append('file', selectedFile.value)
|
formData.append('file', selectedFile.value)
|
||||||
|
|
||||||
await client.post(
|
await client.post(
|
||||||
`/api/creators/${props.creator.id}/banner`,
|
`/api/creators/${props.creator.id}/banner`,
|
||||||
formData)
|
formData
|
||||||
|
)
|
||||||
|
|
||||||
props.creator.images.banner = fileUrl
|
props.creator.images.banner = fileUrl
|
||||||
emits('closeRequested')
|
emits('closeRequested')
|
||||||
@@ -71,5 +72,4 @@ const publish = async () => {
|
|||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
emits('closeRequested')
|
emits('closeRequested')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
62
src/views/profile/creators/ChangeTitle.vue
Normal file
62
src/views/profile/creators/ChangeTitle.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useClient } from '@/plugins/api.js';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
creator: {
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(['closeRequested']);
|
||||||
|
|
||||||
|
const title = ref(props.creator.title);
|
||||||
|
|
||||||
|
const client = useClient();
|
||||||
|
|
||||||
|
const save = async () => {
|
||||||
|
try {
|
||||||
|
await client.post(
|
||||||
|
`/api/creators/${props.creator.id}/title`,
|
||||||
|
{
|
||||||
|
title: title.value
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
props.creator.title = title.value;
|
||||||
|
emits('closeRequested');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error saving title:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const cancel = () => {
|
||||||
|
emits('closeRequested');
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="pb-5 text-2xl">Modifier le Titre</div>
|
||||||
|
<div class="flex flex-col space-y-4">
|
||||||
|
<v-text-field
|
||||||
|
variant="outlined"
|
||||||
|
v-model="title"
|
||||||
|
label="Titre"
|
||||||
|
outlined
|
||||||
|
></v-text-field>
|
||||||
|
|
||||||
|
<div class="flex justify-end space-x-4">
|
||||||
|
<v-btn color="black" variant="text" @click="cancel">Annuler</v-btn>
|
||||||
|
<v-btn color="#A6147D" @click="save">Enregistrer</v-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.space-y-4 > * + * {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,6 +9,7 @@ import CreateCreator from "./CreateCreator.vue";
|
|||||||
import {useClient} from "@/plugins/api.js";
|
import {useClient} from "@/plugins/api.js";
|
||||||
import {useCreatorProfileStore} from "@/stores/creatorProfileStore.js";
|
import {useCreatorProfileStore} from "@/stores/creatorProfileStore.js";
|
||||||
import {useUserProfileStore} from "@/stores/userProfileStore.js";
|
import {useUserProfileStore} from "@/stores/userProfileStore.js";
|
||||||
|
import ChangeTitle from "@/views/profile/creators/ChangeTitle.vue";
|
||||||
|
|
||||||
const creatorProfileStore = useCreatorProfileStore()
|
const creatorProfileStore = useCreatorProfileStore()
|
||||||
const imageBanner = computed(() => creatorProfileStore.creator.images.banner || '/images/placeholders/banner.png')
|
const imageBanner = computed(() => creatorProfileStore.creator.images.banner || '/images/placeholders/banner.png')
|
||||||
@@ -22,7 +23,8 @@ const componentsMap = {
|
|||||||
LogoPicker,
|
LogoPicker,
|
||||||
Socials,
|
Socials,
|
||||||
ColorsPicker,
|
ColorsPicker,
|
||||||
CreateCreator
|
CreateCreator,
|
||||||
|
ChangeTitle
|
||||||
};
|
};
|
||||||
|
|
||||||
async function requestAccept(creatorName) {
|
async function requestAccept(creatorName) {
|
||||||
@@ -100,7 +102,17 @@ const closeDialog = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full">
|
<div class="flex flex-col w-full">
|
||||||
<button
|
<button
|
||||||
|
@click="openDialog('ChangeTitle')"
|
||||||
|
class="HoverBtn active:bg-gray-300 py-2 px-4 border-gray-400 shadow flex items-center transition duration-200 ease-in-out w-full">
|
||||||
|
<span class="flex-none pa-2 min-w-32 text-left">{{ $t('creatorinfopage.title') }}</span>
|
||||||
|
<span class="flex-auto text-left pr-6 capitalize">{{ creatorProfileStore.creator.title }}</span>
|
||||||
|
<span class="flex-none">
|
||||||
|
<v-icon>mdi-chevron-right</v-icon>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col w-full">
|
||||||
|
<button
|
||||||
class="HoverBtn active:bg-gray-300 py-2 px-4 border-gray-400 shadow flex items-center transition duration-200 ease-in-out w-full rounded-b-2xl">
|
class="HoverBtn active:bg-gray-300 py-2 px-4 border-gray-400 shadow flex items-center transition duration-200 ease-in-out w-full rounded-b-2xl">
|
||||||
<span class="flex-none pa-2 min-w-32 text-left">Stripe Account</span>
|
<span class="flex-none pa-2 min-w-32 text-left">Stripe Account</span>
|
||||||
<span class="flex-auto text-left pr-6 capitalize">asdasd038338</span>
|
<span class="flex-auto text-left pr-6 capitalize">asdasd038338</span>
|
||||||
@@ -116,7 +128,6 @@ const closeDialog = () => {
|
|||||||
<div class="flex flex-col w-full gap-4">
|
<div class="flex flex-col w-full gap-4">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@click="openDialog('ColorsPicker')"
|
@click="openDialog('ColorsPicker')"
|
||||||
class="HoverBtn active:bg-gray-300 py-2 px-4 border-gray-400 shadow flex items-center transition duration-200 ease-in-out w-full">
|
class="HoverBtn active:bg-gray-300 py-2 px-4 border-gray-400 shadow flex items-center transition duration-200 ease-in-out w-full">
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
<div class="flex justify-center mb-5">
|
<div class="flex justify-center mb-5">
|
||||||
<img
|
<img
|
||||||
:src="fileUrl"
|
:src="fileUrl || fallbackUrl"
|
||||||
class="w-full transition duration-200 ease-in-out transform max-w-[400px]"
|
class="w-full transition duration-200 ease-in-out transform max-w-[400px]"
|
||||||
alt="Aperçu de la bannière"
|
alt="Aperçu du logo"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
<v-btn color="black" variant="text" @click="cancel">Annuler</v-btn>
|
<v-btn color="black" variant="text" @click="cancel">Annuler</v-btn>
|
||||||
<v-btn color="#A6147D" @click="publish">Enregistrer</v-btn>
|
<v-btn color="#A6147D" @click="publish">Enregistrer</v-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useClient } from '@/plugins/api.js'
|
import { useClient } from '@/plugins/api.js'
|
||||||
@@ -40,6 +40,7 @@ const emits = defineEmits(['closeRequested'])
|
|||||||
|
|
||||||
const selectedFile = ref("")
|
const selectedFile = ref("")
|
||||||
const fileUrl = ref(props.creator.images.logo)
|
const fileUrl = ref(props.creator.images.logo)
|
||||||
|
const fallbackUrl = '/images/usersmedia/HutopyProfile/profilepictures/profileHutopyProfile01.png' // Chemin de votre image de secours
|
||||||
|
|
||||||
const onFileSelected = () => {
|
const onFileSelected = () => {
|
||||||
if (selectedFile.value) {
|
if (selectedFile.value) {
|
||||||
@@ -63,8 +64,8 @@ const publish = async () => {
|
|||||||
`/api/creators/${props.creator.id}/logo`,
|
`/api/creators/${props.creator.id}/logo`,
|
||||||
formData)
|
formData)
|
||||||
|
|
||||||
props.creator.images.logoUrl = fileUrl
|
props.creator.images.logo = fileUrl.value;
|
||||||
emits('closeRequested')
|
emits('closeRequested');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
@@ -73,5 +74,5 @@ const publish = async () => {
|
|||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
emits('closeRequested')
|
emits('closeRequested')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user