Fixes issue with light theme support.

This commit is contained in:
Dimitrios Kaitantzidis 2023-10-14 00:37:52 +03:00
parent 369ac99a16
commit e519840bd6
4 changed files with 54 additions and 30 deletions

View file

@ -91,3 +91,26 @@ hr {
border-color: rgba(255, 255, 255, 0.6); /* semi-transparent white */
background-color: rgba(255, 255, 255, 0.6); /* for some browsers that might use background instead of border for <hr> */
}
#global-buttons-container input {
background-color: #323948;
caret-color: #ffffff;
color: #ffffff;
}
#global-buttons-container input::placeholder {
color: #ffffff;
}
#global-buttons-container input:disabled::-webkit-input-placeholder { /* WebKit browsers */
color: #6E6865;
}
#global-buttons-container input:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #6E6865;
}
#global-buttons-container input:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #6E6865;
}
#global-buttons-container input:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #6E6865;
}

View file

@ -2,4 +2,23 @@
body {
--body-background-color: 255, 255, 255;
--base-font-color: 33, 37, 41;
}
}
#global-buttons-container input {
background-color: #ffffff;
/*caret-color: #ffffff;*/
/*color: #ffffff;*/
}
/*#global-buttons-container input:disabled::-webkit-input-placeholder { !* WebKit browsers *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled:-moz-placeholder { !* Mozilla Firefox 4 to 18 *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled::-moz-placeholder { !* Mozilla Firefox 19+ *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled:-ms-input-placeholder { !* Internet Explorer 10+ *!*/
/* color: #98A0AB;*/
/*}*/

View file

@ -35,11 +35,13 @@ class PdfContainer {
const filenameInput = document.getElementById('filename-input');
const filenameParagraph = document.getElementById('filename');
const downloadBtn = document.getElementById('export-button');
filenameInput.onkeyup = this.updateFilename;
filenameInput.disabled = true;
filenameInput.innerText = "";
filenameParagraph.innerText = "";
downloadBtn.disabled = true;
}
movePageTo(startElement, endElement, scrollTo = false) {
@ -78,10 +80,10 @@ class PdfContainer {
const downloadBtn = document.getElementById('export-button');
filenameInput.disabled = false;
downloadBtn.disabled = false;
if (pagesContainer.childElementCount === 0) {
filenameInput.value = "";
downloadBtn.disabled = true;
}
}
@ -228,26 +230,31 @@ class PdfContainer {
this.downloadLink = document.createElement('a');
this.downloadLink.id = 'download-link';
this.downloadLink.href = url;
console.log('downloadLink.href ' + this.downloadLink.href);
// downloadLink.download = this.fileName ? this.fileName : 'managed.pdf';
// downloadLink.download = this.fileName;
this.downloadLink.setAttribute('download', this.filename ? this.fileName : 'managed.pdf');
this.downloadLink.setAttribute('target', '_blank');
this.downloadLink.onclick = this.setDownloadAttribute;
console.log('downloadLink download ' + this.downloadLink.download);
this.downloadLink.click();
}
}
setDownloadAttribute() {
console.log('inside setDownloadAttribute ' + this.filename);
this.downloadLink.setAttribute("download", this.filename ? this.filename : 'managed.pdf');
}
updateFilename() {
const filenameInput = document.getElementById('filename-input');
const filenameParagraph = document.getElementById('filename');
const downloadBtn = document.getElementById('export-button');
if (filenameInput.value === "") {
filenameParagraph.innerText = "";
downloadBtn.disabled = true;
return;
}
downloadBtn.disabled = false;
this.filename = filenameInput.value;
filenameParagraph.innerText = this.filename + ".pdf";
}

View file

@ -124,31 +124,6 @@
#global-buttons-container > * {
padding: 0.6rem 0.75rem;
}
#global-buttons-container input {
background-color: #323948;
caret-color: #ffffff;
color: #ffffff;
}
#global-buttons-container input::placeholder {
color: #ffffff;
}
#global-buttons-container input:disabled {
color: #3D3D3D !important;
}
#global-buttons-container input:disabled::-webkit-input-placeholder { /* WebKit browsers */
color: #6E6865;
}
#global-buttons-container input:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #6E6865;
}
#global-buttons-container input:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #6E6865;
}
#global-buttons-container input:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #6E6865;
}
#global-buttons-container svg {
width: 20px;