Skip to content

Commit c56eb84

Browse files
committed
Lint fix pass with all rules enforced.
Bumped devcontainer Bump more packages
1 parent e7afa61 commit c56eb84

File tree

125 files changed

+3030
-2993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+3030
-2993
lines changed

.devcontainer/docker/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"features": {
55
"ghcr.io/devcontainers/features/node:1": {
66
// Should match what is defined in ui/package.json
7-
"version": "22.20.0"
7+
"version": "22.21.1"
88
}
99
},
1010
"mounts": [

.devcontainer/podman/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"features": {
55
"ghcr.io/devcontainers/features/node:1": {
66
// Should match what is defined in ui/package.json
7-
"version": "22.20.0"
7+
"version": "22.21.1"
88
}
99
},
1010
"runArgs": [

ui/package-lock.json

Lines changed: 301 additions & 262 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "kvm-ui",
33
"private": true,
4-
"version": "2025.11.11.1900",
4+
"version": "2025.11.20.0300",
55
"type": "module",
66
"engines": {
77
"node": "^22.21.1"
@@ -47,11 +47,11 @@
4747
"react": "^19.2.0",
4848
"react-animate-height": "^3.2.3",
4949
"react-dom": "^19.2.0",
50-
"react-hook-form": "^7.66.0",
50+
"react-hook-form": "^7.66.1",
5151
"react-hot-toast": "^2.6.0",
5252
"react-icons": "^5.5.0",
53-
"react-router": "^7.9.5",
54-
"react-simple-keyboard": "^3.8.133",
53+
"react-router": "^7.9.6",
54+
"react-simple-keyboard": "^3.8.136",
5555
"react-use-websocket": "^4.13.0",
5656
"react-xtermjs": "^1.0.10",
5757
"recharts": "^3.4.1",
@@ -61,25 +61,25 @@
6161
"zustand": "^4.5.2"
6262
},
6363
"devDependencies": {
64-
"@eslint/compat": "^1.4.1",
64+
"@eslint/compat": "^2.0.0",
6565
"@eslint/eslintrc": "^3.3.1",
6666
"@eslint/js": "^9.39.1",
6767
"@inlang/cli": "^3.0.12",
68-
"@inlang/paraglide-js": "^2.4.0",
68+
"@inlang/paraglide-js": "^2.5.0",
6969
"@inlang/plugin-m-function-matcher": "^2.1.0",
7070
"@inlang/plugin-message-format": "^4.0.0",
7171
"@inlang/sdk": "^2.4.9",
7272
"@tailwindcss/forms": "^0.5.10",
7373
"@tailwindcss/postcss": "^4.1.17",
7474
"@tailwindcss/typography": "^0.5.19",
7575
"@tailwindcss/vite": "^4.1.17",
76-
"@types/react": "^19.2.3",
77-
"@types/react-dom": "^19.2.2",
76+
"@types/react": "^19.2.6",
77+
"@types/react-dom": "^19.2.3",
7878
"@types/semver": "^7.7.1",
79-
"@types/validator": "^13.15.5",
80-
"@typescript-eslint/eslint-plugin": "^8.46.4",
81-
"@typescript-eslint/parser": "^8.46.4",
82-
"@vitejs/plugin-react-swc": "^4.2.1",
79+
"@types/validator": "^13.15.10",
80+
"@typescript-eslint/eslint-plugin": "^8.47.0",
81+
"@typescript-eslint/parser": "^8.47.0",
82+
"@vitejs/plugin-react-swc": "^4.2.2",
8383
"autoprefixer": "^10.4.22",
8484
"eslint": "^9.39.1",
8585
"eslint-config-prettier": "^10.1.8",
@@ -95,7 +95,7 @@
9595
"prettier-plugin-tailwindcss": "^0.7.1",
9696
"tailwindcss": "^4.1.17",
9797
"typescript": "^5.9.3",
98-
"typescript-eslint": "^8.46.4",
98+
"typescript-eslint": "^8.47.0",
9999
"vite": "^7.2.2",
100100
"vite-tsconfig-paths": "^5.1.4"
101101
}

ui/src/components/ActionBar.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
66
import { CommandLineIcon } from "@heroicons/react/20/solid";
77

88
import { cx } from "@/cva.config";
9-
import {
10-
useHidStore,
11-
useMountMediaStore,
12-
useSettingsStore,
13-
useUiStore,
14-
} from "@hooks/stores";
9+
import { useHidStore, useMountMediaStore, useSettingsStore, useUiStore } from "@hooks/stores";
1510
import { useDeviceUiNavigation } from "@hooks/useAppNavigation";
1611
import { Button } from "@components/Button";
1712
import Container from "@components/Container";
@@ -28,7 +23,8 @@ export default function Actionbar({
2823
}) {
2924
const { navigateTo } = useDeviceUiNavigation();
3025
const { isVirtualKeyboardEnabled, setVirtualKeyboardEnabled } = useHidStore();
31-
const { setDisableVideoFocusTrap, terminalType, setTerminalType, toggleSidebarView } = useUiStore();
26+
const { setDisableVideoFocusTrap, terminalType, setTerminalType, toggleSidebarView } =
27+
useUiStore();
3228
const { remoteVirtualMediaState } = useMountMediaStore();
3329
const { developerMode } = useSettingsStore();
3430

@@ -246,10 +242,7 @@ export default function Actionbar({
246242
theme="light"
247243
text={m.action_bar_connection_stats()}
248244
LeadingIcon={({ className }) => (
249-
<LuSignal
250-
className={cx(className, "mb-0.5 text-green-500")}
251-
strokeWidth={4}
252-
/>
245+
<LuSignal className={cx(className, "mb-0.5 text-green-500")} strokeWidth={4} />
253246
)}
254247
onClick={() => {
255248
toggleSidebarView("connection-stats");
@@ -264,7 +257,7 @@ export default function Actionbar({
264257
LeadingIcon={LuSettings}
265258
onClick={() => {
266259
setDisableVideoFocusTrap(true);
267-
navigateTo("/settings")
260+
navigateTo("/settings");
268261
}}
269262
/>
270263
</div>

ui/src/components/AuthLayout.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,16 @@ export default function AuthLayout({
5555
</div>
5656
) : null}
5757
<div className="space-y-2 text-center">
58-
<h1 className="text-4xl font-semibold text-black dark:text-white">
59-
{title}
60-
</h1>
58+
<h1 className="text-4xl font-semibold text-black dark:text-white">{title}</h1>
6159
<p className="text-slate-600 dark:text-slate-400">{description}</p>
6260
</div>
6361

6462
<Fieldset className="space-y-12">
6563
<div className="mx-auto max-w-sm space-y-4">
6664
<form action={`${CLOUD_API}/oidc/google`} method="POST">
6765
{/*This could be the KVM ID*/}
68-
{deviceId ? (
69-
<input type="hidden" name="deviceId" value={deviceId} />
70-
) : null}
71-
{returnTo ? (
72-
<input type="hidden" name="returnTo" value={returnTo} />
73-
) : null}
66+
{deviceId ? <input type="hidden" name="deviceId" value={deviceId} /> : null}
67+
{returnTo ? <input type="hidden" name="returnTo" value={returnTo} /> : null}
7468
<Button
7569
size="LG"
7670
theme="light"
@@ -80,8 +74,7 @@ export default function AuthLayout({
8074
textAlign="center"
8175
type="submit"
8276
loading={
83-
(navigation.state === "submitting" ||
84-
navigation.state === "loading") &&
77+
(navigation.state === "submitting" || navigation.state === "loading") &&
8578
navigation.formMethod?.toLowerCase() === "post" &&
8679
navigation.formAction?.includes("auth/google")
8780
}

ui/src/components/Button.tsx

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ const sizes = {
1616
const themes = {
1717
primary: cx(
1818
// Base styles
19-
"bg-blue-700 dark:border-blue-600 border border-blue-900/60 text-white shadow-sm",
19+
"border border-blue-900/60 bg-blue-700 text-white shadow-sm dark:border-blue-600",
2020
// Hover states
2121
"group-hover:bg-blue-800",
2222
// Active states
2323
"group-active:bg-blue-900",
2424
),
2525
danger: cx(
2626
// Base styles
27-
"bg-red-600 text-white border-red-700 shadow-xs shadow-red-200/80 dark:border-red-600 dark:shadow-red-900/20",
27+
"border-red-700 bg-red-600 text-white shadow-xs shadow-red-200/80 dark:border-red-600 dark:shadow-red-900/20",
2828
// Hover states
29-
"group-hover:bg-red-700 group-hover:border-red-800 dark:group-hover:bg-red-700 dark:group-hover:border-red-600",
29+
"group-hover:border-red-800 group-hover:bg-red-700 dark:group-hover:border-red-600 dark:group-hover:bg-red-700",
3030
// Active states
3131
"group-active:bg-red-800 dark:group-active:bg-red-800",
3232
// Focus states
3333
"group-focus:ring-red-700 dark:group-focus:ring-red-600",
3434
),
3535
light: cx(
3636
// Base styles
37-
"bg-white text-black border-slate-800/30 shadow-xs dark:bg-slate-800 dark:border-slate-300/20 dark:text-white",
37+
"border-slate-800/30 bg-white text-black shadow-xs dark:border-slate-300/20 dark:bg-slate-800 dark:text-white",
3838
// Hover states
3939
"group-hover:bg-blue-50/80 dark:group-hover:bg-slate-700",
4040
// Active states
@@ -44,7 +44,7 @@ const themes = {
4444
),
4545
lightDanger: cx(
4646
// Base styles
47-
"bg-white text-black border-red-400/60 shadow-xs",
47+
"border-red-400/60 bg-white text-black shadow-xs",
4848
// Hover states
4949
"group-hover:bg-red-50/80",
5050
// Active states
@@ -54,9 +54,9 @@ const themes = {
5454
),
5555
blank: cx(
5656
// Base styles
57-
"bg-white/0 text-black border-transparent dark:text-white",
57+
"border-transparent bg-white/0 text-black dark:text-white",
5858
// Hover states
59-
"group-hover:bg-white group-hover:border-slate-800/30 group-hover:shadow-sm dark:group-hover:bg-slate-700 dark:group-hover:border-slate-600",
59+
"group-hover:border-slate-800/30 group-hover:bg-white group-hover:shadow-sm dark:group-hover:border-slate-600 dark:group-hover:bg-slate-700",
6060
// Active states
6161
"group-active:bg-slate-100/80",
6262
),
@@ -65,16 +65,16 @@ const themes = {
6565
const btnVariants = cva({
6666
base: cx(
6767
// Base styles
68-
"border rounded-sm select-none",
68+
"rounded-sm border select-none",
6969
// Size classes
70-
"justify-center items-center shrink-0",
70+
"shrink-0 items-center justify-center",
7171
// Transition classes
7272
"outline-hidden transition-all duration-200",
7373
// Text classes
74-
"font-display text-center font-medium leading-tight",
74+
"text-center font-display leading-tight font-medium",
7575
// States
76-
"group-focus:outline-hidden group-focus:ring-2 group-focus:ring-offset-2 group-focus:ring-blue-700",
77-
"group-disabled:opacity-50 group-disabled:pointer-events-none",
76+
"group-focus:ring-2 group-focus:ring-blue-700 group-focus:ring-offset-2 group-focus:outline-hidden",
77+
"group-disabled:pointer-events-none group-disabled:opacity-50",
7878
),
7979

8080
variants: {
@@ -115,8 +115,7 @@ interface ButtonContentPropsType {
115115
}
116116

117117
function ButtonContent(props: ButtonContentPropsType) {
118-
const { text, LeadingIcon, TrailingIcon, fullWidth, className, textAlign, loading } =
119-
props;
118+
const { text, LeadingIcon, TrailingIcon, fullWidth, className, textAlign, loading } = props;
120119

121120
// Based on the size prop, we'll use the corresponding variant classnames
122121
const iconClassName = iconVariants(props);
@@ -136,9 +135,7 @@ function ButtonContent(props: ButtonContentPropsType) {
136135
<LoadingSpinner className={cx(iconClassName, "animate-spin")} />
137136
</div>
138137
) : (
139-
LeadingIcon && (
140-
<LeadingIcon className={cx(iconClassName, "shrink-0 justify-start")} />
141-
)
138+
LeadingIcon && <LeadingIcon className={cx(iconClassName, "shrink-0 justify-start")} />
142139
)}
143140

144141
{text && typeof text === "string" ? (
@@ -147,9 +144,7 @@ function ButtonContent(props: ButtonContentPropsType) {
147144
text
148145
)}
149146

150-
{TrailingIcon && (
151-
<TrailingIcon className={cx(iconClassName, "shrink-0 justify-end")} />
152-
)}
147+
{TrailingIcon && <TrailingIcon className={cx(iconClassName, "shrink-0 justify-end")} />}
153148
</div>
154149
</div>
155150
);
@@ -175,7 +170,7 @@ type ButtonPropsType = Pick<
175170
export const Button = React.forwardRef<HTMLButtonElement, ButtonPropsType>(
176171
({ type, disabled, onClick, formNoValidate, loading, fetcher, ...props }, ref) => {
177172
const classes = cx(
178-
"group outline-hidden cursor-pointer",
173+
"group cursor-pointer outline-hidden",
179174
props.fullWidth ? "w-full" : "",
180175
loading ? "pointer-events-none" : "",
181176
);
@@ -212,7 +207,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonPropsType>(
212207
Button.displayName = "Button";
213208

214209
type LinkPropsType = Pick<LinkProps, "to"> &
215-
React.ComponentProps<typeof ButtonContent> & { disabled?: boolean, reloadDocument?: boolean };
210+
React.ComponentProps<typeof ButtonContent> & { disabled?: boolean; reloadDocument?: boolean };
216211
export const LinkButton = ({ to, ...props }: LinkPropsType) => {
217212
const classes = cx(
218213
"group outline-hidden",
@@ -241,7 +236,7 @@ type LabelPropsType = Pick<HTMLLabelElement, "htmlFor"> &
241236
React.ComponentProps<typeof ButtonContent> & { disabled?: boolean };
242237
export const LabelButton = ({ htmlFor, ...props }: LabelPropsType) => {
243238
const classes = cx(
244-
"group outline-hidden block cursor-pointer",
239+
"group block cursor-pointer outline-hidden",
245240
props.disabled ? "pointer-events-none opacity-70!" : "",
246241
props.fullWidth ? "w-full" : "",
247242
props.loading ? "pointer-events-none" : "",

ui/src/components/CardHeader.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ interface Props {
88

99
export const CardHeader = ({ headline, description, Button }: Props) => {
1010
return (
11-
<div className="flex items-center justify-between pb-0 gap-x-4">
12-
<div className="space-y-1 grow">
13-
<h3 className="text-lg font-bold leading-none text-black dark:text-white">{headline}</h3>
14-
{description && <div className="text-sm text-slate-700 dark:text-slate-300">{description}</div>}
11+
<div className="flex items-center justify-between gap-x-4 pb-0">
12+
<div className="grow space-y-1">
13+
<h3 className="text-lg leading-none font-bold text-black dark:text-white">{headline}</h3>
14+
{description && (
15+
<div className="text-sm text-slate-700 dark:text-slate-300">{description}</div>
16+
)}
1517
</div>
1618
{Button && <div>{Button}</div>}
1719
</div>

ui/src/components/Checkbox.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const checkboxVariants = cva({
1515
"form-checkbox block rounded",
1616

1717
// Colors
18-
"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 checked:accent-blue-700 checked:dark:accent-blue-500 transition-colors",
18+
"border-slate-300 bg-slate-50 transition-colors checked:accent-blue-700 dark:border-slate-600 dark:bg-slate-800 checked:dark:accent-blue-500",
1919

2020
// Hover
2121
"hover:bg-slate-200/50 dark:hover:bg-slate-700/50",
@@ -24,7 +24,7 @@ const checkboxVariants = cva({
2424
"active:bg-slate-200 dark:active:bg-slate-700",
2525

2626
// Focus
27-
"focus:border-slate-300 dark:focus:border-slate-600 focus:outline-hidden focus:ring-2 focus:ring-blue-700 dark:focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900",
27+
"focus:border-slate-300 focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 focus:outline-hidden dark:focus:border-slate-600 dark:focus:ring-blue-500 dark:focus:ring-offset-slate-900",
2828

2929
// Disabled
3030
"disabled:pointer-events-none disabled:opacity-30",
@@ -41,9 +41,7 @@ const Checkbox = forwardRef<HTMLInputElement, CheckBoxProps>(function Checkbox(
4141
ref,
4242
) {
4343
const classes = checkboxVariants({ size });
44-
return (
45-
<input ref={ref} {...props} type="checkbox" className={clsx(classes, className)} />
46-
);
44+
return <input ref={ref} {...props} type="checkbox" className={clsx(classes, className)} />;
4745
});
4846
Checkbox.displayName = "Checkbox";
4947

ui/src/components/Combobox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export function Combobox({
7474
"dark:bg-slate-800 dark:text-white dark:hover:bg-slate-700 dark:active:bg-slate-800/60",
7575

7676
// Focus
77-
"focus:outline-blue-600 focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 dark:focus:outline-blue-500 dark:focus:ring-blue-500",
77+
"focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 focus:outline-blue-600 dark:focus:ring-blue-500 dark:focus:outline-blue-500",
7878

7979
// Disabled
8080
disabled &&
81-
"pointer-events-none select-none bg-slate-50 text-slate-500/80 disabled:hover:bg-white dark:bg-slate-800 dark:text-slate-400/80 dark:disabled:hover:bg-slate-800",
81+
"pointer-events-none bg-slate-50 text-slate-500/80 select-none disabled:hover:bg-white dark:bg-slate-800 dark:text-slate-400/80 dark:disabled:hover:bg-slate-800",
8282
)}
8383
placeholder={disabled ? disabledMessage : placeholder}
8484
displayValue={displayValue}
@@ -95,7 +95,7 @@ export function Combobox({
9595
value={option}
9696
className={clsx(
9797
// General styling
98-
"cursor-default select-none px-4 py-2",
98+
"cursor-default px-4 py-2 select-none",
9999

100100
// Hover and active states
101101
"hover:bg-blue-50/80 ui-active:bg-blue-50/80 ui-active:text-blue-900",

0 commit comments

Comments
 (0)