import {UIElement} from "./UIElement"; import {UserDetails} from "../Logic/OsmConnection"; import {UIEventSource} from "./UIEventSource"; /** * Handles and updates the user badge */ export class UserBadge extends UIElement { private _userDetails: UIEventSource; constructor(userDetails: UIEventSource) { super(userDetails); this._userDetails = userDetails; userDetails.addCallback(function () { const profilePic = document.getElementById("profile-pic"); profilePic.onload = function () { profilePic.style.opacity = "1" }; }); } protected InnerRender(): string { const user = this._userDetails.data; if (!user.loggedIn) { return "
Klik hier om aan te melden bij OSM
"; } return " " + "
"+ "
" + "" + "
"; } InnerUpdate(htmlElement: HTMLElement) { } }