feat: redesign select modals, add log font-size slider, improve onboarding UX

- Redesign widget/app/integration select modal cards: icon left of name,
  description tooltip on hover, "Add to board" button revealed on hover,
  reduced card height from 180 to 140
- Add client-side font-size slider (10-24px) to server logs terminal,
  persisted in localStorage
- Merge Docker discovery into integration grid with "Detected via Docker"
  badges, remove separate DockerDiscoveryIndicator panel
- Make base URL input more prominent (orange alert, auto-focused) in
  onboarding with stronger hint text
- Add disableAutoFocus prop to SelectGridLayout
This commit is contained in:
Thomas Camlong committed 2026-06-04 13:27:26 +02:00
1 parent e98487d2aa
commit 3cb2932474
11 files changed
+331 -87

No files matched your search

@@ -1,5 +1,5 @@
import { useMemo, useState } from "react";
import { Button, Card, Center, Stack, Text } from "@mantine/core";
import { Box, Button, Card, Center, Group, Stack, Text, Tooltip } from "@mantine/core";
import { IconPlus } from "@tabler/icons-react";
import type { RouterOutputs } from "@homarr/api";
@@ -55,44 +55,83 @@ export const AppSelectModal = createModal<AppSelectModalProps>(({ actions, inner
}}
>
{innerProps.withCreate && (
<Card h={selectGridCardHeight} withBorder>
<Stack justify="space-between" h="100%" gap="xs">
<Stack gap="xs">
<Center>
<IconPlus size={24} />
</Center>
<Text lh={1.2} style={{ whiteSpace: "normal" }} ta="center" lineClamp={2}>
<Card
h={selectGridCardHeight}
withBorder
pos="relative"
style={{ overflow: "hidden", "--_hover-opacity": "0" }}
onMouseEnter={(e) => e.currentTarget.style.setProperty("--_hover-opacity", "1")}
onMouseLeave={(e) => e.currentTarget.style.setProperty("--_hover-opacity", "0")}
>
<Stack h="100%" gap="xs">
<Group gap="sm" wrap="nowrap" align="flex-start">
<IconPlus size={22} style={{ flexShrink: 0, marginTop: 2 }} />
<Text lh={1.2} style={{ whiteSpace: "normal" }} fw={500} size="sm" lineClamp={2}>
{t("app.action.create.title")}
</Text>
<Text lh={1.2} style={{ whiteSpace: "normal" }} size="xs" ta="center" c="dimmed" lineClamp={2}>
{t("app.action.create.description")}
</Text>
</Stack>
<Button onClick={handleAddNewApp} variant="light" size="xs" mt="auto" fullWidth>
</Group>
<Text lh={1.2} style={{ whiteSpace: "normal" }} size="xs" c="dimmed" lineClamp={1}>
{t("app.action.create.description")}
</Text>
</Stack>
<Box
pos="absolute"
bottom={0}
left={0}
right={0}
p="xs"
style={{
opacity: "var(--_hover-opacity)",
transition: "opacity 150ms ease",
background: "linear-gradient(transparent, var(--mantine-color-body) 30%)",
}}
>
<Button onClick={handleAddNewApp} variant="light" size="xs" fullWidth>
{t("app.action.create.action")}
</Button>
</Stack>
</Box>
</Card>
)}
{filteredApps.map((app) => (
<Card key={app.id} h={selectGridCardHeight} withBorder>
<Stack justify="space-between" h="100%" gap="xs">
<Stack gap="xs">
<Center>
<img src={app.iconUrl} alt={app.name} width={24} height={24} />
</Center>
<Text lh={1.2} style={{ whiteSpace: "normal" }} ta="center" lineClamp={2}>
<Card
key={app.id}
h={selectGridCardHeight}
withBorder
pos="relative"
style={{ overflow: "hidden", "--_hover-opacity": "0" }}
onMouseEnter={(e) => e.currentTarget.style.setProperty("--_hover-opacity", "1")}
onMouseLeave={(e) => e.currentTarget.style.setProperty("--_hover-opacity", "0")}
>
<Stack h="100%" gap="xs">
<Group gap="sm" wrap="nowrap" align="flex-start">
<img src={app.iconUrl} alt={app.name} width={22} height={22} style={{ flexShrink: 0, marginTop: 2 }} />
<Text lh={1.2} style={{ whiteSpace: "normal" }} fw={500} size="sm" lineClamp={2}>
{app.name}
</Text>
<Text lh={1.2} style={{ whiteSpace: "normal" }} size="xs" ta="center" c="dimmed" lineClamp={2}>
</Group>
<Tooltip label={app.description} multiline w={250} disabled={!app.description}>
<Text lh={1.2} style={{ whiteSpace: "normal" }} size="xs" c="dimmed" lineClamp={1}>
{app.description ?? ""}
</Text>
</Stack>
<Button onClick={() => handleSelect(app)} variant="light" size="xs" mt="auto" fullWidth>
</Tooltip>
</Stack>
<Box
pos="absolute"
bottom={0}
left={0}
right={0}
p="xs"
style={{
opacity: "var(--_hover-opacity)",
transition: "opacity 150ms ease",
background: "linear-gradient(transparent, var(--mantine-color-body) 30%)",
}}
>
<Button onClick={() => handleSelect(app)} variant="light" size="xs" fullWidth>
{t("app.action.select.action", { app: app.name })}
</Button>
</Stack>
</Box>
</Card>
))}
+4 -1
View File
@@ -115,6 +115,7 @@
"label": "Base URL",
"placeholder": "homelab.local or 192.168.1.1",
"hint": "Enter your base domain or IP to auto-fill integration URLs",
"warning": "Setting your base URL now will auto-fill all integration URLs, saving you time during setup",
"preview": "e.g. {example}",
"mode": {
"subdomain": "Subdomain",
@@ -124,6 +125,7 @@
"docker": {
"detected": "Docker detected {count} services",
"detectedBreakdown": "{integrations} integrations · {apps} apps",
"summary": "Homarr detected {apps} apps, {integrations} of which have integrations built-in",
"appBadge": "App",
"appSectionLabel": "Apps to add to dashboard ({count} selected)",
"scanning": "Scanning Docker...",
@@ -780,7 +782,8 @@
},
"grid": {
"widgetCount": "{count} widgets",
"noWidgets": "No widgets"
"noWidgets": "No widgets",
"detected": "Detected via Docker"
},
"category": {
"dnsHole": "DNS",
+4 -2
View File
@@ -5,7 +5,7 @@ import { Input, ScrollArea, SimpleGrid, Stack } from "@mantine/core";
import { IconSearch } from "@tabler/icons-react";
export const selectGridCols = { base: 2, xs: 3, sm: 4, md: 5 };
export const selectGridCardHeight = 180;
export const selectGridCardHeight = 140;
export const selectGridScrollMaxHeight = "70vh";
interface SelectGridLayoutProps {
@@ -14,6 +14,7 @@ interface SelectGridLayoutProps {
placeholder: string;
onSearchKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
disableScroll?: boolean;
disableAutoFocus?: boolean;
children: ReactNode;
}
@@ -23,6 +24,7 @@ export const SelectGridLayout = ({
placeholder,
onSearchKeyDown,
disableScroll = false,
disableAutoFocus = false,
children,
}: SelectGridLayoutProps) => {
const grid = (
@@ -38,7 +40,7 @@ export const SelectGridLayout = ({
onChange={(event) => onSearchChange(event.currentTarget.value)}
leftSection={<IconSearch />}
placeholder={placeholder}
data-autofocus
data-autofocus={disableAutoFocus ? undefined : true}
onKeyDown={onSearchKeyDown}
/>