mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
Improved Contacts handling
This commit is contained in:
parent
bfe80dcacb
commit
fe20741409
2 changed files with 24 additions and 17 deletions
|
|
@ -32,7 +32,7 @@ const propertyMap = [
|
||||||
'URL' => 'Uri',
|
'URL' => 'Uri',
|
||||||
'UID' => 'FlatText',
|
'UID' => 'FlatText',
|
||||||
'VERSION' => 'FlatText',
|
'VERSION' => 'FlatText',
|
||||||
'KEY' => 'FlatText',
|
'KEY' => 'FlatText', // <uri>data:application/pgp-keys;base64,AZaz09==</uri>
|
||||||
'TZ' => 'Text',
|
'TZ' => 'Text',
|
||||||
|
|
||||||
// vCard 3.0 properties
|
// vCard 3.0 properties
|
||||||
|
|
@ -71,6 +71,21 @@ const propertyMap = [
|
||||||
'HOBBY' => 'FlatText',
|
'HOBBY' => 'FlatText',
|
||||||
'INTEREST' => 'FlatText',
|
'INTEREST' => 'FlatText',
|
||||||
'ORG-DIRECTORY' => 'FlatText
|
'ORG-DIRECTORY' => 'FlatText
|
||||||
|
|
||||||
|
<x-crypto>
|
||||||
|
<allowed>
|
||||||
|
<text>PGP/INLINE</text>
|
||||||
|
<text>PGP/MIME</text>
|
||||||
|
<text>S/MIME</text>
|
||||||
|
<text>S/MIMEOpaque</text>
|
||||||
|
</allowed>
|
||||||
|
<signpref>
|
||||||
|
<text>Ask | Never | IfPossible | Always</text>
|
||||||
|
</signpref>
|
||||||
|
<encryptpref>
|
||||||
|
<text>Ask | Never | IfPossible | Always</text>
|
||||||
|
</encryptpref>
|
||||||
|
</x-crypto>
|
||||||
];
|
];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -247,20 +262,9 @@ export class ContactModel extends AbstractModel {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
lineAsCss() {
|
lineAsCss() {
|
||||||
const result = [];
|
return (this.selected() ? 'selected' : '')
|
||||||
if (this.deleted()) {
|
+ (this.deleted() ? ' deleted' : '')
|
||||||
result.push('deleted');
|
+ (this.checked() ? ' checked' : '')
|
||||||
}
|
+ (this.focused() ? ' focused' : '');
|
||||||
if (this.selected()) {
|
|
||||||
result.push('selected');
|
|
||||||
}
|
|
||||||
if (this.checked()) {
|
|
||||||
result.push('checked');
|
|
||||||
}
|
|
||||||
if (this.focused()) {
|
|
||||||
result.push('focused');
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.join(' ');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,10 @@ export class ContactsPopupView extends AbstractViewPopup {
|
||||||
let count = 0,
|
let count = 0,
|
||||||
list = [];
|
list = [];
|
||||||
|
|
||||||
if (!iError && arrayLength(data.Result.List)) {
|
if (iError) {
|
||||||
|
// console.error(data);
|
||||||
|
alert(data?.ErrorMessage || getNotification(iError));
|
||||||
|
} else if (arrayLength(data.Result.List)) {
|
||||||
data.Result.List.forEach(item => {
|
data.Result.List.forEach(item => {
|
||||||
item = ContactModel.reviveFromJson(item);
|
item = ContactModel.reviveFromJson(item);
|
||||||
item && list.push(item);
|
item && list.push(item);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue