UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: дизайн и русификация God Mode

This commit is contained in:
DCCONSTRUCTIONS
2026-04-29 00:38:04 +03:00
parent 5d336039ba
commit 7f47b85c36
57 changed files with 1104 additions and 588 deletions
@@ -5,14 +5,16 @@
*/
import Link from "next/link";
import { PlaneLockup } from "@plane/propel/icons";
export function AuthHeader() {
return (
<div className="sticky top-0 flex w-full flex-shrink-0 items-center justify-between gap-6">
<Link href="/">
<PlaneLockup height={20} width={95} className="text-primary" />
<span className="tracking-normal text-16 font-semibold text-primary">NODE.DC</span>
</Link>
<span className="rounded-full bg-white/6 px-3 py-1 text-11 font-medium text-secondary">
Глобальное администрирование
</span>
</div>
);
}
@@ -22,56 +22,56 @@ const errorCodeMessages: {
} = {
// admin
[EAdminAuthErrorCodes.ADMIN_ALREADY_EXIST]: {
title: `Admin already exists`,
message: () => `Admin already exists. Please try again.`,
title: `Администратор уже существует`,
message: () => `Администратор уже существует. Попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.REQUIRED_ADMIN_EMAIL_PASSWORD_FIRST_NAME]: {
title: `Email, password and first name required`,
message: () => `Email, password and first name required. Please try again.`,
title: `Нужны email, пароль и имя`,
message: () => `Укажите email, пароль и имя. Попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.INVALID_ADMIN_EMAIL]: {
title: `Invalid admin email`,
message: () => `Invalid admin email. Please try again.`,
title: `Некорректный email администратора`,
message: () => `Некорректный email администратора. Попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.INVALID_ADMIN_PASSWORD]: {
title: `Invalid admin password`,
message: () => `Invalid admin password. Please try again.`,
title: `Некорректный пароль администратора`,
message: () => `Некорректный пароль администратора. Попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.REQUIRED_ADMIN_EMAIL_PASSWORD]: {
title: `Email and password required`,
message: () => `Email and password required. Please try again.`,
title: `Нужны email и пароль`,
message: () => `Укажите email и пароль. Попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.ADMIN_AUTHENTICATION_FAILED]: {
title: `Authentication failed`,
message: () => `Authentication failed. Please try again.`,
title: `Ошибка входа`,
message: () => `Не удалось войти. Проверьте данные и попробуйте еще раз.`,
},
[EAdminAuthErrorCodes.ADMIN_USER_ALREADY_EXIST]: {
title: `Admin user already exists`,
title: `Администратор уже существует`,
message: () => (
<div>
Admin user already exists.&nbsp;
Администратор уже существует.&nbsp;
<Link className="font-medium underline underline-offset-4 transition-all hover:font-bold" href={`/admin`}>
Sign In
Войти
</Link>
&nbsp;now.
&nbsp;сейчас.
</div>
),
},
[EAdminAuthErrorCodes.ADMIN_USER_DOES_NOT_EXIST]: {
title: `Admin user does not exist`,
title: `Администратор не найден`,
message: () => (
<div>
Admin user does not exist.&nbsp;
Администратор не найден.&nbsp;
<Link className="font-medium underline underline-offset-4 transition-all hover:font-bold" href={`/admin`}>
Sign In
Войти
</Link>
&nbsp;now.
&nbsp;сейчас.
</div>
),
},
[EAdminAuthErrorCodes.ADMIN_USER_DEACTIVATED]: {
title: `User account deactivated`,
message: () => `User account deactivated. Please contact ${SUPPORT_EMAIL ? SUPPORT_EMAIL : "administrator"}.`,
title: `Аккаунт деактивирован`,
message: () => `Аккаунт деактивирован. Свяжитесь с ${SUPPORT_EMAIL ? SUPPORT_EMAIL : "администратором"}.`,
},
};
@@ -92,8 +92,8 @@ export const authErrorHandler = (errorCode: EAdminAuthErrorCodes, email?: string
return {
type: EErrorAlertType.BANNER_ALERT,
code: errorCode,
title: errorCodeMessages[errorCode]?.title || "Error",
message: errorCodeMessages[errorCode]?.message(email) || "Something went wrong. Please try again.",
title: errorCodeMessages[errorCode]?.title || "Ошибка",
message: errorCodeMessages[errorCode]?.message(email) || "Что-то пошло не так. Попробуйте еще раз.",
};
return undefined;
@@ -22,7 +22,7 @@ function RootLayout() {
}, [replace, isUserLoggedIn]);
return (
<div className="relative z-10 flex h-screen w-screen flex-col items-center overflow-hidden overflow-y-auto bg-surface-1 px-8 pt-6 pb-10">
<div className="nodedc-auth-shell relative z-10 flex h-screen w-screen flex-col items-center overflow-hidden overflow-y-auto bg-surface-1 px-8 pt-6 pb-10">
<Outlet />
</div>
);
@@ -45,6 +45,6 @@ function HomePage() {
export default observer(HomePage);
export const meta: Route.MetaFunction = () => [
{ title: "Admin – Instance Setup & Sign-In" },
{ name: "description", content: "Configure your Plane instance or sign in to the admin portal." },
{ title: "NODE.DC - вход в админ-панель" },
{ name: "description", content: "Настройка инстанса NODE.DC и вход в глобальную админ-панель." },
];
@@ -112,10 +112,10 @@ export function InstanceSignInForm() {
<>
<AuthHeader />
<div className="mt-10 flex w-full flex-grow flex-col items-center justify-center py-6">
<div className="relative flex w-full max-w-[22.5rem] flex-col gap-6">
<div className="nodedc-auth-card relative flex w-full max-w-[22.5rem] flex-col gap-6">
<FormHeader
heading="Manage your Plane instance"
subHeading="Configure instance-wide settings to secure your instance"
heading="Управление инстансом NODE.DC"
subHeading="Войдите, чтобы менять глобальные настройки системы"
/>
<form
className="space-y-4"
@@ -135,10 +135,10 @@ export function InstanceSignInForm() {
<div className="w-full space-y-1">
<label className="text-13 font-medium text-tertiary" htmlFor="email">
Email <span className="text-danger-primary">*</span>
Электронная почта <span className="text-danger-primary">*</span>
</label>
<Input
className="w-full border border-subtle !bg-surface-1 placeholder:text-placeholder"
className="nodedc-settings-input w-full border border-subtle !bg-surface-1 placeholder:text-placeholder"
id="email"
name="email"
type="email"
@@ -153,16 +153,16 @@ export function InstanceSignInForm() {
<div className="w-full space-y-1">
<label className="text-13 font-medium text-tertiary" htmlFor="password">
Password <span className="text-danger-primary">*</span>
Пароль <span className="text-danger-primary">*</span>
</label>
<div className="relative">
<Input
className="w-full border border-subtle !bg-surface-1 placeholder:text-placeholder"
className="nodedc-settings-input w-full border border-subtle !bg-surface-1 placeholder:text-placeholder"
id="password"
name="password"
type={showPassword ? "text" : "password"}
inputSize="md"
placeholder="Enter your password"
placeholder="Введите пароль"
value={formData.password}
onChange={(e) => handleFormChange("password", e.target.value)}
autoComplete="off"
@@ -188,7 +188,7 @@ export function InstanceSignInForm() {
</div>
<div className="py-2">
<Button type="submit" size="xl" className="w-full" disabled={isButtonDisabled}>
{isSubmitting ? <Spinner height="20px" width="20px" /> : "Sign in"}
{isSubmitting ? <Spinner height="20px" width="20px" /> : "Войти"}
</Button>
</div>
</form>