Merge branch 'main' into ls-gui-single-pager

This commit is contained in:
DJ2LS 2023-09-27 11:24:29 +02:00 committed by GitHub
commit 9e836c765b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,8 +80,6 @@ PouchDB.plugin(require("pouchdb-find"));
//PouchDB.plugin(require('pouchdb-replication'));
PouchDB.plugin(require("pouchdb-upsert"));
var db = new PouchDB(chatDB);
var users = new PouchDB(userDB);
@ -1055,7 +1053,6 @@ update_chat = function (obj) {
var attempt = obj.attempt;
}
// add percent and bytes per minute if not existing
//console.log(obj.percent)
if (typeof obj.percent == "undefined") {
@ -1384,17 +1381,16 @@ update_chat = function (obj) {
showOsPopUp("Message received from " + obj.dxcallsign, obj.msg);
}
// check if message is signed or not for adjusting icon
if(typeof obj.hmac_signed !== "undefined" && obj.hmac_signed !== "False"){
console.log(hmac_signed)
var hmac_signed = '<i class="bi bi-shield-fill-check"></i>';
} else {
var hmac_signed = '<i class="bi bi-shield-x"></i>';
}
// check if message is signed or not for adjusting icon
if (
typeof obj.hmac_signed !== "undefined" &&
obj.hmac_signed !== "False"
) {
console.log(hmac_signed);
var hmac_signed = '<i class="bi bi-shield-fill-check"></i>';
} else {
var hmac_signed = '<i class="bi bi-shield-x"></i>';
}
var new_message = `
<div class="d-flex align-items-center" style="margin-left: auto;"> <!-- max-width: 75%; -->
@ -1411,13 +1407,9 @@ update_chat = function (obj) {
</p>
<span id="msg-${
obj._id
}-hmac-badge" class="position-absolute top-0 start-100 translate-middle badge rounded-1 bg-secondary border border-white">
<span id="msg-${obj._id}-hmac-badge" class="position-absolute top-0 start-100 translate-middle badge rounded-1 bg-secondary border border-white">
<span id="msg-${
obj._id
}-hmac-signed" class="">${hmac_signed}</span>
<span id="msg-${obj._id}-hmac-signed" class="">${hmac_signed}</span>
</span>
</div>