fix(creator): styling for creator album
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
<!-- Video Section -->
|
<!-- Video Section -->
|
||||||
<div v-if="videoUrl || isEditMode"
|
<div v-if="videoUrl || isEditMode"
|
||||||
:class="['content-section', {
|
:class="['content-section', {
|
||||||
'rounded-t-xl': hasImages || isEditMode,
|
'rounded-t-xl': hasImages && !isEditMode,
|
||||||
'rounded-xl': !hasImages && !isEditMode
|
'rounded-xl': !hasImages && !isEditMode
|
||||||
}]">
|
}]">
|
||||||
<div v-if="!isEditMode && videoUrl" class="video-container">
|
<div v-if="!isEditMode && videoUrl" class="video-container">
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
@update:images="updateImages"
|
@update:images="updateImages"
|
||||||
@update:isEditMode="isEditMode = $event"
|
@update:isEditMode="isEditMode = $event"
|
||||||
:class="['content-section', {
|
:class="['content-section', {
|
||||||
'rounded-b-xl': videoUrl || isEditMode,
|
'rounded-b-xl': videoUrl && !isEditMode,
|
||||||
'rounded-xl': !videoUrl && !isEditMode
|
'rounded-xl': !videoUrl && !isEditMode
|
||||||
}]"
|
}]"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -180,43 +180,6 @@ function moveImage(index, direction) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload images to API
|
|
||||||
async function uploadImages() {
|
|
||||||
try {
|
|
||||||
// Mark all images as uploading
|
|
||||||
localImages.value = localImages.value.map(img => ({
|
|
||||||
...img,
|
|
||||||
isUploading: true
|
|
||||||
}));
|
|
||||||
|
|
||||||
// Here you would implement your API upload logic
|
|
||||||
// For each image that has a file property:
|
|
||||||
for (const image of localImages.value) {
|
|
||||||
if (image.file) {
|
|
||||||
// Example API upload (replace with your actual API call)
|
|
||||||
// await uploadImageToAPI(image.file);
|
|
||||||
|
|
||||||
// For demo, simulate API delay
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Once all uploads are complete, update states
|
|
||||||
localImages.value = localImages.value.map(img => ({
|
|
||||||
...img,
|
|
||||||
isUploading: false,
|
|
||||||
file: null // Clear the file after upload
|
|
||||||
}));
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error uploading images:', error);
|
|
||||||
// Reset upload state on error
|
|
||||||
localImages.value = localImages.value.map(img => ({
|
|
||||||
...img,
|
|
||||||
isUploading: false
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user