11<template >
22 <div >
3- <div class =" drag-notification" :class =" { 'hidden': !canUpload.isPossible || !isDragging }" ref = " dropzone " >
3+ <div class =" drag-notification" :class =" { 'hidden': !canUpload.isPossible || !isDragging }" >
44 <svg xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 24 24" class =" h-12 w-12 m-4" >
55 <path fill =" none" stroke =" currentColor" stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 1.5" d =" M.752 2.251a1.5 1.5 0 0 1 1.5-1.5m0 22.5a1.5 1.5 0 0 1-1.5-1.5m22.5 0a1.5 1.5 0 0 1-1.5 1.5m0-22.5a1.5 1.5 0 0 1 1.5 1.5m0 15.75v-1.5m0-3.75v-1.5m0-3.75v-1.5m-22.5 12v-1.5m0-3.75v-1.5m0-3.75v-1.5m5.25-5.25h1.5m3.75 0h1.5m3.75 0h1.5m-12 22.5h1.5m3.75 0h1.5m3.75 0h1.5m-6-5.25v-12m4.5 4.5-4.5-4.5-4.5 4.5" ></path >
66 </svg >
@@ -71,7 +71,7 @@ export default {
7171 // Resumable.js isn't supported, fall back on a different method
7272 if (! this .resumable .support ) return alert (" Your browser doesn't support chunked uploads. Get a better browser." );
7373
74- const backupElement = document .getElementById (" statamic-backup" );
74+ const dropzone = document .getElementById (" statamic-backup" );
7575
7676 this .$watch (
7777 (state ) => {
@@ -81,17 +81,15 @@ export default {
8181 if (newValue) {
8282 if (this .$refs .browse ) {
8383 this .resumable .assignBrowse (this .$refs .browse );
84- this .resumable .assignDrop (backupElement );
84+ this .resumable .assignDrop (dropzone );
8585 }
8686 } else {
8787 console .log (this .resumable )
88- this .resumable .unAssignDrop ([backupElement ]);
88+ this .resumable .unAssignDrop ([dropzone ]);
8989 }
9090 }
9191 );
9292
93- this .resumable .handleDropEvent = console .log ;
94-
9593 // set up event listeners to feed into vues reactivity
9694 this .resumable .on (" fileAdded" , (file , event ) => {
9795 file .hasUploaded = false ;
@@ -127,15 +125,15 @@ export default {
127125 if (progress > localFile .progress ) localFile .progress = progress;
128126 });
129127
130- backupElement .addEventListener (" dragover" , (event ) => {
128+ dropzone .addEventListener (" dragover" , (event ) => {
131129 event .preventDefault ();
132130 this .isDragging = true ;
133131 });
134- backupElement .addEventListener (" dragleave" , (event ) => {
132+ dropzone .addEventListener (" dragleave" , (event ) => {
135133 event .preventDefault ();
136134 this .isDragging = false ;
137135 });
138- backupElement .addEventListener (" drop" , (event ) => {
136+ dropzone .addEventListener (" drop" , (event ) => {
139137 event .preventDefault ();
140138 this .isDragging = false ;
141139 });
0 commit comments