mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-03 13:33:18 +00:00
setting: Improve organization page.
This adds a new button in the connected organization page by which a user can quickly add a new Zulip organization. Fixes: #607.
This commit is contained in:
@@ -358,6 +358,10 @@ img.server-info-icon {
|
|||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-200 {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
.grey {
|
.grey {
|
||||||
color: #9E9E9E;
|
color: #9E9E9E;
|
||||||
background: #FAFAFA;
|
background: #FAFAFA;
|
||||||
@@ -401,7 +405,11 @@ i.open-tab-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#server-info-container {
|
#server-info-container {
|
||||||
min-height: calc(100% - 260px);
|
/* min-height: calc(100% - 260px); */
|
||||||
|
}
|
||||||
|
|
||||||
|
#new-org-button {
|
||||||
|
margin: 30px 0px 30px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#create-organization-container {
|
#create-organization-container {
|
||||||
|
|||||||
@@ -556,6 +556,10 @@ class ServerManagerView {
|
|||||||
this.activateLastTab(index);
|
this.activateLastTab(index);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcRenderer.on('open-org-tab', () => {
|
||||||
|
this.openSettings('AddServer');
|
||||||
|
});
|
||||||
|
|
||||||
ipcRenderer.on('reload-proxy', (event, showAlert) => {
|
ipcRenderer.on('reload-proxy', (event, showAlert) => {
|
||||||
this.loadProxy().then(() => {
|
this.loadProxy().then(() => {
|
||||||
if (showAlert) {
|
if (showAlert) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ConnectedOrgSection extends BaseSection {
|
|||||||
<div class="page-title">Connected organizations</div>
|
<div class="page-title">Connected organizations</div>
|
||||||
<div class="title" id="existing-servers">All the connected orgnizations will appear here.</div>
|
<div class="title" id="existing-servers">All the connected orgnizations will appear here.</div>
|
||||||
<div id="server-info-container"></div>
|
<div id="server-info-container"></div>
|
||||||
|
<div id="new-org-button"><button class="green sea w-200">Add a new organization</button></div>
|
||||||
<div class="page-title">Add Custom Certificates</div>
|
<div class="page-title">Add Custom Certificates</div>
|
||||||
<div id="add-certificate-container"></div>
|
<div id="add-certificate-container"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,8 +33,11 @@ class ConnectedOrgSection extends BaseSection {
|
|||||||
|
|
||||||
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.$existingServers = document.getElementById('existing-servers');
|
||||||
|
this.$newOrgButton = document.getElementById('new-org-button');
|
||||||
|
this.$addCertificateContainer = document.getElementById('add-certificate-container');
|
||||||
|
|
||||||
const noServerText = 'All the connected orgnizations will appear here';
|
const noServerText = 'All the connected orgnizations will appear here';
|
||||||
// Show noServerText if no servers are there otherwise hide it
|
// Show noServerText if no servers are there otherwise hide it
|
||||||
@@ -49,7 +52,12 @@ class ConnectedOrgSection extends BaseSection {
|
|||||||
}).init();
|
}).init();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$addCertificateContainer = document.getElementById('add-certificate-container');
|
this.$newOrgButton.addEventListener('click', () => {
|
||||||
|
// We don't need to import this since it's already imported in other files
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
ipcRenderer.send('forward-message', 'open-org-tab');
|
||||||
|
});
|
||||||
|
|
||||||
this.initAddCertificate();
|
this.initAddCertificate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user