Skip to content

Commit

Permalink
Display connection status
Browse files Browse the repository at this point in the history
  • Loading branch information
sebromero committed Dec 17, 2024
1 parent 65e53cc commit 07fa1ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ui/arduino/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ button.small .icon {
}

#panel #drag-handle {
width: 100%;
flex-grow: 2;
height: 100%;
cursor: grab;
}
Expand All @@ -293,6 +293,19 @@ button.small .icon {
background: #008184;
}

.panel-bar #connection-status {
display: flex;
align-items: center;
gap: 10px;
color: white;
}

.panel-bar #connection-status img {
width: 1.25em;
height: 1.25em;
filter: invert(1);
}

.panel-bar .term-operations {
transition: opacity 0.15s;
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions ui/arduino/views/components/repl-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function ReplPanel(state, emit) {
return html`
<div id="panel" style="height: ${state.panelHeight}px">
<div class="panel-bar">
<div id="connection-status" style="visibility:${state.isConnected ? 'visible' : 'hidden'};">
<img src="media/connect.svg" />
<div>${state.isConnected ? 'Connected to ' + state.connectedPort : ''}</div>
</div>
<div id="drag-handle"
onmousedown=${() => emit('start-resizing-panel')}
onmouseup=${() => emit('stop-resizing-panel')}
Expand Down

0 comments on commit 07fa1ce

Please sign in to comment.