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.
28 lines
695 B
28 lines
695 B
4 years ago
|
import pagesManager from "./pagesManager";
|
||
|
|
||
|
export default class Page {
|
||
|
public pageEl: HTMLDivElement;
|
||
|
private installed = false;
|
||
|
|
||
|
constructor(className: string, public isAuthPage: boolean, private onFirstMount?: (...args: any[]) => void, private onMount?: (...args: any[]) => void) {
|
||
|
this.pageEl = document.body.getElementsByClassName(className)[0] as HTMLDivElement;
|
||
|
}
|
||
|
|
||
|
public mount(...args: any[]) {
|
||
|
//this.pageEl.style.display = '';
|
||
|
|
||
|
if(this.onMount) {
|
||
|
this.onMount(...args);
|
||
|
}
|
||
|
|
||
|
if(!this.installed) {
|
||
|
if(this.onFirstMount) {
|
||
|
this.onFirstMount(...args);
|
||
|
}
|
||
|
|
||
|
this.installed = true;
|
||
|
}
|
||
|
|
||
|
pagesManager.setPage(this);
|
||
|
}
|
||
|
}
|