Adds PhotoAlbum, CreatorHome, AboutCreator.
This commit is contained in:
@@ -94,7 +94,7 @@ const emits = defineEmits(['closeRequested'])
|
||||
|
||||
const fileInput = ref(null)
|
||||
const selectedFile = ref(null)
|
||||
const fileUrl = ref(props.creator.images.logo)
|
||||
const fileUrl = ref(props.creator.portraitUrl)
|
||||
const fallbackUrl = '/images/usersmedia/HutopyProfile/profilepictures/profileHutopyProfile01.png'
|
||||
const errorMessage = ref('')
|
||||
const showCropper = ref(false)
|
||||
@@ -180,7 +180,10 @@ const publish = async () => {
|
||||
}
|
||||
)
|
||||
|
||||
props.creator.images.logo = `${response.data.blobUrl}?t=${Date.now()}`
|
||||
props.creator.portraitUrl = `${response.data.blobUrl}?t=${Date.now()}`
|
||||
if (props.creator.portraitUrl) {
|
||||
fileUrl.value = props.creator.portraitUrl
|
||||
}
|
||||
emits('closeRequested')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -194,8 +197,8 @@ const publish = async () => {
|
||||
const cancel = () => {
|
||||
showCropper.value = false
|
||||
// Reset to original state if we were editing
|
||||
if (props.creator.images.logo) {
|
||||
fileUrl.value = props.creator.images.logo
|
||||
if (props.creator.portraitUrl) {
|
||||
fileUrl.value = props.creator.portraitUrl
|
||||
selectedFile.value = null
|
||||
} else {
|
||||
fileUrl.value = fallbackUrl
|
||||
|
||||
Reference in New Issue
Block a user