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