Skip to content

Commit abd7133

Browse files
authored
setting-page: Minor UI fixes for add new server page.
Minor fixes - * Update link to create a new organization. * Update placeholder text for demo zulip server. * Remove border from connect button. * Add overflow for smaller window. * Fix a typo in background color. * Use buttons for server actions. * Make new server page responsive. * Focus buttons on tab. * Update styling of button. * Make add new server page responsive. Fixes: #457.
1 parent e776222 commit abd7133

File tree

2 files changed

+40
-23
lines changed

2 files changed

+40
-23
lines changed

app/renderer/css/preference.css

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ td:nth-child(odd) {
129129
content: '';
130130
}
131131

132+
132133
/* We don't want to show this in nav item since we have the + button for adding an Organization */
133134

134135
#nav-AddServer {
@@ -319,9 +320,10 @@ img.server-info-icon {
319320
border: rgba(239, 83, 80, 0.5) solid 1px;
320321
}
321322

322-
.red:hover{
323+
.red:hover {
323324
color: #e63431;
324-
border: rgba(239, 83, 80, 0.7) solid 1px;;
325+
border: rgba(239, 83, 80, 0.7) solid 1px;
326+
;
325327
}
326328

327329
.blue {
@@ -477,6 +479,7 @@ input.toggle-round:checked+label:after {
477479
height: 100%;
478480
/* background: rgba(61, 64, 67, 15); */
479481
background: linear-gradient(35deg, #003b52, #45b59b);
482+
overflow: auto;
480483
}
481484

482485

@@ -499,15 +502,14 @@ input.toggle-round:checked+label:after {
499502

500503
.divider {
501504
margin-bottom: 30px;
502-
margin-right: 10px;
503505
margin-top: 30px;
504506
color: #7d878a;
505507
}
506508

507509
.divider hr {
508-
margin-left: auto;
509-
margin-right: auto;
510-
width: 45%;
510+
margin-left: 8px;
511+
margin-right: 8px;
512+
width: 44%;
511513
}
512514

513515
.left {
@@ -523,24 +525,31 @@ input.toggle-round:checked+label:after {
523525
text-align: center;
524526
align-items: center;
525527
padding-top: 13px;
528+
margin-left: -5px;
526529
}
527530

528-
.server-center span {
531+
.server-center button {
529532
font-weight: bold;
530533
font-size: 1.1rem;
531-
padding: 10px;
532534
margin: auto;
533535
align-items: center;
534536
text-align: center;
537+
color: #fff;
538+
background: #4EBFAC;
539+
border-color: none;
540+
border: none;
541+
width: 98%;
542+
height: 46px;
543+
border-radius: 3px;
544+
cursor: pointer;
535545
}
536546

537-
.server-center .blue {
538-
border-radius: 3px;
547+
.server-center button:hover {
548+
background: #329588;
539549
}
540550

541-
.server-center .blue:hover {
542-
border-right: 2px solid #309085;
543-
border-bottom: 2px solid #309085;
551+
.server-center button:focus {
552+
background: #329588;
544553
}
545554

546555

@@ -564,10 +573,19 @@ input.toggle-round:checked+label:after {
564573
padding: 40px;
565574
min-width: 300px;
566575
}
567-
.server-center .blue {
568-
margin-right: 1px;
576+
.server-center button {
577+
margin-right: -12px;
578+
width: 100%;
579+
}
580+
.divider {
581+
margin-right: -8px;
582+
}
583+
.divider hr {
584+
margin-left: 6px;
585+
margin-right: 6px;
586+
width: 43%;
569587
}
570588
#new-server-container {
571589
padding-left: 0px;
572590
}
573-
}
591+
}

app/renderer/js/pages/preference/new-server-form.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ class NewServerForm extends BaseComponent {
1515
<div class="server-input-container">
1616
<div class="title">Organization URL</div>
1717
<div class="add-server-info-row">
18-
<input class="setting-input-value" autofocus placeholder="your-organization.zulipchat.com or chat.your-organization.com"/>
18+
<input class="setting-input-value" autofocus placeholder="your-organization.zulipchat.com or zulip.your-organization.com"/>
1919
</div>
2020
<div class="server-center">
21-
<div class="action blue server-save-action">
22-
<span id="connect">Connect</span>
21+
<div class="server-save-action">
22+
<button id="connect">Connect</button>
2323
</div>
2424
</div>
2525
<div class="server-center">
@@ -28,8 +28,8 @@ class NewServerForm extends BaseComponent {
2828
</div>
2929
</div>
3030
<div class="server-center">
31-
<div class="action blue server-save-action">
32-
<span id="open-create-org-link">Create a new organization</span>
31+
<div class="server-save-action">
32+
<button id="open-create-org-link">Create a new organization</button>
3333
</div>
3434
</div>
3535
</div>
@@ -44,7 +44,6 @@ class NewServerForm extends BaseComponent {
4444
initForm() {
4545
this.$newServerForm = this.generateNodeFromTemplate(this.template());
4646
this.$saveServerButton = this.$newServerForm.getElementsByClassName('server-save-action')[0];
47-
4847
this.props.$root.innerHTML = '';
4948
this.props.$root.appendChild(this.$newServerForm);
5049

@@ -64,7 +63,7 @@ class NewServerForm extends BaseComponent {
6463
}
6564

6665
openCreateNewOrgExternalLink() {
67-
const link = 'https://zulipchat.com/beta/';
66+
const link = 'https://zulipchat.com/new/';
6867
const externalCreateNewOrgEl = document.getElementById('open-create-org-link');
6968
externalCreateNewOrgEl.addEventListener('click', () => {
7069
shell.openExternal(link);

0 commit comments

Comments
 (0)