2016-11-06 10:28:37 -08:00
|
|
|
<template>
|
2019-07-05 00:17:44 -07:00
|
|
|
<div
|
|
|
|
class="media-upload"
|
|
|
|
@drop.prevent
|
|
|
|
@dragover.prevent="fileDrag"
|
|
|
|
@drop="fileDrop"
|
|
|
|
>
|
|
|
|
<label
|
2019-11-11 11:45:40 -08:00
|
|
|
class="label"
|
2019-07-05 00:17:44 -07:00
|
|
|
:title="$t('tool_tip.media_upload')"
|
|
|
|
>
|
|
|
|
<i
|
|
|
|
v-if="uploading"
|
2019-11-11 11:45:40 -08:00
|
|
|
class="progress-icon icon-spin4 animate-spin"
|
2019-07-05 00:17:44 -07:00
|
|
|
/>
|
|
|
|
<i
|
|
|
|
v-if="!uploading"
|
2019-11-11 11:45:40 -08:00
|
|
|
class="new-icon icon-upload"
|
2019-07-05 00:17:44 -07:00
|
|
|
/>
|
|
|
|
<input
|
|
|
|
v-if="uploadReady"
|
|
|
|
type="file"
|
|
|
|
style="position: fixed; top: -100em"
|
|
|
|
multiple="true"
|
|
|
|
@change="change"
|
2019-07-06 14:54:17 -07:00
|
|
|
>
|
2016-11-06 10:28:37 -08:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./media_upload.js" ></script>
|
|
|
|
|
2019-11-11 11:45:40 -08:00
|
|
|
<style lang="scss">
|
2019-09-15 02:28:52 -07:00
|
|
|
.media-upload {
|
2019-11-11 11:45:40 -08:00
|
|
|
.label {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.new-icon {
|
2019-09-15 02:28:52 -07:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-22 14:58:25 -08:00
|
|
|
|
2019-11-11 11:45:40 -08:00
|
|
|
.progress-icon {
|
|
|
|
display: inline-block;
|
|
|
|
line-height: 0;
|
|
|
|
&::before {
|
|
|
|
/* Overriding fontello to achieve the perfect speeeen */
|
|
|
|
margin: 0;
|
|
|
|
line-height: 0;
|
|
|
|
}
|
2019-09-15 02:28:52 -07:00
|
|
|
}
|
|
|
|
}
|
2019-11-11 11:45:40 -08:00
|
|
|
</style>
|