fix: docker add to homarr layout overflow (#2441)
This commit is contained in:
@@ -35,7 +35,13 @@ const createColumns = (
|
|||||||
Cell({ renderedCellValue, row }) {
|
Cell({ renderedCellValue, row }) {
|
||||||
return (
|
return (
|
||||||
<Group gap="xs">
|
<Group gap="xs">
|
||||||
<Avatar variant="outline" radius="lg" size="md" src={row.original.iconUrl}>
|
<Avatar
|
||||||
|
variant="outline"
|
||||||
|
radius="lg"
|
||||||
|
size="md"
|
||||||
|
styles={{ image: { objectFit: "contain" } }}
|
||||||
|
src={row.original.iconUrl}
|
||||||
|
>
|
||||||
{row.original.name.at(0)?.toUpperCase()}
|
{row.original.name.at(0)?.toUpperCase()}
|
||||||
</Avatar>
|
</Avatar>
|
||||||
<Text>{renderedCellValue}</Text>
|
<Text>{renderedCellValue}</Text>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Group, Image, List, LoadingOverlay, Stack, Text, TextInput } from "@mantine/core";
|
import { Avatar, Button, Group, List, LoadingOverlay, Stack, Text, TextInput } from "@mantine/core";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import type { RouterOutputs } from "@homarr/api";
|
import type { RouterOutputs } from "@homarr/api";
|
||||||
@@ -60,25 +60,35 @@ export const AddDockerAppToHomarrModal = createModal<AddDockerAppToHomarrProps>(
|
|||||||
<form onSubmit={form.onSubmit(handleSubmit)}>
|
<form onSubmit={form.onSubmit(handleSubmit)}>
|
||||||
<LoadingOverlay visible={isPending} zIndex={1000} overlayProps={{ radius: "sm", blur: 2 }} />
|
<LoadingOverlay visible={isPending} zIndex={1000} overlayProps={{ radius: "sm", blur: 2 }} />
|
||||||
<Stack>
|
<Stack>
|
||||||
<List>
|
<List spacing={"xs"}>
|
||||||
{innerProps.selectedContainers.map((container, index) => (
|
{innerProps.selectedContainers.map((container, index) => (
|
||||||
<List.Item
|
<List.Item
|
||||||
styles={{ itemWrapper: { width: "100%" }, itemLabel: { flex: 1 } }}
|
styles={{ itemWrapper: { width: "100%" }, itemLabel: { flex: 1 } }}
|
||||||
icon={<Image src={container.iconUrl} alt="container image" w={30} h={30} />}
|
icon={
|
||||||
|
<Avatar
|
||||||
|
variant="outline"
|
||||||
|
radius={container.iconUrl ? "sm" : "md"}
|
||||||
|
size={30}
|
||||||
|
styles={{ image: { objectFit: "contain" } }}
|
||||||
|
src={container.iconUrl}
|
||||||
|
>
|
||||||
|
{container.name.at(0)?.toUpperCase()}
|
||||||
|
</Avatar>
|
||||||
|
}
|
||||||
key={container.id}
|
key={container.id}
|
||||||
>
|
>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between" wrap={"nowrap"}>
|
||||||
<Text>{container.name}</Text>
|
<Text lineClamp={1}>{container.name}</Text>
|
||||||
<TextInput {...form.getInputProps(`containerUrls.${index}`)} />
|
<TextInput {...form.getInputProps(`containerUrls.${index}`)} />
|
||||||
</Group>
|
</Group>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
<Group justify="end">
|
<Group justify="end">
|
||||||
<Button onClick={actions.closeModal} variant="light">
|
<Button onClick={actions.closeModal} variant="light" px={"xl"}>
|
||||||
{t("common.action.cancel")}
|
{t("common.action.cancel")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button disabled={!form.isValid()} type="submit">
|
<Button type="submit" px={"xl"}>
|
||||||
{t("common.action.add")}
|
{t("common.action.add")}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -89,4 +99,5 @@ export const AddDockerAppToHomarrModal = createModal<AddDockerAppToHomarrProps>(
|
|||||||
defaultTitle(t) {
|
defaultTitle(t) {
|
||||||
return t("docker.action.addToHomarr.modal.title");
|
return t("docker.action.addToHomarr.modal.title");
|
||||||
},
|
},
|
||||||
|
size: "lg",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user