Compare commits

..
Author SHA1 Message Date
Thomas 088b4b58b8 Merge branch 'dev' into agent/124231b2 2026-06-03 08:45:24 +02:00
ajnart 65faf99d9c style: auto-fix lint and format 2026-06-02 21:22:03 +00:00
Thomas Camlong 4b35c31ecc fix(docker): restore container selection toolbar broken by Mantine v9
Replace mantine-react-table@2.0.0-beta.9 with mantine-react-table-open@9.0.3
(aliased via npm:) which properly supports Mantine v9's Collapse `expanded`
prop (renamed from `in`). Also extract hooks out of renderTopToolbarCustomActions
to fix a React rules-of-hooks violation.
2026-06-02 23:20:55 +02:00
5 changed files with 6 additions and 35 deletions

No files matched your search

@@ -2,7 +2,7 @@
import type { PropsWithChildren } from "react"; import type { PropsWithChildren } from "react";
import type { MantineColorScheme, MantineColorSchemeManager } from "@mantine/core"; import type { MantineColorScheme, MantineColorSchemeManager } from "@mantine/core";
import { DirectionProvider, MantineProvider, v8CssVariablesResolver } from "@mantine/core"; import { DirectionProvider, MantineProvider } from "@mantine/core";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { clientApi } from "@homarr/api/client"; import { clientApi } from "@homarr/api/client";
@@ -18,12 +18,7 @@ export const CustomMantineProvider = ({
const manager = useColorSchemeManager(); const manager = useColorSchemeManager();
return ( return (
<DirectionProvider> <DirectionProvider>
<MantineProvider <MantineProvider defaultColorScheme={defaultColorScheme} colorSchemeManager={manager} theme={theme}>
defaultColorScheme={defaultColorScheme}
colorSchemeManager={manager}
theme={theme}
cssVariablesResolver={v8CssVariablesResolver}
>
{children} {children}
</MantineProvider> </MantineProvider>
</DirectionProvider> </DirectionProvider>
@@ -2,7 +2,7 @@
import type { PropsWithChildren } from "react"; import type { PropsWithChildren } from "react";
import type { MantineColorsTuple } from "@mantine/core"; import type { MantineColorsTuple } from "@mantine/core";
import { colorsTuple, createTheme, darken, lighten, MantineProvider, rem, v8CssVariablesResolver } from "@mantine/core"; import { colorsTuple, createTheme, darken, lighten, MantineProvider, rem } from "@mantine/core";
import { useRequiredBoard } from "@homarr/boards/context"; import { useRequiredBoard } from "@homarr/boards/context";
import type { ColorScheme } from "@homarr/definitions"; import type { ColorScheme } from "@homarr/definitions";
@@ -33,12 +33,7 @@ export const BoardMantineProvider = ({
}); });
return ( return (
<MantineProvider <MantineProvider defaultColorScheme={defaultColorScheme} theme={theme} colorSchemeManager={colorSchemeManager}>
defaultColorScheme={defaultColorScheme}
theme={theme}
colorSchemeManager={colorSchemeManager}
cssVariablesResolver={v8CssVariablesResolver}
>
{children} {children}
</MantineProvider> </MantineProvider>
); );
-3
View File
@@ -1405,9 +1405,6 @@
"openNewTab": { "openNewTab": {
"label": "Open in new tab" "label": "Open in new tab"
}, },
"withBorder": {
"label": "Show border"
},
"items": { "items": {
"label": "Bookmarks", "label": "Bookmarks",
"add": "Add bookmark" "add": "Add bookmark"
+2 -17
View File
@@ -16,7 +16,7 @@ export default function BookmarksWidget({ options, itemId }: WidgetComponentProp
const board = useRequiredBoard(); const board = useRequiredBoard();
const [data] = clientApi.app.byIds.useSuspenseQuery(options.items, { const [data] = clientApi.app.byIds.useSuspenseQuery(options.items, {
select(data) { select(data) {
return data.toSorted((appA, appB) => options.items.indexOf(appA.id) - options.items.indexOf(appB.id)); return data.sort((appA, appB) => options.items.indexOf(appA.id) - options.items.indexOf(appB.id));
}, },
}); });
@@ -56,7 +56,6 @@ export default function BookmarksWidget({ options, itemId }: WidgetComponentProp
hideIcon={options.hideIcon} hideIcon={options.hideIcon}
hideHostname={options.hideHostname} hideHostname={options.hideHostname}
openNewTab={options.openNewTab} openNewTab={options.openNewTab}
withBorder={options.withBorder}
hasIconColor={board.iconColor !== null} hasIconColor={board.iconColor !== null}
/> />
)} )}
@@ -68,7 +67,6 @@ export default function BookmarksWidget({ options, itemId }: WidgetComponentProp
hideIcon={options.hideIcon} hideIcon={options.hideIcon}
hideHostname={options.hideHostname} hideHostname={options.hideHostname}
openNewTab={options.openNewTab} openNewTab={options.openNewTab}
withBorder={options.withBorder}
hasIconColor={board.iconColor !== null} hasIconColor={board.iconColor !== null}
/> />
)} )}
@@ -83,7 +81,6 @@ interface FlexLayoutProps {
hideIcon: boolean; hideIcon: boolean;
hideHostname: boolean; hideHostname: boolean;
openNewTab: boolean; openNewTab: boolean;
withBorder: boolean;
hasIconColor: boolean; hasIconColor: boolean;
} }
@@ -94,7 +91,6 @@ const FlexLayout = ({
hideIcon, hideIcon,
hideHostname, hideHostname,
openNewTab, openNewTab,
withBorder,
hasIconColor, hasIconColor,
}: FlexLayoutProps) => { }: FlexLayoutProps) => {
const board = useRequiredBoard(); const board = useRequiredBoard();
@@ -110,15 +106,7 @@ const FlexLayout = ({
key={app.id} key={app.id}
w="100%" w="100%"
> >
<Card <Card radius={board.itemRadius} className={classes.card} w="100%" display="flex" p={4} h="100%">
radius={board.itemRadius}
className={classes.card}
w="100%"
display="flex"
p={4}
h="100%"
withBorder={withBorder}
>
{direction === "row" ? ( {direction === "row" ? (
<VerticalItem <VerticalItem
app={app} app={app}
@@ -150,7 +138,6 @@ interface GridLayoutProps {
hideIcon: boolean; hideIcon: boolean;
hideHostname: boolean; hideHostname: boolean;
openNewTab: boolean; openNewTab: boolean;
withBorder: boolean;
itemDirection: "horizontal" | "vertical"; itemDirection: "horizontal" | "vertical";
hasIconColor: boolean; hasIconColor: boolean;
} }
@@ -161,7 +148,6 @@ const GridLayout = ({
hideIcon, hideIcon,
hideHostname, hideHostname,
openNewTab, openNewTab,
withBorder,
itemDirection, itemDirection,
hasIconColor, hasIconColor,
}: GridLayoutProps) => { }: GridLayoutProps) => {
@@ -182,7 +168,6 @@ const GridLayout = ({
h="100%" h="100%"
className={combineClasses(classes.card, classes["card-grid"])} className={combineClasses(classes.card, classes["card-grid"])}
radius={board.itemRadius} radius={board.itemRadius}
withBorder={withBorder}
p="xs" p="xs"
> >
{itemDirection === "horizontal" ? ( {itemDirection === "horizontal" ? (
-1
View File
@@ -24,7 +24,6 @@ export const { definition, componentLoader } = createWidgetDefinition("bookmarks
hideIcon: factory.switch({ defaultValue: false }), hideIcon: factory.switch({ defaultValue: false }),
hideHostname: factory.switch({ defaultValue: false }), hideHostname: factory.switch({ defaultValue: false }),
openNewTab: factory.switch({ defaultValue: true }), openNewTab: factory.switch({ defaultValue: true }),
withBorder: factory.switch({ defaultValue: false }),
items: factory.sortableItemList<RouterOutputs["app"]["all"][number], string>({ items: factory.sortableItemList<RouterOutputs["app"]["all"][number], string>({
ItemComponent: ({ item, handle: Handle, removeItem, rootAttributes }) => { ItemComponent: ({ item, handle: Handle, removeItem, rootAttributes }) => {
return ( return (