mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
made main "add files" area keyboard navible
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user