Add files via upload

This commit is contained in:
seb1k 2024-05-21 16:19:12 +02:00 committed by GitHub
parent 830b7da618
commit ef6c21fc86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 25 deletions

View file

@ -16,6 +16,14 @@ html.dark-mode {
--bordercolor:#4d6066;
}
.insummary{
opacity:.5;
padding:5px;
font-size:14px !important;
}
.insummary:hover{
opacity:1;
}
.menu_bottom{
border-top:1px solid var(--bordercolor);
justify-content:normal;
@ -3472,10 +3480,12 @@ table.fixedcopy {
line-height: 1.7em;
}
.messagelist .flagged span.date,
.messagelist td.subject span.size {
.messagelist .flagged span.date{
padding-right: 20px;
}
.messagelist td.subject span.size {
padding-right: 15px;
}
.messagelist td.subject span.date,
.messagelist td.subject span.size {

56
elastic2022/ui.min.js vendored
View file

@ -4696,7 +4696,7 @@ var m = document.getElementById("messagelist")
var msgs = m.querySelectorAll(".message")
// load for quick check( prevent blinking)
var LS = localStorage['contactphoto']??"[]"
var LS = localStorage['contactphoto']??"{}"
var LSdata = JSON.parse(LS)
@ -4713,12 +4713,14 @@ for(var i=0;i<msgs.length;i++)
d.onclick= function(event){event.preventDefault();};
var email=msgs[i].querySelector(".rcmContactAddress").title // ulgy but prevent blinking
var email=""
if(msgs[i].querySelector(".rcmContactAddress")) // ulgy but prevent blinking
var email=msgs[i].querySelector(".rcmContactAddress").title
var emailencode = urlencode(email)
const contact_in_array = (element) => element[0] == emailencode;
if(LSdata.some(contact_in_array) && LSdata.filter(contact_in_array)[0][1])
if(LSdata[emailencode]==1)
{
d.style.backgroundImage="url('?_task=addressbook&_action=photo&_email="+emailencode+"&_error=1')"
}
@ -4741,11 +4743,29 @@ for(var i=0;i<msgs.length;i++)
}
// 2nd loop for attachement
// 2nd part for attachement
var attachement_span = msgs[i].querySelectorAll(".attachment").length
var is_report = msgs[i].querySelectorAll(".report").length
if(attachement_span==2||is_report)
msgs[i].querySelector(".subject").querySelector(".subject").style.paddingRight = "18px"
// delete button
if(!msgs[i].querySelector(".deleteicon"))
{
var spanflags = msgs[i].querySelector(".size")
var d = document.createElement("span");
d.className="sebicon deleteicon insummary"
d.onclick= function(e){
var uid = e.target.closest(".message").uid
if (rcmail.env.mailbox == rcmail.env.trash_mailbox) // in Trash, delete
rcmail.with_selected_messages('delete',{_uid:[uid]})
else
rcmail.command('move',{id:rcmail.env.trash_mailbox ,uids:[uid]},"",event,true)
};
spanflags.appendChild(d);
}
}
setTimeout(try_changeletters_by_image, 0);
@ -4781,13 +4801,11 @@ function is_contactphoto(email)
{
// 1st check LS
var LS = localStorage['contactphoto']??"[]"
var LS = localStorage['contactphoto']??"{}"
var LSdata = JSON.parse(LS)
const contact_in_array = (element) => element[0] == email;
if(LSdata.some(contact_in_array))
return LSdata.filter(contact_in_array)[0][1]
if(LSdata[email]!==undefined)
return LSdata[email]
var xmlhttp = new XMLHttpRequest(),
method = 'GET',
@ -4824,10 +4842,10 @@ else
function LS_add_info(email,info)
{
var LS = localStorage['contactphoto']??"[]"
var LS = localStorage['contactphoto']??"{}"
var LSdata = JSON.parse(LS)
LSdata.push([email,info])
LSdata[ email ] = info;
localStorage['contactphoto'] = JSON.stringify(LSdata)
}
@ -4841,18 +4859,10 @@ LS_remove(email)
function LS_remove(email)
{
var LS = localStorage['contactphoto']??"[]"
var LS = localStorage['contactphoto']??"{}"
var LSdata = JSON.parse(LS)
for(var i=0;i<LSdata.length;i++)
{
if(LSdata[i][0]==email)
{
LSdata.splice(i, 1);
break;
}
}
delete LSdata[email];
localStorage['contactphoto'] = JSON.stringify(LSdata)
}