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

View file

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