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

38 lines
753 B
Vue
Raw Normal View History

2016-11-06 18:28:37 +00:00
<template>
<label
2020-05-07 13:10:53 +00:00
class="media-upload"
:class="{ disabled: disabled }"
:title="$t('tool_tip.media_upload')"
2020-05-07 13:10:53 +00: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"
:disabled="disabled"
type="file"
style="position: fixed; top: -100em; max-width: 0; max-height: 0"
multiple="true"
@change="change"
2019-07-05 07:17:44 +00:00
>
</label>
2016-11-06 18:28:37 +00:00
</template>
<script src="./media_upload.js" ></script>
<style lang="scss">
2020-05-07 13:10:53 +00:00
@import '../../_variables.scss';
.media-upload {
2022-04-20 20:22:51 +00:00
cursor: pointer; // We use <label> for interactivity... i wonder if it's fine
}
</style>