clippy happier

This commit is contained in:
2025-05-07 00:00:21 +02:00
parent a401d4de7b
commit 26da6b39cc
17 changed files with 234 additions and 236 deletions

View File

@@ -1,7 +1,7 @@
const PLANT_COUNT = 8;
import { Controller } from "./main";
import {Controller} from "./main";
export class PlantViews {
private readonly measure_moisture: HTMLButtonElement;
@@ -61,12 +61,10 @@ export class PlantView {
constructor(plantId: number, parent:HTMLDivElement, controller:Controller) {
const dummy = this;
this.plantId = plantId;
this.plantId = plantId;
this.plantDiv = document.createElement("div")! as HTMLDivElement
const template = require('./plant.html') as string;
const plantRaw = template.replaceAll("${plantId}", String(plantId));
this.plantDiv.innerHTML = plantRaw
this.plantDiv.innerHTML = template.replaceAll("${plantId}", String(plantId))
this.plantDiv.classList.add("plantcontainer")
parent.appendChild(this.plantDiv)
@@ -184,7 +182,7 @@ export class PlantView {
}
getConfig(): PlantConfig {
const rv: PlantConfig = {
return {
mode: this.mode.value,
target_moisture: this.targetMoisture.valueAsNumber,
pump_time_s: this.pumpTimeS.valueAsNumber,
@@ -196,14 +194,5 @@ export class PlantView {
moisture_sensor_min_frequency: this.moistureSensorMinFrequency.valueAsNumber || undefined,
moisture_sensor_max_frequency: this.moistureSensorMaxFrequency.valueAsNumber || undefined,
};
return rv;
}
setMoistureA(a: number) {
this.moistureA.innerText = String(a);
}
setMoistureB(b: number) {
this.moistureB.innerText = String(b);
}
}