This commit is contained in:
Jan Prochazka 2021-02-21 08:40:27 +01:00
parent 28c1421294
commit 704a04e9bb

View File

@ -6,7 +6,7 @@
export let commonProps;
export let data;
function getStatusIcon(opened) {
function getStatusIcon(opened, data) {
const { _id, status } = data;
if (opened.includes(_id)) {
if (!status) return 'icon loading';
@ -22,7 +22,7 @@
title={data.displayName || data.server}
icon="img server"
isBold={_.get($currentDatabase, 'connection._id') == data._id}
statusIcon={getStatusIcon($openedConnections)}
statusIcon={getStatusIcon($openedConnections, data)}
statusTitle={data.status && data.status.name == 'error' ? data.status.message : null}
on:click={() => ($openedConnections = _.uniq([...$openedConnections, data._id]))}
/>