2019-03-29 18:58:20 -07:00
|
|
|
<template>
|
|
|
|
<div class="importer">
|
|
|
|
<form>
|
|
|
|
<input type="file" ref="input" v-on:change="change" />
|
|
|
|
</form>
|
2019-03-30 02:10:57 -07:00
|
|
|
<i class="icon-spin4 animate-spin importer-uploading" v-if="submitting"></i>
|
|
|
|
<button class="btn btn-default" v-else @click="submit">{{submitButtonLabel}}</button>
|
2019-03-29 18:58:20 -07:00
|
|
|
<div v-if="success">
|
|
|
|
<i class="icon-cross" @click="dismiss"></i>
|
2019-03-30 02:10:57 -07:00
|
|
|
<p>{{successMessage}}</p>
|
2019-03-29 18:58:20 -07:00
|
|
|
</div>
|
|
|
|
<div v-else-if="error">
|
|
|
|
<i class="icon-cross" @click="dismiss"></i>
|
2019-03-30 02:10:57 -07:00
|
|
|
<p>{{errorMessage}}</p>
|
2019-03-29 18:58:20 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./importer.js"></script>
|
2019-03-29 20:55:49 -07:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.importer {
|
2019-03-30 02:10:57 -07:00
|
|
|
&-uploading {
|
2019-03-29 20:55:49 -07:00
|
|
|
font-size: 1.5em;
|
|
|
|
margin: 0.25em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|