Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
850 B
27 lines
850 B
![]()
4 years ago
|
import AvatarElement from "../avatar";
|
||
|
import PopupElement, { PopupButton } from ".";
|
||
![]()
4 years ago
|
|
||
|
export default class PopupPeer extends PopupElement {
|
||
|
constructor(private className: string, options: Partial<{
|
||
![]()
4 years ago
|
peerId: number,
|
||
![]()
4 years ago
|
title: string,
|
||
|
description: string,
|
||
|
buttons: Array<PopupButton>
|
||
|
}> = {}) {
|
||
|
super('popup-peer' + (className ? ' ' + className : ''), options.buttons);
|
||
|
|
||
|
let avatarEl = new AvatarElement();
|
||
|
avatarEl.setAttribute('dialog', '1');
|
||
![]()
4 years ago
|
avatarEl.setAttribute('peer', '' + options.peerId);
|
||
![]()
4 years ago
|
avatarEl.classList.add('avatar-32');
|
||
![]()
4 years ago
|
|
||
|
this.title.innerText = options.title || '';
|
||
|
this.header.prepend(avatarEl);
|
||
|
|
||
|
let p = document.createElement('p');
|
||
|
p.classList.add('popup-description');
|
||
|
p.innerHTML = options.description;
|
||
|
|
||
|
this.container.insertBefore(p, this.header.nextElementSibling);
|
||
|
}
|
||
|
}
|