Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): automatic release v0.1.0 #1572

Merged
merged 48 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
219a6ad
chore(deps): update dependency @types/node to ^22.9.2 (#1526)
homarr-renovate[bot] Nov 23, 2024
482ca49
chore(deps): update dependency @types/node to ^22.9.3 (#1527)
homarr-renovate[bot] Nov 23, 2024
cdfb61f
fix(deps): update dependency tldts to ^6.1.64 (#1529)
homarr-renovate[bot] Nov 23, 2024
32ee9f3
refactor: add request handlers for centralized cached requests (#1504)
Meierschlumpf Nov 23, 2024
8fea983
refactor: make casing for column names consistent (#1517)
Meierschlumpf Nov 23, 2024
1fc48f9
feat: add permission section to create user page (#1524)
Meierschlumpf Nov 23, 2024
38143b6
fix: matcher for translation middleware only supports en and de (#1528)
Meierschlumpf Nov 23, 2024
9fb14df
feat: replace home page with home board (#1530)
Meierschlumpf Nov 23, 2024
4a94d60
fix: auth broken cause of consistent table column rename (#1532)
Meierschlumpf Nov 23, 2024
5a3d974
fix(deps): update dependency @dnd-kit/core to ^6.2.0 (#1534)
homarr-renovate[bot] Nov 23, 2024
982ab43
chore(deps): update dependency typescript to ^5.7.2 (#1523)
homarr-renovate[bot] Nov 23, 2024
d76b4d0
feat: #1243 add api routes (#1286)
manuel-rw Nov 23, 2024
24daba7
fix(deps): update tanstack-query monorepo to ^5.61.3 (#1536)
homarr-renovate[bot] Nov 24, 2024
2e28147
fix(deps): update mantine monorepo to ^7.14.2 (#1537)
homarr-renovate[bot] Nov 24, 2024
32e6b8e
fix: external users can be added to groups manually (#1540)
Meierschlumpf Nov 24, 2024
225356c
fix: add beforeunload logic for board in edit mode (#1531)
Meierschlumpf Nov 24, 2024
ecf299e
fix: icon picker suspense issue (#1533)
Meierschlumpf Nov 24, 2024
1c4d4f4
fix: rename default to home board (#1538)
Meierschlumpf Nov 24, 2024
74e1b6b
fix: transfer group not invalidating path (#1539)
Meierschlumpf Nov 24, 2024
b68977c
fix(deps): update dependency @dnd-kit/sortable to v9 (#1535)
homarr-renovate[bot] Nov 24, 2024
7e349bb
refactor: improve design of no integrations found (#1543)
Meierschlumpf Nov 25, 2024
b6c28da
fix(deps): update dependency next-intl to v3.25.2 (#1545)
homarr-renovate[bot] Nov 25, 2024
3cbc20b
chore(deps): update dependency @types/node to ^22.9.4 (#1546)
homarr-renovate[bot] Nov 25, 2024
591c5b5
chore(deps): update turbo monorepo to ^2.3.2 (#1547)
homarr-renovate[bot] Nov 25, 2024
bfe284c
chore(deps): update dependency @types/node to ^22.10.0 (#1549)
homarr-renovate[bot] Nov 26, 2024
93aedd9
fix(deps): update dependency better-sqlite3 to ^11.6.0 (#1548)
homarr-renovate[bot] Nov 26, 2024
2e9b99d
fix(deps): update dependency prettier to ^3.4.0 (#1550)
homarr-renovate[bot] Nov 26, 2024
907c28c
fix(deps): update dependency next-intl to v3.25.3 (#1551)
homarr-renovate[bot] Nov 26, 2024
63f8637
chore(deps): update dependency @vitejs/plugin-react to ^4.3.4 (#1552)
homarr-renovate[bot] Nov 26, 2024
37f961c
chore(deps): update vitest monorepo to ^2.1.6 (#1553)
homarr-renovate[bot] Nov 26, 2024
27b8f65
fix(deps): update dependency prettier to ^3.4.1 (#1554)
homarr-renovate[bot] Nov 26, 2024
91a199f
fix(deps): update tanstack-query monorepo to ^5.61.4 (#1555)
homarr-renovate[bot] Nov 26, 2024
c1fe655
fix(deps): update tiptap monorepo to v2.10.3 (#1556)
homarr-renovate[bot] Nov 26, 2024
f2268c8
fix(deps): update dependency @million/lint to v1.0.13 (#1557)
homarr-renovate[bot] Nov 26, 2024
9f98290
fix(deps): update dependency video.js to ^8.20.0 (#1561)
homarr-renovate[bot] Nov 27, 2024
fc734e5
chore(deps): update turbo monorepo to ^2.3.3 (#1558)
homarr-renovate[bot] Nov 27, 2024
f2e7349
fix(deps): update tanstack-query monorepo to ^5.61.5 (#1559)
homarr-renovate[bot] Nov 27, 2024
52d2a88
fix: moving categories up and down is not working (#1542)
Meierschlumpf Nov 27, 2024
09dae45
fix(deps): update mantine monorepo to ^7.14.3 (#1563)
homarr-renovate[bot] Nov 28, 2024
85a7b7d
chore(deps): update dependency @types/node to ^22.10.1 (#1562)
homarr-renovate[bot] Nov 28, 2024
c1f2ede
chore(deps): update pnpm to v9.14.3 (#1564)
homarr-renovate[bot] Nov 28, 2024
4df6006
fix(deps): update dependency typescript-eslint to ^8.16.0 (#1544)
homarr-renovate[bot] Nov 28, 2024
44e2105
fix(deps): update dependency undici to v7 (#1560)
homarr-renovate[bot] Nov 28, 2024
2d7efc3
fix: open-api doc generation failing, post patch and delete not expor…
Meierschlumpf Nov 28, 2024
fd42bde
fix(deps): update dependency @tabler/icons-react to ^3.23.0 (#1566)
homarr-renovate[bot] Nov 28, 2024
cebc925
fix(deps): update dependency mysql2 to v3.11.5 (#1567)
homarr-renovate[bot] Nov 28, 2024
9b6eafc
chore(deps): update pnpm to v9.14.4 (#1568)
homarr-renovate[bot] Nov 29, 2024
6ad5fd5
fix(deps): update tanstack-query monorepo to ^5.62.0 (#1569)
homarr-renovate[bot] Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
"@homarr/ui": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
"@homarr/widgets": "workspace:^0.1.0",
"@mantine/colors-generator": "^7.14.1",
"@mantine/core": "^7.14.1",
"@mantine/hooks": "^7.14.1",
"@mantine/modals": "^7.14.1",
"@mantine/tiptap": "^7.14.1",
"@million/lint": "1.0.12",
"@mantine/colors-generator": "^7.14.3",
"@mantine/core": "^7.14.3",
"@mantine/hooks": "^7.14.3",
"@mantine/modals": "^7.14.3",
"@mantine/tiptap": "^7.14.3",
"@million/lint": "1.0.13",
"@t3-oss/env-nextjs": "^0.11.1",
"@tabler/icons-react": "^3.22.0",
"@tanstack/react-query": "^5.61.0",
"@tanstack/react-query-devtools": "^5.61.0",
"@tanstack/react-query-next-experimental": "5.61.0",
"@tabler/icons-react": "^3.23.0",
"@tanstack/react-query": "^5.62.0",
"@tanstack/react-query-devtools": "^5.62.0",
"@tanstack/react-query-next-experimental": "5.62.0",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
Expand Down Expand Up @@ -80,15 +80,15 @@
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"@types/chroma-js": "2.4.4",
"@types/node": "^22.9.1",
"@types/node": "^22.10.1",
"@types/prismjs": "^1.26.5",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/swagger-ui-react": "^4.18.3",
"concurrently": "^9.1.0",
"eslint": "^9.15.0",
"node-loader": "^2.1.0",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
"prettier": "^3.4.1",
"typescript": "^5.7.2"
}
}
5 changes: 5 additions & 0 deletions apps/nextjs/src/app/[locale]/(home-board)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import definition from "../boards/(content)/(home)/_definition";

const { layout } = definition;

export default layout;
7 changes: 7 additions & 0 deletions apps/nextjs/src/app/[locale]/(home-board)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import definition from "../boards/(content)/(home)/_definition";

const { generateMetadataAsync: generateMetadata, page } = definition;

export default page;

export { generateMetadata };
14 changes: 0 additions & 14 deletions apps/nextjs/src/app/[locale]/(main)/layout.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions apps/nextjs/src/app/[locale]/(main)/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use client";

import { useCallback } from "react";
import type { MouseEvent } from "react";
import { useCallback, useEffect } from "react";
import { useRouter } from "next/navigation";
import { Group, Menu } from "@mantine/core";
import { useHotkeys } from "@mantine/hooks";
import {
Expand All @@ -16,7 +18,7 @@ import {

import { clientApi } from "@homarr/api/client";
import { revalidatePathActionAsync } from "@homarr/common/client";
import { useModalAction } from "@homarr/modals";
import { useConfirmModal, useModalAction } from "@homarr/modals";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useI18n, useScopedI18n } from "@homarr/translation/client";

Expand All @@ -26,6 +28,7 @@ import { useCategoryActions } from "~/components/board/sections/category/categor
import { CategoryEditModal } from "~/components/board/sections/category/category-edit-modal";
import { useDynamicSectionActions } from "~/components/board/sections/dynamic/dynamic-actions";
import { HeaderButton } from "~/components/layout/header/button";
import { env } from "~/env.mjs";
import { useEditMode, useRequiredBoard } from "./_context";

export const BoardContentHeaderActions = () => {
Expand Down Expand Up @@ -139,10 +142,71 @@ const EditModeMenu = () => {
}, [board, isEditMode, saveBoard, setEditMode]);

useHotkeys([["mod+e", toggle]]);
usePreventLeaveWithDirty(isEditMode);

return (
<HeaderButton onClick={toggle} loading={isPending}>
{isEditMode ? <IconPencilOff stroke={1.5} /> : <IconPencil stroke={1.5} />}
</HeaderButton>
);
};

const usePreventLeaveWithDirty = (isDirty: boolean) => {
const t = useI18n();
const { openConfirmModal } = useConfirmModal();
const router = useRouter();

useEffect(() => {
const handleClick = (event: MouseEvent<HTMLElement>) => {
const target = (event.target as HTMLElement).closest("a");

if (!target) return;
if (!isDirty) return;

event.preventDefault();

openConfirmModal({
title: t("board.action.edit.confirmLeave.title"),
children: t("board.action.edit.confirmLeave.message"),
onConfirm() {
router.push(target.href);
},
confirmProps: {
children: t("common.action.discard"),
},
});
};

const handlePopState = (event: Event) => {
if (isDirty) {
window.history.pushState(null, document.title, window.location.href);
event.preventDefault();
} else {
window.history.back();
}
};

const handleBeforeUnload = (event: BeforeUnloadEvent) => {
if (!isDirty) return;
if (env.NODE_ENV === "development") return; // Allow to reload in development

event.preventDefault();
event.returnValue = true;
};

document.querySelectorAll("a").forEach((link) => {
link.addEventListener("click", handleClick as never);
});
window.addEventListener("popstate", handlePopState);
window.addEventListener("beforeunload", handleBeforeUnload);

return () => {
document.querySelectorAll("a").forEach((link) => {
link.removeEventListener("click", handleClick as never);
window.removeEventListener("popstate", handlePopState);
});
window.removeEventListener("beforeunload", handleBeforeUnload);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isDirty]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default async function BoardSettingsPage({ params, searchParams }: Props)
<BoardAccessSettings board={board} initialPermissions={permissions} />
</AccordionItemFor>
<AccordionItemFor value="dangerZone" icon={IconAlertTriangle} danger noPadding>
<DangerZoneSettingsContent hideVisibility={boardSettings.defaultBoardId === board.id} />
<DangerZoneSettingsContent hideVisibility={boardSettings.homeBoardId === board.id} />
</AccordionItemFor>
</>
)}
Expand Down
23 changes: 11 additions & 12 deletions apps/nextjs/src/app/[locale]/manage/apps/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from "next/link";
import { redirect } from "next/navigation";
import { ActionIcon, ActionIconGroup, Anchor, Avatar, Card, Group, Stack, Text, Title } from "@mantine/core";
import { IconApps, IconPencil } from "@tabler/icons-react";
import { IconBox, IconPencil } from "@tabler/icons-react";

import type { RouterOutputs } from "@homarr/api";
import { api } from "@homarr/api/server";
Expand All @@ -12,6 +12,7 @@ import { getI18n, getScopedI18n } from "@homarr/translation/server";
import { ManageContainer } from "~/components/manage/manage-container";
import { MobileAffixButton } from "~/components/manage/mobile-affix-button";
import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { NoResults } from "~/components/no-results";
import { AppDeleteButton } from "./_app-delete-button";

export default async function AppsPage() {
Expand Down Expand Up @@ -113,16 +114,14 @@ const AppNoResults = async () => {
const session = await auth();

return (
<Card withBorder bg="transparent">
<Stack align="center" gap="sm">
<IconApps size="2rem" />
<Text fw={500} size="lg">
{t("app.page.list.noResults.title")}
</Text>
{session?.user.permissions.includes("app-create") && (
<Anchor href="/manage/apps/new">{t("app.page.list.noResults.action")}</Anchor>
)}
</Stack>
</Card>
<NoResults
icon={IconBox}
title={t("app.page.list.noResults.title")}
action={{
label: t("app.page.list.noResults.action"),
href: "/manage/apps/new",
hidden: !session?.user.permissions.includes("app-create"),
}}
/>
);
};
5 changes: 3 additions & 2 deletions apps/nextjs/src/app/[locale]/manage/integrations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
Text,
Title,
} from "@mantine/core";
import { IconChevronDown, IconChevronUp, IconPencil } from "@tabler/icons-react";
import { IconChevronDown, IconChevronUp, IconPencil, IconPlugX } from "@tabler/icons-react";

import type { RouterOutputs } from "@homarr/api";
import { api } from "@homarr/api/server";
Expand All @@ -40,6 +40,7 @@ import { CountBadge, IntegrationAvatar } from "@homarr/ui";

import { ManageContainer } from "~/components/manage/manage-container";
import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { NoResults } from "~/components/no-results";
import { ActiveTabAccordion } from "../../../../components/active-tab-accordion";
import { DeleteIntegrationActionButton } from "./_integration-buttons";
import { IntegrationCreateDropdownContent } from "./new/_integration-new-dropdown";
Expand Down Expand Up @@ -120,7 +121,7 @@ const IntegrationList = async ({ integrations, activeTab }: IntegrationListProps
const hasFullAccess = session?.user.permissions.includes("integration-full-all") ?? false;

if (integrations.length === 0) {
return <div>{t("page.list.empty")}</div>;
return <NoResults icon={IconPlugX} title={t("page.list.noResults.title")} />;
}

const grouppedIntegrations = integrations.reduce(
Expand Down
21 changes: 10 additions & 11 deletions apps/nextjs/src/app/[locale]/manage/search-engines/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { z } from "@homarr/validation";
import { ManageContainer } from "~/components/manage/manage-container";
import { MobileAffixButton } from "~/components/manage/mobile-affix-button";
import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { NoResults } from "~/components/no-results";
import { SearchEngineDeleteButton } from "./_search-engine-delete-button";

const searchParamsSchema = z.object({
Expand Down Expand Up @@ -142,16 +143,14 @@ const SearchEngineNoResults = async () => {
const session = await auth();

return (
<Card withBorder bg="transparent">
<Stack align="center" gap="sm">
<IconSearch size="2rem" />
<Text fw={500} size="lg">
{t("search.engine.page.list.noResults.title")}
</Text>
{session?.user.permissions.includes("search-engine-create") && (
<Anchor href="/manage/search-engines/new">{t("search.engine.page.list.noResults.action")}</Anchor>
)}
</Stack>
</Card>
<NoResults
icon={IconSearch}
title={t("search.engine.page.list.noResults.title")}
action={{
label: t("search.engine.page.list.noResults.action"),
href: "/manage/search-engines/new",
hidden: !session?.user.permissions.includes("search-engine-create"),
}}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const BoardSettingsForm = ({ defaultValues }: { defaultValues: ServerSett
{(form) => (
<>
<SelectWithCustomItems
label={tBoard("defaultBoard.label")}
description={tBoard("defaultBoard.description")}
label={tBoard("homeBoard.label")}
description={tBoard("homeBoard.description")}
data={selectableBoards.map((board) => ({
value: board.id,
label: board.name,
Expand All @@ -35,7 +35,7 @@ export const BoardSettingsForm = ({ defaultValues }: { defaultValues: ServerSett
</Text>
</Group>
)}
{...form.getInputProps("defaultBoardId")}
{...form.getInputProps("homeBoardId")}
/>
</>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import type { OpenAPIV3 } from "openapi-types";
import type { OpenAPIObject } from "openapi3-ts/oas31";
import SwaggerUI from "swagger-ui-react";

// workaround for CSS that cannot be processed by next.js, https://github.com/swagger-api/swagger-ui/issues/10045
Expand All @@ -9,7 +9,7 @@ import "../swagger-ui-overrides.css";
import "../swagger-ui.css";

interface SwaggerUIClientProps {
document: OpenAPIV3.Document;
document: OpenAPIObject;
}

export const SwaggerUIClient = ({ document }: SwaggerUIClientProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const DeleteUserButton = ({ user }: DeleteUserButtonProps) => {
children: t("user.action.delete.confirm", { username: user.name }),
// eslint-disable-next-line no-restricted-syntax
async onConfirm() {
await mutateUserDeletionAsync(user.id);
await mutateUserDeletionAsync({
userId: user.id,
});
},
}),
[user, mutateUserDeletionAsync, openConfirmModal, t],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { Button, Group, Radio, Stack } from "@mantine/core";
import type { DayOfWeek } from "@mantine/dates";
import dayjs from "dayjs";
import localeData from "dayjs/plugin/localeData";

Expand Down Expand Up @@ -43,7 +44,7 @@ export const FirstDayOfWeek = ({ user }: FirstDayOfWeekProps) => {
});
const form = useZodForm(validation.user.firstDayOfWeek, {
initialValues: {
firstDayOfWeek: user.firstDayOfWeek,
firstDayOfWeek: user.firstDayOfWeek as DayOfWeek,
},
});

Expand Down
Loading