Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/js/im/v2/component/search/src/components/ |
Upload File : |
import {AvatarSize} from 'im.v2.const'; import {SearchItem} from '../search-item'; import {Extension} from 'main.core'; import 'ui.fonts.opensans'; import './avatar-openline.css'; const OpenlineAvatarType = { lines: 'lines', network: 'network', livechat: 'livechat', whatsappbytwilio: 'whatsappbytwilio', avito: 'avito', viber: 'viber', telegrambot: 'telegrambot', imessage: 'imessage', wechat: 'wechat', yandex: 'yandex', vkgroup: 'vkgroup', ok: 'ok', olx: 'olx', facebook: 'facebook', facebookcomments: 'facebookcomments', fbinstagramdirect: 'fbinstagramdirect', fbinstagram: 'fbinstagram', notifications: 'notifications', }; export const AvatarOpenline = { name: 'Avatar', props: { item: { type: SearchItem, required: true }, size: { type: String, default: AvatarSize.M }, }, computed: { openlineType() { return this.item.getOpenlineEntityId(); }, chatAvatarStyle(): Object { return {backgroundImage: `url('${this.item.getAvatar()}')`}; }, chatTypeIconClasses(): string { if (OpenlineAvatarType[this.openlineType]) { return `bx-im-search-avatar-openline__icon-${this.openlineType}`; } return 'bx-im-search-avatar-openline__icon-lines'; }, needCrmBadge(): boolean { if (!this.isCrmAvailable) { return false; } return this.item.isCrmSession(); } }, created() { this.isCrmAvailable = Extension.getSettings('im.v2.component.search').get('isCrmAvailable', false); }, template: ` <div :title="item.getTitle()" :class="'bx-im-search-avatar-openline__size-' + size.toLowerCase()" class="bx-im-search-avatar-openline__wrap" > <div v-if="item.getAvatar()" :style="chatAvatarStyle" class="bx-im-search-avatar-openline__content bx-im-search-avatar-openline__image" ></div> <div v-else :style="{backgroundColor: this.item.getAvatarColor()}" :class="chatTypeIconClasses" class="bx-im-search-avatar-openline__content bx-im-search-avatar-openline__icon" ></div> <div v-if="needCrmBadge" class="bx-im-search-avatar-openline__crm-badge"></div> </div> ` };