@social-mail/social-mail-client 1.0.102 → 1.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25421,17 +25421,23 @@ System.register(["@web-atoms/core/dist/core/XNode"], function (_export, _context
25421
25421
  AvatarButton = ({
25422
25422
  senderEmail,
25423
25423
  senderName
25424
- }) => XNode.create("a", {
25425
- "data-element": "avatar",
25426
- "data-editor-action": "change-avatar",
25427
- style: "padding-left:5px;padding-right:5px; text-decoration: none;",
25428
- href: `mailto:${senderEmail}?subject=subscribe-[{messageId}]`
25429
- }, XNode.create("img", {
25430
- alt: senderName,
25431
- style: "margin-left:5px;height: 30px",
25432
- "data-src": "[{avatarUrl}]",
25433
- src: svgImage("🙂", 30)
25434
- }));
25424
+ }) => {
25425
+ const names = senderName.split(/\s+/, 2);
25426
+ const first = names[0];
25427
+ const last = names.pop();
25428
+ const initials = first === last ? first : first + last;
25429
+ XNode.create("a", {
25430
+ "data-element": "avatar",
25431
+ "data-editor-action": "change-avatar",
25432
+ style: "padding-left:5px;padding-right:5px; text-decoration: none;",
25433
+ href: `mailto:${senderEmail}?subject=subscribe-[{messageId}]`
25434
+ }, XNode.create("img", {
25435
+ alt: senderName,
25436
+ style: "margin-left:5px;height: 30px",
25437
+ "data-src": "[{avatarUrl}]",
25438
+ src: svgImage(initials, 30)
25439
+ }));
25440
+ };
25435
25441
  _export("default", SocialTemplate = class SocialTemplate {
25436
25442
  static simple({
25437
25443
  senderEmail,
@@ -31311,13 +31317,16 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
31311
31317
  return __awaiter(this, void 0, void 0, function* () {
31312
31318
  this.model = yield this.mailboxService.get(this.parameters.mailboxID);
31313
31319
  this.title = this.model.emailAddress.emailAddress;
31320
+ const username = this.model.emailAddress.emailAddress;
31321
+ const host = `imap.${username.split("@").pop()}`;
31314
31322
  this.renderer = XNode.create("div", null, XNode.create(CollectionEditor, {
31315
31323
  label: "Sync Targets",
31316
31324
  model: this.model,
31317
31325
  collection: "syncTargets",
31318
31326
  addPage: EditSyncTargetPage,
31319
31327
  addItemDefaults: {
31320
- username: this.model.emailAddress.emailAddress
31328
+ username,
31329
+ host
31321
31330
  },
31322
31331
  itemRenderer: item => XNode.create("tr", null, XNode.create("td", null, XNode.create("span", {
31323
31332
  text: item.protocol