From a31bfa2dc1c10389de1d02cf9e3e538b4955800e Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Thu, 16 Jan 2025 23:15:54 +0500 Subject: [PATCH] Add viber (#7684) Signed-off-by: Denis Bykhov --- models/contact/src/index.ts | 11 +++++++++++ models/contact/src/plugin.ts | 2 ++ plugins/contact-assets/assets/icons.svg | 26 +++++++++++++++++++++++++ plugins/contact-assets/lang/cs.json | 4 +++- plugins/contact-assets/lang/de.json | 4 +++- plugins/contact-assets/lang/en.json | 4 +++- plugins/contact-assets/lang/es.json | 4 +++- plugins/contact-assets/lang/fr.json | 4 +++- plugins/contact-assets/lang/it.json | 4 +++- plugins/contact-assets/lang/pt.json | 4 +++- plugins/contact-assets/lang/ru.json | 4 +++- plugins/contact-assets/lang/zh.json | 4 +++- plugins/contact-assets/src/index.ts | 1 + plugins/contact/src/index.ts | 6 ++++-- 14 files changed, 71 insertions(+), 11 deletions(-) diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index b4179985870..60e26b083da 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -696,6 +696,17 @@ export function createModel (builder: Builder): void { contact.channelProvider.Profile ) + builder.createDoc( + contact.class.ChannelProvider, + core.space.Model, + { + label: contact.string.Viber, + icon: contact.icon.Viber, + placeholder: contact.string.ViberPlaceholder + }, + contact.channelProvider.Viber + ) + builder.createDoc( contact.class.AvatarProvider, core.space.Model, diff --git a/models/contact/src/plugin.ts b/models/contact/src/plugin.ts index e3189451f8c..cbb7e1b4a86 100644 --- a/models/contact/src/plugin.ts +++ b/models/contact/src/plugin.ts @@ -91,6 +91,8 @@ export default mergeIds(contactId, contact, { SkypePlaceholder: '' as IntlString, Profile: '' as IntlString, ProfilePlaceholder: '' as IntlString, + Viber: '' as IntlString, + ViberPlaceholder: '' as IntlString, CurrentEmployee: '' as IntlString, diff --git a/plugins/contact-assets/assets/icons.svg b/plugins/contact-assets/assets/icons.svg index 7e0f0c61c0a..d66d763cf24 100644 --- a/plugins/contact-assets/assets/icons.svg +++ b/plugins/contact-assets/assets/icons.svg @@ -95,4 +95,30 @@ + + + + + + + diff --git a/plugins/contact-assets/lang/cs.json b/plugins/contact-assets/lang/cs.json index 0337643477e..3c68f91b41d 100644 --- a/plugins/contact-assets/lang/cs.json +++ b/plugins/contact-assets/lang/cs.json @@ -105,6 +105,8 @@ "For": "Pro", "SelectUsers": "Vyberte uživatele", "AddGuest": "Přidat hosta", - "ViewProfile": "Zobrazit profil" + "ViewProfile": "Zobrazit profil", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/de.json b/plugins/contact-assets/lang/de.json index bfa05c591f0..2d1c7467bd4 100644 --- a/plugins/contact-assets/lang/de.json +++ b/plugins/contact-assets/lang/de.json @@ -105,6 +105,8 @@ "For": "Für", "SelectUsers": "Benutzer auswählen", "AddGuest": "Gast hinzufügen", - "ViewProfile": "Profil anzeigen" + "ViewProfile": "Profil anzeigen", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/en.json b/plugins/contact-assets/lang/en.json index ac4c99f0dda..c0823fd5eb8 100644 --- a/plugins/contact-assets/lang/en.json +++ b/plugins/contact-assets/lang/en.json @@ -105,6 +105,8 @@ "For": "For", "SelectUsers": "Select users", "AddGuest": "Add guest", - "ViewProfile": "View profile" + "ViewProfile": "View profile", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/es.json b/plugins/contact-assets/lang/es.json index a8c491f331b..5e3f8a68357 100644 --- a/plugins/contact-assets/lang/es.json +++ b/plugins/contact-assets/lang/es.json @@ -105,6 +105,8 @@ "For": "Para", "SelectUsers": "Seleccionar usuarios", "AddGuest": "Añadir invitado", - "ViewProfile": "Ver perfil" + "ViewProfile": "Ver perfil", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/fr.json b/plugins/contact-assets/lang/fr.json index 090d7e84218..e6bcf4546f7 100644 --- a/plugins/contact-assets/lang/fr.json +++ b/plugins/contact-assets/lang/fr.json @@ -105,6 +105,8 @@ "For": "Pour", "SelectUsers": "Sélectionner des utilisateurs", "AddGuest": "Ajouter un invité", - "ViewProfile": "Voir le profil" + "ViewProfile": "Voir le profil", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/it.json b/plugins/contact-assets/lang/it.json index 6be24cb527f..3be4148a48d 100644 --- a/plugins/contact-assets/lang/it.json +++ b/plugins/contact-assets/lang/it.json @@ -105,6 +105,8 @@ "For": "Per", "SelectUsers": "Seleziona utenti", "AddGuest": "Aggiungi ospite", - "ViewProfile": "Visualizza profilo" + "ViewProfile": "Visualizza profilo", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/pt.json b/plugins/contact-assets/lang/pt.json index eaefaf537f4..ca1f70e0bc6 100644 --- a/plugins/contact-assets/lang/pt.json +++ b/plugins/contact-assets/lang/pt.json @@ -105,6 +105,8 @@ "For": "Para", "SelectUsers": "Selecionar utilizadores", "AddGuest": "Adicionar convidado", - "ViewProfile": "Ver perfil" + "ViewProfile": "Ver perfil", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/ru.json b/plugins/contact-assets/lang/ru.json index 8e063ae76b7..15c2c3231d8 100644 --- a/plugins/contact-assets/lang/ru.json +++ b/plugins/contact-assets/lang/ru.json @@ -105,6 +105,8 @@ "For": "Для", "SelectUsers": "Выберите пользователей", "AddGuest": "Добавить гостя", - "ViewProfile": "Посмотреть профиль" + "ViewProfile": "Посмотреть профиль", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/lang/zh.json b/plugins/contact-assets/lang/zh.json index a06acb8accd..65f6de469dc 100644 --- a/plugins/contact-assets/lang/zh.json +++ b/plugins/contact-assets/lang/zh.json @@ -105,6 +105,8 @@ "For": "为", "SelectUsers": "选择用户", "AddGuest": "添加访客", - "ViewProfile": "查看资料" + "ViewProfile": "查看资料", + "Viber": "Viber", + "ViberPlaceholder": "Viber" } } diff --git a/plugins/contact-assets/src/index.ts b/plugins/contact-assets/src/index.ts index 6cc90fb5785..37d0347d9a5 100644 --- a/plugins/contact-assets/src/index.ts +++ b/plugins/contact-assets/src/index.ts @@ -28,6 +28,7 @@ loadMetadata(contact.icon, { Telegram: `${icons}#telegram`, Twitter: `${icons}#twitter`, VK: `${icons}#vk`, + Viber: `${icons}#viber`, WhatsApp: `${icons}#whatsapp`, Skype: `${icons}#skype`, Youtube: `${icons}#youtube`, diff --git a/plugins/contact/src/index.ts b/plugins/contact/src/index.ts index b19b6ff83d1..9dd17c0d4c3 100644 --- a/plugins/contact/src/index.ts +++ b/plugins/contact/src/index.ts @@ -235,7 +235,8 @@ export const contactPlugin = plugin(contactId, { Homepage: '' as Ref, Whatsapp: '' as Ref, Skype: '' as Ref, - Profile: '' as Ref + Profile: '' as Ref, + Viber: '' as Ref }, avatarProvider: { Color: '' as Ref, @@ -273,7 +274,8 @@ export const contactPlugin = plugin(contactId, { ComponentMembers: '' as Asset, Profile: '' as Asset, KickUser: '' as Asset, - Contacts: '' as Asset + Contacts: '' as Asset, + Viber: '' as Asset }, space: { Contacts: '' as Ref