fix: matine ui fixes for concistency
This commit is contained in:
49 files changed
+121
-143
No files matched your search
@@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
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 { createTheme, DirectionProvider, MantineProvider } 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";
|
||||||
import { useSession } from "@homarr/auth/client";
|
import { useSession } from "@homarr/auth/client";
|
||||||
import { parseCookies, setClientCookie } from "@homarr/common";
|
import { parseCookies, setClientCookie } from "@homarr/common";
|
||||||
import { colorSchemeCookieKey } from "@homarr/definitions";
|
import { colorSchemeCookieKey } from "@homarr/definitions";
|
||||||
|
import { theme } from "@homarr/ui";
|
||||||
|
|
||||||
export const CustomMantineProvider = ({
|
export const CustomMantineProvider = ({
|
||||||
children,
|
children,
|
||||||
@@ -17,14 +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={createTheme({
|
|
||||||
primaryColor: "red",
|
|
||||||
autoContrast: true,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</MantineProvider>
|
</MantineProvider>
|
||||||
</DirectionProvider>
|
</DirectionProvider>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default async function InviteUsagePage(props: InviteUsagePageProps) {
|
|||||||
{t("subtitle")}
|
{t("subtitle")}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Card withBorder w={64 * 6} maw="90vw">
|
<Card w={64 * 6} maw="90vw">
|
||||||
<RegistrationForm invite={invite} />
|
<RegistrationForm invite={invite} />
|
||||||
</Card>
|
</Card>
|
||||||
<Text size="xs" c="gray.5" ta="center">
|
<Text size="xs" c="gray.5" ta="center">
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default async function Login(props: LoginProps) {
|
|||||||
{t("subtitle")}
|
{t("subtitle")}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Card withBorder w={64 * 6} maw="90vw">
|
<Card w={64 * 6} maw="90vw">
|
||||||
<LoginForm
|
<LoginForm
|
||||||
providers={env.AUTH_PROVIDERS}
|
providers={env.AUTH_PROVIDERS}
|
||||||
oidcClientName={env.AUTH_OIDC_CLIENT_NAME}
|
oidcClientName={env.AUTH_OIDC_CLIENT_NAME}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const AddMenu = () => {
|
|||||||
}, [openAppSelectModal, createItem]);
|
}, [openAppSelectModal, createItem]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu position="bottom-end" withArrow>
|
<Menu position="bottom-end">
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<HeaderButton w="auto" px={4}>
|
<HeaderButton w="auto" px={4}>
|
||||||
<Group gap={4} wrap="nowrap">
|
<Group gap={4} wrap="nowrap">
|
||||||
@@ -183,7 +183,7 @@ const SelectBoardsMenu = () => {
|
|||||||
const { data: boards = [] } = clientApi.board.getAllBoards.useQuery();
|
const { data: boards = [] } = clientApi.board.getAllBoards.useQuery();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu position="bottom-end" withArrow>
|
<Menu position="bottom-end">
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<HeaderButton w="auto" px={4}>
|
<HeaderButton w="auto" px={4}>
|
||||||
<IconReplace stroke={1.5} />
|
<IconReplace stroke={1.5} />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const InitFinish = async () => {
|
|||||||
const tFinish = await getScopedI18n("init.step.finish");
|
const tFinish = await getScopedI18n("init.step.finish");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 6} maw="90vw" withBorder>
|
<Card w={64 * 6} maw="90vw">
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text>{tFinish("description")}</Text>
|
<Text>{tFinish("description")}</Text>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const InitGroup = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 6} maw="90vw" withBorder>
|
<Card w={64 * 6} maw="90vw">
|
||||||
<form onSubmit={form.onSubmit(handleSubmitAsync)}>
|
<form onSubmit={form.onSubmit(handleSubmitAsync)}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ interface FileInfoCardProps {
|
|||||||
export const FileInfoCard = ({ file, onRemove }: FileInfoCardProps) => {
|
export const FileInfoCard = ({ file, onRemove }: FileInfoCardProps) => {
|
||||||
const tFileInfo = useScopedI18n("init.step.import.fileInfo");
|
const tFileInfo = useScopedI18n("init.step.import.fileInfo");
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 12 + 8} maw="90vw">
|
<Card w={64 * 12 + 8} maw="90vw" withBorder={false}>
|
||||||
<Group justify="space-between" align="center" wrap="nowrap">
|
<Group justify="space-between" align="center" wrap="nowrap">
|
||||||
<Group>
|
<Group>
|
||||||
<Text fw={500} lineClamp={1} style={{ wordBreak: "break-all" }}>
|
<Text fw={500} lineClamp={1} style={{ wordBreak: "break-all" }}>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const InitImport = () => {
|
|||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 12 + 8} maw="90vw" withBorder>
|
<Card w={64 * 12 + 8} maw="90vw">
|
||||||
<ImportDropZone
|
<ImportDropZone
|
||||||
loading={isPending}
|
loading={isPending}
|
||||||
updateFile={(file) => {
|
updateFile={(file) => {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const InitSettings = () => {
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={form.onSubmit(handleSubmitAsync)}>
|
<form onSubmit={form.onSubmit(handleSubmitAsync)}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Card w={64 * 12 + 8} maw="90vw" withBorder>
|
<Card w={64 * 12 + 8} maw="90vw">
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text fw={500}>{tSection("analytics.title")}</Text>
|
<Text fw={500}>{tSection("analytics.title")}</Text>
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ export const InitSettings = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
<Card w={64 * 12 + 8} maw="90vw" withBorder>
|
<Card w={64 * 12 + 8} maw="90vw">
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text fw={500}>{tSection("crawlingAndIndexing.title")}</Text>
|
<Text fw={500}>{tSection("crawlingAndIndexing.title")}</Text>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const InitStart = async () => {
|
|||||||
const tStart = await getScopedI18n("init.step.start");
|
const tStart = await getScopedI18n("init.step.start");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 6} maw="90vw" withBorder>
|
<Card w={64 * 6} maw="90vw">
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text>{tStart("description")}</Text>
|
<Text>{tStart("description")}</Text>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { InitUserForm } from "./init-user-form";
|
|||||||
|
|
||||||
export const InitUser = () => {
|
export const InitUser = () => {
|
||||||
return (
|
return (
|
||||||
<Card w={64 * 6} maw="90vw" withBorder>
|
<Card w={64 * 6} maw="90vw">
|
||||||
<InitUserForm />
|
<InitUserForm />
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ const fontSans = Inter({
|
|||||||
export const generateMetadata = async (): Promise<Metadata> => ({
|
export const generateMetadata = async (): Promise<Metadata> => ({
|
||||||
title: "Homarr",
|
title: "Homarr",
|
||||||
description:
|
description:
|
||||||
"Simplify the management of your server with Homarr - a sleek, modern dashboard that puts all of your apps and services at your fingertips.",
|
"A self-hosted dashboard for the *arr stack and your entire homelab. Integrates with 50+ services, real-time widgets, no config files.",
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "Homarr Dashboard",
|
title: "Homarr Dashboard",
|
||||||
description:
|
description:
|
||||||
"Simplify the management of your server with Homarr - a sleek, modern dashboard that puts all of your apps and services at your fingertips.",
|
"A self-hosted dashboard for the *arr stack and your entire homelab. Integrates with 50+ services, real-time widgets, no config files.",
|
||||||
url: "https://homarr.dev",
|
url: "https://homarr.dev",
|
||||||
siteName: "Homarr Documentation",
|
siteName: "Homarr",
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
icon: "/logo/logo.png",
|
icon: "/logo/logo.png",
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export const HeroBanner = async () => {
|
|||||||
<Image
|
<Image
|
||||||
key={`grid-column-${columnIndex}-scroll-1-${index}`}
|
key={`grid-column-${columnIndex}-scroll-1-${index}`}
|
||||||
src={icon}
|
src={icon}
|
||||||
radius="md"
|
|
||||||
fit={"contain"}
|
fit={"contain"}
|
||||||
w={50}
|
w={50}
|
||||||
h={50}
|
h={50}
|
||||||
@@ -57,7 +56,6 @@ export const HeroBanner = async () => {
|
|||||||
<Image
|
<Image
|
||||||
key={`grid-column-${columnIndex}-scroll-2-${index}`}
|
key={`grid-column-${columnIndex}-scroll-2-${index}`}
|
||||||
src={icon}
|
src={icon}
|
||||||
radius="md"
|
|
||||||
fit={"contain"}
|
fit={"contain"}
|
||||||
w={50}
|
w={50}
|
||||||
h={50}
|
h={50}
|
||||||
|
|||||||
@@ -90,9 +90,7 @@ export default async function AboutPage() {
|
|||||||
<Group py="lg">
|
<Group py="lg">
|
||||||
<Image src={homarrLogoPath} width={100} height={100} alt="" />
|
<Image src={homarrLogoPath} width={100} height={100} alt="" />
|
||||||
<Stack gap={0}>
|
<Stack gap={0}>
|
||||||
<Title order={1} tt="uppercase">
|
<Title order={1}>Homarr</Title>
|
||||||
Homarr
|
|
||||||
</Title>
|
|
||||||
<Title order={2}>{t("version", { version })}</Title>
|
<Title order={2}>{t("version", { version })}</Title>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -184,6 +182,7 @@ export default async function AboutPage() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</AccordionControl>
|
</AccordionControl>
|
||||||
<AccordionPanel>
|
<AccordionPanel>
|
||||||
|
{" "}
|
||||||
<SimpleGrid cols={{ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }} spacing="md">
|
<SimpleGrid cols={{ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }} spacing="md">
|
||||||
{Object.entries(dependencies)
|
{Object.entries(dependencies)
|
||||||
.filter(([, value]) => !value.includes("workspace:"))
|
.filter(([, value]) => !value.includes("workspace:"))
|
||||||
@@ -195,9 +194,9 @@ export default async function AboutPage() {
|
|||||||
href={`https://www.npmjs.com/package/${name}`}
|
href={`https://www.npmjs.com/package/${name}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<Card withBorder radius="md" p="xs" className={classes.dependencyCard}>
|
<Card radius="md" p="xs" className={classes.dependencyCard}>
|
||||||
<Group gap="sm" wrap="nowrap">
|
<Group gap="sm" wrap="nowrap">
|
||||||
<ThemeIcon variant="light" size="lg" radius="md">
|
<ThemeIcon variant="light" size="lg">
|
||||||
<IconPackage size="1.5rem" stroke={1.5} />
|
<IconPackage size="1.5rem" stroke={1.5} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const AppCard = async ({ app }: AppCardProps) => {
|
|||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder>
|
<Card>
|
||||||
<Group justify="space-between" wrap="nowrap">
|
<Group justify="space-between" wrap="nowrap">
|
||||||
<Group align="top" justify="start" wrap="nowrap" style={{ flex: "1" }}>
|
<Group align="top" justify="start" wrap="nowrap" style={{ flex: "1" }}>
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
@@ -66,16 +66,14 @@ const BoardCard = async ({ board }: BoardCardProps) => {
|
|||||||
const VisibilityIcon = board.isPublic ? IconWorld : IconLock;
|
const VisibilityIcon = board.isPublic ? IconWorld : IconLock;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card radius="lg" withBorder>
|
<Card>
|
||||||
<CardSection p="sm" withBorder>
|
<CardSection p="sm" withBorder>
|
||||||
<Group justify="space-between" align="center">
|
<Group justify="space-between" align="center">
|
||||||
<Group gap="sm">
|
<Group gap="sm">
|
||||||
<Tooltip label={t(`visibility.${visibility}`)}>
|
<Tooltip label={t(`visibility.${visibility}`)}>
|
||||||
<VisibilityIcon size={20} stroke={1.5} />
|
<VisibilityIcon size={20} stroke={1.5} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Text fw="bolder" tt="uppercase">
|
<Text fw={700}>{board.name}</Text>
|
||||||
{board.name}
|
|
||||||
</Text>
|
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
@@ -123,6 +121,7 @@ const BoardCard = async ({ board }: BoardCardProps) => {
|
|||||||
style={{ borderTop: "none", borderBottom: "none", borderRight: "none", borderRadius: 0 }}
|
style={{ borderTop: "none", borderBottom: "none", borderRight: "none", borderRadius: 0 }}
|
||||||
variant="default"
|
variant="default"
|
||||||
size="lg"
|
size="lg"
|
||||||
|
aria-label={t("action.settings.label")}
|
||||||
>
|
>
|
||||||
<IconDotsVertical size={16} stroke={1.5} />
|
<IconDotsVertical size={16} stroke={1.5} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
|
|||||||
+7
-2
@@ -33,7 +33,7 @@ export const SecretCard = ({ secret, children, onCancel }: SecretCardProps) => {
|
|||||||
const KindIcon = integrationSecretIcons[secret.kind];
|
const KindIcon = integrationSecretIcons[secret.kind];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder>
|
<Card>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between">
|
||||||
<Group>
|
<Group>
|
||||||
@@ -58,7 +58,12 @@ export const SecretCard = ({ secret, children, onCancel }: SecretCardProps) => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{isPublic ? (
|
{isPublic ? (
|
||||||
<ActionIcon color="gray" variant="subtle" onClick={togglePublicSecretDisplay}>
|
<ActionIcon
|
||||||
|
color="gray"
|
||||||
|
variant="subtle"
|
||||||
|
onClick={togglePublicSecretDisplay}
|
||||||
|
aria-label={t(publicSecretDisplayOpened ? "common.action.hide" : "common.action.show")}
|
||||||
|
>
|
||||||
<DisplayIcon size={16} stroke={1.5} />
|
<DisplayIcon size={16} stroke={1.5} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ export const IntegrationTestConnectionError = ({ error, url }: IntegrationTestCo
|
|||||||
const causeArray = useMemo(() => toCauseArray(error.cause), [error.cause]);
|
const causeArray = useMemo(() => toCauseArray(error.cause), [error.cause]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder style={{ borderColor: getMantineColor("red", 8) }}>
|
<Card style={{ borderColor: getMantineColor("red", 8) }}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text size="lg" fw={500} c="red.8">
|
<Text size="lg" fw={500} c="red.8">
|
||||||
|
|||||||
+1
-1
@@ -216,7 +216,7 @@ export const CertificateDetailsCard = ({ certificate }: CertificateDetailsProps)
|
|||||||
const tCertificateField = useScopedI18n("certificate.field");
|
const tCertificateField = useScopedI18n("certificate.field");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder>
|
<Card>
|
||||||
<Text fw={500}>{tDetails("title")}</Text>
|
<Text fw={500}>{tDetails("title")}</Text>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between">
|
||||||
<Text size="sm" c="dimmed">
|
<Text size="sm" c="dimmed">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
transition: transform 150ms ease;
|
transition: background-color 150ms ease;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&[data-first="true"] {
|
&[data-first="true"] {
|
||||||
@@ -20,11 +20,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&[data-active] {
|
&[data-active] {
|
||||||
transform: scale(1.01);
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: var(--mantine-color-body);
|
background-color: var(--mantine-color-body);
|
||||||
border-color: light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
|
border-color: light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
|
||||||
box-shadow: var(--mantine-shadow-md);
|
|
||||||
border-radius: var(--mantine-radius-lg);
|
border-radius: var(--mantine-radius-lg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ export default async function NotFound() {
|
|||||||
return (
|
return (
|
||||||
<Center h="100%">
|
<Center h="100%">
|
||||||
<Stack align="center">
|
<Stack align="center">
|
||||||
<Title order={1} tt="uppercase">
|
<Title order={1}>{t("title")}</Title>
|
||||||
{t("title")}
|
|
||||||
</Title>
|
|
||||||
<Text>{t("text")}</Text>
|
<Text>{t("text")}</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Center>
|
</Center>
|
||||||
|
|||||||
@@ -29,20 +29,20 @@ export default async function ManagementPage() {
|
|||||||
<Space h="md" />
|
<Space h="md" />
|
||||||
<SimpleGrid cols={{ xs: 1, sm: 2, md: 3 }}>
|
<SimpleGrid cols={{ xs: 1, sm: 2, md: 3 }}>
|
||||||
{statistics.map((statistic) => (
|
{statistics.map((statistic) => (
|
||||||
<Card component={Link} href={statistic.path} key={statistic.path} radius="lg">
|
<Card component={Link} href={statistic.path} key={statistic.path}>
|
||||||
<Group justify="space-between" wrap="nowrap">
|
<Group justify="space-between" wrap="nowrap">
|
||||||
<Group wrap="nowrap">
|
<Group wrap="nowrap">
|
||||||
<Text size="2.4rem" fw="bolder">
|
<Text size="xl" fw={700}>
|
||||||
{statistic.count}
|
{statistic.count}
|
||||||
</Text>
|
</Text>
|
||||||
<Stack gap={0}>
|
<Stack gap={0}>
|
||||||
<Text c="red" size="xs">
|
<Text c="dimmed" size="xs">
|
||||||
{t(`statisticLabel.${statistic.subtitleKey}`)}
|
{t(`statisticLabel.${statistic.subtitleKey}`)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text fw="bold">{t(`statistic.${statistic.titleKey}`)}</Text>
|
<Text fw={600}>{t(`statistic.${statistic.titleKey}`)}</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
<IconArrowRight />
|
<IconArrowRight size={16} stroke={1.5} color="var(--mantine-color-dimmed)" />
|
||||||
</Group>
|
</Group>
|
||||||
</Card>
|
</Card>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ const SearchEngineCard = async ({ searchEngine }: SearchEngineCardProps) => {
|
|||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card withBorder>
|
<Card>
|
||||||
<Group justify="space-between" wrap="nowrap">
|
<Group justify="space-between" wrap="nowrap">
|
||||||
<Group align="top" justify="start" wrap="nowrap" style={{ flex: 1 }}>
|
<Group align="top" justify="start" wrap="nowrap" style={{ flex: 1 }}>
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ export const AnalyticsSettings = ({ initialData }: AnalyticsSettingsProps) => {
|
|||||||
<>
|
<>
|
||||||
<Title order={2}>{t("title")}</Title>
|
<Title order={2}>{t("title")}</Title>
|
||||||
|
|
||||||
<Card pos="relative" withBorder>
|
<Card pos="relative">
|
||||||
<LoadingOverlay visible={isPending} zIndex={1000} overlayProps={{ radius: "sm", blur: 2 }} />
|
<LoadingOverlay visible={isPending} />
|
||||||
<Stack>
|
<Stack>
|
||||||
<SwitchSetting form={form} formKey="enableGeneral" title={t("general.title")} text={t("general.text")} />
|
<SwitchSetting form={form} formKey="enableGeneral" title={t("general.title")} text={t("general.text")} />
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
+2
-2
@@ -41,11 +41,11 @@ export const CrawlingAndIndexingSettings = ({ initialData }: CrawlingAndIndexing
|
|||||||
<>
|
<>
|
||||||
<Title order={2}>{t("title")}</Title>
|
<Title order={2}>{t("title")}</Title>
|
||||||
|
|
||||||
<Card pos="relative" withBorder>
|
<Card pos="relative">
|
||||||
<Text c={"dimmed"} mb={"lg"}>
|
<Text c={"dimmed"} mb={"lg"}>
|
||||||
{t("warning")}
|
{t("warning")}
|
||||||
</Text>
|
</Text>
|
||||||
<LoadingOverlay visible={isPending} zIndex={1000} overlayProps={{ radius: "sm", blur: 2 }} />
|
<LoadingOverlay visible={isPending} />
|
||||||
<Stack>
|
<Stack>
|
||||||
<SwitchSetting form={form} formKey="noIndex" title={t("noIndex.title")} text={t("noIndex.text")} />
|
<SwitchSetting form={form} formKey="noIndex" title={t("noIndex.title")} text={t("noIndex.text")} />
|
||||||
<SwitchSetting form={form} formKey="noFollow" title={t("noFollow.title")} text={t("noFollow.text")} />
|
<SwitchSetting form={form} formKey="noFollow" title={t("noFollow.title")} text={t("noFollow.text")} />
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default async function CertificatesPage({ params }: CertificatesPageProps
|
|||||||
|
|
||||||
<SimpleGrid cols={{ sm: 1, lg: 2, xl: 3 }} spacing="lg">
|
<SimpleGrid cols={{ sm: 1, lg: 2, xl: 3 }} spacing="lg">
|
||||||
{x509Certificates.map((cert) => (
|
{x509Certificates.map((cert) => (
|
||||||
<Card key={cert.fileName} withBorder>
|
<Card key={cert.fileName}>
|
||||||
<Group wrap="nowrap">
|
<Group wrap="nowrap">
|
||||||
{cert.isError ? (
|
{cert.isError ? (
|
||||||
<IconAlertTriangle
|
<IconAlertTriangle
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ const ContainerActionBar = ({ selectedContainers }: ContainerActionBarProps) =>
|
|||||||
<ContainerActionBarButton icon={IconPlayerStop} color="red" action="stop" selectedIds={selectedIds} />
|
<ContainerActionBarButton icon={IconPlayerStop} color="red" action="stop" selectedIds={selectedIds} />
|
||||||
<ContainerActionBarButton icon={IconRotateClockwise} color="orange" action="restart" selectedIds={selectedIds} />
|
<ContainerActionBarButton icon={IconRotateClockwise} color="orange" action="restart" selectedIds={selectedIds} />
|
||||||
<ContainerActionBarButton icon={IconTrash} color="red" action="remove" selectedIds={selectedIds} />
|
<ContainerActionBarButton icon={IconTrash} color="red" action="remove" selectedIds={selectedIds} />
|
||||||
<Button leftSection={<IconCategoryPlus />} color={"red"} onClick={handleClick} variant="light" radius="md">
|
<Button leftSection={<IconCategoryPlus />} color={"red"} onClick={handleClick} variant="light">
|
||||||
{t("addToHomarr.label")}
|
{t("addToHomarr.label")}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -253,7 +253,6 @@ const ContainerActionBarButton = (props: ContainerActionBarButtonProps) => {
|
|||||||
onClick={handleClickAsync}
|
onClick={handleClickAsync}
|
||||||
loading={isPending}
|
loading={isPending}
|
||||||
variant="light"
|
variant="light"
|
||||||
radius="md"
|
|
||||||
>
|
>
|
||||||
{t(`${props.action}.label`)}
|
{t(`${props.action}.label`)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
+7
-19
@@ -4,28 +4,16 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: var(--mantine-spacing-xs);
|
padding: var(--mantine-spacing-xs);
|
||||||
padding-left: calc(var(--mantine-spacing-xs) * 2);
|
padding-left: calc(var(--mantine-spacing-xs) * 2);
|
||||||
|
border-left: 1px solid var(--mantine-color-blue-6);
|
||||||
@mixin hover {
|
background-color: light-dark(
|
||||||
box-shadow: var(--mantine-shadow-md);
|
var(--mantine-color-blue-0),
|
||||||
}
|
color-mix(in oklch, var(--mantine-color-blue-9), transparent 85%)
|
||||||
|
);
|
||||||
&::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 6px;
|
|
||||||
background-image: linear-gradient(0, var(--mantine-color-blue-4), var(--mantine-color-blue-9));
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin rtl {
|
@mixin rtl {
|
||||||
padding-left: var(--mantine-spacing-xs);
|
padding-left: var(--mantine-spacing-xs);
|
||||||
padding-right: calc(var(--mantine-spacing-xs) * 2);
|
padding-right: calc(var(--mantine-spacing-xs) * 2);
|
||||||
|
border-left: none;
|
||||||
&::before {
|
border-right: 1px solid var(--mantine-color-blue-6);
|
||||||
left: unset;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-1
@@ -23,7 +23,6 @@ export function HeaderCard(props: HeaderCardProps) {
|
|||||||
<Flex align="center" justify={isRTL ? "space-between" : "flex-start"} gap="md" direction={"row"}>
|
<Flex align="center" justify={isRTL ? "space-between" : "flex-start"} gap="md" direction={"row"}>
|
||||||
<ThemeIcon
|
<ThemeIcon
|
||||||
size="xl"
|
size="xl"
|
||||||
radius="md"
|
|
||||||
variant="gradient"
|
variant="gradient"
|
||||||
gradient={{
|
gradient={{
|
||||||
deg: 0,
|
deg: 0,
|
||||||
|
|||||||
+2
-2
@@ -18,8 +18,8 @@ export function ResourceGauge(props: KubernetesResourceGaugeProps) {
|
|||||||
const isRTL = Boolean(isLocaleRTL(currentLocale));
|
const isRTL = Boolean(isLocaleRTL(currentLocale));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Paper radius="md" withBorder className={classes.paper} mt={20}>
|
<Paper className={classes.paper} mt={20}>
|
||||||
<ThemeIcon className={classes.icon} size={60} radius={60} bg={"#326ce5"}>
|
<ThemeIcon className={classes.icon} size={60} radius={60} bg="blue.7">
|
||||||
<ResourceIcon type={props.kubernetesCapacity.type} />
|
<ResourceIcon type={props.kubernetesCapacity.type} />
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
|
|
||||||
|
|||||||
+1
-6
@@ -17,12 +17,7 @@ interface ResourceTileProps {
|
|||||||
export function ResourceTile(props: ResourceTileProps) {
|
export function ResourceTile(props: ResourceTileProps) {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card component={Link} href={`/manage/tools/kubernetes/${props.label}`} className={classes.cardContainer}>
|
||||||
withBorder
|
|
||||||
component={Link}
|
|
||||||
href={`/manage/tools/kubernetes/${props.label}`}
|
|
||||||
className={classes.cardContainer}
|
|
||||||
>
|
|
||||||
<Group justify="space-between" wrap="nowrap">
|
<Group justify="space-between" wrap="nowrap">
|
||||||
<Image src={`/images/kubernetes/${props.label}.svg`} alt={props.label} width={64} height={64} />
|
<Image src={`/images/kubernetes/${props.label}.svg`} alt={props.label} width={64} height={64} />
|
||||||
<Group gap="xs">
|
<Group gap="xs">
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@ export const UserProfileAvatarForm = ({ user }: UserProfileAvatarForm) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box pos="relative">
|
<Box pos="relative">
|
||||||
<Menu opened={opened} keepMounted onChange={toggle} position="bottom-start" withArrow>
|
<Menu opened={opened} keepMounted onChange={toggle} position="bottom-start">
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<UnstyledButton onClick={toggle}>
|
<UnstyledButton onClick={toggle}>
|
||||||
<UserAvatar user={user} size={200} />
|
<UserAvatar user={user} size={200} />
|
||||||
|
|||||||
+6
-6
@@ -149,7 +149,7 @@ export const UserCreateStepperComponent = ({ initialGroups }: UserCreateStepperC
|
|||||||
color={!generalForm.isValid() ? "red" : undefined}
|
color={!generalForm.isValid() ? "red" : undefined}
|
||||||
>
|
>
|
||||||
<form>
|
<form>
|
||||||
<Card p="xl" shadow="md" withBorder>
|
<Card p="xl">
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<TextInput
|
<TextInput
|
||||||
label={tUserField("username.label")}
|
label={tUserField("username.label")}
|
||||||
@@ -165,7 +165,7 @@ export const UserCreateStepperComponent = ({ initialGroups }: UserCreateStepperC
|
|||||||
</Stepper.Step>
|
</Stepper.Step>
|
||||||
<Stepper.Step label={t("step.security.label")} allowStepSelect={false} allowStepClick={false}>
|
<Stepper.Step label={t("step.security.label")} allowStepSelect={false} allowStepClick={false}>
|
||||||
<form>
|
<form>
|
||||||
<Card p="xl" shadow="md" withBorder>
|
<Card p="xl">
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<CustomPasswordInput
|
<CustomPasswordInput
|
||||||
withPasswordRequirements
|
withPasswordRequirements
|
||||||
@@ -185,7 +185,7 @@ export const UserCreateStepperComponent = ({ initialGroups }: UserCreateStepperC
|
|||||||
</form>
|
</form>
|
||||||
</Stepper.Step>
|
</Stepper.Step>
|
||||||
<Stepper.Step label={t("step.groups.label")} allowStepSelect={false} allowStepClick={false}>
|
<Stepper.Step label={t("step.groups.label")} allowStepSelect={false} allowStepClick={false}>
|
||||||
<Card p="xl" shadow="md" withBorder>
|
<Card p="xl">
|
||||||
<GroupsForm
|
<GroupsForm
|
||||||
initialGroups={initialGroups}
|
initialGroups={initialGroups}
|
||||||
addGroup={(groupId) =>
|
addGroup={(groupId) =>
|
||||||
@@ -198,20 +198,20 @@ export const UserCreateStepperComponent = ({ initialGroups }: UserCreateStepperC
|
|||||||
</Card>
|
</Card>
|
||||||
</Stepper.Step>
|
</Stepper.Step>
|
||||||
<Stepper.Step label={t("step.review.label")} allowStepSelect={false} allowStepClick={false}>
|
<Stepper.Step label={t("step.review.label")} allowStepSelect={false} allowStepClick={false}>
|
||||||
<Card p="xl" shadow="md" withBorder>
|
<Card p="xl">
|
||||||
<Stack maw={300} align="center" mx="auto">
|
<Stack maw={300} align="center" mx="auto">
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
size="xl"
|
size="xl"
|
||||||
user={{ name: generalForm.values.username, email: generalForm.values.email ?? null, image: null }}
|
user={{ name: generalForm.values.username, email: generalForm.values.email ?? null, image: null }}
|
||||||
/>
|
/>
|
||||||
<Text tt="uppercase" fw="bolder" size="xl">
|
<Text fw={700} size="xl">
|
||||||
{generalForm.values.username}
|
{generalForm.values.username}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
</Stepper.Step>
|
</Stepper.Step>
|
||||||
<Stepper.Completed>
|
<Stepper.Completed>
|
||||||
<Card p="xl" shadow="md" withBorder>
|
<Card p="xl">
|
||||||
<Stack align="center" maw={300} mx="auto">
|
<Stack align="center" maw={300} mx="auto">
|
||||||
<IconUserCheck size="3rem" />
|
<IconUserCheck size="3rem" />
|
||||||
<Title order={2}>{t("step.completed.title")}</Title>
|
<Title order={2}>{t("step.completed.title")}</Title>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const StepperNavigationComponent = ({
|
|||||||
}: StepperNavigationComponentProps) => {
|
}: StepperNavigationComponentProps) => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
return (
|
return (
|
||||||
<Card shadow="md" withBorder>
|
<Card>
|
||||||
{!isComplete ? (
|
{!isComplete ? (
|
||||||
<Group justify="space-between" wrap="nowrap">
|
<Group justify="space-between" wrap="nowrap">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ export const SaveAffix = ({ groupId }: SaveAffixProps) => {
|
|||||||
<div style={{ position: "sticky", bottom: 20 }}>
|
<div style={{ position: "sticky", bottom: 20 }}>
|
||||||
<Transition transition="slide-up" mounted={form.isDirty()}>
|
<Transition transition="slide-up" mounted={form.isDirty()}>
|
||||||
{(transitionStyles) => (
|
{(transitionStyles) => (
|
||||||
<Card style={transitionStyles} withBorder>
|
<Card style={transitionStyles}>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between">
|
||||||
<Text fw={500}>{tForm("unsavedChanges")}</Text>
|
<Text fw={500}>{tForm("unsavedChanges")}</Text>
|
||||||
<Group>
|
<Group>
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ const PermissionCard = async ({ group, isDanger }: PermissionCardProps) => {
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
p="md"
|
p="md"
|
||||||
withBorder
|
|
||||||
style={{
|
style={{
|
||||||
borderColor: isDanger ? "var(--mantine-color-red-8)" : undefined,
|
borderColor: isDanger ? "var(--mantine-color-red-8)" : undefined,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ const SaveAffix = ({ visible, isPending, onDiscard, onSave }: SaveAffixProps) =>
|
|||||||
<div style={{ position: "sticky", bottom: 20 }}>
|
<div style={{ position: "sticky", bottom: 20 }}>
|
||||||
<Transition transition="slide-up" mounted={visible}>
|
<Transition transition="slide-up" mounted={visible}>
|
||||||
{(transitionStyles) => (
|
{(transitionStyles) => (
|
||||||
<Card style={transitionStyles} withBorder>
|
<Card style={transitionStyles}>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between">
|
||||||
<Text fw={500}>{t("common.unsavedChanges")}</Text>
|
<Text fw={500}>{t("common.unsavedChanges")}</Text>
|
||||||
<Group>
|
<Group>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export const WidgetPreviewPageContent = ({ kind, integrationData }: WidgetPrevie
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Card withBorder w={dimensions.width} h={dimensions.height} p={dimensions.height >= 96 ? undefined : 4}>
|
<Card w={dimensions.width} h={dimensions.height} p={dimensions.height >= 96 ? undefined : 4}>
|
||||||
<QueryErrorResetBoundary>
|
<QueryErrorResetBoundary>
|
||||||
{({ reset }) => (
|
{({ reset }) => (
|
||||||
<ErrorBoundary
|
<ErrorBoundary
|
||||||
@@ -123,17 +123,35 @@ export const WidgetPreviewPageContent = ({ kind, integrationData }: WidgetPrevie
|
|||||||
</QueryErrorResetBoundary>
|
</QueryErrorResetBoundary>
|
||||||
</Card>
|
</Card>
|
||||||
<Affix bottom={12} right={72}>
|
<Affix bottom={12} right={72}>
|
||||||
<ActionIcon size={48} variant="default" radius="xl" onClick={handleOpenEditWidgetModal}>
|
<ActionIcon
|
||||||
|
size={48}
|
||||||
|
variant="default"
|
||||||
|
radius="xl"
|
||||||
|
onClick={handleOpenEditWidgetModal}
|
||||||
|
aria-label={t("common.action.edit")}
|
||||||
|
>
|
||||||
<IconPencil size={24} />
|
<IconPencil size={24} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Affix>
|
</Affix>
|
||||||
<Affix bottom={12} right={72 + 60}>
|
<Affix bottom={12} right={72 + 60}>
|
||||||
<ActionIcon size={48} variant="default" radius="xl" onClick={toggleEditMode}>
|
<ActionIcon
|
||||||
|
size={48}
|
||||||
|
variant="default"
|
||||||
|
radius="xl"
|
||||||
|
onClick={toggleEditMode}
|
||||||
|
aria-label={editMode ? t("widgetPreview.toggle.disabled") : t("widgetPreview.toggle.enabled")}
|
||||||
|
>
|
||||||
{editMode ? <IconToggleLeft size={24} /> : <IconToggleRight size={24} />}
|
{editMode ? <IconToggleLeft size={24} /> : <IconToggleRight size={24} />}
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Affix>
|
</Affix>
|
||||||
<Affix bottom={12} right={72 + 120}>
|
<Affix bottom={12} right={72 + 120}>
|
||||||
<ActionIcon size={48} variant="default" radius="xl" onClick={openDimensionsModal}>
|
<ActionIcon
|
||||||
|
size={48}
|
||||||
|
variant="default"
|
||||||
|
radius="xl"
|
||||||
|
onClick={openDimensionsModal}
|
||||||
|
aria-label={t("widgetPreview.dimensions.title")}
|
||||||
|
>
|
||||||
<IconDimensions size={24} />
|
<IconDimensions size={24} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Affix>
|
</Affix>
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export const BoardItemContent = ({ item }: BoardItemContentProps) => {
|
|||||||
item.advancedOptions.customCssClasses.join(" "),
|
item.advancedOptions.customCssClasses.join(" "),
|
||||||
)}
|
)}
|
||||||
radius={board.itemRadius}
|
radius={board.itemRadius}
|
||||||
withBorder
|
|
||||||
styles={{
|
styles={{
|
||||||
root: {
|
root: {
|
||||||
"--opacity": board.opacity / 100,
|
"--opacity": board.opacity / 100,
|
||||||
|
|||||||
@@ -105,9 +105,17 @@ const BoardItemMenuInner = ({ offset, item, resetErrorBoundary }: BoardItemMenuP
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu withinPortal withArrow position="right-start" arrowPosition="center">
|
<Menu withinPortal position="right-start" arrowPosition="center">
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<ActionIcon variant="default" radius={"xl"} pos="absolute" top={offset} right={offset} style={{ zIndex: 10 }}>
|
<ActionIcon
|
||||||
|
variant="default"
|
||||||
|
radius={"xl"}
|
||||||
|
pos="absolute"
|
||||||
|
top={offset}
|
||||||
|
right={offset}
|
||||||
|
style={{ zIndex: 10 }}
|
||||||
|
aria-label={tItem("menu.label.settings")}
|
||||||
|
>
|
||||||
<IconDotsVertical size={"1rem"} />
|
<IconDotsVertical size={"1rem"} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const WidgetItem = ({
|
|||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<SupportedIntegrations mt="auto" integrations={item.supportedIntegrations} />
|
<SupportedIntegrations mt="auto" integrations={item.supportedIntegrations} />
|
||||||
<Button onClick={onSelect} variant="light" size="xs" radius="md" fullWidth>
|
<Button onClick={onSelect} variant="light" size="xs" fullWidth>
|
||||||
{t(`item.create.addToBoard`)}
|
{t(`item.create.addToBoard`)}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -129,7 +129,7 @@ const SupportedIntegrations = ({ integrations, mt }: SupportedIntegrationsProps)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Center mt={mt}>
|
<Center mt={mt}>
|
||||||
<Tooltip.Group openDelay={300} closeDelay={100}>
|
<Tooltip.Group closeDelay={100}>
|
||||||
<Group gap={2}>
|
<Group gap={2}>
|
||||||
{integrations.slice(0, countToShow).map((integration) => (
|
{integrations.slice(0, countToShow).map((integration) => (
|
||||||
<Tooltip key={integration} label={getIntegrationName(integration)} withArrow>
|
<Tooltip key={integration} label={getIntegrationName(integration)} withArrow>
|
||||||
|
|||||||
@@ -27,13 +27,7 @@ export const BoardCategorySection = ({ section }: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card style={{ "--opacity": board.opacity / 100 }} radius={board.itemRadius} p={0} className={classes.itemCard}>
|
||||||
style={{ "--opacity": board.opacity / 100 }}
|
|
||||||
radius={board.itemRadius}
|
|
||||||
withBorder
|
|
||||||
p={0}
|
|
||||||
className={classes.itemCard}
|
|
||||||
>
|
|
||||||
<Stack>
|
<Stack>
|
||||||
<Group wrap="nowrap" gap="sm">
|
<Group wrap="nowrap" gap="sm">
|
||||||
<UnstyledButton w="100%" p="sm" onClick={toggle}>
|
<UnstyledButton w="100%" p="sm" onClick={toggle}>
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ export const CategoryMenu = ({ category }: Props) => {
|
|||||||
const t = useScopedI18n("section.category");
|
const t = useScopedI18n("section.category");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu withArrow>
|
<Menu>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<ActionIcon mr="sm" variant="transparent">
|
<ActionIcon mr="sm" variant="transparent" aria-label={t("menu.label.settings")}>
|
||||||
<IconDotsVertical size={20} />
|
<IconDotsVertical size={20} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ export const BoardDynamicSection = ({ section }: Props) => {
|
|||||||
className={combineClasses(classes.itemCard, section.options.customCssClasses.join(" "))}
|
className={combineClasses(classes.itemCard, section.options.customCssClasses.join(" "))}
|
||||||
w="100%"
|
w="100%"
|
||||||
h="100%"
|
h="100%"
|
||||||
withBorder
|
|
||||||
styles={{
|
styles={{
|
||||||
root: {
|
root: {
|
||||||
overflow: "visible",
|
overflow: "visible",
|
||||||
|
|||||||
@@ -43,9 +43,17 @@ export const BoardDynamicSectionMenu = ({ section }: { section: DynamicSectionIt
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu withinPortal withArrow position="right-start" arrowPosition="center">
|
<Menu withinPortal position="right-start" arrowPosition="center">
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<ActionIcon variant="default" radius={"xl"} pos="absolute" top={4} right={4} style={{ zIndex: 10 }}>
|
<ActionIcon
|
||||||
|
variant="default"
|
||||||
|
radius={"xl"}
|
||||||
|
pos="absolute"
|
||||||
|
top={4}
|
||||||
|
right={4}
|
||||||
|
style={{ zIndex: 10 }}
|
||||||
|
aria-label={tItem("menu.label.settings")}
|
||||||
|
>
|
||||||
<IconDotsVertical size={"1rem"} />
|
<IconDotsVertical size={"1rem"} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|||||||
@@ -12,16 +12,7 @@ export const CommonNavLink = (props: ClientNavigationLink) =>
|
|||||||
const NavLinkHref = (props: NavigationLinkHref) => {
|
const NavLinkHref = (props: NavigationLinkHref) => {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
return props.external ? (
|
return props.external ? (
|
||||||
<NavLink
|
<NavLink component="a" label={props.label} leftSection={props.icon} href={props.href} target="_blank" />
|
||||||
component="a"
|
|
||||||
label={props.label}
|
|
||||||
leftSection={props.icon}
|
|
||||||
href={props.href}
|
|
||||||
style={{
|
|
||||||
borderRadius: 5,
|
|
||||||
}}
|
|
||||||
target="_blank"
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<NavLink
|
<NavLink
|
||||||
component={Link}
|
component={Link}
|
||||||
@@ -29,9 +20,6 @@ const NavLinkHref = (props: NavigationLinkHref) => {
|
|||||||
leftSection={props.icon}
|
leftSection={props.icon}
|
||||||
href={props.href}
|
href={props.href}
|
||||||
active={pathname === props.href}
|
active={pathname === props.href}
|
||||||
style={{
|
|
||||||
borderRadius: 5,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -40,14 +28,7 @@ const NavLinkWithItems = (props: NavigationLinkWithItems) => {
|
|||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const isActive = props.items.some((item) => item.href === pathname);
|
const isActive = props.items.some((item) => item.href === pathname);
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink label={props.label} leftSection={props.icon} defaultOpened={isActive}>
|
||||||
style={{
|
|
||||||
borderRadius: 5,
|
|
||||||
}}
|
|
||||||
label={props.label}
|
|
||||||
leftSection={props.icon}
|
|
||||||
defaultOpened={isActive}
|
|
||||||
>
|
|
||||||
{props.items.map((item) => (
|
{props.items.map((item) => (
|
||||||
<NavLinkHref key={item.label} {...item} />
|
<NavLinkHref key={item.label} {...item} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const DangerZoneRoot = async ({ children }: DangerZoneRootProps) => {
|
|||||||
<Title c="red.8" order={2}>
|
<Title c="red.8" order={2}>
|
||||||
{t("common.dangerZone")}
|
{t("common.dangerZone")}
|
||||||
</Title>
|
</Title>
|
||||||
<Card withBorder style={{ borderColor: "var(--mantine-color-red-8)", borderWidth: 3 }}>
|
<Card style={{ borderColor: "var(--mantine-color-red-8)", borderWidth: 3 }}>
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
{Array.isArray(children)
|
{Array.isArray(children)
|
||||||
? children.map((child, index) => (
|
? children.map((child, index) => (
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ interface NoResultsProps {
|
|||||||
|
|
||||||
export const NoResults = ({ icon: Icon, title, action }: NoResultsProps) => {
|
export const NoResults = ({ icon: Icon, title, action }: NoResultsProps) => {
|
||||||
return (
|
return (
|
||||||
<Card withBorder bg="transparent">
|
<Card bg="transparent" withBorder={false}>
|
||||||
<Stack align="center" gap="sm">
|
<Stack align="center" gap="sm">
|
||||||
<Icon size="2rem" />
|
<Icon size="2rem" />
|
||||||
<Text fw={500} size="lg">
|
<Text fw={500} size="lg">
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export const UserAvatarMenu = ({ children, availableUpdatesPromise }: UserAvatar
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
// We use keepMounted so we can add event listeners to prevent navigating away without saving the board
|
// We use keepMounted so we can add event listeners to prevent navigating away without saving the board
|
||||||
<Menu width={300} withArrow withinPortal keepMounted>
|
<Menu width={300} withinPortal keepMounted>
|
||||||
<Menu.Dropdown>
|
<Menu.Dropdown>
|
||||||
<AvailableUpdatesMenuItem availableUpdatesPromise={availableUpdatesPromise} />
|
<AvailableUpdatesMenuItem availableUpdatesPromise={availableUpdatesPromise} />
|
||||||
<Menu.Item component={Link} href="/boards" leftSection={<IconHome size="1rem" />}>
|
<Menu.Item component={Link} href="/boards" leftSection={<IconHome size="1rem" />}>
|
||||||
|
|||||||
Reference in new issue
Block a user