components/buffer-header: fix missing "join" button for parted channel

This commit is contained in:
Simon Ser 2021-12-03 19:09:52 +01:00
parent 93ba0e6443
commit ada9ff3b71

View file

@ -134,13 +134,13 @@ export default function BufferHeader(props) {
description = linkify(stripANSI(props.buffer.topic), props.onChannelClick); description = linkify(stripANSI(props.buffer.topic), props.onChannelClick);
} }
if (props.buffer.joined) { if (props.buffer.joined) {
actions = html` actions.push(html`
<button <button
key="part" key="part"
class="danger" class="danger"
onClick=${handleCloseClick} onClick=${handleCloseClick}
>Leave</button> >Leave</button>
`; `);
} else { } else {
if (fullyConnected) { if (fullyConnected) {
actions.push(html` actions.push(html`
@ -150,13 +150,13 @@ export default function BufferHeader(props) {
>Join</button> >Join</button>
`); `);
} }
actions = html` actions.push(html`
<button <button
key="part" key="part"
class="danger" class="danger"
onClick=${handleCloseClick} onClick=${handleCloseClick}
>Close</button> >Close</button>
`; `);
} }
break; break;
case BufferType.NICK: case BufferType.NICK: