2016-11-06 19:28:37 +01:00
|
|
|
<template>
|
2020-11-24 12:32:42 +02:00
|
|
|
<label
|
2020-05-07 16:10:53 +03:00
|
|
|
class="media-upload"
|
|
|
|
|
:class="{ disabled: disabled }"
|
2020-11-24 12:32:42 +02:00
|
|
|
:title="$t('tool_tip.media_upload')"
|
2020-05-07 16:10:53 +03:00
|
|
|
>
|
2020-11-24 12:32:42 +02:00
|
|
|
<FAIcon
|
|
|
|
|
v-if="uploading"
|
|
|
|
|
class="progress-icon"
|
|
|
|
|
icon="circle-notch"
|
|
|
|
|
spin
|
|
|
|
|
/>
|
|
|
|
|
<FAIcon
|
|
|
|
|
v-if="!uploading"
|
|
|
|
|
class="new-icon"
|
|
|
|
|
icon="upload"
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
v-if="uploadReady"
|
2022-05-09 23:07:55 +03:00
|
|
|
class="hidden-input-file"
|
2020-11-24 12:32:42 +02:00
|
|
|
:disabled="disabled"
|
|
|
|
|
type="file"
|
|
|
|
|
multiple="true"
|
|
|
|
|
@change="change"
|
2019-07-05 10:17:44 +03:00
|
|
|
>
|
2020-11-24 12:32:42 +02:00
|
|
|
</label>
|
2016-11-06 19:28:37 +01:00
|
|
|
</template>
|
|
|
|
|
|
2022-07-31 12:35:48 +03:00
|
|
|
<script src="./media_upload.js"></script>
|
2016-11-06 19:28:37 +01:00
|
|
|
|
2019-11-11 21:45:40 +02:00
|
|
|
<style lang="scss">
|
2020-05-07 16:10:53 +03:00
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
2019-09-15 12:28:52 +03:00
|
|
|
.media-upload {
|
2022-04-20 23:22:51 +03:00
|
|
|
cursor: pointer; // We use <label> for interactivity... i wonder if it's fine
|
2022-05-09 23:07:55 +03:00
|
|
|
|
|
|
|
|
.hidden-input-file {
|
2022-05-16 23:46:32 +03:00
|
|
|
display: none;
|
2022-05-09 23:07:55 +03:00
|
|
|
}
|
2019-09-15 12:28:52 +03:00
|
|
|
}
|
2019-11-11 21:45:40 +02:00
|
|
|
</style>
|