fixes after npm run check

This commit is contained in:
Timo
2025-05-07 12:23:13 +02:00
committed by Johannes Kirschbauer
parent 71b51356a7
commit ba0297f098
7 changed files with 9 additions and 29 deletions

View File

@@ -96,6 +96,7 @@ export const DynForm = (props: FormProps) => {
return ( return (
<> <>
{/* @ts-expect-error: This happened after solidjs upgrade. TOOD: fixme */}
<ModuleForm {...props.formProps} onSubmit={handleSubmit}> <ModuleForm {...props.formProps} onSubmit={handleSubmit}>
{props.components?.before} {props.components?.before}
<SchemaFields <SchemaFields

View File

@@ -98,7 +98,6 @@ export async function set_single_service<T extends keyof Services>(
inventory.services = inventory.services || {}; inventory.services = inventory.services || {};
inventory.services[service_name] = inventory.services[service_name] || {}; inventory.services[service_name] = inventory.services[service_name] || {};
// @ts-expect-error: This doesn't check
inventory.services[service_name][instance_key] = service_config; inventory.services[service_name][instance_key] = service_config;
console.log("saving inventory", inventory); console.log("saving inventory", inventory);
return callApi("set_inventory", { return callApi("set_inventory", {

View File

@@ -55,7 +55,7 @@ export const SidebarHeader = (props: SidebarProps) => {
<header class="sidebar__header"> <header class="sidebar__header">
<div onClick={handleClick} class="sidebar__header__inner"> <div onClick={handleClick} class="sidebar__header__inner">
{/* <ClanProfile clanName={props.clanName} showFlyout={showFlyout} /> */} {/* <ClanProfile clanName={props.clanName} showFlyout={showFlyout} /> */}
<div class="w-full text-white pl-1"> <div class="w-full pl-1 text-white">
<ClanTitle clanName={props.clanName} /> <ClanTitle clanName={props.clanName} />
</div> </div>
<Show <Show

View File

@@ -84,6 +84,7 @@ interface _TypographyProps<H extends Hierarchy> {
inverted?: boolean; inverted?: boolean;
tag?: Tag; tag?: Tag;
class?: string; class?: string;
classList?: Record<string, boolean>;
} }
export const Typography = <H extends Hierarchy>(props: _TypographyProps<H>) => { export const Typography = <H extends Hierarchy>(props: _TypographyProps<H>) => {

View File

@@ -1,21 +0,0 @@
// renderRoutes.ts
import { Route } from "@solidjs/router";
import type { JSXElement } from "solid-js";
export type AppRoute = {
path: string;
component?: () => JSXElement;
children?: AppRoute[];
};
export function renderRoutes(routes: AppRoute[], parentPath = ""): JSXElement[] {
return routes.map(({ path, component, children }) => {
const fullPath = `${parentPath}/${path}`.replace(/\/+/g, "/");
return (
<Route path={path} component={component} key={fullPath}>
{children && renderRoutes(children, fullPath)}
</Route>
);
});
}

View File

@@ -325,7 +325,7 @@ export const Flash = () => {
<FieldLayout <FieldLayout
label={<InputLabel>Networks</InputLabel>} label={<InputLabel>Networks</InputLabel>}
field={ field={
<div class="w-full flex justify-end"> <div class="flex w-full justify-end">
<Button <Button
type="button" type="button"
size="s" size="s"

View File

@@ -244,7 +244,7 @@ const InstallMachine = (props: InstallMachineProps) => {
<div class="flex flex-col items-center gap-3 fg-def-1"> <div class="flex flex-col items-center gap-3 fg-def-1">
<Typography <Typography
classList={{ classList={{
[cx("bg-inv-4 fg-inv-1")]: idx == step(), [cx("bg-inv-4 fg-inv-1")]: idx === step(),
[cx("bg-def-4 fg-def-1")]: idx < step(), [cx("bg-def-4 fg-def-1")]: idx < step(),
}} }}
color="inherit" color="inherit"
@@ -522,8 +522,8 @@ const MachineForm = (props: MachineDetailsProps) => {
return ( return (
<> <>
<div class="flex flex-col gap-6"> <div class="flex flex-col gap-6">
<div class="sticky top-0 flex items-center justify-end gap-2 bg-secondary-50 border-b border-secondary-100 py-2 px-4"> <div class="sticky top-0 flex items-center justify-end gap-2 border-b border-secondary-100 bg-secondary-50 px-4 py-2">
<div class="flex gap-3 items-center"> <div class="flex items-center gap-3">
<div class="w-fit" data-tip="Machine must be online"> <div class="w-fit" data-tip="Machine must be online">
{/* <Button {/* <Button
class="w-full" class="w-full"
@@ -542,7 +542,7 @@ const MachineForm = (props: MachineDetailsProps) => {
remote device. remote device.
</Typography> */} </Typography> */}
</div> </div>
<div class="flex gap-3 items-center"> <div class="flex items-center gap-3">
<div class="button-group flex"> <div class="button-group flex">
<Button <Button
variant="light" variant="light"
@@ -606,7 +606,7 @@ const MachineForm = (props: MachineDetailsProps) => {
</Field> </Field>
<Field name="machine.tags" type="string[]"> <Field name="machine.tags" type="string[]">
{(field, props) => ( {(field, props) => (
<div class="flex gap-4 items-center"> <div class="flex items-center gap-4">
<Typography hierarchy="label" size="default" weight="bold"> <Typography hierarchy="label" size="default" weight="bold">
Tags{" "} Tags{" "}
</Typography> </Typography>