-
-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
design: Redesign Add new server page. (#446)
Changes - * New setting nav item for connected organizations. * All new page for adding a new server. * Minor UI changes in setting page. * Update default height, width of the main window. * Fix webview showing outline. * Hide Server nav item in setting page. Fixes #340.
- Loading branch information
1 parent
b31fc6b
commit 6c12026
Showing
10 changed files
with
218 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
|
||
const BaseSection = require(__dirname + '/base-section.js'); | ||
const DomainUtil = require(__dirname + '/../../utils/domain-util.js'); | ||
const ServerInfoForm = require(__dirname + '/server-info-form.js'); | ||
|
||
class ConnectedOrgSection extends BaseSection { | ||
constructor(props) { | ||
super(); | ||
this.props = props; | ||
} | ||
|
||
template() { | ||
return ` | ||
<div class="settings-pane" id="server-settings-pane"> | ||
<div class="page-title">Connected organizations</div> | ||
<div class="title" id="existing-servers">All the connected orgnizations will appear here.</div> | ||
<div id="server-info-container"></div> | ||
</div> | ||
`; | ||
} | ||
|
||
init() { | ||
this.initServers(); | ||
} | ||
|
||
initServers() { | ||
this.props.$root.innerHTML = ''; | ||
|
||
const servers = DomainUtil.getDomains(); | ||
this.props.$root.innerHTML = this.template(); | ||
this.$serverInfoContainer = document.getElementById('server-info-container'); | ||
this.$existingServers = document.getElementById('existing-servers'); | ||
|
||
const noServerText = 'All the connected orgnizations will appear here'; | ||
// Show noServerText if no servers are there otherwise hide it | ||
this.$existingServers.innerHTML = servers.length === 0 ? noServerText : ''; | ||
|
||
for (let i = 0; i < servers.length; i++) { | ||
new ServerInfoForm({ | ||
$root: this.$serverInfoContainer, | ||
server: servers[i], | ||
index: i, | ||
onChange: this.reloadApp | ||
}).init(); | ||
} | ||
} | ||
|
||
} | ||
|
||
module.exports = ConnectedOrgSection; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.