Skip to content

Commit eb1b80c

Browse files
committed
Merge console template into go file
1 parent fdd7783 commit eb1b80c

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

main.go

+14-5
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ const homeTemplateHtml = `<!DOCTYPE html>
389389
link.click();
390390
});
391391
392+
$('#clear').click(function() {
393+
messages = [];
394+
log.innerHTML = '';
395+
});
396+
392397
if (window['WebSocket']) {
393398
if (window.location.protocol === 'https:') {
394399
socket = io('https://{{$}}')
@@ -440,7 +445,8 @@ body {
440445
441446
#footer {
442447
display: flex;
443-
flex-wrap: wrap;
448+
flex-wrap: wrap;
449+
align-items: flex-start;
444450
justify-content: space-between;
445451
margin: 0px 15px 0px;
446452
}
@@ -468,15 +474,17 @@ body {
468474
}
469475
470476
471-
#export {
477+
#secondary-controls button {
472478
margin-bottom: 15px;
479+
vertical-align: top;
473480
}
474481
475482
.button {
476483
background-color: #b5c8c9;
477484
border: 1px solid #b5c8c9;
478485
border-radius: 2px 2px 0 0;
479486
box-shadow: 0 4px #95a5a6;
487+
margin-bottom: 4px;
480488
color: #000;
481489
cursor: pointer;
482490
font-size: 14px;
@@ -490,13 +498,13 @@ body {
490498
}
491499
492500
.button:hover {
493-
box-shadow: 0 2px #95a5a6;
501+
box-shadow: 0 2px #95a5a6;
494502
outline: none;
495503
transform: translateY(2px);
496504
}
497505
498506
.button:active {
499-
box-shadow: none;
507+
box-shadow: none;
500508
transform: translateY(4px);
501509
}
502510
@@ -530,8 +538,9 @@ body {
530538
</div>
531539
<div>
532540
<input name="list" type="checkbox" checked id="list" />
533-
<label for="list">List&nbsp;Command&nbsp;Enabled</label>
541+
<label for="list">Enable&nbsp;List&nbsp;Command</label>
534542
</div>
543+
<button id="clear" class="button">Clear&nbsp;Log</button>
535544
<button id="export" class="button">Export&nbsp;Log</button>
536545
</div>
537546
</div>

0 commit comments

Comments
 (0)