Skip to content

Commit 07fa1ce

Browse files
committed
Display connection status
1 parent 65e53cc commit 07fa1ce

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

ui/arduino/main.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ button.small .icon {
273273
}
274274

275275
#panel #drag-handle {
276-
width: 100%;
276+
flex-grow: 2;
277277
height: 100%;
278278
cursor: grab;
279279
}
@@ -293,6 +293,19 @@ button.small .icon {
293293
background: #008184;
294294
}
295295

296+
.panel-bar #connection-status {
297+
display: flex;
298+
align-items: center;
299+
gap: 10px;
300+
color: white;
301+
}
302+
303+
.panel-bar #connection-status img {
304+
width: 1.25em;
305+
height: 1.25em;
306+
filter: invert(1);
307+
}
308+
296309
.panel-bar .term-operations {
297310
transition: opacity 0.15s;
298311
display: flex;

ui/arduino/views/components/repl-panel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ function ReplPanel(state, emit) {
1313
return html`
1414
<div id="panel" style="height: ${state.panelHeight}px">
1515
<div class="panel-bar">
16+
<div id="connection-status" style="visibility:${state.isConnected ? 'visible' : 'hidden'};">
17+
<img src="media/connect.svg" />
18+
<div>${state.isConnected ? 'Connected to ' + state.connectedPort : ''}</div>
19+
</div>
1620
<div id="drag-handle"
1721
onmousedown=${() => emit('start-resizing-panel')}
1822
onmouseup=${() => emit('stop-resizing-panel')}

0 commit comments

Comments
 (0)