Renames StoredDataUrls to Images
This commit is contained in:
@@ -37,7 +37,7 @@ const props = defineProps({
|
||||
const emits = defineEmits(['closeRequested'])
|
||||
|
||||
const selectedFile = ref("")
|
||||
const fileUrl = ref(props.creator.storedDataUrls.bannerPictureUrl)
|
||||
const fileUrl = ref(props.creator.images.banner)
|
||||
|
||||
const onFileSelected = () => {
|
||||
if (selectedFile.value) {
|
||||
@@ -61,7 +61,7 @@ const publish = async () => {
|
||||
`/api/creators/${props.creator.id}/banner`,
|
||||
formData)
|
||||
|
||||
props.creator.storedDataUrls.bannerPictureUrl = fileUrl
|
||||
props.creator.images.banner = fileUrl
|
||||
emits('closeRequested')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
@@ -37,7 +37,7 @@ const props = defineProps({
|
||||
const emits = defineEmits(['closeRequested'])
|
||||
|
||||
const selectedFile = ref("")
|
||||
const fileUrl = ref(props.creator.storedDataUrls.profilePictureUrl)
|
||||
const fileUrl = ref(props.creator.images.logo)
|
||||
|
||||
const onFileSelected = () => {
|
||||
if (selectedFile.value) {
|
||||
@@ -61,7 +61,7 @@ const publish = async () => {
|
||||
`/api/creators/${props.creator.id}/logo`,
|
||||
formData)
|
||||
|
||||
props.creator.storedDataUrls.profilePictureUrl = fileUrl
|
||||
props.creator.images.logoUrl = fileUrl
|
||||
emits('closeRequested')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
@@ -69,7 +69,7 @@ const closeDialog = () => {
|
||||
<button>
|
||||
<img
|
||||
@click="openDialog('BannerPicker')"
|
||||
:src="userStore.creator.storedDataUrls.bannerPictureUrl"
|
||||
:src="userStore.creator.images.banner"
|
||||
class="w-full transition duration-200 ease-in-out transform hover:brightness-125"
|
||||
alt="Tutorial Banner"
|
||||
>
|
||||
@@ -85,7 +85,7 @@ const closeDialog = () => {
|
||||
<img
|
||||
@click="openDialog('LogoPicker')"
|
||||
class="custom-border hover:brightness-125 active:bg-gray-600 shadow flex items-center transition duration-200 ease-in-out w-48 h-48 rounded-full"
|
||||
:src="userStore.creator.storedDataUrls.profilePictureUrl"
|
||||
:src="userStore.creator.images.logo"
|
||||
alt="Profile Image"
|
||||
>
|
||||
</button>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<!--Banner-->
|
||||
<div>
|
||||
<img class=" w-full drop-shadow-[0_15px_10px_rgba(0,0,0,0.7)]"
|
||||
:src="creator.storedDataUrls.bannerPictureUrl || '/images/hutopymedia/banners/tutorialbanner.png'"
|
||||
:src="creator.images.banner"
|
||||
alt="Profile Banner" style="max-height: 425px">
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="absolute lg:ml-72 transform -translate-y-1/2 lg:-translate-y-1/2 z-20">
|
||||
<img
|
||||
class="rounded-full border-solid border-2 z-20 lg:max-w-[200px] max-w-[200px] h-auto"
|
||||
:src="creator.storedDataUrls.profilePictureUrl"
|
||||
:src="creator.images.logo"
|
||||
alt="Profile Picture"
|
||||
:style="{ borderColor: creator.profileColors.accent || '#A30E79', height: '150px' /* Adjust the height here */ }"
|
||||
/>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="flex justify-center text-2xl ">Photo de profil</div>
|
||||
</div>
|
||||
<div class="flex justify-center py-4">
|
||||
<img :src="profilePictureUrl"
|
||||
<img :src="logoImageUrl"
|
||||
:style="{ borderColor: user.profileColors.accent || '#23393B' , borderWidth: '3px', borderStyle: 'solid' }"
|
||||
class="rounded-full max-w-48 max-w-48"
|
||||
@error="handleProfileImageError"
|
||||
@@ -95,8 +95,8 @@ const props = defineProps({
|
||||
user: {}
|
||||
});
|
||||
|
||||
const bannerImageUrl = ref(props.user.storedDataUrls.bannerPictureUrl);
|
||||
const profilePictureUrl = ref(props.user.storedDataUrls.profilePictureUrl);
|
||||
const bannerImageUrl = ref(props.user.images.banner);
|
||||
const logoImageUrl = ref(props.user.images.logo);
|
||||
|
||||
const bannerImage = ref(null);
|
||||
const profilePicture = ref(null);
|
||||
@@ -130,7 +130,7 @@ const onProfileFileChange = (event) => {
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
profilePictureUrl.value = e.target.result;
|
||||
logoImageUrl.value = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
emit('updateProfilePicture', file);
|
||||
|
||||
Reference in New Issue
Block a user