ui: format and debug messages

This commit is contained in:
Johannes Kirschbauer
2025-08-29 10:38:28 +02:00
parent 5a3381d9ff
commit f007279bee
3 changed files with 9 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ export const Loader = (props: LoaderProps) => {
class={cx(
styles.loader,
styles[props.hierarchy || "primary"],
props.class
props.class,
)}
>
<div class={styles.wrapper}>

View File

@@ -39,10 +39,10 @@ export class MachineManager {
const actualIds = Object.keys(machinesQueryResult.data);
const machinePositions = machinePositionsSignal();
// Remove stale
for (const id of Object.keys(machinePositions)) {
if (!actualIds.includes(id)) {
console.log("Removing stale machine", id);
setMachinePos(id, null);
}
}
@@ -61,10 +61,11 @@ export class MachineManager {
//
createEffect(() => {
const positions = machinePositionsSignal();
if (!positions) return;
// Remove machines from scene
for (const [id, repr] of this.machines) {
if (!(id in positions)) {
if (!Object.keys(positions).includes(id)) {
repr.dispose(scene);
this.machines.delete(id);
}

View File

@@ -11,7 +11,11 @@ import {
import { Fieldset } from "@/src/components/Form/Fieldset";
import * as v from "valibot";
import { getStepStore, useStepper } from "@/src/hooks/stepper";
import { InstallSteps, InstallStoreType, PromptValues } from "../InstallMachine";
import {
InstallSteps,
InstallStoreType,
PromptValues,
} from "../InstallMachine";
import { TextInput } from "@/src/components/Form/TextInput";
import { Alert } from "@/src/components/Alert/Alert";
import { createSignal, For, Match, Show, Switch } from "solid-js";