Showing
1 changed file
with
31 additions
and
6 deletions
| ... | @@ -2,7 +2,9 @@ | ... | @@ -2,7 +2,9 @@ |
| 2 | <v-sheet> | 2 | <v-sheet> |
| 3 | <v-overlay v-model="loadingProcess"> | 3 | <v-overlay v-model="loadingProcess"> |
| 4 | <v-progress-circular :size="120" width="10" color="primary" indeterminate></v-progress-circular> | 4 | <v-progress-circular :size="120" width="10" color="primary" indeterminate></v-progress-circular> |
| 5 | - <div style="color: #ffffff; font-size: 22px; margin-top: 20px; margin-left: -30px;">Analyzing Your Video...</div> | 5 | + <div |
| 6 | + style="color: #ffffff; font-size: 22px; margin-top: 20px; margin-left: -30px;" | ||
| 7 | + >Analyzing Your Video...</div> | ||
| 6 | </v-overlay> | 8 | </v-overlay> |
| 7 | <v-layout justify-center> | 9 | <v-layout justify-center> |
| 8 | <v-flex xs12 sm8 md6 lg4> | 10 | <v-flex xs12 sm8 md6 lg4> |
| ... | @@ -25,7 +27,10 @@ | ... | @@ -25,7 +27,10 @@ |
| 25 | </v-flex> | 27 | </v-flex> |
| 26 | <v-flex md5> | 28 | <v-flex md5> |
| 27 | <v-card width="240" elevation="0" class="ml-5"> | 29 | <v-card width="240" elevation="0" class="ml-5"> |
| 28 | - <v-img width="240" src="http://khuhub.khu.ac.kr/2020-1-capstone-design1/PKH_Project1/uploads/b70e4a173c2b7d5fa6ab73d48582dd6e/youtubelogoBlack.326653df.png"></v-img> | 30 | + <v-img |
| 31 | + width="240" | ||
| 32 | + src="http://khuhub.khu.ac.kr/2020-1-capstone-design1/PKH_Project1/uploads/b70e4a173c2b7d5fa6ab73d48582dd6e/youtubelogoBlack.326653df.png" | ||
| 33 | + ></v-img> | ||
| 29 | </v-card> | 34 | </v-card> |
| 30 | </v-flex> | 35 | </v-flex> |
| 31 | </v-row> | 36 | </v-row> |
| ... | @@ -63,11 +68,25 @@ | ... | @@ -63,11 +68,25 @@ |
| 63 | @dragenter.prevent | 68 | @dragenter.prevent |
| 64 | @drop.prevent="onDrop" | 69 | @drop.prevent="onDrop" |
| 65 | > | 70 | > |
| 66 | - <v-btn style="text-transform: none" @click="clickUploadButton" text large color="primary">CLICK or DRAG & DROP</v-btn> | 71 | + <v-btn |
| 72 | + style="text-transform: none" | ||
| 73 | + @click="clickUploadButton" | ||
| 74 | + text | ||
| 75 | + large | ||
| 76 | + color="primary" | ||
| 77 | + >CLICK or DRAG & DROP</v-btn> | ||
| 67 | <input ref="fileInput" style="display: none" type="file" @change="onFileChange" /> | 78 | <input ref="fileInput" style="display: none" type="file" @change="onFileChange" /> |
| 68 | </v-card> | 79 | </v-card> |
| 69 | </v-row> | 80 | </v-row> |
| 70 | - | 81 | + <div |
| 82 | + style="font-size: 20px; font-weight: 300; color: #888; text-align: center; margin-top: 20px; margin-bottom: 18px" | ||
| 83 | + > | ||
| 84 | + <div>And Set up Threshold of</div> | ||
| 85 | + <div>recommended Youtube link</div> | ||
| 86 | + </div> | ||
| 87 | + <v-row justify="center" class="mx-12"> | ||
| 88 | + <v-slider v-model="slider" :thumb-size="20" thumb-label="always" :min="20" :max="80" ></v-slider> | ||
| 89 | + </v-row> | ||
| 71 | <div | 90 | <div |
| 72 | style="font-size: 24px; text-align: center; font-weight: 400; color: #5a5a5a;" | 91 | style="font-size: 24px; text-align: center; font-weight: 400; color: #5a5a5a;" |
| 73 | class="mt-10" | 92 | class="mt-10" |
| ... | @@ -111,6 +130,7 @@ export default { | ... | @@ -111,6 +130,7 @@ export default { |
| 111 | videoFile: '', | 130 | videoFile: '', |
| 112 | YoutubeUrl: [], | 131 | YoutubeUrl: [], |
| 113 | generatedTag: [], | 132 | generatedTag: [], |
| 133 | + threshold: 20, | ||
| 114 | successDialog: false, | 134 | successDialog: false, |
| 115 | errorDialog: false, | 135 | errorDialog: false, |
| 116 | loadingProcess: false, | 136 | loadingProcess: false, |
| ... | @@ -120,20 +140,25 @@ export default { | ... | @@ -120,20 +140,25 @@ export default { |
| 120 | this.YoutubeUrl = []; | 140 | this.YoutubeUrl = []; |
| 121 | this.generatedTag = []; | 141 | this.generatedTag = []; |
| 122 | }, | 142 | }, |
| 123 | - | ||
| 124 | methods: { | 143 | methods: { |
| 125 | loadVideoInfo() {}, | 144 | loadVideoInfo() {}, |
| 126 | uploadVideo(files) { | 145 | uploadVideo(files) { |
| 127 | this.loadingProcess = true; | 146 | this.loadingProcess = true; |
| 128 | const formData = new FormData(); | 147 | const formData = new FormData(); |
| 129 | formData.append('file', files[0]); | 148 | formData.append('file', files[0]); |
| 149 | + formData.append('threshold', this.threshold); | ||
| 130 | console.log(files[0]); | 150 | console.log(files[0]); |
| 131 | - this.$axios.post('/upload', formData, { headers: { 'Content-Type': 'multipart/form-data' } }) | 151 | + this.$axios |
| 152 | + .post('/upload', formData, { | ||
| 153 | + headers: { 'Content-Type': 'multipart/form-data' }, | ||
| 154 | + }) | ||
| 132 | .then((r) => { | 155 | .then((r) => { |
| 133 | this.loadingProcess = false; | 156 | this.loadingProcess = false; |
| 157 | + this.successDialog = true; | ||
| 134 | console.log(r); | 158 | console.log(r); |
| 135 | }) | 159 | }) |
| 136 | .catch((e) => { | 160 | .catch((e) => { |
| 161 | + this.errorDialog = true; | ||
| 137 | console.log(e.message); | 162 | console.log(e.message); |
| 138 | }); | 163 | }); |
| 139 | }, | 164 | }, | ... | ... |
-
Please register or login to post a comment