Dim away users in member list

References: https://todo.sr.ht/~emersion/gamja/13
This commit is contained in:
Simon Ser 2021-11-28 20:09:48 +01:00
parent e29ccf7220
commit fcce340846
2 changed files with 10 additions and 1 deletions

View file

@ -43,6 +43,7 @@ class MemberItem extends Component {
let title = null; let title = null;
let user = this.props.user; let user = this.props.user;
let classes = ["nick"];
if (user) { if (user) {
let mask = ""; let mask = "";
if (user.username && user.hostname) { if (user.username && user.hostname) {
@ -61,13 +62,18 @@ class MemberItem extends Component {
if (user.account) { if (user.account) {
title += `\nAuthenticated as ${user.account}`; title += `\nAuthenticated as ${user.account}`;
} }
if (user.away) {
classes.push("away");
title += "\nAway";
}
} }
return html` return html`
<li> <li>
<a <a
href=${getNickURL(this.props.nick)} href=${getNickURL(this.props.nick)}
class="nick" class=${classes.join(" ")}
title=${title} title=${title}
onClick=${this.handleClick} onClick=${this.handleClick}
> >

View file

@ -279,6 +279,9 @@ button.danger:hover {
padding: 2px 10px; padding: 2px 10px;
box-sizing: border-box; box-sizing: border-box;
} }
#member-list li a.away {
color: var(--gray);
}
.membership.owner { .membership.owner {
color: red; color: red;