TSK-679: Add Whatsapp (#2651)

TSK-679: Add Whatsapp

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-02-17 12:38:53 +07:00 committed by GitHub
parent 0d0e5f6f7b
commit 02311af9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 6 deletions

View File

@ -393,6 +393,18 @@ export function createModel (builder: Builder): void {
contact.channelProvider.Homepage
)
builder.createDoc(
contact.class.ChannelProvider,
core.space.Model,
{
label: contact.string.Whatsapp,
icon: contact.icon.Whatsapp,
placeholder: contact.string.WhatsappPlaceholder,
action: contact.actionImpl.OpenChannel
},
contact.channelProvider.Whatsapp
)
builder.createDoc(
contact.class.AvatarProvider,
core.space.Model,

View File

@ -72,7 +72,9 @@ export default mergeIds(contactId, contact, {
TypeLabel: '' as IntlString,
Homepage: '' as IntlString,
Birthday: '' as IntlString,
CreatedOn: '' as IntlString
CreatedOn: '' as IntlString,
Whatsapp: '' as IntlString,
WhatsappPlaceholder: '' as IntlString
},
completion: {
PersonQuery: '' as Resource<ObjectSearchFactory>,

View File

@ -74,6 +74,8 @@
"UseGravatar": "Use Gravatar",
"UseColor": "Use color",
"NotSpecified": "Not specified",
"CreatedOn": "Created"
"CreatedOn": "Created",
"Whatsapp": "Whatsapp",
"WhatsappPlaceholder": "Whatsapp"
}
}

View File

@ -74,6 +74,8 @@
"UseGravatar": "Использовать Gravatar",
"UseColor": "Использовать цвет",
"NotSpecified": "Не указан",
"CreatedOn": "Создан"
"CreatedOn": "Создан",
"Whatsapp": "Whatsapp",
"WhatsappPlaceholder": "Whatsapp"
}
}

View File

@ -35,6 +35,7 @@ loadMetadata(contact.icon, {
Person: `${icons}#person`,
Company: `${icons}#company`,
SocialEdit: `${icons}#social-edit`,
Homepage: `${icons}#homepage`
Homepage: `${icons}#homepage`,
Whatsapp: `${icons}#whatsapp`
})
addStringsLoader(contactId, async (lang: string) => await import(`../lang/${lang}.json`))

View File

@ -230,7 +230,8 @@ const contactPlugin = plugin(contactId, {
Telegram: '' as Ref<ChannelProvider>,
GitHub: '' as Ref<ChannelProvider>,
Facebook: '' as Ref<ChannelProvider>,
Homepage: '' as Ref<ChannelProvider>
Homepage: '' as Ref<ChannelProvider>,
Whatsapp: '' as Ref<ChannelProvider>
},
avatarProvider: {
Color: '' as Ref<AvatarProvider>,
@ -260,7 +261,8 @@ const contactPlugin = plugin(contactId, {
Person: '' as Asset,
Company: '' as Asset,
SocialEdit: '' as Asset,
Homepage: '' as Asset
Homepage: '' as Asset,
Whatsapp: '' as Asset
},
space: {
Employee: '' as Ref<Space>,