diff --git a/components/buffer-list.js b/components/buffer-list.js index 3537198..590dbed 100644 --- a/components/buffer-list.js +++ b/components/buffer-list.js @@ -1,6 +1,6 @@ import * as irc from "../lib/irc.js"; import { html, Component } from "../lib/index.js"; -import { BufferType, Unread, getBufferURL, getServerName } from "../state.js"; +import { BufferType, Unread, ServerStatus, getBufferURL, getServerName } from "../state.js"; function BufferItem(props) { function handleClick(event) { @@ -26,6 +26,15 @@ function BufferItem(props) { if (props.buffer.unread != Unread.NONE) { classes.push("unread-" + props.buffer.unread); } + if (props.buffer.type === BufferType.SERVER) { + let isError = props.server.status === ServerStatus.DISCONNECTED; + if (props.bouncerNetwork && props.bouncerNetwork.error) { + isError = true; + } + if (isError) { + classes.push("error"); + } + } return html`
  • diff --git a/style.css b/style.css index 37ff476..57857ec 100644 --- a/style.css +++ b/style.css @@ -158,6 +158,9 @@ button.danger:hover { color: white; background-color: var(--gray); } +#buffer-list li.error a { + color: red; +} #buffer-list li.unread-message a { color: #b37400; }