From 54918c8fc69fe478ebae68981cce20e24a4296cf Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 23 May 2022 21:28:53 +0700 Subject: [PATCH] Closes #1839 (#1843) Signed-off-by: Andrey Sobolev --- models/contact/src/index.ts | 11 +++++++++++ models/contact/src/plugin.ts | 4 +++- plugins/contact-assets/assets/icons.svg | 4 ++++ plugins/contact-assets/lang/en.json | 2 ++ plugins/contact-assets/lang/ru.json | 2 ++ plugins/contact-assets/src/index.ts | 3 ++- plugins/contact/src/index.ts | 6 ++++-- 7 files changed, 28 insertions(+), 4 deletions(-) diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index ceeccc9777..2a7c871f8a 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -255,6 +255,17 @@ export function createModel (builder: Builder): void { contact.channelProvider.Facebook ) + builder.createDoc( + contact.class.ChannelProvider, + core.space.Model, + { + label: contact.string.Homepage, + icon: contact.icon.Homepage, + placeholder: contact.string.HomepagePlaceholder + }, + contact.channelProvider.Homepage + ) + builder.mixin(contact.class.Person, core.class.Class, view.mixin.AttributePresenter, { presenter: contact.component.PersonPresenter }) diff --git a/models/contact/src/plugin.ts b/models/contact/src/plugin.ts index f02943278c..57c33bd27b 100644 --- a/models/contact/src/plugin.ts +++ b/models/contact/src/plugin.ts @@ -56,10 +56,12 @@ export default mergeIds(contactId, contact, { LinkedInPlaceholder: '' as IntlString, AtPlaceHolder: '' as IntlString, FacebookPlaceholder: '' as IntlString, + HomepagePlaceholder: '' as IntlString, Twitter: '' as IntlString, GitHub: '' as IntlString, Facebook: '' as IntlString, - TypeLabel: '' as IntlString + TypeLabel: '' as IntlString, + Homepage: '' as IntlString }, completion: { PersonQuery: '' as Resource, diff --git a/plugins/contact-assets/assets/icons.svg b/plugins/contact-assets/assets/icons.svg index 3b90b11f4e..65808702a2 100644 --- a/plugins/contact-assets/assets/icons.svg +++ b/plugins/contact-assets/assets/icons.svg @@ -55,4 +55,8 @@ + + + + diff --git a/plugins/contact-assets/lang/en.json b/plugins/contact-assets/lang/en.json index 1412b3b93d..351c9db7e5 100644 --- a/plugins/contact-assets/lang/en.json +++ b/plugins/contact-assets/lang/en.json @@ -43,6 +43,8 @@ "AtPlaceHolder": "@appleseed", "FacebookPlaceholder": "https://fb.com/jappleseed", "Facebook": "Facebook", + "HomepagePlaceholder": "https://jappleseed.com", + "Homepage": "Home page", "SocialLinks": "Socail links", "ViewActivity": "View activity", "PersonAlreadyExists": "Person already exists...", diff --git a/plugins/contact-assets/lang/ru.json b/plugins/contact-assets/lang/ru.json index f067adaf57..7bd03e4398 100644 --- a/plugins/contact-assets/lang/ru.json +++ b/plugins/contact-assets/lang/ru.json @@ -43,6 +43,8 @@ "AtPlaceHolder": "@appleseed", "FacebookPlaceholder": "https://fb.com/jappleseed", "Facebook": "Facebook", + "HomepagePlaceholder": "https://jappleseed.com", + "Homepage": "Веб страница", "SocialLinks": "Контактная информация", "ViewActivity": "Посмотреть активность", "PersonAlreadyExists": "Контакт уже существует...", diff --git a/plugins/contact-assets/src/index.ts b/plugins/contact-assets/src/index.ts index 9f7a59e0fd..fada080487 100644 --- a/plugins/contact-assets/src/index.ts +++ b/plugins/contact-assets/src/index.ts @@ -33,6 +33,7 @@ loadMetadata(contact.icon, { Edit: `${icons}#edit`, Person: `${icons}#person`, Company: `${icons}#company`, - SocialEdit: `${icons}#social-edit` + SocialEdit: `${icons}#social-edit`, + Homepage: `${icons}#homepage` }) addStringsLoader(contactId, async (lang: string) => await import(`../lang/${lang}.json`)) diff --git a/plugins/contact/src/index.ts b/plugins/contact/src/index.ts index 51e075d98f..84ffb18800 100644 --- a/plugins/contact/src/index.ts +++ b/plugins/contact/src/index.ts @@ -169,7 +169,8 @@ const contactPlugin = plugin(contactId, { Twitter: '' as Ref, Telegram: '' as Ref, GitHub: '' as Ref, - Facebook: '' as Ref + Facebook: '' as Ref, + Homepage: '' as Ref }, icon: { Phone: '' as Asset, @@ -187,7 +188,8 @@ const contactPlugin = plugin(contactId, { Edit: '' as Asset, Person: '' as Asset, Company: '' as Asset, - SocialEdit: '' as Asset + SocialEdit: '' as Asset, + Homepage: '' as Asset }, space: { Employee: '' as Ref,