feat(board): add mobile home board (#1910)

* feat(board): add mobile home board

* fix: add missing translations

* fix: mysql key reference with other datatype

* fix: format issue

* fix: missing trpc context arguments in tests

* fix: missing trpc context arguments in tests
This commit is contained in:
Meier Lukas
2025-01-14 19:54:55 +01:00
committed by GitHub
parent ec3bda34e0
commit e01d74f4f8
32 changed files with 3634 additions and 90 deletions

View File

@@ -1,5 +1,5 @@
import { Group, Stack, Text } from "@mantine/core";
import { IconHome, IconLayoutDashboard, IconLink, IconSettings } from "@tabler/icons-react";
import { IconDeviceMobile, IconHome, IconLayoutDashboard, IconLink, IconSettings } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
import { useI18n } from "@homarr/translation/client";
@@ -59,6 +59,30 @@ const boardChildrenOptions = createChildrenOptions<Board>({
};
},
},
{
key: "mobileBoard",
Component: () => {
const t = useI18n();
return (
<Group mx="md" my="sm">
<IconDeviceMobile stroke={1.5} />
<Text>{t("search.mode.appIntegrationBoard.group.board.children.action.mobileBoard.label")}</Text>
</Group>
);
},
useInteraction(option) {
const { mutateAsync } = clientApi.board.setMobileHomeBoard.useMutation();
return {
type: "javaScript",
// eslint-disable-next-line no-restricted-syntax
async onSelect() {
await mutateAsync({ id: option.id });
},
};
},
},
{
key: "settings",
Component: () => {