import {LitElement, html, unsafeHTML} from './lit-all.min.js'; import * as tfrpc from '/static/tfrpc.js'; import * as tfutils from './tf-utils.js'; import {styles} from './tf-styles.js'; class TfProfileElement extends LitElement { static get properties() { return { id: {type: String}, users: {type: Object}, } } static styles = styles; constructor() { super(); let self = this; this.id = null; this.users = {}; } render_raw() { return html`
${JSON.stringify(this.message, null, 2)}
` } render() { let profile = this.users[this.id] || {}; return html`
${unsafeHTML(tfutils.markdown(profile.description))}
`; } } customElements.define('tf-profile', TfProfileElement);