diff --git a/www/src/ts/virtual_machine/device.ts b/www/src/ts/virtual_machine/device.ts
index d4d9aa1..57fae23 100644
--- a/www/src/ts/virtual_machine/device.ts
+++ b/www/src/ts/virtual_machine/device.ts
@@ -34,7 +34,11 @@ import "@shoelace-style/shoelace/dist/components/drawer/drawer.js";
import "@shoelace-style/shoelace/dist/components/icon/icon.js";
import SlInput from "@shoelace-style/shoelace/dist/components/input/input.js";
-import { parseIntWithHexOrBinary, parseNumber, structuralEqual } from "../utils";
+import {
+ parseIntWithHexOrBinary,
+ parseNumber,
+ structuralEqual,
+} from "../utils";
import SlSelect from "@shoelace-style/shoelace/dist/components/select/select.js";
import SlDrawer from "@shoelace-style/shoelace/dist/components/drawer/drawer.js";
import { DeviceDB, DeviceDBEntry } from "./device_db";
@@ -78,7 +82,7 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
align-items: center;
flex-wrap: wrap;
}
- .device-card{
+ .device-card {
--padding: var(--sl-spacing-small);
}
.device-name::part(input) {
@@ -134,56 +138,30 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
}
activeIc?.pins?.forEach((id, index) => {
if (this.deviceID == id) {
- badges.push(html`d${index}`);
+ badges.push(
+ html`d${index}`,
+ );
}
}, this);
return html`
-
+
@@ -195,20 +173,12 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
const inputIdBase = `vmDeviceCard${this.deviceID}Field`;
return html`
${fields.map(([name, field], _index, _fields) => {
- return html`
- ${name}
-
- ${field.field_type}
- `;
+ return html`
+ ${name}
+
+ ${field.field_type}
+ `;
})}
`;
}
@@ -219,28 +189,17 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
const inputIdBase = `vmDeviceCard${this.deviceID}Slot${slotIndex}Field`;
return html`
-
+
${fields.map(
- ([name, field], _index, _fields) => html`
-
- ${name}
-
- ${field.field_type}
-
- `,
+ ([name, field], _index, _fields) => html`
+
+ ${name}
+
+ ${field.field_type}
+
+ `,
)}
@@ -264,26 +223,19 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
return html`
${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 conn =
+ typeof connection === "object" ? connection.CableNetwork : null;
+ return html`
+
+ Connection:${index}
+ ${vmNetworks.map(
+ (net) =>
+ html`Network ${net}`,
+ )}
+ ${conn?.typ}
+
+ `;
})}
`;
@@ -294,23 +246,16 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
return html`
${pins?.map(
- (pin, index) =>
- html`
- d${index}
- ${visibleDevices.map(
- (device, _index) =>
- html`
- Device ${device.id} : ${device.name ?? device.prefabName}
- `,
- )}
- `,
+ (pin, index) =>
+ html`
+ d${index}
+ ${visibleDevices.map(
+ (device, _index) =>
+ html`
+ Device ${device.id} : ${device.name ?? device.prefabName}
+ `,
+ )}
+ `,
)}
`;
@@ -440,10 +385,7 @@ export class VMDeviceList extends BaseElement {
protected render(): HTMLTemplateResult {
const deviceCards: HTMLTemplateResult[] = this.devices.map(
(id, _index, _ids) =>
- html``,
+ html``,
);
const result = html`