mirror of
https://codeberg.org/emersion/gamja.git
synced 2025-02-17 19:40:15 -05:00
Dim away users in member list
References: https://todo.sr.ht/~emersion/gamja/13
This commit is contained in:
parent
e29ccf7220
commit
fcce340846
2 changed files with 10 additions and 1 deletions
|
@ -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}
|
||||||
>
|
>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue