Adds PhotoAlbum, CreatorHome, AboutCreator.
This commit is contained in:
@@ -91,7 +91,7 @@ const emits = defineEmits(['closeRequested'])
|
||||
|
||||
const fileInput = ref(null)
|
||||
const selectedFile = ref(null)
|
||||
const fileUrl = ref(props.creator?.images?.banner)
|
||||
const fileUrl = ref(props.creator?.bannerUrl)
|
||||
const fallbackUrl = '/images/hutopymedia/banners/hutopyul.png'
|
||||
const errorMessage = ref('')
|
||||
const showCropper = ref(false)
|
||||
@@ -175,7 +175,8 @@ const publish = async () => {
|
||||
}
|
||||
)
|
||||
|
||||
props.creator.images.banner = `${response.data.blobUrl}?t=${Date.now()}`
|
||||
props.creator.bannerUrl = `${response.data.blobUrl}?t=${Date.now()}`
|
||||
fileUrl.value = props.creator.bannerUrl
|
||||
emits('closeRequested')
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -189,8 +190,8 @@ const publish = async () => {
|
||||
const cancel = () => {
|
||||
showCropper.value = false
|
||||
// Reset to original state if we were editing
|
||||
if (props.creator?.images?.banner) {
|
||||
fileUrl.value = props.creator.images.banner
|
||||
if (props.creator?.bannerUrl) {
|
||||
fileUrl.value = props.creator.bannerUrl
|
||||
selectedFile.value = null
|
||||
} else {
|
||||
fileUrl.value = fallbackUrl
|
||||
|
||||
Reference in New Issue
Block a user