From 15c27e91a72396d2c32eec57202a0d2e907934b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B5=D1=80=D0=B5=D0=BD=D1=82=D1=8C=D0=B5=D0=B2=20?= =?UTF-8?q?=D0=92=D0=B0=D0=B4=D0=B8=D0=BC=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 9 May 2024 09:54:11 +0300 Subject: [PATCH] =?UTF-8?q?GL-00:=20=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9?= =?UTF-8?q?=20=D0=B8=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/dashboard/integrations/page.tsx | 3 +- src/app/dashboard/profile/[name]/loading.tsx | 2 +- src/app/dashboard/profile/[name]/page.tsx | 3 +- src/app/dashboard/profiles/page.tsx | 3 +- src/features/authentication-form-any/index.ts | 1 - .../ui/AuthenticationFormAny.tsx | 45 --------- .../authentication-form-azuriom/index.ts | 1 - .../authentication-form-azuriom/lib/static.ts | 11 --- .../ui/AuthenticationFormAzuriom.tsx | 76 --------------- src/features/authentication-form-dle/index.ts | 1 - .../authentication-form-dle/lib/static.ts | 11 --- .../ui/AuthenticationFormDle.tsx | 96 ------------------- .../authentication-form-undefined/index.ts | 1 - .../ui/AuthenticationFormUndefined.tsx | 49 ---------- src/features/sentry-connect-form/index.ts | 1 - .../sentry-connect-form/lib/static.ts | 7 -- .../ui/SentryConnectForm.tsx | 64 ------------- src/screens/Integrations/ui/Integrations.tsx | 15 +-- src/screens/Profile/ui/Profile.tsx | 18 ++-- src/screens/Profiles/ui/Profiles.tsx | 5 +- src/shared/test.tsx | 93 ------------------ .../AuthenticationMethodDialog/index.ts | 1 - .../ui/AuthenticationMethodDialog.tsx | 81 ---------------- src/widgets/ConnectTexturesDialog/index.ts | 1 - .../ui/ConnectTexturesDialog.tsx | 21 ---- src/widgets/CreateProfileDialog/index.ts | 1 - .../ui/CreateProfileDialog.tsx | 20 ---- src/widgets/GenerateLauncherDialog/index.ts | 1 - .../ui/GenerateLauncherDialog.tsx | 20 ---- src/widgets/IntegrationCard/index.ts | 1 - .../IntegrationCard/ui/IntegrationCard.tsx | 32 ------- src/widgets/SentryConnectDialog/index.ts | 1 - .../ui/SentryConnectDialog.tsx | 22 ----- 33 files changed, 30 insertions(+), 678 deletions(-) delete mode 100644 src/features/authentication-form-any/index.ts delete mode 100644 src/features/authentication-form-any/ui/AuthenticationFormAny.tsx delete mode 100644 src/features/authentication-form-azuriom/index.ts delete mode 100644 src/features/authentication-form-azuriom/lib/static.ts delete mode 100644 src/features/authentication-form-azuriom/ui/AuthenticationFormAzuriom.tsx delete mode 100644 src/features/authentication-form-dle/index.ts delete mode 100644 src/features/authentication-form-dle/lib/static.ts delete mode 100644 src/features/authentication-form-dle/ui/AuthenticationFormDle.tsx delete mode 100644 src/features/authentication-form-undefined/index.ts delete mode 100644 src/features/authentication-form-undefined/ui/AuthenticationFormUndefined.tsx delete mode 100644 src/features/sentry-connect-form/index.ts delete mode 100644 src/features/sentry-connect-form/lib/static.ts delete mode 100644 src/features/sentry-connect-form/ui/SentryConnectForm.tsx delete mode 100644 src/shared/test.tsx delete mode 100644 src/widgets/AuthenticationMethodDialog/index.ts delete mode 100644 src/widgets/AuthenticationMethodDialog/ui/AuthenticationMethodDialog.tsx delete mode 100644 src/widgets/ConnectTexturesDialog/index.ts delete mode 100644 src/widgets/ConnectTexturesDialog/ui/ConnectTexturesDialog.tsx delete mode 100644 src/widgets/CreateProfileDialog/index.ts delete mode 100644 src/widgets/CreateProfileDialog/ui/CreateProfileDialog.tsx delete mode 100644 src/widgets/GenerateLauncherDialog/index.ts delete mode 100644 src/widgets/GenerateLauncherDialog/ui/GenerateLauncherDialog.tsx delete mode 100644 src/widgets/IntegrationCard/index.ts delete mode 100644 src/widgets/IntegrationCard/ui/IntegrationCard.tsx delete mode 100644 src/widgets/SentryConnectDialog/index.ts delete mode 100644 src/widgets/SentryConnectDialog/ui/SentryConnectDialog.tsx diff --git a/src/app/dashboard/integrations/page.tsx b/src/app/dashboard/integrations/page.tsx index 8de8c1b..eead5b0 100644 --- a/src/app/dashboard/integrations/page.tsx +++ b/src/app/dashboard/integrations/page.tsx @@ -1,6 +1,7 @@ -import { IntegrationsPage } from "@/screens/Integrations"; import { Metadata } from "next"; +import { IntegrationsPage } from "@/screens/integrations"; + export const metadata: Metadata = { title: "Интеграции", }; diff --git a/src/app/dashboard/profile/[name]/loading.tsx b/src/app/dashboard/profile/[name]/loading.tsx index 39fc836..d56897a 100644 --- a/src/app/dashboard/profile/[name]/loading.tsx +++ b/src/app/dashboard/profile/[name]/loading.tsx @@ -1,3 +1,3 @@ -import { ProfileLoading } from "@/screens/Profile/ui/ProfileLoading"; +import { ProfileLoading } from "@/screens/profile/ui/ProfileLoading"; export default ProfileLoading; diff --git a/src/app/dashboard/profile/[name]/page.tsx b/src/app/dashboard/profile/[name]/page.tsx index 666b35b..64497d4 100644 --- a/src/app/dashboard/profile/[name]/page.tsx +++ b/src/app/dashboard/profile/[name]/page.tsx @@ -1,6 +1,7 @@ -import { ProfilePage } from "@/screens/Profile"; import type { Metadata } from "next"; +import { ProfilePage } from "@/screens/profile"; + type PageProps = { params: { name: string }; }; diff --git a/src/app/dashboard/profiles/page.tsx b/src/app/dashboard/profiles/page.tsx index 28219a7..be2a9ec 100644 --- a/src/app/dashboard/profiles/page.tsx +++ b/src/app/dashboard/profiles/page.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next"; -import { ProfilesPage } from "@/screens/Profiles"; + +import { ProfilesPage } from "@/screens/profiles"; export const metadata: Metadata = { title: "Профили", diff --git a/src/features/authentication-form-any/index.ts b/src/features/authentication-form-any/index.ts deleted file mode 100644 index 91993d4..0000000 --- a/src/features/authentication-form-any/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AuthenticationFormAny } from "@/features/authentication-form-any/ui/AuthenticationFormAny"; diff --git a/src/features/authentication-form-any/ui/AuthenticationFormAny.tsx b/src/features/authentication-form-any/ui/AuthenticationFormAny.tsx deleted file mode 100644 index 0817229..0000000 --- a/src/features/authentication-form-any/ui/AuthenticationFormAny.tsx +++ /dev/null @@ -1,45 +0,0 @@ -"use client"; - -import React from "react"; - -import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; - -import { useEditIntegration } from "@/shared/hooks"; -import { cn } from "@/shared/lib/utils"; -import { Button } from "@/shared/ui/button"; -import { Icons } from "@/shared/ui/icons"; -import { AuthenticationType } from "@/shared/enums"; -import { Alert, AlertDescription, AlertTitle } from "@/shared/ui/alert"; - -interface SignInFormProps extends React.HTMLAttributes { - onOpenChange: (open: boolean) => void; -} - -export function AuthenticationFormAny({ className, onOpenChange, ...props }: SignInFormProps) { - const { mutateAsync, isPending } = useEditIntegration(); - - const onSubmit = async () => { - await mutateAsync({ - authType: AuthenticationType.AUTHENTICATION_TYPE_ANY, - endpoint: "https://localhost", - }).then(() => { - onOpenChange(false); - }); - }; - - return ( -
- - - Внимание! - - Данный метод разрешит любую аутентификацию со стороны лаунчера - - - -
- ); -} diff --git a/src/features/authentication-form-azuriom/index.ts b/src/features/authentication-form-azuriom/index.ts deleted file mode 100644 index d0c627f..0000000 --- a/src/features/authentication-form-azuriom/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AuthenticationFormAzuriom } from "@/features/authentication-form-azuriom/ui/AuthenticationFormAzuriom"; diff --git a/src/features/authentication-form-azuriom/lib/static.ts b/src/features/authentication-form-azuriom/lib/static.ts deleted file mode 100644 index 09c8bef..0000000 --- a/src/features/authentication-form-azuriom/lib/static.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from "zod"; - -export const integrationSchema = z.object({ - authType: z.number(), - endpoint: z - .string() - .min(1, { message: "Вы не заполнили поле" }) - .transform((v) => v.trim()), -}); - -export type IntegrationFormSchemaType = z.infer; diff --git a/src/features/authentication-form-azuriom/ui/AuthenticationFormAzuriom.tsx b/src/features/authentication-form-azuriom/ui/AuthenticationFormAzuriom.tsx deleted file mode 100644 index 9e7826b..0000000 --- a/src/features/authentication-form-azuriom/ui/AuthenticationFormAzuriom.tsx +++ /dev/null @@ -1,76 +0,0 @@ -"use client"; - -import React from "react"; - -import { SubmitHandler, useForm } from "react-hook-form"; - -import { zodResolver } from "@hookform/resolvers/zod"; - -import { useEditIntegration, useGetActiveAuthIntegrations } from "@/shared/hooks"; -import { cn } from "@/shared/lib/utils"; -import { Button } from "@/shared/ui/button"; -import { Form, FormControl, FormItem, FormLabel, FormMessage } from "@/shared/ui/form"; -import { Icons } from "@/shared/ui/icons"; -import { Input } from "@/shared/ui/input"; -import { AuthenticationType } from "@/shared/enums"; - -import { IntegrationFormSchemaType, integrationSchema } from "../lib/static"; - -interface SignInFormProps extends React.HTMLAttributes { - onOpenChange: (open: boolean) => void; -} - -export function AuthenticationFormAzuriom({ className, onOpenChange, ...props }: SignInFormProps) { - const { data: integration } = useGetActiveAuthIntegrations(); - - const { mutateAsync, isPending } = useEditIntegration(); - - const form = useForm({ - values: { - endpoint: - integration.authType === AuthenticationType.AUTHENTICATION_TYPE_AZURIOM - ? String(integration.endpoint) - : "", - authType: - integration.authType === AuthenticationType.AUTHENTICATION_TYPE_AZURIOM - ? integration.authType - : AuthenticationType.AUTHENTICATION_TYPE_AZURIOM, - }, - resolver: zodResolver(integrationSchema), - }); - - const onSubmit: SubmitHandler = async ( - data: IntegrationFormSchemaType, - ) => { - await mutateAsync(data).then(() => { - onOpenChange(false); - }); - }; - - return ( -
-
- - - Введите ссылку на Ваш сайт - - - - {form.formState.errors.endpoint && ( - {form.formState.errors.endpoint.message} - )} - - - -
- -
- ); -} diff --git a/src/features/authentication-form-dle/index.ts b/src/features/authentication-form-dle/index.ts deleted file mode 100644 index 42ba874..0000000 --- a/src/features/authentication-form-dle/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AuthenticationFormDle } from "@/features/authentication-form-dle/ui/AuthenticationFormDle"; diff --git a/src/features/authentication-form-dle/lib/static.ts b/src/features/authentication-form-dle/lib/static.ts deleted file mode 100644 index 09c8bef..0000000 --- a/src/features/authentication-form-dle/lib/static.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from "zod"; - -export const integrationSchema = z.object({ - authType: z.number(), - endpoint: z - .string() - .min(1, { message: "Вы не заполнили поле" }) - .transform((v) => v.trim()), -}); - -export type IntegrationFormSchemaType = z.infer; diff --git a/src/features/authentication-form-dle/ui/AuthenticationFormDle.tsx b/src/features/authentication-form-dle/ui/AuthenticationFormDle.tsx deleted file mode 100644 index 3683792..0000000 --- a/src/features/authentication-form-dle/ui/AuthenticationFormDle.tsx +++ /dev/null @@ -1,96 +0,0 @@ -"use client"; - -import React from "react"; - -import Link from "next/link"; - -import { SubmitHandler, useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; - -import { useEditIntegration, useGetActiveAuthIntegrations } from "@/shared/hooks"; -import { cn } from "@/shared/lib/utils"; -import { Button } from "@/shared/ui/button"; -import { - Form, - FormControl, - FormDescription, - FormItem, - FormLabel, - FormMessage, -} from "@/shared/ui/form"; -import { Icons } from "@/shared/ui/icons"; -import { Input } from "@/shared/ui/input"; -import { AuthenticationType } from "@/shared/enums"; - -import { IntegrationFormSchemaType, integrationSchema } from "../lib/static"; - -interface SignInFormProps extends React.HTMLAttributes { - onOpenChange: (open: boolean) => void; -} - -export function AuthenticationFormDle({ className, onOpenChange, ...props }: SignInFormProps) { - const { data: integration } = useGetActiveAuthIntegrations(); - - const { mutateAsync, isPending } = useEditIntegration(); - - const form = useForm({ - values: { - endpoint: - integration.authType === AuthenticationType.AUTHENTICATION_TYPE_DATALIFE_ENGINE - ? String(integration.endpoint) - : "", - authType: - integration.authType === AuthenticationType.AUTHENTICATION_TYPE_DATALIFE_ENGINE - ? integration.authType - : AuthenticationType.AUTHENTICATION_TYPE_DATALIFE_ENGINE, - }, - resolver: zodResolver(integrationSchema), - }); - - const onSubmit: SubmitHandler = async ( - data: IntegrationFormSchemaType, - ) => { - await mutateAsync(data).then(() => { - onOpenChange(false); - }); - }; - - return ( -
-
- - - Введите эндпоинт - - - - - {form.formState.errors.endpoint ? ( - {form.formState.errors.endpoint.message} - ) : ( - - Не знаете где взять файл auth.php?{" "} - - Скачайте по ссылке - - - )} - - -
- -
- ); -} diff --git a/src/features/authentication-form-undefined/index.ts b/src/features/authentication-form-undefined/index.ts deleted file mode 100644 index e779e1f..0000000 --- a/src/features/authentication-form-undefined/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AuthenticationFormUndefined } from "@/features/authentication-form-undefined/ui/AuthenticationFormUndefined"; diff --git a/src/features/authentication-form-undefined/ui/AuthenticationFormUndefined.tsx b/src/features/authentication-form-undefined/ui/AuthenticationFormUndefined.tsx deleted file mode 100644 index c87232a..0000000 --- a/src/features/authentication-form-undefined/ui/AuthenticationFormUndefined.tsx +++ /dev/null @@ -1,49 +0,0 @@ -"use client"; - -import React from "react"; - -import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; - -import { useEditIntegration } from "@/shared/hooks"; -import { cn } from "@/shared/lib/utils"; -import { Button } from "@/shared/ui/button"; -import { Icons } from "@/shared/ui/icons"; -import { AuthenticationType } from "@/shared/enums"; -import { Alert, AlertDescription, AlertTitle } from "@/shared/ui/alert"; - -interface SignInFormProps extends React.HTMLAttributes { - onOpenChange: (open: boolean) => void; -} - -export function AuthenticationFormUndefined({ - className, - onOpenChange, - ...props -}: SignInFormProps) { - const { mutateAsync, isPending } = useEditIntegration(); - - const onSubmit = async () => { - await mutateAsync({ - authType: AuthenticationType.AUTHENTICATION_TYPE_UNDEFINED, - endpoint: "https://localhost", - }).then(() => { - onOpenChange(false); - }); - }; - - return ( -
- - - Внимание! - - Данный метод запретит любую аутентификацию со стороны лаунчера - - - -
- ); -} diff --git a/src/features/sentry-connect-form/index.ts b/src/features/sentry-connect-form/index.ts deleted file mode 100644 index a44721f..0000000 --- a/src/features/sentry-connect-form/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { SentryConnectForm } from "@/features/sentry-connect-form/ui/SentryConnectForm"; diff --git a/src/features/sentry-connect-form/lib/static.ts b/src/features/sentry-connect-form/lib/static.ts deleted file mode 100644 index 2f39400..0000000 --- a/src/features/sentry-connect-form/lib/static.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { z } from "zod"; - -export const integrationSchema = z.object({ - url: z.string().transform((v) => v.trim()), -}); - -export type SentryFormSchemaType = z.infer; diff --git a/src/features/sentry-connect-form/ui/SentryConnectForm.tsx b/src/features/sentry-connect-form/ui/SentryConnectForm.tsx deleted file mode 100644 index eccdf57..0000000 --- a/src/features/sentry-connect-form/ui/SentryConnectForm.tsx +++ /dev/null @@ -1,64 +0,0 @@ -"use client"; - -import React from "react"; - -import { SubmitHandler, useForm } from "react-hook-form"; - -import { zodResolver } from "@hookform/resolvers/zod"; - -import { useEditSentry, useSentry } from "@/shared/hooks"; -import { cn } from "@/shared/lib/utils"; -import { Button } from "@/shared/ui/button"; -import { Form, FormControl, FormItem, FormLabel, FormMessage } from "@/shared/ui/form"; -import { Icons } from "@/shared/ui/icons"; -import { Input } from "@/shared/ui/input"; -import { integrationSchema, SentryFormSchemaType } from "../lib/static"; - -interface SignInFormProps extends React.HTMLAttributes { - onOpenChange: (open: boolean) => void; -} - -export function SentryConnectForm({ className, onOpenChange, ...props }: SignInFormProps) { - const { data } = useSentry(); - const { mutateAsync, isPending } = useEditSentry(); - - const form = useForm({ - values: { - url: data?.url || "", - }, - resolver: zodResolver(integrationSchema), - }); - - const onSubmit: SubmitHandler = async (data: SentryFormSchemaType) => { - await mutateAsync(data).then(() => { - onOpenChange(false); - }); - }; - - return ( -
-
- - - Введите эндпоинт - - - - {form.formState.errors.url && ( - {form.formState.errors.url.message} - )} - - - -
- -
- ); -} diff --git a/src/screens/Integrations/ui/Integrations.tsx b/src/screens/Integrations/ui/Integrations.tsx index 26b6585..d0e9a88 100644 --- a/src/screens/Integrations/ui/Integrations.tsx +++ b/src/screens/Integrations/ui/Integrations.tsx @@ -2,11 +2,12 @@ import { useState } from "react"; -import { IntegrationCard } from "@/widgets/IntegrationCard"; -import { GenerateLauncherDialog } from "@/widgets/GenerateLauncherDialog"; -import { AuthenticationMethodDialog } from "@/widgets/AuthenticationMethodDialog"; -import { SentryConnectDialog } from "@/widgets/SentryConnectDialog"; -import { ConnectTexturesDialog } from "@/widgets/ConnectTexturesDialog"; +import { GenerateLauncherDialog } from "@/widgets/generate-launcher-dialog"; +import { ChooseAuthenticationMethodDialog } from "@/widgets/choose-authentication-method-dialog"; +import { ConnectSentryDialog } from "@/widgets/connect-sentry-dialog"; +import { ConnectTexturesDialog } from "@/widgets/connect-textures-dialog"; + +import { IntegrationCard } from "@/entities/IntegrationCard"; import { Breadcrumbs } from "@/shared/ui/Breadcrumbs"; import { useSentry } from "@/shared/hooks"; @@ -81,7 +82,7 @@ export const IntegrationsPage = () => { - @@ -91,7 +92,7 @@ export const IntegrationsPage = () => { onOpenChange={onGenerateLauncherDialogToggle} /> - diff --git a/src/screens/Profile/ui/Profile.tsx b/src/screens/Profile/ui/Profile.tsx index 97971ac..c54bb59 100644 --- a/src/screens/Profile/ui/Profile.tsx +++ b/src/screens/Profile/ui/Profile.tsx @@ -1,16 +1,22 @@ "use client"; import { useEffect } from "react"; -import { OsArchitectureEnum, OsTypeEnum } from "@/shared/enums"; -import { useProfile } from "@/shared/hooks"; -import { getStorageAccessToken, getStorageProfile } from "@/shared/services/AuthTokenService"; -import { DownloadClientHub } from "@/widgets/client-hub"; + import Image from "next/image"; + +import { DownloadClientHub } from "@/widgets/client-hub"; + import { Section } from "@/entities/Section"; -import { ProfileLoading } from "@/screens/Profile"; + import { EditProfileForm } from "@/features/edit-profile-form/ui/EditProfileForm"; + import { DASHBOARD_PAGES } from "@/shared/routes"; -import { Breadcrumbs } from "@/shared/ui/Breadcrumbs/ui/Breadcrumbs"; +import { OsArchitectureEnum, OsTypeEnum } from "@/shared/enums"; +import { useProfile } from "@/shared/hooks"; +import { Breadcrumbs } from "@/shared/ui/Breadcrumbs"; +import { getStorageAccessToken, getStorageProfile } from "@/shared/services/AuthTokenService"; + +import { ProfileLoading } from "./ProfileLoading"; export const ProfilePage = ({ params }: { params: { name: string } }) => { const account = getStorageProfile(); diff --git a/src/screens/Profiles/ui/Profiles.tsx b/src/screens/Profiles/ui/Profiles.tsx index c8b2824..814300c 100644 --- a/src/screens/Profiles/ui/Profiles.tsx +++ b/src/screens/Profiles/ui/Profiles.tsx @@ -2,9 +2,10 @@ import { useState } from "react"; -import { Button } from "@/shared/ui/button"; -import { CreateProfileDialog } from "@/widgets/CreateProfileDialog"; +import { CreateProfileDialog } from "@/widgets/create-profile-dialog"; import { ProfilesTable } from "@/widgets/profiles-table"; + +import { Button } from "@/shared/ui/button"; import { Breadcrumbs } from "@/shared/ui/Breadcrumbs/ui/Breadcrumbs"; import { DASHBOARD_PAGES } from "@/shared/routes"; diff --git a/src/shared/test.tsx b/src/shared/test.tsx deleted file mode 100644 index b291586..0000000 --- a/src/shared/test.tsx +++ /dev/null @@ -1,93 +0,0 @@ -'use client'; - -import { useForm } from 'react-hook-form'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { z } from 'zod'; - -import { Button } from '@/shared/ui/button'; -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, -} from '@/shared/ui/form'; -import { Switch } from '@/shared/ui/switch'; -import { toast } from '@/shared/ui/use-toast'; - -const FormSchema = z.object({ - marketing_emails: z.boolean().default(false).optional(), - security_emails: z.boolean(), -}); - -export function SwitchForm() { - const form = useForm>({ - resolver: zodResolver(FormSchema), - defaultValues: { - security_emails: true, - }, - }); - - function onSubmit(data: z.infer) { - toast({ - title: 'You submitted the following values:', - description: ( -
-          {JSON.stringify(data, null, 2)}
-        
- ), - }); - } - - return ( -
- -
-

Email Notifications

-
- ( - -
- Marketing emails - - Receive emails about new products, features, and more. - -
- - - -
- )} - /> - ( - -
- Security emails - Receive emails about your account security. -
- - - -
- )} - /> -
-
- -
- - ); -} diff --git a/src/widgets/AuthenticationMethodDialog/index.ts b/src/widgets/AuthenticationMethodDialog/index.ts deleted file mode 100644 index 48ecce8..0000000 --- a/src/widgets/AuthenticationMethodDialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AuthenticationMethodDialog } from "./ui/AuthenticationMethodDialog"; diff --git a/src/widgets/AuthenticationMethodDialog/ui/AuthenticationMethodDialog.tsx b/src/widgets/AuthenticationMethodDialog/ui/AuthenticationMethodDialog.tsx deleted file mode 100644 index 9706430..0000000 --- a/src/widgets/AuthenticationMethodDialog/ui/AuthenticationMethodDialog.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { useEffect, useState } from "react"; - -import { AuthenticationFormDle } from "@/features/authentication-form-dle"; -import { AuthenticationFormAzuriom } from "@/features/authentication-form-azuriom"; -import { AuthenticationFormUndefined } from "@/features/authentication-form-undefined"; -import { AuthenticationFormAny } from "@/features/authentication-form-any"; - -import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/ui/dialog"; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/shared/ui/select"; -import { AuthenticationType, AuthenticationTypeOption } from "@/shared/enums"; -import { useActiveAuthIntegrations, useAuthIntegrations } from "@/shared/hooks"; - -interface AuthenticationMethodDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; -} - -export function AuthenticationMethodDialog(props: AuthenticationMethodDialogProps) { - const { data: integrations } = useAuthIntegrations(); - const { data: activeIntegrations } = useActiveAuthIntegrations(); - - const [authenticationTab, setAuthenticationTab] = useState(String(activeIntegrations?.authType)); - const onAuthenticationTabToggle = (tab: string) => setAuthenticationTab(() => tab); - - useEffect(() => { - setAuthenticationTab(String(activeIntegrations?.authType)); - }, [activeIntegrations]); - - const isFormUndefined = - Number(authenticationTab) === AuthenticationType.AUTHENTICATION_TYPE_UNDEFINED; - const isFormDatalife = - Number(authenticationTab) === AuthenticationType.AUTHENTICATION_TYPE_DATALIFE_ENGINE; - const isFormAny = Number(authenticationTab) === AuthenticationType.AUTHENTICATION_TYPE_ANY; - const isFormAzuriom = - Number(authenticationTab) === AuthenticationType.AUTHENTICATION_TYPE_AZURIOM; - - return ( - - - - Метод аутентификации - -
-
-
-
Метод
-

- Текущий метод аутентификации игроков в лаунчере -

-
-
- -
-
- {isFormUndefined && ( - props.onOpenChange(false)} /> - )} - {isFormDatalife && ( - props.onOpenChange(false)} /> - )} - {isFormAny && props.onOpenChange(false)} />} - {isFormAzuriom && ( - props.onOpenChange(false)} /> - )} -
-
-
- ); -} diff --git a/src/widgets/ConnectTexturesDialog/index.ts b/src/widgets/ConnectTexturesDialog/index.ts deleted file mode 100644 index dbddbe5..0000000 --- a/src/widgets/ConnectTexturesDialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ConnectTexturesDialog } from "./ui/ConnectTexturesDialog"; diff --git a/src/widgets/ConnectTexturesDialog/ui/ConnectTexturesDialog.tsx b/src/widgets/ConnectTexturesDialog/ui/ConnectTexturesDialog.tsx deleted file mode 100644 index b44ff1b..0000000 --- a/src/widgets/ConnectTexturesDialog/ui/ConnectTexturesDialog.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ConnectTexturesForm } from "@/features/connect-textures-form"; - -import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/ui/dialog"; - -interface GenerateLauncherDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; -} - -export function ConnectTexturesDialog(props: GenerateLauncherDialogProps) { - return ( - - - - Подключение сервиса скинов и плащей - - - - - ); -} diff --git a/src/widgets/CreateProfileDialog/index.ts b/src/widgets/CreateProfileDialog/index.ts deleted file mode 100644 index 4e2dbeb..0000000 --- a/src/widgets/CreateProfileDialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { CreateProfileDialog } from '@/widgets/CreateProfileDialog/ui/CreateProfileDialog'; diff --git a/src/widgets/CreateProfileDialog/ui/CreateProfileDialog.tsx b/src/widgets/CreateProfileDialog/ui/CreateProfileDialog.tsx deleted file mode 100644 index d820661..0000000 --- a/src/widgets/CreateProfileDialog/ui/CreateProfileDialog.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { CreateProfileForm } from "@/features/create-profile-form"; -import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/ui/dialog"; - -interface CreateProfileDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; -} - -export function CreateProfileDialog(props: CreateProfileDialogProps) { - return ( - - - - Создание профиля - props.onOpenChange(false)} /> - - - - ); -} diff --git a/src/widgets/GenerateLauncherDialog/index.ts b/src/widgets/GenerateLauncherDialog/index.ts deleted file mode 100644 index 557bfc4..0000000 --- a/src/widgets/GenerateLauncherDialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { GenerateLauncherDialog } from "./ui/GenerateLauncherDialog"; diff --git a/src/widgets/GenerateLauncherDialog/ui/GenerateLauncherDialog.tsx b/src/widgets/GenerateLauncherDialog/ui/GenerateLauncherDialog.tsx deleted file mode 100644 index 9281503..0000000 --- a/src/widgets/GenerateLauncherDialog/ui/GenerateLauncherDialog.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/ui/dialog"; -import { InstallClientForm } from "@/features/install-client-form"; - -interface GenerateLauncherDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; -} - -export function GenerateLauncherDialog(props: GenerateLauncherDialogProps) { - return ( - - - - Сборка лаунчера - - - - - ); -} diff --git a/src/widgets/IntegrationCard/index.ts b/src/widgets/IntegrationCard/index.ts deleted file mode 100644 index f2edbb8..0000000 --- a/src/widgets/IntegrationCard/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { IntegrationCard } from "./ui/IntegrationCard"; diff --git a/src/widgets/IntegrationCard/ui/IntegrationCard.tsx b/src/widgets/IntegrationCard/ui/IntegrationCard.tsx deleted file mode 100644 index 5b3909f..0000000 --- a/src/widgets/IntegrationCard/ui/IntegrationCard.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Card } from "@/shared/ui/card"; -import { Button } from "@/shared/ui/button"; -import { PlugIcon, Settings2 } from "lucide-react"; - -interface IntegrationCardProps { - title: string; - description?: string; - status?: "CONNECTED" | "UNCONNECTED"; - buttonText?: string; - isDisabled?: boolean; - action?: () => void; -} - -export const IntegrationCard = (props: IntegrationCardProps) => { - const { title, description, buttonText = "Подключить", status, isDisabled, action } = props; - - return ( - -
-
-
{title}
-
- {description &&

{description}

} -
- -
- ); -}; diff --git a/src/widgets/SentryConnectDialog/index.ts b/src/widgets/SentryConnectDialog/index.ts deleted file mode 100644 index 0897767..0000000 --- a/src/widgets/SentryConnectDialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { SentryConnectDialog } from "./ui/SentryConnectDialog"; diff --git a/src/widgets/SentryConnectDialog/ui/SentryConnectDialog.tsx b/src/widgets/SentryConnectDialog/ui/SentryConnectDialog.tsx deleted file mode 100644 index fc45a9a..0000000 --- a/src/widgets/SentryConnectDialog/ui/SentryConnectDialog.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/ui/dialog"; -import { SentryConnectForm } from "@/features/sentry-connect-form/ui/SentryConnectForm"; - -interface AuthenticationMethodDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; -} - -export function SentryConnectDialog(props: AuthenticationMethodDialogProps) { - return ( - - - - Подключение Sentry - -
- props.onOpenChange(false)} /> -
-
-
- ); -}