2021-06-11 05:18:29 -04:00
|
|
|
import { html, Component } from "../lib/index.js";
|
2024-09-07 11:59:01 -04:00
|
|
|
import * as irc from "../lib/irc.js";
|
2021-06-11 05:18:29 -04:00
|
|
|
|
|
|
|
export default function Membership(props) {
|
|
|
|
if (!this.props.value) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2024-09-07 06:36:13 -04:00
|
|
|
// XXX: If we were feeling creative we could generate unique colors for
|
|
|
|
// each item in ISUPPORT CHANMODES. But I am not feeling creative.
|
|
|
|
const name = irc.STD_MEMBERSHIP_NAMES[this.props.value[0]] || "";
|
2021-06-11 05:18:29 -04:00
|
|
|
return html`
|
|
|
|
<span class="membership ${name}" title=${name}>
|
|
|
|
${this.props.value}
|
|
|
|
</span>
|
|
|
|
`;
|
|
|
|
}
|