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

58 lines
1007 B
Vue
Raw Normal View History

2016-11-06 19:28:37 +01:00
<template>
2020-05-07 15:10:53 +02:00
<div
class="media-upload"
:class="{ disabled: disabled }"
>
2019-07-05 09:17:44 +02:00
<label
class="label"
2019-07-05 09:17:44 +02:00
:title="$t('tool_tip.media_upload')"
>
<FAIcon
2019-07-05 09:17:44 +02:00
v-if="uploading"
class="progress-icon"
icon="circle-notch"
spin
2019-07-05 09:17:44 +02:00
/>
<FAIcon
2019-07-05 09:17:44 +02:00
v-if="!uploading"
class="new-icon"
icon="upload"
2019-07-05 09:17:44 +02:00
/>
<input
v-if="uploadReady"
2020-05-07 15:10:53 +02:00
:disabled="disabled"
2019-07-05 09:17:44 +02:00
type="file"
style="position: fixed; top: -100em"
multiple="true"
@change="change"
2019-07-06 23:54:17 +02:00
>
2016-11-06 19:28:37 +01:00
</label>
</div>
</template>
<script src="./media_upload.js" ></script>
<style lang="scss">
2020-05-07 15:10:53 +02:00
@import '../../_variables.scss';
.media-upload {
.label {
display: inline-block;
}
.new-icon {
cursor: pointer;
}
.progress-icon {
display: inline-block;
line-height: 0;
&::before {
/* Overriding fontello to achieve the perfect speeeen */
margin: 0;
line-height: 0;
}
}
}
</style>