mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-28 18:26:19 -05:00
Linkify error messages
Sometimes servers will put links and channels in their error messages. Make it easy for users to click them.
This commit is contained in:
parent
25e69a551e
commit
c4a78283af
2 changed files with 3 additions and 2 deletions
|
@ -230,7 +230,7 @@ class LogLine extends Component {
|
|||
if (irc.isError(msg.command) && msg.command != irc.ERR_NOMOTD) {
|
||||
lineClass = "error";
|
||||
}
|
||||
content = html`${msg.command} ${msg.params.join(" ")}`;
|
||||
content = html`${msg.command} ${linkify(msg.params.join(" "))}`;
|
||||
}
|
||||
|
||||
return html`
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { html, Component, createRef } from "../lib/index.js";
|
||||
import linkify from "../lib/linkify.js";
|
||||
|
||||
export default class ConnectForm extends Component {
|
||||
state = {
|
||||
|
@ -104,7 +105,7 @@ export default class ConnectForm extends Component {
|
|||
`;
|
||||
} else if (this.props.error) {
|
||||
status = html`
|
||||
<p class="error-text">${this.props.error}</p>
|
||||
<p class="error-text">${linkify(this.props.error)}</p>
|
||||
`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue