mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Update compose view
This commit is contained in:
parent
bc2d8555fb
commit
5c1237dc74
1 changed files with 10 additions and 0 deletions
|
@ -22,6 +22,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body bg-light">
|
<div class="card-body bg-light">
|
||||||
|
<div class="composeLoader d-none text-center">
|
||||||
|
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
|
||||||
|
</div>
|
||||||
<div class="d-none preview-pagination">
|
<div class="d-none preview-pagination">
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<p class="prev text-light" onclick="pixelfed.uploader.previous()"><i class="fas fa-chevron-left"></i></p>
|
<p class="prev text-light" onclick="pixelfed.uploader.previous()"><i class="fas fa-chevron-left"></i></p>
|
||||||
|
@ -319,6 +322,7 @@ $(document).on('change', '.file-input', function(e) {
|
||||||
if($('.welcome-text').hasClass('d-none') == false) {
|
if($('.welcome-text').hasClass('d-none') == false) {
|
||||||
$('.welcome-text').addClass('d-none');
|
$('.welcome-text').addClass('d-none');
|
||||||
}
|
}
|
||||||
|
$('.composeLoader').removeClass('d-none');
|
||||||
let form = new FormData();
|
let form = new FormData();
|
||||||
form.append('file', io);
|
form.append('file', io);
|
||||||
|
|
||||||
|
@ -342,6 +346,7 @@ $(document).on('change', '.file-input', function(e) {
|
||||||
};
|
};
|
||||||
pixelfed.uploader.meta.push(meta);
|
pixelfed.uploader.meta.push(meta);
|
||||||
pixelfed.uploader.media.push(e.data);
|
pixelfed.uploader.media.push(e.data);
|
||||||
|
$('.composeLoader').addClass('d-none');
|
||||||
pixelfed.uploader.addPreview(e.data);
|
pixelfed.uploader.addPreview(e.data);
|
||||||
pixelfed.uploader.paginate(e.data);
|
pixelfed.uploader.paginate(e.data);
|
||||||
if(pixelfed.uploader.ids.length >= pixelfed.uploader.limit) {
|
if(pixelfed.uploader.ids.length >= pixelfed.uploader.limit) {
|
||||||
|
@ -358,6 +363,7 @@ $(document).on('change', '.file-input', function(e) {
|
||||||
$(document).on('click', '#addMedia', function(e) {
|
$(document).on('click', '#addMedia', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let el = $(this);
|
let el = $(this);
|
||||||
|
el.attr('disabled', '');
|
||||||
if(pixelfed.uploader.ids.length >= pixelfed.uploader.limit) {
|
if(pixelfed.uploader.ids.length >= pixelfed.uploader.limit) {
|
||||||
el.remove();
|
el.remove();
|
||||||
return;
|
return;
|
||||||
|
@ -365,6 +371,7 @@ $(document).on('click', '#addMedia', function(e) {
|
||||||
let fi = $('.file-input');
|
let fi = $('.file-input');
|
||||||
fi.trigger('click');
|
fi.trigger('click');
|
||||||
el.blur();
|
el.blur();
|
||||||
|
el.removeAttr('disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#filterSelectDropdown', function() {
|
$(document).on('change', '#filterSelectDropdown', function() {
|
||||||
|
@ -458,6 +465,9 @@ $(document).on('click', '.preview-thumbs img', function(e) {
|
||||||
|
|
||||||
$(document).on('click', '#create', function(e) {
|
$(document).on('click', '#create', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
let el = $(this);
|
||||||
|
el.attr('disabled', '');
|
||||||
|
$('.composeLoader').removeClass('d-none');
|
||||||
let data = {
|
let data = {
|
||||||
media: pixelfed.uploader.meta,
|
media: pixelfed.uploader.meta,
|
||||||
caption: $('.caption input').val(),
|
caption: $('.caption input').val(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue