From 1c18b8bf1805855e0c89f9c0280adf2c2f7f76ed Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:50:53 -0700 Subject: [PATCH] fix some formatter induced errors --- www/src/ts/virtual_machine/device.ts | 74 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/www/src/ts/virtual_machine/device.ts b/www/src/ts/virtual_machine/device.ts index 1bdb3c8..e2c206f 100644 --- a/www/src/ts/virtual_machine/device.ts +++ b/www/src/ts/virtual_machine/device.ts @@ -314,50 +314,48 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) { renderNetworks(): HTMLTemplateResult { const vmNetworks = window.VM!.networks; - return html` - < div class="networks" > - ${ - this.connections.map((connection, index, _conns) => { - const conn = - typeof connection === "object" ? connection.CableNetwork : null; - return html` - - Connection:${index} - ${vmNetworks.map( - (net) => - html`Network ${net}`, - )} - ${conn?.typ} - - `; - }) - } - + const networks = this.connections.map((connection, index, _conns) => { + const conn = + typeof connection === "object" ? connection.CableNetwork : null; + return html` + + Connection:${index} + ${vmNetworks.map( + (net) => + html`Network ${net}`, + )} + ${conn?.typ} + `; + }); + return html` +
+ ${networks} +
+ `; } renderPins(): HTMLTemplateResult { const pins = this.pins; const visibleDevices = window.VM!.visibleDevices(this.deviceID); - return html` - < div class="pins" > - ${ - pins?.map( - (pin, index) => + const pinsHtml = pins?.map( + (pin, index) => + html` + + d${index} + ${visibleDevices.map( + (device, _index) => html` - - d${index} - ${visibleDevices.map( - (device, _index) => - html` - - Device ${device.id} : ${device.name ?? device.prefabName} - - `, - )} - `, - ) - } + + Device ${device.id} : ${device.name ?? device.prefabName} + + `, + )} + `, + ); + return html` +
+ ${pinsHtml}
`; }