mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	design: Update UI for server section #340
This commit is contained in:
		@@ -24,7 +24,9 @@ kbd {
 | 
				
			|||||||
    white-space: nowrap;
 | 
					    white-space: nowrap;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
table, th, td {
 | 
					table,
 | 
				
			||||||
 | 
					th,
 | 
				
			||||||
 | 
					td {
 | 
				
			||||||
    border-collapse: collapse;
 | 
					    border-collapse: collapse;
 | 
				
			||||||
    color: #383430;
 | 
					    color: #383430;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -35,12 +37,17 @@ table {
 | 
				
			|||||||
    margin-bottom: 18px;
 | 
					    margin-bottom: 18px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
table tr:nth-child(even) { background-color: #f7eee6; }
 | 
					table tr:nth-child(even) {
 | 
				
			||||||
 | 
					    background-color: #f7eee6;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
table tr:nth-child(odd) { background-color: #fff8ef; }
 | 
					table tr:nth-child(odd) {
 | 
				
			||||||
 | 
					    background-color: #fff8ef;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					td {
 | 
				
			||||||
td { padding: 5px; }
 | 
					    padding: 5px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
td:nth-child(odd) {
 | 
					td:nth-child(odd) {
 | 
				
			||||||
    text-align: right;
 | 
					    text-align: right;
 | 
				
			||||||
@@ -51,9 +58,7 @@ td:nth-child(odd) {
 | 
				
			|||||||
    font-family: 'Material Icons';
 | 
					    font-family: 'Material Icons';
 | 
				
			||||||
    font-style: normal;
 | 
					    font-style: normal;
 | 
				
			||||||
    font-weight: 400;
 | 
					    font-weight: 400;
 | 
				
			||||||
  src: local('Material Icons'),
 | 
					    src: local('Material Icons'), local('MaterialIcons-Regular'), url(../fonts/MaterialIcons-Regular.ttf) format('truetype');
 | 
				
			||||||
       local('MaterialIcons-Regular'),
 | 
					 | 
				
			||||||
       url(../fonts/MaterialIcons-Regular.ttf) format('truetype');
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@font-face {
 | 
					@font-face {
 | 
				
			||||||
@@ -144,6 +149,13 @@ td:nth-child(odd) {
 | 
				
			|||||||
    color: #222c31;
 | 
					    color: #222c31;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.page-title {
 | 
				
			||||||
 | 
					    color: #222c31;
 | 
				
			||||||
 | 
					    font-size: 15px;
 | 
				
			||||||
 | 
					    font-weight: bold;
 | 
				
			||||||
 | 
					    padding: 4px 0 6px 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.sub-title {
 | 
					.sub-title {
 | 
				
			||||||
    padding: 4px 0 6px 0;
 | 
					    padding: 4px 0 6px 0;
 | 
				
			||||||
    font-weight: bold;
 | 
					    font-weight: bold;
 | 
				
			||||||
@@ -188,16 +200,18 @@ img.server-info-icon {
 | 
				
			|||||||
.setting-input-value {
 | 
					.setting-input-value {
 | 
				
			||||||
    flex-grow: 1;
 | 
					    flex-grow: 1;
 | 
				
			||||||
    font-size: 14px;
 | 
					    font-size: 14px;
 | 
				
			||||||
    height: 24px;
 | 
					    height: 22px;
 | 
				
			||||||
    border: none;
 | 
					    border-radius: 3px;
 | 
				
			||||||
    border-bottom: #ededed 1px solid;
 | 
					    padding: 7px;
 | 
				
			||||||
 | 
					    border: #ededed 2px solid;
 | 
				
			||||||
    outline-width: 0;
 | 
					    outline-width: 0;
 | 
				
			||||||
    background: transparent;
 | 
					    background: transparent;
 | 
				
			||||||
    max-width: 500px;
 | 
					    max-width: 500px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.setting-input-value:focus {
 | 
					.setting-input-value:focus {
 | 
				
			||||||
    border-bottom: #7cb980 1px solid;
 | 
					    border: #7cb980 2px solid;
 | 
				
			||||||
 | 
					    border-radius: 3px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.setting-block {
 | 
					.setting-block {
 | 
				
			||||||
@@ -334,7 +348,8 @@ i.open-tab-button {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#open-create-org-link:hover {
 | 
					#open-create-org-link:hover {
 | 
				
			||||||
		color: #005580;;
 | 
					    color: #005580;
 | 
				
			||||||
 | 
					    ;
 | 
				
			||||||
    text-decoration: underline;
 | 
					    text-decoration: underline;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -343,6 +358,7 @@ i.open-tab-button {
 | 
				
			|||||||
    margin-left: -9999px;
 | 
					    margin-left: -9999px;
 | 
				
			||||||
    visibility: hidden;
 | 
					    visibility: hidden;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.toggle+label {
 | 
					.toggle+label {
 | 
				
			||||||
    display: block;
 | 
					    display: block;
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
@@ -358,6 +374,7 @@ input.toggle-round + label {
 | 
				
			|||||||
    background-color: #dddddd;
 | 
					    background-color: #dddddd;
 | 
				
			||||||
    border-radius: 25px;
 | 
					    border-radius: 25px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle-round+label:before,
 | 
					input.toggle-round+label:before,
 | 
				
			||||||
input.toggle-round+label:after {
 | 
					input.toggle-round+label:after {
 | 
				
			||||||
    display: block;
 | 
					    display: block;
 | 
				
			||||||
@@ -367,12 +384,14 @@ input.toggle-round + label:after {
 | 
				
			|||||||
    bottom: 2px;
 | 
					    bottom: 2px;
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle-round+label:before {
 | 
					input.toggle-round+label:before {
 | 
				
			||||||
    right: 2px;
 | 
					    right: 2px;
 | 
				
			||||||
    background-color: #f1f1f1;
 | 
					    background-color: #f1f1f1;
 | 
				
			||||||
    border-radius: 25px;
 | 
					    border-radius: 25px;
 | 
				
			||||||
    transition: background 0.4s;
 | 
					    transition: background 0.4s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle-round+label:after {
 | 
					input.toggle-round+label:after {
 | 
				
			||||||
    width: 25px;
 | 
					    width: 25px;
 | 
				
			||||||
    height: 25px;
 | 
					    height: 25px;
 | 
				
			||||||
@@ -380,9 +399,11 @@ input.toggle-round + label:after {
 | 
				
			|||||||
    border-radius: 100%;
 | 
					    border-radius: 100%;
 | 
				
			||||||
    transition: margin 0.4s;
 | 
					    transition: margin 0.4s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle-round:checked+label:before {
 | 
					input.toggle-round:checked+label:before {
 | 
				
			||||||
    background-color: #4EBFAC;
 | 
					    background-color: #4EBFAC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
input.toggle-round:checked+label:after {
 | 
					input.toggle-round:checked+label:after {
 | 
				
			||||||
    margin-left: 25px;
 | 
					    margin-left: 25px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -13,6 +13,7 @@ class NewServerForm extends BaseComponent {
 | 
				
			|||||||
		return `
 | 
							return `
 | 
				
			||||||
			<div class="settings-card">
 | 
								<div class="settings-card">
 | 
				
			||||||
				<div class="server-info-right">
 | 
									<div class="server-info-right">
 | 
				
			||||||
 | 
										<div class="title">Enter URL of your Zulip Organization</div>
 | 
				
			||||||
					<div class="server-info-row">
 | 
										<div class="server-info-row">
 | 
				
			||||||
						<input class="setting-input-value" autofocus placeholder="example.zulipchat.com"/>
 | 
											<input class="setting-input-value" autofocus placeholder="example.zulipchat.com"/>
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ class ServersSection extends BaseSection {
 | 
				
			|||||||
	template() {
 | 
						template() {
 | 
				
			||||||
		return `
 | 
							return `
 | 
				
			||||||
			<div class="settings-pane" id="server-settings-pane">
 | 
								<div class="settings-pane" id="server-settings-pane">
 | 
				
			||||||
				<div class="title">Enter URL of your Zulip organization</div>
 | 
									<div class="page-title">Register or login to a Zulip Organization to get started</div>
 | 
				
			||||||
				<div id="new-server-container"></div>
 | 
									<div id="new-server-container"></div>
 | 
				
			||||||
				<div class="title" id="existing-servers"></div>
 | 
									<div class="title" id="existing-servers"></div>
 | 
				
			||||||
				<div id="server-info-container"></div>
 | 
									<div id="server-info-container"></div>
 | 
				
			||||||
@@ -38,9 +38,9 @@ class ServersSection extends BaseSection {
 | 
				
			|||||||
		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 ? '' : '';
 | 
				
			||||||
		// Show Existing servers if servers are there otherwise hide it
 | 
							// Show Existing servers if servers are there otherwise hide it
 | 
				
			||||||
		this.$existingServers.innerHTML = servers.length === 0 ? '' : 'Existing Servers';
 | 
							this.$existingServers.innerHTML = servers.length === 0 ? '' : 'Existing Organizations';
 | 
				
			||||||
		this.initNewServerForm();
 | 
							this.initNewServerForm();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.$createOrganizationContainer = document.getElementById('create-organization-container');
 | 
							this.$createOrganizationContainer = document.getElementById('create-organization-container');
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user