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