diff options
Diffstat (limited to 'components/membership.js')
-rw-r--r-- | components/membership.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/components/membership.js b/components/membership.js index 36b3d73..9f7b4c3 100644 --- a/components/membership.js +++ b/components/membership.js @@ -1,21 +1,14 @@ import { html, Component } from "../lib/index.js"; - -// XXX: If we were feeling creative we could generate unique colors for -// each item in ISUPPORT CHANMODES. But I am not feeling creative. -const names = { - "~": "owner", - "&": "admin", - "@": "op", - "%": "halfop", - "+": "voice", -}; +import * as irc from "../lib/irc.js"; export default function Membership(props) { if (!this.props.value) { return null; } - const name = names[this.props.value[0]] || ""; + // 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]] || ""; return html` <span class="membership ${name}" title=${name}> ${this.props.value} |