2019-03-29 21:58:20 -04:00
|
|
|
<template>
|
|
|
|
<div class="importer">
|
|
|
|
<form>
|
2019-07-05 10:17:44 +03:00
|
|
|
<input
|
2024-02-07 15:53:49 +02:00
|
|
|
class="input"
|
2019-07-05 10:17:44 +03:00
|
|
|
ref="input"
|
|
|
|
type="file"
|
|
|
|
@change="change"
|
|
|
|
>
|
2019-03-29 21:58:20 -04:00
|
|
|
</form>
|
2020-10-21 00:01:28 +03:00
|
|
|
<FAIcon
|
2019-07-05 10:17:44 +03:00
|
|
|
v-if="submitting"
|
2020-10-21 00:01:28 +03:00
|
|
|
class="importer-uploading"
|
|
|
|
spin
|
|
|
|
icon="circle-notch"
|
2019-07-05 10:17:44 +03:00
|
|
|
/>
|
|
|
|
<button
|
|
|
|
v-else
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default"
|
2019-07-05 10:17:44 +03:00
|
|
|
@click="submit"
|
|
|
|
>
|
2021-04-25 14:12:34 +03:00
|
|
|
{{ submitButtonLabel || $t('importer.submit') }}
|
2019-07-05 10:17:44 +03:00
|
|
|
</button>
|
2022-03-30 18:00:24 +03:00
|
|
|
<div v-if="success">
|
|
|
|
<button
|
|
|
|
class="button-unstyled"
|
|
|
|
@click="dismiss"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="times"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
{{ ' ' }}
|
|
|
|
<span>{{ successMessage || $t('importer.success') }}</span>
|
|
|
|
</div>
|
|
|
|
<div v-else-if="error">
|
|
|
|
<button
|
|
|
|
class="button-unstyled"
|
|
|
|
@click="dismiss"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="times"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
{{ ' ' }}
|
|
|
|
<span>{{ errorMessage || $t('importer.error') }}</span>
|
|
|
|
</div>
|
2019-03-29 21:58:20 -04:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./importer.js"></script>
|
2019-03-29 23:55:49 -04:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.importer {
|
2019-03-30 05:10:57 -04:00
|
|
|
&-uploading {
|
2019-03-29 23:55:49 -04:00
|
|
|
font-size: 1.5em;
|
|
|
|
margin: 0.25em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|