Merge pull request #383 from DJ2LS/chat

and even more chat related fixes
This commit is contained in:
DJ2LS 2023-03-26 19:53:12 +02:00 committed by GitHub
commit 5a4dfa69ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -32,7 +32,7 @@
"@electron/osx-sign": "^1.0.4",
"@popperjs/core": "^2.11.6",
"blob-util": "^2.0.2",
"bootstrap": "^5.3.0-alpha.1",
"bootstrap": "^5.3.0-alpha.2",
"bootstrap-icons": "^1.10.3",
"bootswatch": "^5.2.3",
"browser-image-compression": "^2.0.0",

View File

@ -1286,7 +1286,7 @@ update_chat = function (obj) {
"msg-" + obj._id + "-progress-information"
).innerHTML = obj.percent + "% - " + obj.bytesperminute + " Bpm";
if (obj.percent >= 100) {
if (obj.status == "transmitted") {
//document.getElementById('msg-' + obj._id + '-progress').classList.remove("progress-bar-striped");
document
.getElementById("msg-" + obj._id + "-progress")
@ -1296,9 +1296,12 @@ update_chat = function (obj) {
.classList.remove("bg-danger");
document
.getElementById("msg-" + obj._id + "-progress")
.classList.add("bg-primary");
.classList.add("bg-success");
document.getElementById("msg-" + obj._id + "-progress").innerHTML = "";
document.getElementById(
"msg-" + obj._id + "-progress-information"
).innerHTML = "TRANSMITTED - " + obj.bytesperminute + " Bpm";
} else {
document
.getElementById("msg-" + obj._id + "-progress")
@ -1319,6 +1322,10 @@ update_chat = function (obj) {
document
.getElementById("msg-" + obj._id + "-progress")
.classList.add("bg-danger");
document.getElementById(
"msg-" + obj._id + "-progress-information"
).innerHTML = "TRANSMISSION FAILED - " + obj.bytesperminute + " Bpm";
}
//document.getElementById(id).className = message_class;