feat: polish release v2 experience (#6800)

This commit is contained in:
Thomas authored and GitHub committed 2026-09-07 19:17:37 +02:00
1 parent 925b0fb801
commit a4a903d7c3
295 files changed
+10627 -7115

No files matched your search

+4 -2
View File
@@ -1,3 +1,5 @@
import { isRecord } from "@homarr/common";
export const dockerEndpointCapabilities = ["inventory", "logs", "lifecycle", "remove"] as const;
export type DockerEndpointCapability = (typeof dockerEndpointCapabilities)[number];
@@ -101,8 +103,8 @@ const parseCapabilities = (value: unknown, index: number): DockerEndpointCapabil
};
const getRecord = (value: unknown, path: string): Record<string, unknown> => {
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`${path} must be an object`);
return value as Record<string, unknown>;
if (!isRecord(value)) throw new Error(`${path} must be an object`);
return value;
};
const getNonEmptyString = (value: unknown, path: string) => {
+5 -5
View File
@@ -13,11 +13,11 @@ export const containerStateColorMap = {
} satisfies Record<ContainerState, MantineColor>;
export const memoryUsageColor = (number: number, state: string): MantineColor => {
const mbUsage = number / 1024 / 1024;
if (mbUsage === 0 && state !== "running") return "red";
if (mbUsage < 128) return "green";
if (mbUsage < 256) return "yellow";
if (mbUsage < 512) return "orange";
const mebibyteUsage = number / 1024 / 1024;
if (mebibyteUsage === 0 && state !== "running") return "red";
if (mebibyteUsage < 128) return "green";
if (mebibyteUsage < 256) return "yellow";
if (mebibyteUsage < 512) return "orange";
return "red";
};