Extensions styles fix

This commit is contained in:
SillyLossy
2023-04-13 22:34:38 +03:00
parent 0cb78685a9
commit d6656da4c5
7 changed files with 39 additions and 31 deletions

View File

@@ -16,8 +16,8 @@ async function moduleWorker() {
async function setImageIcon() {
try {
const sendButton = document.getElementById('send_picture');
sendButton.style.backgroundImage = `url('/img/image-solid.svg')`;
sendButton.classList.remove('spin');
sendButton.classList.add('fa-image');
sendButton.classList.remove('fa-hourglass-half', 'fa-spin');
}
catch (error) {
console.log(error);
@@ -27,7 +27,8 @@ async function setImageIcon() {
async function setSpinnerIcon() {
try {
const sendButton = document.getElementById('send_picture');
sendButton.style.backgroundImage = `url('/img/hourglass-half-solid.svg')`;
sendButton.classList.remove('fa-image');
sendButton.classList.add('fa-hourglass-half', 'fa-spin');
}
catch (error) {
console.log(error);
@@ -96,9 +97,9 @@ $(document).ready(function () {
$('#send_form').css('grid-template-columns', columns.join(' '));
}
function addSendPictureButton() {
const sendButton = document.createElement('input');
sendButton.type = 'button';
const sendButton = document.createElement('div');
sendButton.id = 'send_picture';
sendButton.classList.add('fa-solid');
$(sendButton).hide();
$(sendButton).on('click', () => $('#img_file').click());
$('#send_but_sheld').prepend(sendButton);

View File

@@ -4,15 +4,14 @@
height: 40px;
margin: 0;
padding: 1px;
background: no-repeat;
background-size: 24px 24px;
background-position: center center;
outline: none;
border: none;
cursor: pointer;
transition: 0.3s;
filter: invert(1);
opacity: 0.5;
display: flex;
align-items: center;
justify-content: center;
}
#send_picture:hover {