diff --git a/dev/DAV/JCard.js b/dev/DAV/JCard.js index 38676cdac..56c247e67 100644 --- a/dev/DAV/JCard.js +++ b/dev/DAV/JCard.js @@ -79,12 +79,12 @@ export class JCard { * @param arg the field, or a VCardProperty object * @param value the value for the VCardProperty object * @param params the parameters for the VCardProperty object - * @param group the group for the VCardProperty object + * @param type the type for the VCardProperty object */ - set(arg, value, params, group) + set(arg, value, params, type) { if (typeof arg === 'string') { - arg = new VCardProperty(String(arg), value, params, group); + arg = new VCardProperty(String(arg), value, params, type); } if (!(arg instanceof VCardProperty)) { throw new Error('invalid argument of VCard.set(), expects string arguments or a VCardProperty'); @@ -94,11 +94,11 @@ export class JCard { return arg; } - add(arg, value, params, group) + add(arg, value, params, type) { // string arguments if (typeof arg === 'string') { - arg = new VCardProperty(String(arg), value, params, group); + arg = new VCardProperty(String(arg), value, params, type); } if (!(arg instanceof VCardProperty)) { throw new Error('invalid argument of VCard.add(), expects string arguments or a VCardProperty'); diff --git a/dev/Model/Contact.js b/dev/Model/Contact.js index b3f4df8c3..caedcc9f9 100644 --- a/dev/Model/Contact.js +++ b/dev/Model/Contact.js @@ -108,12 +108,16 @@ export class ContactModel extends AbstractModel { middleName: '', // MiddleName namePrefix: '', // NamePrefix nameSuffix: '', // NameSuffix - nickname: null + nickname: null, + + encryptpref: '', + signpref: '' }); // this.email = koArrayWithDestroy(); this.email = ko.observableArray(); this.tel = ko.observableArray(); this.url = ko.observableArray(); + this.adr = ko.observableArray(); this.addComputables({ hasValidName: () => !!(this.givenName() || this.surName()), @@ -156,7 +160,7 @@ export class ContactModel extends AbstractModel { /** * @static - * @param {FetchJsonContact} json + * @param {jCard} json * @returns {?ContactModel} */ static reviveFromJson(json) { @@ -181,6 +185,26 @@ export class ContactModel extends AbstractModel { }); }); + props = jCard.get('adr'); + props && props.forEach(prop => { + contact.adr.push({ + street: ko.observable(prop.value[2]), + street_ext: ko.observable(prop.value[1]), + locality: ko.observable(prop.value[3]), + region: ko.observable(prop.value[4]), + postcode: ko.observable(prop.value[5]), + pobox: ko.observable(prop.value[0]), + country: ko.observable(prop.value[6]), + preferred: ko.observable(prop.params.pref), + type: ko.observable(prop.params.type) // HOME | WORK + }); + }); + + props = jCard.getOne('x-Crypto'); + contact.signpref(props?.params.signpref || 'Ask'); + contact.encryptpref(props?.params.encryptpref || 'Ask'); +// contact.encryptpref(props?.params.allowed || 'PGP/INLINE,PGP/MIME,S/MIME,S/MIMEOpaque'); + contact.jCard = jCard; } return contact; @@ -249,6 +273,12 @@ export class ContactModel extends AbstractModel { values.forEach(value => value && jCard.add(field, value)); }); + jCard.set('x-Crypto', '', { + allowed: 'PGP/INLINE,PGP/MIME,S/MIME,S/MIMEOpaque', + signpref: this.signpref(), + encryptpref: this.encryptpref() + }, 'x-crypto'); + // Done by server // jCard.set('rev', '2022-05-21T10:59:52Z') diff --git a/dev/Model/ContactProperty.js b/dev/Model/ContactProperty.js deleted file mode 100644 index 8617627f5..000000000 --- a/dev/Model/ContactProperty.js +++ /dev/null @@ -1,86 +0,0 @@ -import { pInt, pString } from 'Common/Utils'; -import { i18n } from 'Common/Translator'; - -import { AbstractModel } from 'Knoin/AbstractModel'; - -const trim = text => null == text ? "" : (text + "").trim(); - -/** - * @enum {number} - */ -export const ContactPropertyType = { - Unknown: 0, - - FullName: 10, - - FirstName: 15, - LastName: 16, - MiddleName: 17, - Nick: 18, - - NamePrefix: 20, - NameSuffix: 21, - - Email: 30, - Phone: 31, - Web: 32, - - Birthday: 40, - - Facebook: 90, - Skype: 91, - GitHub: 92, - - Note: 110, - - Custom: 250 -}; - -export class ContactPropertyModel extends AbstractModel { - /** - * @param {number=} type = Enums.ContactPropertyType.Unknown - * @param {string=} typeStr = '' - * @param {string=} value = '' - * @param {boolean=} focused = false - * @param {string=} placeholder = '' - */ - constructor(type = ContactPropertyType.Unknown, typeStr = '', value = '', focused = false, placeholder = '') { - super(); - - this.addObservables({ - type: pInt(type), - typeStr: pString(typeStr), - focused: !!focused, - value: pString(value), - - placeholder: placeholder - }); - - this.addComputables({ - placeholderValue: () => { - const v = this.placeholder(); - return v ? i18n(v) : ''; - }, - - largeValue: () => ContactPropertyType.Note === this.type() - }); - } - - isType(type) { - return this.type && type === this.type(); - } - - isValid() { - return this.value && !!trim(this.value()); - } - - toJSON() { - return { - type: this.type(), - typeStr: this.typeStr(), - value: this.value() - }; - } - -// static reviveFromJson(json) {} -} diff --git a/dev/Styles/Ui.less b/dev/Styles/Ui.less index 6a7cb090e..b7e0d083e 100644 --- a/dev/Styles/Ui.less +++ b/dev/Styles/Ui.less @@ -99,9 +99,10 @@ tr:hover .drag-handle { .tabs { display: grid; + grid-auto-columns: minmax(0, 1fr); } -.tabs input[type="radio"] { +.tabs > input[type="radio"] { position: absolute; top: 0; left: -9999px; @@ -109,7 +110,7 @@ tr:hover .drag-handle { } // Actual tabs -.tabs label { +.tabs > label { border: 1px solid transparent; border-radius: 4px 4px 0 0; cursor: pointer; @@ -124,9 +125,9 @@ tr:hover .drag-handle { opacity: 0.8; } } -.tabs [id^="tab"]:checked + label { +.tabs > [id^="tab"]:checked + label { background-color: @white; - border-color: #ddd #ddd transparent #ddd; + border-color: rgba(128,128,128,.5) rgba(128,128,128,.5) transparent rgba(128,128,128,.5); opacity: 1; z-index: 1; } @@ -140,6 +141,6 @@ tr:hover .drag-handle { visibility: hidden; } -.tabs [id^="tab"]:checked + label + .tab-content { +.tabs > [id^="tab"]:checked + label + .tab-content { visibility: visible; } diff --git a/dev/Styles/User/Contacts.less b/dev/Styles/User/Contacts.less index 84016aa7d..1b979d2cb 100644 --- a/dev/Styles/User/Contacts.less +++ b/dev/Styles/User/Contacts.less @@ -11,7 +11,7 @@ max-height: 700px; .control-group { - label { + label.iconsize24 { padding-top: 0; width: 50px; } @@ -135,12 +135,12 @@ .b-view-content-toolbar { padding: 7px; position: absolute; - top: 0; + bottom: 0; right: 0; left: @contacts-popup-left-width; height: 30px; text-align: right; - border-bottom: 1px solid rgba(128,128,128,0.4); + border-top: 1px solid rgba(128,128,128,0.4); .button-save-contact { &.dirty:enabled { @@ -148,12 +148,17 @@ font-weight: bold; } } + + .dropdown-menu.right-edge { + top: auto; + bottom: 100%; + } } .b-view-content { position: absolute; - top: 45px; - bottom: 0; + top: 0; + bottom: 45px; left: @contacts-popup-left-width; right: 0; overflow: auto; @@ -176,19 +181,10 @@ color: #999; } - .top-part { - padding-top: 20px; - } - .property-line { margin-bottom: 5px; } - .top-row { - padding: 10px 0; - height: 30px; - } - input, textarea { box-shadow: none; border-color: #fff; @@ -206,43 +202,28 @@ border-color: #999; } } + } - .hasError { - input { - color: #ee5f5b; - border-color: #ee5f5b; - } + .read-only-sign { + display: none; + position: absolute; + top: 20px; + right: 40px; + } + + .read-only { + span, .e-read-only-sign { + display: inline-block; } - .e-save-trigger { - position: absolute; - top: 25px; - left: 10px; - } - - .e-read-only-sign { + input, textarea { display: none; - position: absolute; - top: 20px; - right: 40px; } + } - .e-share-sign { - position: absolute; - top: 20px; - right: 20px; - cursor: pointer; - } - - &.read-only { - span, .e-read-only-sign { - display: inline-block; - } - - input, textarea, .e-share-sign { - display: none; - } - } + .tab-content { + grid-column-end: 3; + padding-top: 20px; } } diff --git a/dev/Styles/User/Shortcuts.less b/dev/Styles/User/Shortcuts.less index 1605d89c6..1edd1ad5f 100644 --- a/dev/Styles/User/Shortcuts.less +++ b/dev/Styles/User/Shortcuts.less @@ -6,6 +6,6 @@ } .tab-content { - grid-column-end: 6; + grid-column-end: 5; } } diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js index 0ac6a9485..428ed3df4 100644 --- a/dev/View/Popup/Contacts.js +++ b/dev/View/Popup/Contacts.js @@ -107,7 +107,7 @@ export class ContactsPopupView extends AbstractViewPopup { } newContact() { - this.populateViewContact(null); + this.populateViewContact(); this.selectorContact(null); } @@ -252,11 +252,7 @@ export class ContactsPopupView extends AbstractViewPopup { * @param {?ContactModel} contact */ populateViewContact(contact) { - if (!contact) { - contact = new ContactModel; - } - this.contact(contact); - + this.contact(contact || new ContactModel); this.hasChanges(false); } diff --git a/plugins/kolab/KolabAddressBook.php b/plugins/kolab/KolabAddressBook.php index 4f0dcb25e..64c058e09 100644 --- a/plugins/kolab/KolabAddressBook.php +++ b/plugins/kolab/KolabAddressBook.php @@ -1,8 +1,6 @@ sSearch = 'from='.$sSearch; } $oParams->sSort = 'FROM'; + $oParams->bUseSortIfSupported = !!\RainLoop\Api::Actions()->Config()->Get('labs', 'use_imap_sort', true); // $oParams->iPrevUidNext = $this->GetActionParam('UidNext', 0); // $oParams->bUseThreads = false; diff --git a/plugins/kolab/index.php b/plugins/kolab/index.php index e8555f3e2..84902031a 100644 --- a/plugins/kolab/index.php +++ b/plugins/kolab/index.php @@ -4,11 +4,11 @@ class KolabPlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Kolab', - VERSION = '1.1', - RELEASE = '2022-05-20', + VERSION = '2.0', + RELEASE = '2022-09-06', CATEGORY = 'Contacts', DESCRIPTION = 'Use an Address Book of Kolab.', - REQUIRED = '2.16.2'; + REQUIRED = '2.18.0'; public function Init() : void { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook.php index 5d124f818..d9f0fd987 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook.php @@ -2,8 +2,6 @@ namespace RainLoop\Providers; -use RainLoop\Providers\AddressBook\Enumerations\PropertyType as PropertyType; - class AddressBook extends AbstractProvider { /** diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Contact.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Contact.php index 8cc882dfa..c6ab97029 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Contact.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Contact.php @@ -2,11 +2,6 @@ namespace RainLoop\Providers\AddressBook\Classes; -use - RainLoop\Providers\AddressBook\Enumerations\PropertyType, - RainLoop\Providers\AddressBook\Classes\Property -; - class Contact implements \JsonSerializable { /** diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Property.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Property.php index 4c7e13433..9a496d3ac 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Property.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Classes/Property.php @@ -26,16 +26,6 @@ class Property implements \JsonSerializable */ public $Value; - /** - * @var string - */ - public $ValueLower = ''; - - /** - * @var string - */ - public $ValueCustom = ''; - /** * @var int */ @@ -48,101 +38,9 @@ class Property implements \JsonSerializable $this->TypeStr = $sTypeStr; } - public function IsName() : bool - { - return \in_array($this->Type, array(PropertyType::FULLNAME, PropertyType::FIRST_NAME, - PropertyType::LAST_NAME, PropertyType::MIDDLE_NAME, PropertyType::NICK_NAME)); - } - - public function IsEmail() : bool - { - return PropertyType::EMAIl === $this->Type; - } - - public function IsPhone() : bool - { - return PropertyType::PHONE === $this->Type; - } - - public function IsWeb() : bool - { - return PropertyType::WEB_PAGE === $this->Type; - } - - public function IsValueForLower() : bool - { - return $this->IsEmail() || $this->IsName() || $this->IsWeb(); - } - - public function TypesAsArray() : array - { - $aResult = array(); - if (!empty($this->TypeStr)) - { - $sTypeStr = \preg_replace('/[\s]+/', '', $this->TypeStr); - $aResult = \explode(',', $sTypeStr); - } - - return $aResult; - } - - public function TypesUpperAsArray() : array - { - return \array_map('strtoupper', $this->TypesAsArray()); - } - - public function UpdateDependentValues() : void - { - $this->Value = \trim($this->Value); - $this->ValueCustom = \trim($this->ValueCustom); - $this->TypeStr = \trim($this->TypeStr); - $this->ValueLower = ''; - - if (\strlen($this->Value)) - { - // lower - if ($this->IsEmail()) - { - $this->Value = \MailSo\Base\Utils::StrMailDomainToLower($this->Value); - } - - if ($this->IsName()) - { - $this->Value = \MailSo\Base\Utils::StripSpaces($this->Value); - } - - // lower value for searching - if ($this->IsValueForLower()) - { - $this->ValueLower = (string) \mb_strtolower($this->Value, 'UTF-8'); - } - - // phone value for searching - if ($this->IsPhone()) - { - $sPhone = \trim($this->Value); - $sPhone = \preg_replace('/^[+]+/', '', $sPhone); - $sPhone = \preg_replace('/[^\d]/', '', $sPhone); - - $this->ValueCustom = \trim($sPhone); - } - } - } - #[\ReturnTypeWillChange] public function jsonSerialize() { - // Simple hack - if ($this && $this->IsWeb()) - { - $this->Value = \preg_replace('#(https?)\\\://#i', '$1://', $this->Value); - } - return array( - '@Object' => 'Object/ContactProperty', - 'id' => $this->IdProperty, - 'type' => $this->Type, - 'typeStr' => $this->TypeStr, - 'value' => \MailSo\Base\Utils::Utf8Clear($this->Value) - ); + throw new \Exception('Obsolete ' . __CLASS__ . '::jsonSerialize()'); } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Legacy.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Legacy.php new file mode 100644 index 000000000..586731189 --- /dev/null +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Legacy.php @@ -0,0 +1,111 @@ +getValue()); + if (\strlen($sValue)) { + $oTypes = $oProp['TYPE']; + $aTypes = $oTypes ? $oTypes->getParts() : array(); + $pref = 100; + if (0 < $oProp['PREF']) { + $pref = (int) $oProp['PREF']; + } + $aTmp[\substr(1000+$pref,-3) . $sValue] = new Property($iType, $sValue, \implode(',', $aTypes)); + } + } + \ksort($aTmp); + foreach ($aTmp as $oProp) { + yield $oProp; + } + } + + /** + * @param mixed $oProp + */ + private static function getPropertyValueHelper($oProp, bool $bOldVersion) : string + { + $sValue = \trim($oProp); + if ($bOldVersion && !isset($oProp->parameters['CHARSET'])) { + if (\strlen($sValue)) { + $sEncValue = \utf8_encode($sValue); + if (\strlen($sEncValue)) { + $sValue = $sEncValue; + } + } + } + return \MailSo\Base\Utils::Utf8Clear($sValue); + } + + public static function VCardToProperties(\Sabre\VObject\Component\VCard $oVCard) : iterable + { + yield new Property(PropertyType::JCARD, \json_encode($oVCard)); + + $bOldVersion = !empty($oVCard->VERSION) && \in_array((string) $oVCard->VERSION, array('2.1', '2.0', '1.0')); + + if (isset($oVCard->FN) && '' !== \trim($oVCard->FN)) { + $sValue = static::getPropertyValueHelper($oVCard->FN, $bOldVersion); + yield new Property(PropertyType::FULLNAME, $sValue); + } + + if (isset($oVCard->N)) { + $aNames = $oVCard->N->getParts(); + foreach ($aNames as $iIndex => $sValue) { + $sValue = \trim($sValue); + if ($bOldVersion && !isset($oVCard->N->parameters['CHARSET'])) { + if (\strlen($sValue)) { + $sEncValue = \utf8_encode($sValue); + if (\strlen($sEncValue)) { + $sValue = $sEncValue; + } + } + } + $sValue = \MailSo\Base\Utils::Utf8Clear($sValue); + if ($sValue) { + switch ($iIndex) { + case 0: + yield new Property(PropertyType::LAST_NAME, $sValue); + break; + case 1: + yield new Property(PropertyType::FIRST_NAME, $sValue); + break; + case 2: + yield new Property(PropertyType::MIDDLE_NAME, $sValue); + break; + case 3: + yield new Property(PropertyType::NAME_PREFIX, $sValue); + break; + case 4: + yield new Property(PropertyType::NAME_SUFFIX, $sValue); + break; + } + } + } + } + + if (isset($oVCard->EMAIL)) { + yield from static::yieldPropertyHelper($oVCard->EMAIL, PropertyType::EMAIl); + } + + if (isset($oVCard->URL)) { + yield from static::yieldPropertyHelper($oVCard->URL, PropertyType::WEB_PAGE); + } + + if (isset($oVCard->TEL)) { + yield from static::yieldPropertyHelper($oVCard->TEL, PropertyType::PHONE); + } + } +} diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php index e34d732d8..bdbad2a36 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php @@ -2,7 +2,11 @@ namespace RainLoop\Providers\AddressBook; -use RainLoop\Providers\AddressBook\Enumerations\PropertyType; +use + Sabre\VObject\Component\VCard, + RainLoop\Providers\AddressBook\Classes\Contact, + RainLoop\Providers\AddressBook\Enumerations\PropertyType +; class PdoAddressBook extends \RainLoop\Common\PdoAbstract @@ -265,7 +269,7 @@ class PdoAddressBook } } - if ($oVCard instanceof \Sabre\VObject\Component\VCard) { + if ($oVCard instanceof VCard) { $oVCard->UID = $aData['uid']; $oContact = null; @@ -273,7 +277,7 @@ class PdoAddressBook $oContact = $this->GetContactByID($mExistingContactID); } if (!$oContact) { - $oContact = new Classes\Contact(); + $oContact = new Contact(); } $oContact->setVCard($oVCard); @@ -325,7 +329,7 @@ class PdoAddressBook return true; } - public function ContactSave(Classes\Contact $oContact) : bool + public function ContactSave(Contact $oContact) : bool { if (1 > $this->iUserID) { return false; @@ -390,9 +394,9 @@ class PdoAddressBook if (0 < $iIdContact) { $aParams = array(); - foreach (Utils::VCardToProperties($oContact->vCard) as /* @var $oProp Classes\Property */ $oProp) { + foreach (Legacy::VCardToProperties($oContact->vCard) as /* @var $oProp Classes\Property */ $oProp) { $iFreq = $oProp->Frec; - if ($oProp->IsEmail() && isset($aFreq[$oProp->Value])) { + if (PropertyType::EMAIl === $oProp->Type && isset($aFreq[$oProp->Value])) { $iFreq = $aFreq[$oProp->Value]; } $aParams[] = array( @@ -401,8 +405,8 @@ class PdoAddressBook ':prop_type' => array($oProp->Type, \PDO::PARAM_INT), ':prop_type_str' => array($oProp->TypeStr, \PDO::PARAM_STR), ':prop_value' => array($oProp->Value, \PDO::PARAM_STR), - ':prop_value_lower' => array($oProp->ValueLower, \PDO::PARAM_STR), - ':prop_value_custom' => array($oProp->ValueCustom, \PDO::PARAM_STR), + ':prop_value_lower' => array(\mb_strtolower($oProp->Value, 'UTF-8'), \PDO::PARAM_STR), + ':prop_value_custom' => array('', \PDO::PARAM_STR), ':prop_frec' => array($iFreq, \PDO::PARAM_INT), ); } @@ -475,7 +479,7 @@ class PdoAddressBook foreach ($aFetch as $aItem) { $iIdContact = $aItem && isset($aItem['id_contact']) ? (int) $aItem['id_contact'] : 0; if (0 < $iIdContact) { - $oContact = new Classes\Contact(); + $oContact = new Contact(); $oContact->id = (string) $iIdContact; $oContact->IdContactStr = (string) $aItem['id_contact_str']; // $oContact->Display = (string) $aItem['display']; @@ -523,7 +527,7 @@ class PdoAddressBook $iPrevId = $iId; } if (!isset($aVCards[$iId])) { - $aVCards[$iId] = new \Sabre\VObject\Component\VCard; + $aVCards[$iId] = new VCard; } $oVCard = $aVCards[$iId]; $oVCard->VERSION = '4.0'; @@ -684,7 +688,7 @@ class PdoAddressBook /** * @param mixed $mID */ - public function GetContactByID($mID, bool $bIsStrID = false) : ?Classes\Contact + public function GetContactByID($mID, bool $bIsStrID = false) : ?Contact { $mID = \trim($mID); @@ -962,16 +966,12 @@ class PdoAddressBook if (\count($aEmailsToCreate)) { foreach ($aEmailsToCreate as $oEmail) { - $oContact = new Classes\Contact(); - + $oVCard = new VCard; + $bValid = false; if ('' !== \trim($oEmail->GetEmail())) { - $oPropEmail = new Classes\Property(); - $oPropEmail->Type = Enumerations\PropertyType::EMAIl; - $oPropEmail->Value = \trim($oEmail->GetEmail(true)); - - $oContact->Properties[] = $oPropEmail; + $oVCard->add('EMAIL', \trim($oEmail->GetEmail(true))); + $bValid = true; } - if ('' !== \trim($oEmail->GetDisplayName())) { $sFirst = $sLast = ''; $sFullName = $oEmail->GetDisplayName(); @@ -982,25 +982,14 @@ class PdoAddressBook } else { $sFirst = $sFullName; } - - if (\strlen($sFirst)) { - $oPropName = new Classes\Property(); - $oPropName->Type = Enumerations\PropertyType::FIRST_NAME; - $oPropName->Value = \trim($sFirst); - - $oContact->Properties[] = $oPropName; - } - - if (\strlen($sLast)) { - $oPropName = new Classes\Property(); - $oPropName->Type = Enumerations\PropertyType::LAST_NAME; - $oPropName->Value = \trim($sLast); - - $oContact->Properties[] = $oPropName; + if (\strlen($sFirst) || \strlen($sLast)) { + $oVCard->N = array($sLast, $sFirst, '', '', ''); + $bValid = true; } } - - if (\count($oContact->Properties)) { + if ($bValid) { + $oContact = new Contact(); + $oContact->setVCard($oVCard); $this->ContactSave($oContact); } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Utils.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Utils.php index 8dbde7d2a..00834404d 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Utils.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/Utils.php @@ -2,114 +2,8 @@ namespace RainLoop\Providers\AddressBook; -use - RainLoop\Providers\AddressBook\Enumerations\PropertyType, - RainLoop\Providers\AddressBook\Classes\Property -; - - class Utils { - /** - * @param mixed $oProp - */ - private static function yieldPropertyHelper($oArrayProp, int $iType) : iterable - { - $aTmp = []; - foreach ($oArrayProp as $oProp) { - $sValue = \trim($oProp->getValue()); - if (\strlen($sValue)) { - $oTypes = $oProp['TYPE']; - $aTypes = $oTypes ? $oTypes->getParts() : array(); - $pref = 100; - if (0 < $oProp['PREF']) { - $pref = (int) $oProp['PREF']; - } - $aTmp[\substr(1000+$pref,-3) . $sValue] = new Property($iType, $sValue, \implode(',', $aTypes)); - } - } - \ksort($aTmp); - foreach ($aTmp as $oProp) { - yield $oProp; - } - } - - /** - * @param mixed $oProp - */ - private static function getPropertyValueHelper($oProp, bool $bOldVersion) : string - { - $sValue = \trim($oProp); - if ($bOldVersion && !isset($oProp->parameters['CHARSET'])) { - if (\strlen($sValue)) { - $sEncValue = \utf8_encode($sValue); - if (\strlen($sEncValue)) { - $sValue = $sEncValue; - } - } - } - return \MailSo\Base\Utils::Utf8Clear($sValue); - } - - public static function VCardToProperties(\Sabre\VObject\Component\VCard $oVCard) : iterable - { - yield new Property(PropertyType::JCARD, \json_encode($oVCard)); - - $bOldVersion = !empty($oVCard->VERSION) && \in_array((string) $oVCard->VERSION, array('2.1', '2.0', '1.0')); - - if (isset($oVCard->FN) && '' !== \trim($oVCard->FN)) { - $sValue = static::getPropertyValueHelper($oVCard->FN, $bOldVersion); - yield new Property(PropertyType::FULLNAME, $sValue); - } - - if (isset($oVCard->N)) { - $aNames = $oVCard->N->getParts(); - foreach ($aNames as $iIndex => $sValue) { - $sValue = \trim($sValue); - if ($bOldVersion && !isset($oVCard->N->parameters['CHARSET'])) { - if (\strlen($sValue)) { - $sEncValue = \utf8_encode($sValue); - if (\strlen($sEncValue)) { - $sValue = $sEncValue; - } - } - } - $sValue = \MailSo\Base\Utils::Utf8Clear($sValue); - if ($sValue) { - switch ($iIndex) { - case 0: - yield new Property(PropertyType::LAST_NAME, $sValue); - break; - case 1: - yield new Property(PropertyType::FIRST_NAME, $sValue); - break; - case 2: - yield new Property(PropertyType::MIDDLE_NAME, $sValue); - break; - case 3: - yield new Property(PropertyType::NAME_PREFIX, $sValue); - break; - case 4: - yield new Property(PropertyType::NAME_SUFFIX, $sValue); - break; - } - } - } - } - - if (isset($oVCard->EMAIL)) { - yield from static::yieldPropertyHelper($oVCard->EMAIL, PropertyType::EMAIl); - } - - if (isset($oVCard->URL)) { - yield from static::yieldPropertyHelper($oVCard->URL, PropertyType::WEB_PAGE); - } - - if (isset($oVCard->TEL)) { - yield from static::yieldPropertyHelper($oVCard->TEL, PropertyType::PHONE); - } - } - private static $aMap = array( 'title' => 'FN', 'name' => 'FN', @@ -293,4 +187,11 @@ class Utils } } } +/* + public static function QrCode(string $sVcfData) : string + { + MECARD:N:djmaze;ORG:SnappyMail;TEL:+31012345678;URL:https\://snappymail.eu;EMAIL:info@snappymail.eu;ADR:address line;; + VCARD + } +*/ } diff --git a/snappymail/v/0.0.0/app/localization/ar-SA/user.json b/snappymail/v/0.0.0/app/localization/ar-SA/user.json index 6d83c7d42..a39f3c6e3 100644 --- a/snappymail/v/0.0.0/app/localization/ar-SA/user.json +++ b/snappymail/v/0.0.0/app/localization/ar-SA/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "يتم البحث..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "إضافة جهة إتصال", "BUTTON_CREATE_CONTACT": "إنشاء", "BUTTON_UPDATE_CONTACT": "تحديث", diff --git a/snappymail/v/0.0.0/app/localization/bg-BG/user.json b/snappymail/v/0.0.0/app/localization/bg-BG/user.json index e89a097a9..dce95e5cb 100644 --- a/snappymail/v/0.0.0/app/localization/bg-BG/user.json +++ b/snappymail/v/0.0.0/app/localization/bg-BG/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Търсене..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Добави контакт", "BUTTON_CREATE_CONTACT": "Създай", "BUTTON_UPDATE_CONTACT": "Обнови", diff --git a/snappymail/v/0.0.0/app/localization/cs-CZ/user.json b/snappymail/v/0.0.0/app/localization/cs-CZ/user.json index 6ae4b05e5..c437a20ce 100644 --- a/snappymail/v/0.0.0/app/localization/cs-CZ/user.json +++ b/snappymail/v/0.0.0/app/localization/cs-CZ/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Hledám..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Přidat kontakt", "BUTTON_CREATE_CONTACT": "Vytvořit", "BUTTON_UPDATE_CONTACT": "Aktualizovat", diff --git a/snappymail/v/0.0.0/app/localization/da-DK/user.json b/snappymail/v/0.0.0/app/localization/da-DK/user.json index 21a61175a..2c2e78450 100644 --- a/snappymail/v/0.0.0/app/localization/da-DK/user.json +++ b/snappymail/v/0.0.0/app/localization/da-DK/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Søger..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Tilføj kontakt", "BUTTON_CREATE_CONTACT": "Ny kontakt", "BUTTON_UPDATE_CONTACT": "Opdater kontakt", diff --git a/snappymail/v/0.0.0/app/localization/de-DE/user.json b/snappymail/v/0.0.0/app/localization/de-DE/user.json index 4ba33d7f5..29215bcf4 100644 --- a/snappymail/v/0.0.0/app/localization/de-DE/user.json +++ b/snappymail/v/0.0.0/app/localization/de-DE/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Suche läuft..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Kontakt hinzufügen", "BUTTON_CREATE_CONTACT": "Kontakt anlegen", "BUTTON_UPDATE_CONTACT": "Kontakt aktualisieren", diff --git a/snappymail/v/0.0.0/app/localization/el-GR/user.json b/snappymail/v/0.0.0/app/localization/el-GR/user.json index 17d3427c0..ab8b77397 100644 --- a/snappymail/v/0.0.0/app/localization/el-GR/user.json +++ b/snappymail/v/0.0.0/app/localization/el-GR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Αναζήτηση..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Προσθήκη επαφής", "BUTTON_CREATE_CONTACT": "Δημιουργία", "BUTTON_UPDATE_CONTACT": "Ενημέρωση", diff --git a/snappymail/v/0.0.0/app/localization/en-GB/user.json b/snappymail/v/0.0.0/app/localization/en-GB/user.json index 461e90940..f7a606e65 100644 --- a/snappymail/v/0.0.0/app/localization/en-GB/user.json +++ b/snappymail/v/0.0.0/app/localization/en-GB/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Searching..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Add Contact", "BUTTON_CREATE_CONTACT": "Create", "BUTTON_UPDATE_CONTACT": "Update", diff --git a/snappymail/v/0.0.0/app/localization/en/user.json b/snappymail/v/0.0.0/app/localization/en/user.json index 78834a28b..e76c46f1d 100644 --- a/snappymail/v/0.0.0/app/localization/en/user.json +++ b/snappymail/v/0.0.0/app/localization/en/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Searching..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Add Contact", "BUTTON_CREATE_CONTACT": "Create", "BUTTON_UPDATE_CONTACT": "Update", diff --git a/snappymail/v/0.0.0/app/localization/es-ES/user.json b/snappymail/v/0.0.0/app/localization/es-ES/user.json index 9ed01c9f3..1a5a6ef01 100644 --- a/snappymail/v/0.0.0/app/localization/es-ES/user.json +++ b/snappymail/v/0.0.0/app/localization/es-ES/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Buscando..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Añadir Contacto", "BUTTON_CREATE_CONTACT": "Crear", "BUTTON_UPDATE_CONTACT": "Actualizar", diff --git a/snappymail/v/0.0.0/app/localization/et-EE/user.json b/snappymail/v/0.0.0/app/localization/et-EE/user.json index 1e494c345..57139a81e 100644 --- a/snappymail/v/0.0.0/app/localization/et-EE/user.json +++ b/snappymail/v/0.0.0/app/localization/et-EE/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Otsin..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Lisa kontakt", "BUTTON_CREATE_CONTACT": "Lisa", "BUTTON_UPDATE_CONTACT": "Salvesta", diff --git a/snappymail/v/0.0.0/app/localization/fa-IR/user.json b/snappymail/v/0.0.0/app/localization/fa-IR/user.json index e78644c67..d33dc91c9 100644 --- a/snappymail/v/0.0.0/app/localization/fa-IR/user.json +++ b/snappymail/v/0.0.0/app/localization/fa-IR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "در حال جستجو..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "اضافه‌کردن تماس", "BUTTON_CREATE_CONTACT": "ایجاد", "BUTTON_UPDATE_CONTACT": "بروزرسانی", diff --git a/snappymail/v/0.0.0/app/localization/fi-FI/user.json b/snappymail/v/0.0.0/app/localization/fi-FI/user.json index bc858cccc..5c700d3ed 100644 --- a/snappymail/v/0.0.0/app/localization/fi-FI/user.json +++ b/snappymail/v/0.0.0/app/localization/fi-FI/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Hakee..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Lisää yhteystieto", "BUTTON_CREATE_CONTACT": "Luo", "BUTTON_UPDATE_CONTACT": "Päivitä", diff --git a/snappymail/v/0.0.0/app/localization/fr-FR/user.json b/snappymail/v/0.0.0/app/localization/fr-FR/user.json index 6b17de69d..008467854 100644 --- a/snappymail/v/0.0.0/app/localization/fr-FR/user.json +++ b/snappymail/v/0.0.0/app/localization/fr-FR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Recherche..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Ajouter un contact", "BUTTON_CREATE_CONTACT": "Créer", "BUTTON_UPDATE_CONTACT": "Modifier", diff --git a/snappymail/v/0.0.0/app/localization/hu-HU/user.json b/snappymail/v/0.0.0/app/localization/hu-HU/user.json index c6919a224..c55bf17a4 100644 --- a/snappymail/v/0.0.0/app/localization/hu-HU/user.json +++ b/snappymail/v/0.0.0/app/localization/hu-HU/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Keresés..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Névjegy hozzáadás", "BUTTON_CREATE_CONTACT": "Létrehozás", "BUTTON_UPDATE_CONTACT": "Frissítés", diff --git a/snappymail/v/0.0.0/app/localization/id-ID/user.json b/snappymail/v/0.0.0/app/localization/id-ID/user.json index 8e9536da4..7868d3a28 100644 --- a/snappymail/v/0.0.0/app/localization/id-ID/user.json +++ b/snappymail/v/0.0.0/app/localization/id-ID/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Pencarian..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Tambah Kontak", "BUTTON_CREATE_CONTACT": "Simpan", "BUTTON_UPDATE_CONTACT": "Perbarui", diff --git a/snappymail/v/0.0.0/app/localization/is-IS/user.json b/snappymail/v/0.0.0/app/localization/is-IS/user.json index 91966f042..ec2dcab17 100644 --- a/snappymail/v/0.0.0/app/localization/is-IS/user.json +++ b/snappymail/v/0.0.0/app/localization/is-IS/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Leita..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Bæta við tengilið", "BUTTON_CREATE_CONTACT": "Búa til", "BUTTON_UPDATE_CONTACT": "Uppfæra", diff --git a/snappymail/v/0.0.0/app/localization/it-IT/user.json b/snappymail/v/0.0.0/app/localization/it-IT/user.json index d40b17e22..8152804ee 100644 --- a/snappymail/v/0.0.0/app/localization/it-IT/user.json +++ b/snappymail/v/0.0.0/app/localization/it-IT/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Cerca..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Aggiungi contatto", "BUTTON_CREATE_CONTACT": "Crea", "BUTTON_UPDATE_CONTACT": "Aggiorna", diff --git a/snappymail/v/0.0.0/app/localization/ja-JP/user.json b/snappymail/v/0.0.0/app/localization/ja-JP/user.json index d2718dc15..14c7aa1e3 100644 --- a/snappymail/v/0.0.0/app/localization/ja-JP/user.json +++ b/snappymail/v/0.0.0/app/localization/ja-JP/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "検索中..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "連絡先を追加", "BUTTON_CREATE_CONTACT": "作成", "BUTTON_UPDATE_CONTACT": "更新", diff --git a/snappymail/v/0.0.0/app/localization/ko-KR/user.json b/snappymail/v/0.0.0/app/localization/ko-KR/user.json index a3e262367..e1ef33aca 100644 --- a/snappymail/v/0.0.0/app/localization/ko-KR/user.json +++ b/snappymail/v/0.0.0/app/localization/ko-KR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "검색 중..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "연락처 추가", "BUTTON_CREATE_CONTACT": "생성", "BUTTON_UPDATE_CONTACT": "업데이트", diff --git a/snappymail/v/0.0.0/app/localization/lt-LT/user.json b/snappymail/v/0.0.0/app/localization/lt-LT/user.json index 54655381e..ffc57d518 100644 --- a/snappymail/v/0.0.0/app/localization/lt-LT/user.json +++ b/snappymail/v/0.0.0/app/localization/lt-LT/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Ieškome..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Pridėti kontaktą", "BUTTON_CREATE_CONTACT": "Sukurti", "BUTTON_UPDATE_CONTACT": "Atnaujinti", diff --git a/snappymail/v/0.0.0/app/localization/lv-LV/user.json b/snappymail/v/0.0.0/app/localization/lv-LV/user.json index 28a6b4ebf..a0dfb5247 100644 --- a/snappymail/v/0.0.0/app/localization/lv-LV/user.json +++ b/snappymail/v/0.0.0/app/localization/lv-LV/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Meklē..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Pievienot kontaktu", "BUTTON_CREATE_CONTACT": "Izveidot", "BUTTON_UPDATE_CONTACT": "Atjaunot", diff --git a/snappymail/v/0.0.0/app/localization/nb-NO/user.json b/snappymail/v/0.0.0/app/localization/nb-NO/user.json index 69b5f12ac..75aa418ec 100644 --- a/snappymail/v/0.0.0/app/localization/nb-NO/user.json +++ b/snappymail/v/0.0.0/app/localization/nb-NO/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Søker …" }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Legg til kontakt", "BUTTON_CREATE_CONTACT": "Lag", "BUTTON_UPDATE_CONTACT": "Oppdater", diff --git a/snappymail/v/0.0.0/app/localization/nl-NL/user.json b/snappymail/v/0.0.0/app/localization/nl-NL/user.json index b04ead094..4af60c681 100644 --- a/snappymail/v/0.0.0/app/localization/nl-NL/user.json +++ b/snappymail/v/0.0.0/app/localization/nl-NL/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Zoeken..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Contactpersoon Toevoegen", "BUTTON_CREATE_CONTACT": "Toevoegen", "BUTTON_UPDATE_CONTACT": "Bijwerken", diff --git a/snappymail/v/0.0.0/app/localization/pl-PL/user.json b/snappymail/v/0.0.0/app/localization/pl-PL/user.json index bca5295a1..36ddbc94e 100644 --- a/snappymail/v/0.0.0/app/localization/pl-PL/user.json +++ b/snappymail/v/0.0.0/app/localization/pl-PL/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Wyszukiwanie..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Dodaj kontakt", "BUTTON_CREATE_CONTACT": "Utwórz", "BUTTON_UPDATE_CONTACT": "Zaktualizuj", diff --git a/snappymail/v/0.0.0/app/localization/pt-BR/user.json b/snappymail/v/0.0.0/app/localization/pt-BR/user.json index 914b46d19..1d306ae6e 100644 --- a/snappymail/v/0.0.0/app/localization/pt-BR/user.json +++ b/snappymail/v/0.0.0/app/localization/pt-BR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Procurando..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Adicionar Contato", "BUTTON_CREATE_CONTACT": "Criar", "BUTTON_UPDATE_CONTACT": "Atualizar", diff --git a/snappymail/v/0.0.0/app/localization/pt-PT/user.json b/snappymail/v/0.0.0/app/localization/pt-PT/user.json index 76ed4a3d1..aebf7987d 100644 --- a/snappymail/v/0.0.0/app/localization/pt-PT/user.json +++ b/snappymail/v/0.0.0/app/localization/pt-PT/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "A pesquisar..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Adicionar contacto", "BUTTON_CREATE_CONTACT": "Criar", "BUTTON_UPDATE_CONTACT": "Atualizar", diff --git a/snappymail/v/0.0.0/app/localization/pt/user.json b/snappymail/v/0.0.0/app/localization/pt/user.json index 76ed4a3d1..aebf7987d 100644 --- a/snappymail/v/0.0.0/app/localization/pt/user.json +++ b/snappymail/v/0.0.0/app/localization/pt/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "A pesquisar..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Adicionar contacto", "BUTTON_CREATE_CONTACT": "Criar", "BUTTON_UPDATE_CONTACT": "Atualizar", diff --git a/snappymail/v/0.0.0/app/localization/ro-RO/user.json b/snappymail/v/0.0.0/app/localization/ro-RO/user.json index 87c2342c0..04d925620 100644 --- a/snappymail/v/0.0.0/app/localization/ro-RO/user.json +++ b/snappymail/v/0.0.0/app/localization/ro-RO/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Căutare..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Adugă un contact", "BUTTON_CREATE_CONTACT": "Salvează", "BUTTON_UPDATE_CONTACT": "Actualizează", diff --git a/snappymail/v/0.0.0/app/localization/ru-RU/user.json b/snappymail/v/0.0.0/app/localization/ru-RU/user.json index f0701a14f..721938d6a 100644 --- a/snappymail/v/0.0.0/app/localization/ru-RU/user.json +++ b/snappymail/v/0.0.0/app/localization/ru-RU/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Поиск..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Добавить контакт", "BUTTON_CREATE_CONTACT": "Сохранить", "BUTTON_UPDATE_CONTACT": "Обновить", diff --git a/snappymail/v/0.0.0/app/localization/sk-SK/user.json b/snappymail/v/0.0.0/app/localization/sk-SK/user.json index 92229e5b9..0afbbbc70 100644 --- a/snappymail/v/0.0.0/app/localization/sk-SK/user.json +++ b/snappymail/v/0.0.0/app/localization/sk-SK/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Hľadám..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Pridať kontakt", "BUTTON_CREATE_CONTACT": "Vytvoriť", "BUTTON_UPDATE_CONTACT": "Aktualizovať", diff --git a/snappymail/v/0.0.0/app/localization/sl-SI/user.json b/snappymail/v/0.0.0/app/localization/sl-SI/user.json index 198a9b582..9e217b775 100644 --- a/snappymail/v/0.0.0/app/localization/sl-SI/user.json +++ b/snappymail/v/0.0.0/app/localization/sl-SI/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Iskanje..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Dodaj stik", "BUTTON_CREATE_CONTACT": "Ustvari", "BUTTON_UPDATE_CONTACT": "Posodobi", diff --git a/snappymail/v/0.0.0/app/localization/sv-SE/user.json b/snappymail/v/0.0.0/app/localization/sv-SE/user.json index dc8255a48..f72d0de92 100644 --- a/snappymail/v/0.0.0/app/localization/sv-SE/user.json +++ b/snappymail/v/0.0.0/app/localization/sv-SE/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Söker..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Lägg till", "BUTTON_CREATE_CONTACT": "Ny", "BUTTON_UPDATE_CONTACT": "Uppdatera", diff --git a/snappymail/v/0.0.0/app/localization/tr-TR/user.json b/snappymail/v/0.0.0/app/localization/tr-TR/user.json index d8e763aaf..8fd464baf 100644 --- a/snappymail/v/0.0.0/app/localization/tr-TR/user.json +++ b/snappymail/v/0.0.0/app/localization/tr-TR/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Aranıyor..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Ekle", "BUTTON_CREATE_CONTACT": "Oluştur", "BUTTON_UPDATE_CONTACT": "Güncelle", diff --git a/snappymail/v/0.0.0/app/localization/uk-UA/user.json b/snappymail/v/0.0.0/app/localization/uk-UA/user.json index 6f03cbdc0..6206e23a0 100644 --- a/snappymail/v/0.0.0/app/localization/uk-UA/user.json +++ b/snappymail/v/0.0.0/app/localization/uk-UA/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Пошук..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Додати контакт", "BUTTON_CREATE_CONTACT": "Зберегти", "BUTTON_UPDATE_CONTACT": "Оновити", diff --git a/snappymail/v/0.0.0/app/localization/vi-VN/user.json b/snappymail/v/0.0.0/app/localization/vi-VN/user.json index fbaf06187..7b284e46f 100644 --- a/snappymail/v/0.0.0/app/localization/vi-VN/user.json +++ b/snappymail/v/0.0.0/app/localization/vi-VN/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "Đang tìm kiếm..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "Thêm liên hệ mới", "BUTTON_CREATE_CONTACT": "Tạo", "BUTTON_UPDATE_CONTACT": "Cập nhật", diff --git a/snappymail/v/0.0.0/app/localization/zh-CN/user.json b/snappymail/v/0.0.0/app/localization/zh-CN/user.json index de897228d..8f0eaf08e 100644 --- a/snappymail/v/0.0.0/app/localization/zh-CN/user.json +++ b/snappymail/v/0.0.0/app/localization/zh-CN/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "搜索中……" }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "添加联系人", "BUTTON_CREATE_CONTACT": "新增联系人", "BUTTON_UPDATE_CONTACT": "更新联系人", diff --git a/snappymail/v/0.0.0/app/localization/zh-TW/user.json b/snappymail/v/0.0.0/app/localization/zh-TW/user.json index cf230368c..a4a01ecb7 100644 --- a/snappymail/v/0.0.0/app/localization/zh-TW/user.json +++ b/snappymail/v/0.0.0/app/localization/zh-TW/user.json @@ -174,6 +174,13 @@ "SEARCHING_DESC": "搜索中..." }, "CONTACTS": { + "TAB_CONTACT": "Contact", + "TAB_LOCATIONS": "Locations", + "TAB_CRYPTO": "Crypto", + "ASK": "Ask", + "NEVER": "Never", + "ALWAYS": "Always", + "ALWAYS_IF_POSSIBLE": "Always if possible", "BUTTON_ADD_CONTACT": "添加連絡人", "BUTTON_CREATE_CONTACT": "新增連絡人", "BUTTON_UPDATE_CONTACT": "更新連絡人", diff --git a/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html b/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html index 057ec473d..807c4d91d 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html @@ -72,58 +72,19 @@ -
- -
- -
- - -
-
-
+
-
+
-
+ + +
@@ -210,10 +171,107 @@
- + + +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+ + + +