diff --git a/maubot/management/frontend/src/pages/dashboard/Client.js b/maubot/management/frontend/src/pages/dashboard/Client.js index ef414a0..f6d9ed9 100644 --- a/maubot/management/frontend/src/pages/dashboard/Client.js +++ b/maubot/management/frontend/src/pages/dashboard/Client.js @@ -222,10 +222,16 @@ class Client extends Component { ) + get hasInstances() { + return this.state.instances.length > 0 + } + renderPrefButtons = () => <>
{!this.isNew && ( - )} @@ -238,7 +244,7 @@ class Client extends Component { renderInstances = () => !this.isNew && (
-

{this.state.instances.length > 0 ? "Instances" : "No instances :("}

+

{this.hasInstances ? "Instances" : "No instances :("}

{this.state.instances.map(instance => ( {instance.id} diff --git a/maubot/management/frontend/src/style/base/elements.sass b/maubot/management/frontend/src/style/base/elements.sass index 99a6e5e..91a20c2 100644 --- a/maubot/management/frontend/src/style/base/elements.sass +++ b/maubot/management/frontend/src/style/base/elements.sass @@ -26,6 +26,9 @@ box-sizing: border-box font-size: 1rem + &.disabled-bg + background-color: $background-dark + &:not(:disabled) cursor: pointer