Skip to content

Commit 8171234

Browse files
committed
settings image upload error
1 parent 9175d01 commit 8171234

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/views/app/Settings.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
</div>
116116
<div class="text-center py-8 w-full px-8 border-t border-gray-300">
117117
<h1 class="font-bold text-gray-matcha">Images<span class="text-md font-normal ml-2 opacity-50 text-gray-matcha">{{this.$store.getters.getLoggedInUser.images.length}} / 5</span></h1>
118-
<div class="auth-sub-container-error mt-8" v-if="image.error">
118+
<div class="auth-sub-container-error mt-8 mx-auto" v-if="image.error">
119119
<h1 class="auth-sub-container-error-message">{{image.error}}</h1>
120120
</div>
121121
<button v-if="this.$store.getters.getLoggedInUser.images.length < 5 && !fetchingImages" class="overflow-hidden relative onboarding-sub-container-content-button-outline border w-full max-w-sm my-4">
@@ -215,10 +215,12 @@ export default {
215215
216216
if (!allowedTypes.includes(file.type)) {
217217
this.image.error = 'Only images allowed';
218+
this.fetchingImages = false;
218219
return;
219220
}
220221
if (file.size > 2000000) {
221222
this.image.error = 'File too large';
223+
this.fetchingImages = false;
222224
return;
223225
}
224226
const formData = new FormData();

0 commit comments

Comments
 (0)