diff --git a/js/workflows/usb.js b/js/workflows/usb.js index ba4ed07..b4d07fd 100644 --- a/js/workflows/usb.js +++ b/js/workflows/usb.js @@ -236,9 +236,6 @@ class USBWorkflow extends Workflow { // Workflow specific Functions async _switchToDevice(device) { device.addEventListener("message", this.onSerialReceive.bind(this)); - device.addEventListener("disconnect", async (e) => { - await this.onDisconnected(e, false); - }); this._serialDevice = device; console.log("switch to", this._serialDevice); @@ -256,13 +253,13 @@ class USBWorkflow extends Workflow { await this.writer.ready; } + await this.showBusy(this._getDeviceUid()); + this.updateConnected(CONNSTATE.connected); // At this point we should see if we should init the file client and check if have a saved dir handle let fileops = new FileOps(this.repl, false); if (await fileops.isReadOnly()) { - // UID Only needed for matching the CIRCUITPY drive with the Serial Terminal - await this.showBusy(this._getDeviceUid()); let modal = this.connectDialog.getModal(); // Show the last step diff --git a/js/workflows/workflow.js b/js/workflows/workflow.js index 42f5491..4f14cf0 100644 --- a/js/workflows/workflow.js +++ b/js/workflows/workflow.js @@ -66,7 +66,6 @@ class Workflow { this._showSerial = params.showSerialFunc; this.repl.setTitle = this.setTerminalTitle.bind(this); - this.repl.writeToTerminal = this.writeToTerminal.bind(this); this.repl.serialTransmit = this.serialTransmit.bind(this); } @@ -116,7 +115,7 @@ class Workflow { } async onSerialReceive(e) { - await this.repl.onSerialReceive(e); + this.writeToTerminal(await this.repl.onSerialReceive(e)); } connectionStatus(partialConnectionsAllowed = false) { diff --git a/package-lock.json b/package-lock.json index b239018..6e0ef81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@adafruit/ble-file-transfer-js": "adafruit/ble-file-transfer-js#1.0.2", - "@adafruit/circuitpython-repl-js": "adafruit/circuitpython-repl-js#3.0.0", + "@adafruit/circuitpython-repl-js": "adafruit/circuitpython-repl-js#2.1.1", "@codemirror/lang-python": "^6.1.6", "@fortawesome/fontawesome-free": "^6.5.2", "@xterm/addon-fit": "^0.10.0", @@ -37,7 +37,7 @@ }, "node_modules/@adafruit/circuitpython-repl-js": { "version": "2.0.1", - "resolved": "git+ssh://git@github.com/adafruit/circuitpython-repl-js.git#7e245f35bfa8f8110298b37aaf953ebc65cdb1b2", + "resolved": "git+ssh://git@github.com/adafruit/circuitpython-repl-js.git#731e3101354e4a81e88f4ec5b40018de13be60c6", "license": "MIT" }, "node_modules/@codemirror/autocomplete": { diff --git a/package.json b/package.json index e254783..a1b0001 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@adafruit/ble-file-transfer-js": "adafruit/ble-file-transfer-js#1.0.2", - "@adafruit/circuitpython-repl-js": "adafruit/circuitpython-repl-js#3.0.0", + "@adafruit/circuitpython-repl-js": "adafruit/circuitpython-repl-js#2.1.1", "@codemirror/lang-python": "^6.1.6", "@fortawesome/fontawesome-free": "^6.5.2", "@xterm/addon-fit": "^0.10.0", diff --git a/sass/base/_base.scss b/sass/base/_base.scss index eaca655..5cf0a27 100644 --- a/sass/base/_base.scss +++ b/sass/base/_base.scss @@ -48,13 +48,14 @@ h5 { border: none; background-color: $purple; margin: 10px 0 10px 10px; - cursor: pointer; - white-space: nowrap; i { padding-left: 10px; } + cursor: pointer; + white-space: nowrap; + &:first-of-type, &.first-item { margin-left: 0; } diff --git a/sass/layout/_grid.scss b/sass/layout/_grid.scss index fc2e3f2..6d213dc 100644 --- a/sass/layout/_grid.scss +++ b/sass/layout/_grid.scss @@ -35,6 +35,9 @@ counter-increment: step; .step-number { + &::before { + content: counter(step); + } width: 75px; height: 75px; color: #333; @@ -46,10 +49,6 @@ border: solid 5px #333; border-radius: 100%; min-width: 75px; - - &::before { - content: counter(step); - } } &.hidden { @@ -60,9 +59,6 @@ @media (max-width: $screen-xs-max) { .connection-layout { - max-height: calc(100vh - 100px); - padding: 20px; - .step { .step-number { width: 50px; @@ -72,5 +68,8 @@ min-width: 50px; } } + + max-height: calc(100vh - 100px); + padding: 20px; } } \ No newline at end of file diff --git a/sass/layout/_header.scss b/sass/layout/_header.scss index 28ec9ee..ece7216 100644 --- a/sass/layout/_header.scss +++ b/sass/layout/_header.scss @@ -101,10 +101,8 @@ button { @include rounded-button; - & { - background-color: transparent; - margin: 0; - } + background-color: transparent; + margin: 0; } } diff --git a/sass/layout/_layout.scss b/sass/layout/_layout.scss index ec8cbc3..e6348f7 100644 --- a/sass/layout/_layout.scss +++ b/sass/layout/_layout.scss @@ -355,12 +355,6 @@ border: 1px solid #888; a { - padding-left: 5px; - display: grid; - grid-template-columns: 30px minmax(60px, 1fr) 60px 1fr; - grid-gap: 10px; - cursor: default; - &.hidden-file { i, @@ -369,6 +363,12 @@ } } + padding-left: 5px; + display: grid; + grid-template-columns: 30px minmax(60px, 1fr) 60px 1fr; + grid-gap: 10px; + cursor: default; + &.selected { background-color: $light-purple; }