refactor: move integration pages to main directory for main layout
This commit is contained in:
@@ -21,9 +21,6 @@
|
|||||||
"@homarr/form": "workspace:^0.1.0",
|
"@homarr/form": "workspace:^0.1.0",
|
||||||
"@homarr/notifications": "workspace:^0.1.0",
|
"@homarr/notifications": "workspace:^0.1.0",
|
||||||
"@homarr/spotlight": "workspace:^0.1.0",
|
"@homarr/spotlight": "workspace:^0.1.0",
|
||||||
"@homarr/form": "workspace:^0.1.0",
|
|
||||||
"@homarr/notifications": "workspace:^0.1.0",
|
|
||||||
"@homarr/spotlight": "workspace:^0.1.0",
|
|
||||||
"@homarr/translation": "workspace:^0.1.0",
|
"@homarr/translation": "workspace:^0.1.0",
|
||||||
"@homarr/ui": "workspace:^0.1.0",
|
"@homarr/ui": "workspace:^0.1.0",
|
||||||
"@homarr/validation": "workspace:^0.1.0",
|
"@homarr/validation": "workspace:^0.1.0",
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import { useScopedI18n } from "@homarr/translation/client";
|
|||||||
import { ActionIcon, IconTrash } from "@homarr/ui";
|
import { ActionIcon, IconTrash } from "@homarr/ui";
|
||||||
|
|
||||||
import { api } from "~/trpc/react";
|
import { api } from "~/trpc/react";
|
||||||
import { revalidatePathAction } from "../../revalidatePathAction";
|
import { revalidatePathAction } from "../../../revalidatePathAction";
|
||||||
import { modalEvents } from "../modals";
|
import { modalEvents } from "../../modals";
|
||||||
|
|
||||||
interface DeleteIntegrationActionButtonProps {
|
interface DeleteIntegrationActionButtonProps {
|
||||||
count: number;
|
count: number;
|
||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
} from "@homarr/ui";
|
} from "@homarr/ui";
|
||||||
|
|
||||||
import { integrationSecretIcons } from "./_secret-icons";
|
import { integrationSecretIcons } from "./_integration-secret-icons";
|
||||||
|
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ import type { IntegrationSecretKind } from "@homarr/definitions";
|
|||||||
import { useI18n } from "@homarr/translation/client";
|
import { useI18n } from "@homarr/translation/client";
|
||||||
import { PasswordInput, TextInput } from "@homarr/ui";
|
import { PasswordInput, TextInput } from "@homarr/ui";
|
||||||
|
|
||||||
import { integrationSecretIcons } from "./_secret-icons";
|
import { integrationSecretIcons } from "./_integration-secret-icons";
|
||||||
|
|
||||||
interface IntegrationSecretInputProps {
|
interface IntegrationSecretInputProps {
|
||||||
label?: string;
|
label?: string;
|
||||||
@@ -17,14 +17,14 @@ import { validation } from "@homarr/validation";
|
|||||||
|
|
||||||
import { modalEvents } from "~/app/[locale]/modals";
|
import { modalEvents } from "~/app/[locale]/modals";
|
||||||
import { api } from "~/trpc/react";
|
import { api } from "~/trpc/react";
|
||||||
import { SecretCard } from "../../_secret-card";
|
import { SecretCard } from "../../_integration-secret-card";
|
||||||
import { IntegrationSecretInput } from "../../_secret-inputs";
|
import { IntegrationSecretInput } from "../../_integration-secret-inputs";
|
||||||
import {
|
import {
|
||||||
TestConnection,
|
TestConnection,
|
||||||
TestConnectionNoticeAlert,
|
TestConnectionNoticeAlert,
|
||||||
useTestConnectionDirty,
|
useTestConnectionDirty,
|
||||||
} from "../../_test-connection";
|
} from "../../_integration-test-connection";
|
||||||
import { revalidatePathAction } from "../../../../revalidatePathAction";
|
import { revalidatePathAction } from "../../../../../revalidatePathAction";
|
||||||
|
|
||||||
interface EditIntegrationForm {
|
interface EditIntegrationForm {
|
||||||
integration: RouterOutputs["integration"]["byId"];
|
integration: RouterOutputs["integration"]["byId"];
|
||||||
@@ -3,8 +3,8 @@ import { getScopedI18n } from "@homarr/translation/server";
|
|||||||
import { Container, Group, Stack, Title } from "@homarr/ui";
|
import { Container, Group, Stack, Title } from "@homarr/ui";
|
||||||
|
|
||||||
import { api } from "~/trpc/server";
|
import { api } from "~/trpc/server";
|
||||||
import { IntegrationAvatar } from "../../_avatar";
|
import { IntegrationAvatar } from "../../_integration-avatar";
|
||||||
import { EditIntegrationForm } from "./_form";
|
import { EditIntegrationForm } from "./_integration-edit-form";
|
||||||
|
|
||||||
interface EditIntegrationPageProps {
|
interface EditIntegrationPageProps {
|
||||||
params: { id: string };
|
params: { id: string };
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
} from "@homarr/ui";
|
} from "@homarr/ui";
|
||||||
|
|
||||||
import { IntegrationAvatar } from "../_avatar";
|
import { IntegrationAvatar } from "../_integration-avatar";
|
||||||
|
|
||||||
export const IntegrationCreateDropdownContent = () => {
|
export const IntegrationCreateDropdownContent = () => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
@@ -16,13 +16,13 @@ import type { z } from "@homarr/validation";
|
|||||||
import { validation } from "@homarr/validation";
|
import { validation } from "@homarr/validation";
|
||||||
|
|
||||||
import { api } from "~/trpc/react";
|
import { api } from "~/trpc/react";
|
||||||
import { IntegrationSecretInput } from "../_secret-inputs";
|
import { IntegrationSecretInput } from "../_integration-secret-inputs";
|
||||||
import {
|
import {
|
||||||
TestConnection,
|
TestConnection,
|
||||||
TestConnectionNoticeAlert,
|
TestConnectionNoticeAlert,
|
||||||
useTestConnectionDirty,
|
useTestConnectionDirty,
|
||||||
} from "../_test-connection";
|
} from "../_integration-test-connection";
|
||||||
import { revalidatePathAction } from "../../../revalidatePathAction";
|
import { revalidatePathAction } from "../../../../revalidatePathAction";
|
||||||
|
|
||||||
interface NewIntegrationFormProps {
|
interface NewIntegrationFormProps {
|
||||||
searchParams: Partial<z.infer<typeof validation.integration.create>> & {
|
searchParams: Partial<z.infer<typeof validation.integration.create>> & {
|
||||||
@@ -7,8 +7,8 @@ import { Container, Group, Stack, Title } from "@homarr/ui";
|
|||||||
import type { validation } from "@homarr/validation";
|
import type { validation } from "@homarr/validation";
|
||||||
import { z } from "@homarr/validation";
|
import { z } from "@homarr/validation";
|
||||||
|
|
||||||
import { IntegrationAvatar } from "../_avatar";
|
import { IntegrationAvatar } from "../_integration-avatar";
|
||||||
import { NewIntegrationForm } from "./_form";
|
import { NewIntegrationForm } from "./_integration-new-form";
|
||||||
|
|
||||||
interface NewIntegrationPageProps {
|
interface NewIntegrationPageProps {
|
||||||
searchParams: Partial<z.infer<typeof validation.integration.create>> & {
|
searchParams: Partial<z.infer<typeof validation.integration.create>> & {
|
||||||
@@ -33,10 +33,10 @@ import {
|
|||||||
} from "@homarr/ui";
|
} from "@homarr/ui";
|
||||||
|
|
||||||
import { api } from "~/trpc/server";
|
import { api } from "~/trpc/server";
|
||||||
import { IntegrationGroupAccordion } from "./_accordion";
|
import { IntegrationGroupAccordion } from "./_integration-accordion";
|
||||||
import { IntegrationAvatar } from "./_avatar";
|
import { IntegrationAvatar } from "./_integration-avatar";
|
||||||
import { DeleteIntegrationActionButton } from "./_buttons";
|
import { DeleteIntegrationActionButton } from "./_integration-buttons";
|
||||||
import { IntegrationCreateDropdownContent } from "./new/_dropdown";
|
import { IntegrationCreateDropdownContent } from "./new/_integration-new-dropdown";
|
||||||
|
|
||||||
interface IntegrationsPageProps {
|
interface IntegrationsPageProps {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@@ -2,7 +2,7 @@ import { getScopedI18n } from "@homarr/translation/server";
|
|||||||
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
|
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
|
||||||
|
|
||||||
import { LogoWithTitle } from "~/components/layout/logo";
|
import { LogoWithTitle } from "~/components/layout/logo";
|
||||||
import { LoginForm } from "./_components/login-form";
|
import { LoginForm } from "./_login-form";
|
||||||
|
|
||||||
export default async function Login() {
|
export default async function Login() {
|
||||||
const t = await getScopedI18n("user.page.login");
|
const t = await getScopedI18n("user.page.login");
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { getScopedI18n } from "@homarr/translation/server";
|
|||||||
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
|
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
|
||||||
|
|
||||||
import { LogoWithTitle } from "~/components/layout/logo";
|
import { LogoWithTitle } from "~/components/layout/logo";
|
||||||
import { InitUserForm } from "./_components/init-user-form";
|
import { InitUserForm } from "./_init-user-form";
|
||||||
|
|
||||||
export default async function InitUser() {
|
export default async function InitUser() {
|
||||||
const firstUser = await db.query.users.findFirst({
|
const firstUser = await db.query.users.findFirst({
|
||||||
|
|||||||
Reference in New Issue
Block a user