pleroma-fe/src/components/media_upload/media_upload.vue

23 lines
503 B
Vue
Raw Normal View History

2016-11-07 05:28:37 +11:00
<template>
<div class="media-upload" @drop.prevent @dragover.prevent="fileDrag" @drop="fileDrop">
2016-11-07 05:28:37 +11:00
<label class="btn btn-default">
<i class="animate-spin" v-if="uploading"></i>
<i class="icon-upload" v-if="!uploading"></i>
2016-11-07 05:28:37 +11:00
<input type=file style="position: fixed; top: -100em"></input>
</label>
</div>
</template>
<script src="./media_upload.js" ></script>
<style>
.media-upload {
font-size: 26px;
flex: 1;
}
.icon-upload {
cursor: pointer;
}
2016-11-07 05:28:37 +11:00
</style>