Commit 895062f9a8e45c1b895ee03da1f88ed1644f896b
1 parent
c39f609dfc
Exists in
master
and in
3 other branches
add loader on submit gallery
Showing
1 changed file
with
10 additions
and
6 deletions
Show diff stats
src/pages/Gallery/gallery.vue
... | ... | @@ -226,9 +226,12 @@ |
226 | 226 | <v-spacer></v-spacer> |
227 | 227 | <v-icon @click="close1">close</v-icon> |
228 | 228 | </v-toolbar> |
229 | - <v-card-text > | |
229 | + <v-card-text> | |
230 | 230 | <v-layout row wrap> |
231 | - <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"> | |
231 | + <v-flex | |
232 | + xs12 | |
233 | + class="text-xs-center text-sm-center text-md-center text-lg-center my-4" | |
234 | + > | |
232 | 235 | <v-avatar size="100" v-if="editedItem.imageUrl == ''" class="mt-4 pa-2"> |
233 | 236 | <img src="/static/icon/user.png" width="240" height="180" /> |
234 | 237 | </v-avatar> |
... | ... | @@ -794,7 +797,7 @@ export default { |
794 | 797 | description: this.addGallery.description, |
795 | 798 | upload: this.addGallery.upload |
796 | 799 | }; |
797 | - // this.loading = true; | |
800 | + this.loading = true; | |
798 | 801 | http() |
799 | 802 | .post("/createGallery", galleryData) |
800 | 803 | .then(response => { |
... | ... | @@ -811,6 +814,7 @@ export default { |
811 | 814 | this.loading = false; |
812 | 815 | }); |
813 | 816 | } else if (this.addGallery.youTubeLinkUrl) { |
817 | + this.loading = true; | |
814 | 818 | http() |
815 | 819 | .post("/createGallery", this.addGallery) |
816 | 820 | .then(response => { |
... | ... | @@ -823,9 +827,9 @@ export default { |
823 | 827 | this.files = ""; |
824 | 828 | }) |
825 | 829 | .catch(error => { |
826 | - if ((this.snackbar = true)) { | |
827 | - this.text = error.response.data.message; | |
828 | - } | |
830 | + this.snackbar = true; | |
831 | + this.text = error.response.data.message; | |
832 | + this.loading = false; | |
829 | 833 | }); |
830 | 834 | } |
831 | 835 | } | ... | ... |