made main "add files" area keyboard navible
This commit is contained in:
parent
b1e5073e59
commit
fd2b58d96d
|
@ -374,14 +374,16 @@ module.exports.empty = function(state, emit) {
|
||||||
>
|
>
|
||||||
${state.translate('uploadDropDragMessage')}
|
${state.translate('uploadDropDragMessage')}
|
||||||
</div>
|
</div>
|
||||||
<div class="pb-6 text-center text-base italic">
|
<div class="text-center text-base italic">
|
||||||
${state.translate('uploadDropClickMessage')}
|
${state.translate('uploadDropClickMessage')}
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
id="file-upload"
|
id="file-upload"
|
||||||
class="hidden"
|
class="opacity-0"
|
||||||
type="file"
|
type="file"
|
||||||
multiple
|
multiple
|
||||||
|
onfocus="${focus}"
|
||||||
|
onblur="${blur}"
|
||||||
onchange="${add}"
|
onchange="${add}"
|
||||||
onclick="${e => e.stopPropagation()}"
|
onclick="${e => e.stopPropagation()}"
|
||||||
/>
|
/>
|
||||||
|
@ -396,6 +398,14 @@ module.exports.empty = function(state, emit) {
|
||||||
</send-upload-area>
|
</send-upload-area>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
function focus(event) {
|
||||||
|
event.target.nextElementSibling.classList.add('bg-blue-darker');
|
||||||
|
}
|
||||||
|
|
||||||
|
function blur(event) {
|
||||||
|
event.target.nextElementSibling.classList.remove('bg-blue-darker');
|
||||||
|
}
|
||||||
|
|
||||||
function add(event) {
|
function add(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const newFiles = Array.from(event.target.files);
|
const newFiles = Array.from(event.target.files);
|
||||||
|
|
Loading…
Reference in New Issue