mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-01 20:43:33 +00:00
hide Existing servers if there is no server
This commit is contained in:
@@ -87,10 +87,6 @@ body {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#server-info-container {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
#new-server-container {
|
||||
margin: 20px 0;
|
||||
opacity: 1;
|
||||
|
||||
@@ -24,7 +24,7 @@ class ServersSection extends BaseComponent {
|
||||
</div>
|
||||
</div>
|
||||
<div id="new-server-container" class="hidden"></div>
|
||||
<div class="sub-title">Existing Servers</div>
|
||||
<div class="sub-title" id="existing-servers"></div>
|
||||
<div id="server-info-container"></div>
|
||||
</div>
|
||||
`;
|
||||
@@ -41,11 +41,13 @@ class ServersSection extends BaseComponent {
|
||||
const servers = DomainUtil.getDomains();
|
||||
this.props.$root.innerHTML = this.template();
|
||||
this.$serverInfoContainer = document.getElementById('server-info-container');
|
||||
this.$existingServers = document.getElementById('existing-servers');
|
||||
this.$newServerContainer = document.getElementById('new-server-container');
|
||||
this.$newServerButton = document.getElementById('new-server-action');
|
||||
|
||||
this.$serverInfoContainer.innerHTML = servers.length ? '' : 'Add your first server to get started!';
|
||||
|
||||
// Show Existing servers if servers are there otherwise hide it
|
||||
this.$existingServers.innerHTML = servers.length === 0 ? '' : 'Existing servers';
|
||||
this.initNewServerForm();
|
||||
|
||||
for (const i in servers) {
|
||||
|
||||
Reference in New Issue
Block a user