Merge pull request 'clan-app: ui-2d remove unecessary imports' (#4032) from Qubasa/clan-core:ui-2d-logs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4032
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
"build": "npm run check && npm run test && vite build && npm run convert-html",
|
"build": "npm run check && npm run test && vite build && npm run convert-html",
|
||||||
"convert-html": "node gtk.webview.js",
|
"convert-html": "node gtk.webview.js",
|
||||||
"serve": "vite preview",
|
"serve": "vite preview",
|
||||||
"check": "tsc --noEmit --skipLibCheck && eslint ./src",
|
"check": "tsc --noEmit --skipLibCheck && eslint ./src --fix",
|
||||||
"knip": "knip",
|
"knip": "knip --fix",
|
||||||
"test": "vitest run --project unit --typecheck",
|
"test": "vitest run --project unit --typecheck",
|
||||||
"storybook": "storybook",
|
"storybook": "storybook",
|
||||||
"storybook-build": "storybook build",
|
"storybook-build": "storybook build",
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
InputLabel,
|
InputLabel,
|
||||||
InputVariant,
|
InputVariant,
|
||||||
} from "@/src/components/inputBase";
|
} from "@/src/components/inputBase";
|
||||||
import { Typography } from "@/src/components/Typography";
|
|
||||||
import { FieldLayout } from "./layout";
|
import { FieldLayout } from "./layout";
|
||||||
|
|
||||||
interface TextInputProps {
|
interface TextInputProps {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import schema from "@/api/API.json" with { type: "json" };
|
import { API } from "@/api/API";
|
||||||
import { API, Error as ApiError } from "@/api/API";
|
|
||||||
import { nanoid } from "nanoid";
|
|
||||||
import { Schema as Inventory } from "@/api/Inventory";
|
import { Schema as Inventory } from "@/api/Inventory";
|
||||||
import { toast, Toast } from "solid-toast";
|
import { toast } from "solid-toast";
|
||||||
import {
|
import {
|
||||||
ErrorToastComponent,
|
ErrorToastComponent,
|
||||||
CancelToastComponent,
|
CancelToastComponent,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { TextInput } from "@/src/Form/fields/TextInput";
|
|||||||
import { SelectInput } from "@/src/Form/fields/Select";
|
import { SelectInput } from "@/src/Form/fields/Select";
|
||||||
import { FileInput } from "@/src/components/FileInput";
|
import { FileInput } from "@/src/components/FileInput";
|
||||||
import { FieldLayout } from "@/src/Form/fields/layout";
|
import { FieldLayout } from "@/src/Form/fields/layout";
|
||||||
import { InputLabel, InputBase } from "@/src/components/inputBase";
|
import { InputLabel } from "@/src/components/inputBase";
|
||||||
import Icon from "@/src/components/icon";
|
import Icon from "@/src/components/icon";
|
||||||
import { Loader } from "@/src/components/v2/Loader/Loader";
|
import { Loader } from "@/src/components/v2/Loader/Loader";
|
||||||
import { Button } from "@/src/components/v2/Button/Button";
|
import { Button } from "@/src/components/v2/Button/Button";
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { FileInput, type FileInputProps } from "@/src/components/FileInput"; // Assuming FileInput can take a ref and has onClick
|
import { FileInput, type FileInputProps } from "@/src/components/FileInput"; // Assuming FileInput can take a ref and has onClick
|
||||||
import { Typography } from "@/src/components/Typography";
|
import { Typography } from "@/src/components/Typography";
|
||||||
import Fieldset from "@/src/Form/fieldset";
|
import Fieldset from "@/src/Form/fieldset";
|
||||||
import Icon from "@/src/components/icon"; // For displaying file icons
|
// For displaying file icons
|
||||||
import { callApi } from "@/src/api";
|
import { callApi } from "@/src/api";
|
||||||
import type { FieldValues } from "@modular-forms/solid";
|
|
||||||
import { Show, For, type Component, type JSX } from "solid-js";
|
import { Show, For, type Component, type JSX } from "solid-js";
|
||||||
|
|
||||||
// Types for the file dialog options passed to callApi
|
// Types for the file dialog options passed to callApi
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { createContext, createEffect, JSX, useContext } from "solid-js";
|
import { createContext, createEffect, JSX, useContext } from "solid-js";
|
||||||
import { callApi } from "@/src/api";
|
|
||||||
import {
|
import {
|
||||||
activeClanURI,
|
activeClanURI,
|
||||||
addClanURI,
|
addClanURI,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import {
|
|||||||
import { Layout } from "./layout/layout";
|
import { Layout } from "./layout/layout";
|
||||||
import { ClanDetails, ClanList, CreateClan } from "./routes/clans";
|
import { ClanDetails, ClanList, CreateClan } from "./routes/clans";
|
||||||
import { Flash } from "./routes/flash/view";
|
import { Flash } from "./routes/flash/view";
|
||||||
import { HostList } from "./routes/hosts/view";
|
|
||||||
import { Welcome } from "./routes/welcome";
|
import { Welcome } from "./routes/welcome";
|
||||||
import { Toaster } from "solid-toast";
|
import { Toaster } from "solid-toast";
|
||||||
import { ModuleList } from "./routes/modules/list";
|
import { ModuleList } from "./routes/modules/list";
|
||||||
@@ -21,7 +20,6 @@ import { ModuleDetails } from "./routes/modules/details";
|
|||||||
import { ModuleDetails as AddModule } from "./routes/modules/add";
|
import { ModuleDetails as AddModule } from "./routes/modules/add";
|
||||||
import { ApiTester } from "./api_test";
|
import { ApiTester } from "./api_test";
|
||||||
import { IconVariant } from "./components/icon";
|
import { IconVariant } from "./components/icon";
|
||||||
import { Components } from "./routes/components";
|
|
||||||
import { VarsPage } from "./routes/machines/install/vars-step";
|
import { VarsPage } from "./routes/machines/install/vars-step";
|
||||||
import { ClanProvider } from "./contexts/clan";
|
import { ClanProvider } from "./contexts/clan";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useQuery } from "@tanstack/solid-query";
|
import { useQuery } from "@tanstack/solid-query";
|
||||||
import { callApi } from "../api";
|
import { callApi } from "../api";
|
||||||
import toast from "solid-toast";
|
|
||||||
|
|
||||||
interface ModulesFilter {
|
interface ModulesFilter {
|
||||||
features: string[];
|
features: string[];
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
import { callApi, ClanServiceInstance, SuccessQuery } from "@/src/api";
|
import { callApi, SuccessQuery } from "@/src/api";
|
||||||
import { useParams } from "@solidjs/router";
|
import { useParams } from "@solidjs/router";
|
||||||
import { createQuery, useQueryClient } from "@tanstack/solid-query";
|
import { useQueryClient } from "@tanstack/solid-query";
|
||||||
import { createSignal, For, Match, Switch } from "solid-js";
|
import { Match, Switch } from "solid-js";
|
||||||
import {
|
import { createForm, required, SubmitHandler } from "@modular-forms/solid";
|
||||||
createForm,
|
|
||||||
FieldValues,
|
|
||||||
getValue,
|
|
||||||
getValues,
|
|
||||||
required,
|
|
||||||
setValue,
|
|
||||||
SubmitHandler,
|
|
||||||
} from "@modular-forms/solid";
|
|
||||||
import { TextInput } from "@/src/Form/fields/TextInput";
|
|
||||||
import toast from "solid-toast";
|
import toast from "solid-toast";
|
||||||
import { Button } from "../../components/Button/Button";
|
import { Button } from "../../components/Button/Button";
|
||||||
import Icon from "@/src/components/icon";
|
import Icon from "@/src/components/icon";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
getValues,
|
getValues,
|
||||||
} from "@modular-forms/solid";
|
} from "@modular-forms/solid";
|
||||||
import { createQuery } from "@tanstack/solid-query";
|
import { createQuery } from "@tanstack/solid-query";
|
||||||
import { createEffect, createSignal, For, Show } from "solid-js"; // For, Show might not be needed directly here now
|
import { createEffect, createSignal } from "solid-js"; // For, Show might not be needed directly here now
|
||||||
import toast from "solid-toast";
|
import toast from "solid-toast";
|
||||||
import { FieldLayout } from "@/src/Form/fields/layout";
|
import { FieldLayout } from "@/src/Form/fields/layout";
|
||||||
import { InputLabel } from "@/src/components/inputBase";
|
import { InputLabel } from "@/src/components/inputBase";
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ export function MachineActionsBar(props: MachineActionsBarProps) {
|
|||||||
return (
|
return (
|
||||||
<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="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 items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<div class="button-group flex flex-shrink-0 min-w-0">
|
<div class="button-group flex min-w-0 shrink-0">
|
||||||
<Button
|
<Button
|
||||||
variant="light"
|
variant="light"
|
||||||
class="flex-1 min-w-0"
|
class="min-w-0 flex-1"
|
||||||
size="s"
|
size="s"
|
||||||
onClick={props.onInstall}
|
onClick={props.onInstall}
|
||||||
endIcon={<Icon size={14} icon="Flash" />}
|
endIcon={<Icon size={14} icon="Flash" />}
|
||||||
@@ -24,7 +24,7 @@ export function MachineActionsBar(props: MachineActionsBarProps) {
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="light"
|
variant="light"
|
||||||
class="flex-1 min-w-0"
|
class="min-w-0 flex-1"
|
||||||
size="s"
|
size="s"
|
||||||
onClick={props.onUpdate}
|
onClick={props.onUpdate}
|
||||||
endIcon={<Icon size={14} icon="Update" />}
|
endIcon={<Icon size={14} icon="Update" />}
|
||||||
@@ -33,7 +33,7 @@ export function MachineActionsBar(props: MachineActionsBarProps) {
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="light"
|
variant="light"
|
||||||
class="flex-1 min-w-0"
|
class="min-w-0 flex-1"
|
||||||
size="s"
|
size="s"
|
||||||
onClick={props.onCredentials}
|
onClick={props.onCredentials}
|
||||||
endIcon={<Icon size={14} icon="Folder" />}
|
endIcon={<Icon size={14} icon="Folder" />}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { callApi, SuccessData, OperationResponse } from "@/src/api";
|
import { callApi, OperationResponse } from "@/src/api";
|
||||||
import { createForm, getValue, ResponseData } from "@modular-forms/solid";
|
import { createForm, ResponseData } from "@modular-forms/solid";
|
||||||
import { useNavigate } from "@solidjs/router";
|
import { useNavigate } from "@solidjs/router";
|
||||||
import { useQuery, useQueryClient } from "@tanstack/solid-query";
|
import { useQuery, useQueryClient } from "@tanstack/solid-query";
|
||||||
import { createEffect, createSignal } from "solid-js";
|
import { createSignal } from "solid-js";
|
||||||
import { Button } from "@/src/components/Button/Button";
|
import { Button } from "@/src/components/Button/Button";
|
||||||
import { useClanContext } from "@/src/contexts/clan";
|
import { useClanContext } from "@/src/contexts/clan";
|
||||||
import { MachineAvatar } from "./MachineAvatar";
|
import { MachineAvatar } from "./MachineAvatar";
|
||||||
@@ -10,8 +10,6 @@ import toast from "solid-toast";
|
|||||||
import { MachineActionsBar } from "./MachineActionsBar";
|
import { MachineActionsBar } from "./MachineActionsBar";
|
||||||
import { MachineGeneralFields } from "./MachineGeneralFields";
|
import { MachineGeneralFields } from "./MachineGeneralFields";
|
||||||
import { MachineHardwareInfo } from "./MachineHardwareInfo";
|
import { MachineHardwareInfo } from "./MachineHardwareInfo";
|
||||||
import { InstallMachine } from "./InstallMachine";
|
|
||||||
import { debug } from "console";
|
|
||||||
|
|
||||||
type DetailedMachineType = Extract<
|
type DetailedMachineType = Extract<
|
||||||
OperationResponse<"get_machine_details">,
|
OperationResponse<"get_machine_details">,
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
FieldValues,
|
|
||||||
FormStore,
|
FormStore,
|
||||||
ResponseData,
|
ResponseData,
|
||||||
FieldStore,
|
FieldStore,
|
||||||
FieldElementProps,
|
FieldElementProps,
|
||||||
FieldPath,
|
|
||||||
} from "@modular-forms/solid";
|
} from "@modular-forms/solid";
|
||||||
import { TextInput } from "@/src/Form/fields/TextInput";
|
import { TextInput } from "@/src/Form/fields/TextInput";
|
||||||
import { Typography } from "@/src/components/Typography";
|
import { Typography } from "@/src/components/Typography";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
FieldValues,
|
|
||||||
FormStore,
|
FormStore,
|
||||||
ResponseData,
|
ResponseData,
|
||||||
FieldStore,
|
FieldStore,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { FieldLayout } from "@/src/Form/fields/layout";
|
|||||||
import {
|
import {
|
||||||
createForm,
|
createForm,
|
||||||
FieldValues,
|
FieldValues,
|
||||||
getValue,
|
|
||||||
required,
|
required,
|
||||||
setValue,
|
setValue,
|
||||||
submit,
|
submit,
|
||||||
@@ -18,11 +17,7 @@ import { useQuery } from "@tanstack/solid-query";
|
|||||||
import { Badge } from "@/src/components/badge";
|
import { Badge } from "@/src/components/badge";
|
||||||
import { Group } from "@/src/components/group";
|
import { Group } from "@/src/components/group";
|
||||||
import { useClanContext } from "@/src/contexts/clan";
|
import { useClanContext } from "@/src/contexts/clan";
|
||||||
import {
|
import { RemoteForm, type RemoteData } from "@/src/components/RemoteForm";
|
||||||
RemoteForm,
|
|
||||||
type RemoteData,
|
|
||||||
HostKeyCheck,
|
|
||||||
} from "@/src/components/RemoteForm";
|
|
||||||
|
|
||||||
export type HardwareValues = FieldValues & {
|
export type HardwareValues = FieldValues & {
|
||||||
report: boolean;
|
report: boolean;
|
||||||
|
|||||||
28
pkgs/clan-app/ui-2d/ui-2d.code-workspace
Normal file
28
pkgs/clan-app/ui-2d/ui-2d.code-workspace
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../clan-cli"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../clan_app"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.fonts": true,
|
||||||
|
"**/.claude": true,
|
||||||
|
"**/.vscode": true,
|
||||||
|
"**/tests": true,
|
||||||
|
"**/node_modules": true,
|
||||||
|
"**/icons": true,
|
||||||
|
"**/dist": true,
|
||||||
|
"*.js": true,
|
||||||
|
"*.json": true,
|
||||||
|
"tailwind": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user