mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bigchange for contact image avatar support #115
This commit is contained in:
parent
113a421d0f
commit
5069bc2950
32 changed files with 134 additions and 31 deletions
|
|
@ -22,10 +22,12 @@
|
|||
view.viewUserPicVisible = ko.observable(false);
|
||||
|
||||
view.message.subscribe(msg => {
|
||||
view.viewUserPicVisible(false);
|
||||
if (msg) {
|
||||
let from = msg.from[0],
|
||||
bimi = 'pass' == from.dkimStatus ? 1 : 0;
|
||||
// view.viewUserPic(`?Avatar/${bimi}/${encodeURIComponent(from.email)}`);
|
||||
// view.viewUserPicVisible(true);
|
||||
rl.pluginRemoteRequest((iError, data) => {
|
||||
if (!iError && data?.Result.type) {
|
||||
view.viewUserPic(`data:${data.Result.type};base64,${data.Result.data}`);
|
||||
|
|
@ -38,6 +40,23 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
/*
|
||||
if ('MailMessageList' === e.detail.viewModelTemplateID) {
|
||||
const
|
||||
template = document.getElementById('MailMessageList' ),
|
||||
messageCheckbox = template.content.querySelector('.messageCheckbox');
|
||||
messageCheckbox.dataset.bind = 'attr:{style:$root.viewUserPic($data)}';
|
||||
e.detail.viewUserPic = msg => {
|
||||
let from = msg.from[0],
|
||||
bimi = 'pass' == from.dkimStatus ? 1 : 0;
|
||||
return `background:no-repeat url("?Avatar/${bimi}/${encodeURIComponent(from.email)}") center / contain`;
|
||||
return `background:no-repeat url("?Avatar/${bimi}/${encodeURIComponent(from.email)}") right / 32px;width:68px`;
|
||||
};
|
||||
.checkboxMessage {
|
||||
background: #000;
|
||||
}
|
||||
}
|
||||
*/
|
||||
});
|
||||
|
||||
})(window.rl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue