diff --git a/apps/docs/docs/management/boards/index.mdx b/apps/docs/docs/management/boards/index.mdx
index f1eb3c572..93bf78ae3 100644
--- a/apps/docs/docs/management/boards/index.mdx
+++ b/apps/docs/docs/management/boards/index.mdx
@@ -9,11 +9,11 @@ tags:
- Layout
---
-import iconColorImage from './img/icon-color.png'
-import itemRadiusImage from './img/item-radius.png'
-import layoutLargeImage from './img/layout-large.png'
-import layoutMediumImage from './img/layout-medium.png'
-import layoutSmallImage from './img/layout-small.png'
+import iconColorImage from "./img/icon-color.png";
+import itemRadiusImage from "./img/item-radius.png";
+import layoutLargeImage from "./img/layout-large.png";
+import layoutMediumImage from "./img/layout-medium.png";
+import layoutSmallImage from "./img/layout-small.png";
Each dashboard is called a "board".
You can create as many boards as you want.
@@ -24,24 +24,29 @@ Other boards can be viewed by direct links (e.g. my-homarr.com/board/smart-home)
Names of boards must be unique because this will be used in the URL to load the desired board.
## Create a new board
+
When creating a board, the availability of the board name will be checked for you.

### Name
+
The name must not include any special characters and must be at least one character long.
Underscores and hyphen-minus are allowed.
### Column count
-Homarr has a complex drag and drop system that can be used from the browser.
+
+Homarr has a complex drag-and-drop system that can be used from the browser.
The column count defines how many horizontal columns are available to drag and drop elements to.
### Public
+
This will enable public access for everyone - regardless of whether they are logged in or not.
-This can be really useful if you want to have public boards in your company or for family and fiends.
+This can be really useful if you want to have public boards in your company or for family and friends.
Modifications for public boards must be allowed explicitly using user groups and their permissions.
## Board settings
+
You navigate to the board settings by clicking on these three dots:

@@ -50,8 +55,12 @@ Alternatively, you can also navigate from the board page itself using the cog ic

+All board settings are edited on a single page. Click the **Save changes** button in the save bar at the bottom to apply them, or **Discard** to restore the last saved values. The save bar only appears when you have unsaved changes. Access control and the Danger zone are independent sections and are applied immediately.
+
### General
+
#### Page title
+
This is the title that will be visible at the top left in the navigation bar:

@@ -59,6 +68,7 @@ This is the title that will be visible at the top left in the navigation bar:
This field is optional and Homarr will fall back to "Homarr" if nothing is set.
#### Meta title
+
This is the secondary title of the page that is not directly visible in the page itself.
Browser will use it to set the title of tabs:
@@ -67,10 +77,12 @@ Browser will use it to set the title of tabs:
Homarr will fall back to the board name and a suffix if nothing is set.
#### Logo image URL
+
This is the URL that is used for the image at the top left.
Homarr will fall back to the Homarr logo if nothing is set.
#### Favicon image URL
+
This is the URL that is used for the favicon in the tab title.
Homarr will fall back to the Homarr logo if nothing is set.
@@ -94,51 +106,65 @@ Amount of columns for this layout. Defines how many items can be placed in a row
#### Breakpoint
-Minimum width of the screen where the layout will be used.
-Once the minmum of the next layout is reached the layout will change.
+Minimum width of the screen where the layout will be used.
+Once the minimum of the next layout is reached the layout will change.
#### Preview
-
-
-
+
+
+
### Background
+
#### Background image URL
+
Homarr can display a background image behind apps and widgets.
This URL can be used to define what image should be shown.
#### Background image attachment
+
This defines whether the background should move when the user scrolls.
#### Background image size
+
This defines whether the background should cover the entire page (and possibly be cropped) or never be cropped but may not cover the entire page.
#### Background image repeat
+
This defines whether the background should be repeated if it cannot cover the entire page.
This option can be useful if you have patterns that can be repeated easily (e.g. patterns):

### Appearance
+
#### Primary color
+
Color that can be chosen freely to give accents to active elements.
+
#### Secondary color
+
Color that can be chosen freely to give accents.
+
#### Opacity
+
Opacity of the colors.
+
#### Icon color
+
Change the color of your bookmark / app icons.
-
+
#### Item radius
+
Change the radius of your items / categories.
-
-
+
### Custom CSS
+
This is the field where you can enter custom CSS.
The styling will only be applied on the respective board page.
@@ -147,14 +173,16 @@ The styling will only be applied on the respective board page.
### Behaviour
#### Disable app status
+
This will disable the status check for apps.
### Access control
+
With the access control, you can permit a single user or a group to your board.
The users and groups can have one of these three levels of access:
| **Permission Level** | View board | Edit mode | Settings | Danger zone (eg. delete) |
-|----------------------|------------|-----------|----------|--------------------------|
+| -------------------- | ---------- | --------- | -------- | ------------------------ |
| View board | X | | | |
| Modify board | X | X | X | |
| Full access | X | X | X | X |
@@ -173,22 +201,27 @@ After editing permissions, the save button below the table must be pressed.
Otherwise, all changes will be discarded.
### Danger zone
+
#### Rename
+
Renaming a board will break all existing links to it permanently with no redirect.
#### Board visibility
+
By default, boards will be private. This means only authenticated users that are authorized have access.
Making a board public will expose it to everyone - including unauthenticated users.
#### Delete
+
This will permanently delete the board.
This action is irreversible and cannot be undone.
## Delete boards
+
The deletion of boards is permanent and cannot be undone.
There are two ways to delete a board:
-- Navigate to the settings of your board, open the "Danger zone" dropdown and click on the "delete this board" button.
+- Navigate to the settings of your board, open the "Danger zone" section and click on the "delete this board" button.
- Navigate to the list of boards in the management pages, click the three dots and click on "delete permanently".
Both actions will execute the same deletion process.
@@ -196,7 +229,7 @@ Both actions will execute the same deletion process.
## Duplicate boards
:::note
-Duplicating a board will not copy the users and groups that have access to the board
+Duplicating a board will not copy the users and groups that have access to the board
nor the integrations the user does not have access to.
:::
@@ -206,47 +239,51 @@ You can duplicate a board by clicking on the three dots in the list of boards an

## Setting boards as your home board
+
The home board is the dashboard, that will be shown at the root path of Homarr or if no board name was passed in the URL.
All the following paths will lead to the home board:
-- ``my-homarr.com``
-- ``my-homarr.com/boards``
+
+- `my-homarr.com`
+- `my-homarr.com/boards`
Your home board will have a special small badge at the top right in the list of boards:

### For yourself
+
To set the home board yourself, the easiest option is to set it directly in the list of boards:

Alternatively, you can also define it via your user profile:
+
1. Click on your user profile at the top right
-2. Click on ``Your preferences``
-3. Change the home board in the ``home board`` dropdown and click on ``Save``.
+2. Click on `Your preferences`
+3. Change the home board in the `home board` dropdown and click on `Save`.
### For other users
-1. Navigate to the users: ``Management`` > ``Users`` > ``Manage``
+1. Navigate to the users: `Management` > `Users` > `Manage`
2. Click on the username of the user that you want to adjust
-3. Select the desired home board via the dropdown and click on ``Save`` \
-
+3. Select the desired home board via the dropdown and click on `Save` \
+ 
### For user groups
-1. Navigate to the user groups: ``Management`` > ``Users`` > ``Groups`` > ``Manage``
-2. Go to tab ``Settings``
-3. Select the desired home board via the dropdown and click on ``Save`` \
-
+1. Navigate to the user groups: `Management` > `Users` > `Groups` > `Manage`
+2. Go to tab `Settings`
+3. Select the desired home board via the dropdown and click on `Save` \
+ 
### For whole server
You can also set a global home board that will be used for all users that have not set a home board themselves.
It will also be used for anonymous users.
-1. Navigate to the settings: ``Management`` > ``Settings`` > ``Boards``
-2. Select the desired home board via the dropdown and click on ``Save`` \
-
+1. Navigate to the settings: `Management` > `Settings` > `Boards`
+2. Select the desired home board via the dropdown and click on `Save` \
+ 
:::note
For the global home board you can only select boards that are public.
@@ -255,4 +292,4 @@ For the global home board you can only select boards that are public.
### Mobile home board
Same as the home board, you can also set a mobile home board.
-It will be used for devices that are detected as mobile devices. (Using User-Agent header)
\ No newline at end of file
+It will be used for devices that are detected as mobile devices. (Using User-Agent header)
diff --git a/apps/docs/docs/management/settings/index.mdx b/apps/docs/docs/management/settings/index.mdx
index 016d56d10..8507d2b4f 100644
--- a/apps/docs/docs/management/settings/index.mdx
+++ b/apps/docs/docs/management/settings/index.mdx
@@ -13,6 +13,8 @@ tags:
The settings page applies options to the whole Homarr application.
Some changes need a full page reload before they take effect.
+All changes are collected in a single form. Click the **Save changes** button in the save bar at the bottom of the page to apply them. The save bar only appears when you have unsaved changes, and the **Discard** button reverts your changes.
+
## Analytics
Homarr uses [PostHog](https://posthog.com/) to collect anonymous usage data.
diff --git a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx
index 4af4af15f..b03168912 100644
--- a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx
+++ b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx
@@ -19,130 +19,106 @@ import {
import { useDisclosure } from "@mantine/hooks";
import { IconX } from "@tabler/icons-react";
-import { useZodForm } from "@homarr/form";
+import type { UseFormReturnType } from "@homarr/form";
import { useI18n } from "@homarr/translation/client";
-import { boardSavePartialSettingsSchema } from "@homarr/validation/board";
-import type { Board } from "../../_types";
+import { SectionCard } from "~/components/manage/section-card";
import { generateColors } from "../../(content)/_theme";
-import { useSavePartialSettingsMutation } from "./_shared";
+import type { FormValues } from "./_settings-form";
interface Props {
- board: Board;
+ form: UseFormReturnType;
}
const hexRegex = /^#[0-9a-fA-F]{6}$/;
const progressPercentageLabel = (value: number) => `${value}%`;
-export const ColorSettingsContent = ({ board }: Props) => {
- const form = useZodForm(boardSavePartialSettingsSchema, {
- initialValues: {
- primaryColor: board.primaryColor,
- secondaryColor: board.secondaryColor,
- opacity: board.opacity,
- iconColor: board.iconColor ?? "",
- itemRadius: board.itemRadius,
- },
- });
+export const ColorSettingsContent = ({ form }: Props) => {
const [showPreview, { toggle }] = useDisclosure(false);
const t = useI18n();
const theme = useMantineTheme();
- const { mutate: savePartialSettings, isPending } = useSavePartialSettingsMutation(board);
return (
-
+
+
+
+
+ color[6])}
+ flex={1}
+ {...form.getInputProps("iconColor")}
+ />
+ }
+ onClick={() => form.setFieldValue("iconColor", "")}
+ disabled={!form.values.iconColor}
+ >
+ {t("board.field.clearColor.label")}
+
+
+
+
+
+
+
+
);
};
diff --git a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_background.tsx b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_background.tsx
index 7b105fe9c..8a796560f 100644
--- a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_background.tsx
+++ b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_background.tsx
@@ -1,41 +1,32 @@
"use client";
import { startTransition } from "react";
-import { ActionIcon, Autocomplete, Button, Center, Grid, Group, Popover, Stack, Text } from "@mantine/core";
+import { ActionIcon, Autocomplete, Center, Grid, Group, Popover, Stack, Text } from "@mantine/core";
import { useDebouncedValue } from "@mantine/hooks";
import { IconPhotoOff, IconUpload } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
import { useSession } from "@homarr/auth/client";
import { backgroundImageAttachments, backgroundImageRepeats, backgroundImageSizes } from "@homarr/definitions";
-import { useZodForm } from "@homarr/form";
+import type { UseFormReturnType } from "@homarr/form";
import { UploadMedia } from "@homarr/forms-collection";
import type { TranslationObject } from "@homarr/translation";
import { useI18n } from "@homarr/translation/client";
import type { SelectItemWithDescriptionBadge } from "@homarr/ui";
import { SelectWithDescriptionBadge } from "@homarr/ui";
-import { boardSavePartialSettingsSchema } from "@homarr/validation/board";
-import type { Board } from "../../_types";
-import { useSavePartialSettingsMutation } from "./_shared";
+import { SectionCard } from "~/components/manage/section-card";
+import type { FormValues } from "./_settings-form";
interface Props {
- board: Board;
+ form: UseFormReturnType;
}
-export const BackgroundSettingsContent = ({ board }: Props) => {
+
+export const BackgroundSettingsContent = ({ form }: Props) => {
const t = useI18n();
const { data: session } = useSession();
- const { mutate: savePartialSettings, isPending } = useSavePartialSettingsMutation(board);
- const form = useZodForm(boardSavePartialSettingsSchema, {
- initialValues: {
- backgroundImageUrl: board.backgroundImageUrl ?? "",
- backgroundImageAttachment: board.backgroundImageAttachment,
- backgroundImageRepeat: board.backgroundImageRepeat,
- backgroundImageSize: board.backgroundImageSize,
- },
- });
- const [debouncedSearch] = useDebouncedValue(form.values.backgroundImageUrl, 200);
+ const [debouncedSearch] = useDebouncedValue(form.values.backgroundImageUrl ?? "", 200);
const medias = clientApi.media.getPaginated.useQuery({
page: 1,
pageSize: 10,
@@ -53,121 +44,106 @@ export const BackgroundSettingsContent = ({ board }: Props) => {
const backgroundImageRepeatData = useBackgroundOptionData("backgroundImageRepeat", backgroundImageRepeats);
return (
-
+ >
+ {({ onClick, loading }) => (
+
+
+
+ )}
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
diff --git a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_behavior.tsx b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_behavior.tsx
index 9eded5ec4..563fb97eb 100644
--- a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_behavior.tsx
+++ b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_behavior.tsx
@@ -1,48 +1,27 @@
"use client";
-import { Button, Group, Stack, Switch } from "@mantine/core";
+import { Switch } from "@mantine/core";
-import { useForm } from "@homarr/form";
+import type { UseFormReturnType } from "@homarr/form";
import { useI18n } from "@homarr/translation/client";
-import type { Board } from "../../_types";
-import { useSavePartialSettingsMutation } from "./_shared";
+import { SectionCard } from "~/components/manage/section-card";
+import type { FormValues } from "./_settings-form";
interface Props {
- board: Board;
+ form: UseFormReturnType;
}
-export const BehaviorSettingsContent = ({ board }: Props) => {
+export const BehaviorSettingsContent = ({ form }: Props) => {
const t = useI18n();
- const { mutate: savePartialSettings, isPending } = useSavePartialSettingsMutation(board);
- const form = useForm({
- initialValues: {
- disableStatus: board.disableStatus,
- },
- });
return (
-
+
+
+
);
};
diff --git a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_customCss.tsx b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_customCss.tsx
index e0d8ec565..e5df59a9f 100644
--- a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_customCss.tsx
+++ b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_customCss.tsx
@@ -1,6 +1,6 @@
"use client";
-import { Alert, Button, Group, Input, Stack } from "@mantine/core";
+import { Alert, Input } from "@mantine/core";
import { highlight, languages } from "prismjs";
import Editor from "react-simple-code-editor";
@@ -8,59 +8,39 @@ import "~/styles/prismjs.scss";
import { IconInfoCircle } from "@tabler/icons-react";
-import { useForm } from "@homarr/form";
+import type { UseFormReturnType } from "@homarr/form";
import { useI18n, useScopedI18n } from "@homarr/translation/client";
-import type { Board } from "../../_types";
-import { useSavePartialSettingsMutation } from "./_shared";
+import { SectionCard } from "~/components/manage/section-card";
+import type { FormValues } from "./_settings-form";
import classes from "./customcss.module.css";
interface Props {
- board: Board;
+ form: UseFormReturnType;
}
-export const CustomCssSettingsContent = ({ board }: Props) => {
+export const CustomCssSettingsContent = ({ form }: Props) => {
const t = useI18n();
const customCssT = useScopedI18n("board.field.customCss");
- const { mutate: savePartialSettings, isPending } = useSavePartialSettingsMutation(board);
- const form = useForm({
- initialValues: {
- customCss: board.customCss ?? "",
- },
- });
return (
-
+ }>
+ {customCssT("customClassesAlert.description")}
+
+
);
};
interface CustomCssInputProps {
value?: string;
onChange: (value: string) => void;
+ error?: React.ReactNode;
}
-const CustomCssInput = ({ value, onChange }: CustomCssInputProps) => {
+const CustomCssInput = ({ value, onChange, error }: CustomCssInputProps) => {
const customCssT = useScopedI18n("board.field.customCss");
return (
@@ -70,6 +50,7 @@ const CustomCssInput = ({ value, onChange }: CustomCssInputProps) => {
htmlFor: "custom-css",
}}
description={customCssT("description")}
+ error={error}
inputWrapperOrder={["label", "description", "input", "error"]}
>