Skip to content

Commit 20f1527

Browse files
Gourav DwivediGourav Dwivedi
authored andcommitted
UI bug fixes
1 parent 7d63844 commit 20f1527

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

src/css/main.css

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ body {
1212
}
1313

1414
/* .tabcontent .tab-pane{ border:solid 1px blue; border-top: 0}; */
15-
#tabheader li a { background-color: rgb(17, 106, 158); color: white; font-size: 20px; }
15+
#tabheader li a {
16+
background-color: rgb(17, 106, 158);
17+
color: white;
18+
font-size: 20px;
19+
}
20+
1621
#tabheader a.active {
1722
border-bottom-color: transparent;
1823
background-color: white;
@@ -82,4 +87,15 @@ li:hover {
8287
margin-top: 10px;
8388
margin-bottom: 10px;
8489
}
85-
90+
91+
.btn-send-payload {
92+
margin-right: 10px;
93+
}
94+
95+
ul.nav .nav-item a:hover {
96+
border-color: rgb(17, 106, 158) !important;
97+
}
98+
ul.nav .nav-link.active:hover {
99+
border-color: white !important;
100+
}
101+

src/js/components/srform.component.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,9 @@ class SrFormComponent extends HTMLElement {
3939
<input type="text" class="form-control inputUrl" id="inputUrl" placeholder="Url" value="https://localhost:5001/Test/OneHub">
4040
</div>
4141
</div>
42-
<div class="form-group row">
43-
<div class="col-sm-10 offset-sm-2">
44-
<input type="button" class="btn btn-primary connectbtn" id="btn-connect" value="Connect" />
45-
</div>
46-
</div>
4742
48-
<div class="form-group row ">
43+
44+
<div class="form-group row onconnect" id="auth-container">
4945
<label for="authHeader" class="col-sm-2 col-form-label">Authentication Header</label>
5046
<div class="col-sm-10 offset-sm-2">
5147
<input type="text" class="form-control" id="authHeader" placeholder="Token">
@@ -75,6 +71,12 @@ class SrFormComponent extends HTMLElement {
7571
</div>
7672
</div>
7773
</div>
74+
75+
<div class="form-group row">
76+
<div class="col-sm-10 offset-sm-2">
77+
<input type="button" class="btn btn-primary connectbtn" id="btn-connect" value="Connect" />
78+
</div>
79+
</div>
7880
7981
<div class="form-group row onconnect">
8082
<label for="inputServerMethod" class="col-sm-2 col-form-label">Server Method</label>
@@ -95,17 +97,16 @@ class SrFormComponent extends HTMLElement {
9597
<textarea rows="2" class="form-control" id="inputResponseData" placeholder="Response Payload"></textarea>
9698
</div>
9799
</div>
98-
<div class="form-group row onconnect">
99-
<div class="col-10 col-sm-5 col-md-5">
100+
<div class="form-group row onconnect ">
101+
<div class="col-sm-2 offset-sm-2 btn-group">
100102
<input type="button" class="btn btn-primary btn-send-payload" value="Send"/>
101103
<input type="button" class="btn btn-primary disconnectbtn" id="btn-disconnectbtn" value="Disconnect" />
102104
</div>
103105
</div>
106+
</div>
104107
</fieldset>
105108
</form>
106109
`;
107-
108-
109110
}
110111
}
111112

src/js/components/srform.js

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ export function OnTabChange(tabName) {
103103
export function AdvanceViewElements(enable) {
104104
if(enable === true) {
105105
document.getElementById('protocol-support').style = 'display:block';
106+
document.getElementById('auth-container').style = 'display:block';
106107
}
107108
else {
108109
document.getElementById('protocol-support').style = 'display:none';
110+
document.getElementById('auth-container').style = 'display:none';
109111
}
110112
}
111113

@@ -264,8 +266,7 @@ export function buildConnection(url) {
264266

265267
};
266268

267-
if(isAdvanceView) {
268-
var token = document.getElementById('authHeader').value;
269+
if(isAdvanceView) {
269270
option.accessTokenFactory = () => document.getElementById('authHeader').value;
270271
}
271272

@@ -332,14 +333,6 @@ export function OnConnect() {
332333
}
333334

334335
export function SetConnectionProtocol() {
335-
// var anyCheckbox = document.getElementById("txt-chk-any");
336-
337-
// if(anyCheckbox.checked === true)
338-
// {
339-
// return;
340-
// }
341-
//Start work from here.
342-
var counter = 0;
343336
var elements = document.querySelectorAll(".protocol-support");
344337

345338
for(var i = 0; i < elements.length; i++)
@@ -363,16 +356,6 @@ export function SetConnectionProtocol() {
363356
counter++;
364357
}
365358
}
366-
367-
368-
// if(counter === 0)
369-
// {
370-
// anyCheckbox.checked = true;
371-
// }
372-
// else
373-
// {
374-
// anyCheckbox.checked = false;
375-
// }
376359
}
377360

378361
export function DisableElementByClassName(className) {

0 commit comments

Comments
 (0)