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 #1283

Merged
merged 30 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
41538a7
chore(deps): update dependency eslint to ^9.12.0 (#1241)
homarr-renovate[bot] Oct 4, 2024
b5bfe90
fix(notebook): default-content image path (#1244)
oben01 Oct 4, 2024
20e6399
fix(deps): update dependency winston to v3.15.0 (#1245)
homarr-renovate[bot] Oct 5, 2024
ee83757
chore(deps): update node.js to v20.18.0 (#1239)
homarr-renovate[bot] Oct 5, 2024
b14f82b
feat: add api keys (#991)
manuel-rw Oct 5, 2024
770768e
fix: rtl common translation unnecessary (#1246)
Meierschlumpf Oct 5, 2024
1421ccc
fix: permissions not restricted for certain management pages / action…
Meierschlumpf Oct 5, 2024
d0d2a82
fix(deps): update dependency @auth/core to ^0.36.0 (#1250)
homarr-renovate[bot] Oct 5, 2024
9c5ca6f
fix(deps): update dependency @auth/drizzle-adapter to ^1.6.0 (#1251)
homarr-renovate[bot] Oct 5, 2024
1d281c0
fix(deps): update dependency @million/lint to v1.0.9 (#1255)
homarr-renovate[bot] Oct 6, 2024
dea6254
fix(deps): update dependency @auth/drizzle-adapter to ^1.6.1 (#1258)
homarr-renovate[bot] Oct 7, 2024
ea84b1c
fix(deps): update dependency video.js to ^8.18.1 (#1259)
homarr-renovate[bot] Oct 7, 2024
2d5a7a2
chore(deps): update pnpm to v9.12.1 (#1260)
homarr-renovate[bot] Oct 7, 2024
635fadf
fix(deps): update dependency drizzle-kit to ^0.25.0 (#1261)
homarr-renovate[bot] Oct 7, 2024
23ee229
fix(deps): update dependency drizzle-orm to ^0.34.0 (#1262)
homarr-renovate[bot] Oct 7, 2024
4d51e3b
fix(deps): update dependency typescript-eslint to ^8.8.1 (#1266)
homarr-renovate[bot] Oct 7, 2024
eb21628
refactor: replace signIn callback with signIn event, adjust getUserBy…
Meierschlumpf Oct 7, 2024
ab1744c
feat: add first day of week user setting (#1249)
Meierschlumpf Oct 7, 2024
14d1ce8
fix(deps): update dependency drizzle-orm to ^0.34.1 (#1268)
homarr-renovate[bot] Oct 7, 2024
6f2bc8e
chore(deps): update dependency @types/node to ^20.16.11 (#1269)
homarr-renovate[bot] Oct 7, 2024
2bbe594
fix(deps): update nextjs monorepo to ^14.2.15 (#1270)
homarr-renovate[bot] Oct 8, 2024
388717e
chore(deps): update dependency typescript to ^5.6.3 (#1271)
homarr-renovate[bot] Oct 8, 2024
a44ead0
fix(deps): update dependency @auth/drizzle-adapter to ^1.7.0 (#1273)
homarr-renovate[bot] Oct 9, 2024
8bcba35
fix(deps): update dependency @auth/core to ^0.37.0 (#1272)
homarr-renovate[bot] Oct 9, 2024
e3cd8a8
fix(deps): update tanstack-query monorepo to ^5.59.3 (#1274)
homarr-renovate[bot] Oct 9, 2024
c7b2261
fix(deps): update dependency undici to v6.20.0 (#1275)
homarr-renovate[bot] Oct 9, 2024
efd06ea
fix(deps): update tanstack-query monorepo to ^5.59.6 (#1276)
homarr-renovate[bot] Oct 9, 2024
98cf214
fix: groups can be created with empty names (#1267)
Meierschlumpf Oct 9, 2024
0ca140f
fix(deps): update tanstack-query monorepo to ^5.59.9 (#1278)
homarr-renovate[bot] Oct 10, 2024
99ddd92
fix(deps): update dependency sass to ^1.79.5 (#1279)
homarr-renovate[bot] Oct 11, 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.17.0-alpine AS base
FROM node:20.18.0-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat
Expand Down
18 changes: 9 additions & 9 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"@mantine/hooks": "^7.13.2",
"@mantine/modals": "^7.13.2",
"@mantine/tiptap": "^7.13.2",
"@million/lint": "1.0.8",
"@million/lint": "1.0.9",
"@t3-oss/env-nextjs": "^0.11.1",
"@tabler/icons-react": "^3.19.0",
"@tanstack/react-query": "^5.59.0",
"@tanstack/react-query-devtools": "^5.59.0",
"@tanstack/react-query-next-experimental": "5.59.0",
"@tanstack/react-query": "^5.59.9",
"@tanstack/react-query-devtools": "^5.59.9",
"@tanstack/react-query-next-experimental": "5.59.9",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
Expand All @@ -63,14 +63,14 @@
"glob": "^11.0.0",
"jotai": "^2.10.0",
"mantine-react-table": "2.0.0-beta.6",
"next": "^14.2.14",
"next": "^14.2.15",
"postcss-preset-mantine": "^1.17.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-simple-code-editor": "^0.14.1",
"sass": "^1.79.4",
"sass": "^1.79.5",
"superjson": "2.2.1",
"swagger-ui-react": "^5.17.14",
"use-deep-compare-effect": "^1.8.1"
Expand All @@ -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": "^20.16.10",
"@types/node": "^20.16.11",
"@types/prismjs": "^1.26.4",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@types/swagger-ui-react": "^4.18.3",
"concurrently": "^9.0.1",
"eslint": "^9.11.1",
"eslint": "^9.12.0",
"node-loader": "^2.0.0",
"prettier": "^3.3.3",
"typescript": "^5.6.2"
"typescript": "^5.6.3"
}
}
24 changes: 13 additions & 11 deletions apps/nextjs/src/app/[locale]/_client-providers/mantine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import type { PropsWithChildren } from "react";
import { useState } from "react";
import type { MantineColorScheme, MantineColorSchemeManager } from "@mantine/core";
import { createTheme, isMantineColorScheme, MantineProvider } from "@mantine/core";
import { createTheme, DirectionProvider, isMantineColorScheme, MantineProvider } from "@mantine/core";
import dayjs from "dayjs";

import { clientApi } from "@homarr/api/client";
Expand All @@ -14,16 +14,18 @@ export const CustomMantineProvider = ({ children }: PropsWithChildren) => {
const manager = useColorSchemeManager();

return (
<MantineProvider
defaultColorScheme="auto"
colorSchemeManager={manager}
theme={createTheme({
primaryColor: "red",
autoContrast: true,
})}
>
{children}
</MantineProvider>
<DirectionProvider>
<MantineProvider
defaultColorScheme="auto"
colorSchemeManager={manager}
theme={createTheme({
primaryColor: "red",
autoContrast: true,
})}
>
{children}
</MantineProvider>
</DirectionProvider>
);
};

Expand Down
27 changes: 14 additions & 13 deletions apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import type { useForm } from "@homarr/form";
import { useZodForm } from "@homarr/form";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import type { z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { validation, z } from "@homarr/validation";

interface LoginFormProps {
providers: string[];
Expand All @@ -22,15 +21,17 @@ interface LoginFormProps {
callbackUrl: string;
}

const extendedValidation = validation.user.signIn.extend({ provider: z.enum(["credentials", "ldap"]) });

export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, callbackUrl }: LoginFormProps) => {
const t = useScopedI18n("user");
const router = useRouter();
const [isPending, setIsPending] = useState(false);
const form = useZodForm(validation.user.signIn, {
const form = useZodForm(extendedValidation, {
initialValues: {
name: "",
password: "",
credentialType: "basic",
provider: "credentials",
},
});

Expand Down Expand Up @@ -95,22 +96,22 @@ export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, c
<Stack gap="lg">
{credentialInputsVisible && (
<>
<form onSubmit={form.onSubmit((credentials) => void signInAsync("credentials", credentials))}>
<form onSubmit={form.onSubmit((credentials) => void signInAsync(credentials.provider, credentials))}>
<Stack gap="lg">
<TextInput label={t("field.username.label")} {...form.getInputProps("name")} />
<PasswordInput label={t("field.password.label")} {...form.getInputProps("password")} />

{providers.includes("credentials") && (
<Stack gap="sm">
<SubmitButton isPending={isPending} form={form} credentialType="basic">
<SubmitButton isPending={isPending} form={form} provider="credentials">
{t("action.login.label")}
</SubmitButton>
<PasswordForgottenCollapse username={form.values.name} />
</Stack>
)}

{providers.includes("ldap") && (
<SubmitButton isPending={isPending} form={form} credentialType="ldap">
<SubmitButton isPending={isPending} form={form} provider="ldap">
{t("action.login.labelWith", { provider: "LDAP" })}
</SubmitButton>
)}
Expand All @@ -133,18 +134,18 @@ export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, c
interface SubmitButtonProps {
isPending: boolean;
form: ReturnType<typeof useForm<FormType, (values: FormType) => FormType>>;
credentialType: "basic" | "ldap";
provider: "credentials" | "ldap";
}

const SubmitButton = ({ isPending, form, credentialType, children }: PropsWithChildren<SubmitButtonProps>) => {
const isCurrentProviderActive = form.getValues().credentialType === credentialType;
const SubmitButton = ({ isPending, form, provider, children }: PropsWithChildren<SubmitButtonProps>) => {
const isCurrentProviderActive = form.getValues().provider === provider;

return (
<Button
type="submit"
name={credentialType}
name={provider}
fullWidth
onClick={() => form.setFieldValue("credentialType", credentialType)}
onClick={() => form.setFieldValue("provider", provider)}
loading={isPending && isCurrentProviderActive}
disabled={isPending && !isCurrentProviderActive}
>
Expand Down Expand Up @@ -181,4 +182,4 @@ const PasswordForgottenCollapse = ({ username }: PasswordForgottenCollapseProps)
);
};

type FormType = z.infer<typeof validation.user.signIn>;
type FormType = z.infer<typeof extendedValidation>;
5 changes: 4 additions & 1 deletion apps/nextjs/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { env } from "@homarr/auth/env.mjs";
import { auth } from "@homarr/auth/next";
import { ModalProvider } from "@homarr/modals";
import { Notifications } from "@homarr/notifications";
import { getScopedI18n } from "@homarr/translation/server";

import { Analytics } from "~/components/layout/analytics";
import { SearchEngineOptimization } from "~/components/layout/search-engine-optimization";
Expand Down Expand Up @@ -56,6 +57,8 @@ export const viewport: Viewport = {
export default async function Layout(props: { children: React.ReactNode; params: { locale: string } }) {
const session = await auth();
const colorScheme = cookies().get("homarr-color-scheme")?.value ?? "light";
const tCommon = await getScopedI18n("common");
const direction = tCommon("direction");

const StackedProvider = composeWrappers([
(innerProps) => {
Expand All @@ -70,7 +73,7 @@ export default async function Layout(props: { children: React.ReactNode; params:

return (
// Instead of ColorSchemScript we use data-mantine-color-scheme to prevent flickering
<html lang="en" data-mantine-color-scheme={colorScheme} suppressHydrationWarning>
<html lang="en" dir={direction} data-mantine-color-scheme={colorScheme} suppressHydrationWarning>
<head>
<Analytics />
<SearchEngineOptimization />
Expand Down
6 changes: 4 additions & 2 deletions apps/nextjs/src/app/[locale]/manage/boards/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { IconDotsVertical, IconHomeFilled, IconLock, IconWorld } from "@tabler/i

import type { RouterOutputs } from "@homarr/api";
import { api } from "@homarr/api/server";
import { auth } from "@homarr/auth/next";
import { getScopedI18n } from "@homarr/translation/server";
import { UserAvatar } from "@homarr/ui";

Expand All @@ -30,16 +31,17 @@ import { CreateBoardButton } from "./_components/create-board-button";

export default async function ManageBoardsPage() {
const t = await getScopedI18n("management.page.board");

const session = await auth();
const boards = await api.board.getAllBoards();
const canCreateBoards = session?.user.permissions.includes("board-create");

return (
<ManageContainer>
<DynamicBreadcrumb />
<Stack>
<Group justify="space-between">
<Title mb="md">{t("title")}</Title>
<CreateBoardButton />
{canCreateBoards && <CreateBoardButton />}
</Group>

<Grid mb={{ base: "xl", md: 0 }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getI18n, getScopedI18n } from "@homarr/translation/server";
import { IntegrationAvatar } from "@homarr/ui";

import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { catchTrpcNotFound } from "~/errors/trpc-not-found";
import { IntegrationAccessSettings } from "../../_components/integration-access-settings";
import { EditIntegrationForm } from "./_integration-edit-form";

Expand All @@ -16,7 +17,7 @@ interface EditIntegrationPageProps {
export default async function EditIntegrationPage({ params }: EditIntegrationPageProps) {
const editT = await getScopedI18n("integration.page.edit");
const t = await getI18n();
const integration = await api.integration.byId({ id: params.id });
const integration = await api.integration.byId({ id: params.id }).catch(catchTrpcNotFound);
const integrationPermissions = await api.integration.getIntegrationPermissions({ id: integration.id });

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { notFound } from "next/navigation";
import { Container, Group, Stack, Title } from "@mantine/core";

import { auth } from "@homarr/auth/next";
import type { IntegrationKind } from "@homarr/definitions";
import { getIntegrationName, integrationKinds } from "@homarr/definitions";
import { getScopedI18n } from "@homarr/translation/server";
Expand All @@ -18,6 +19,11 @@ interface NewIntegrationPageProps {
}

export default async function IntegrationsNewPage({ searchParams }: NewIntegrationPageProps) {
const session = await auth();
if (!session?.user.permissions.includes("integration-create")) {
notFound();
}

const result = z.enum(integrationKinds).safeParse(searchParams.kind);
if (!result.success) {
notFound();
Expand Down
Loading