From 8f710a58a9080cb4be5a621d4e60dcacb79537a0 Mon Sep 17 00:00:00 2001 From: mnenie <121057011+mneniee@users.noreply.github.com> Date: Sun, 21 Jul 2024 01:02:53 +0300 Subject: [PATCH] localization: auth --- src/app/providers/router/index.ts | 6 ++-- src/features/auth/ui/PrivacyPolicy.vue | 32 ++++++++++++------ src/features/auth/ui/SignInForm.vue | 18 ++++++----- src/features/auth/ui/SignUpForm.vue | 27 ++++++++-------- src/shared/lib/i18n/locales/en-US.ts | 22 +++++++++++++ src/shared/lib/i18n/locales/ru-RU.ts | 27 ++++++++++++++++ src/shared/lib/i18n/locales/zh-CN.ts | 22 +++++++++++++ src/widgets/auth/ui/AuthContainer.vue | 45 ++++++++++++++------------ 8 files changed, 145 insertions(+), 54 deletions(-) diff --git a/src/app/providers/router/index.ts b/src/app/providers/router/index.ts index ea9c0fff..de989248 100644 --- a/src/app/providers/router/index.ts +++ b/src/app/providers/router/index.ts @@ -81,7 +81,7 @@ export const router = createRouter({ router.beforeEach((to, from) => { // TODO(@mnenie): Add guards logic // Needs to add guard auth logic in router - if (to.meta.requiresAuth === true) { - return router.push({ name: RouteNames.login }); - } + // if (to.meta.requiresAuth === true) { + // return router.push({ name: RouteNames.login }); + // } }); diff --git a/src/features/auth/ui/PrivacyPolicy.vue b/src/features/auth/ui/PrivacyPolicy.vue index 7d66afb2..e53f0ba6 100644 --- a/src/features/auth/ui/PrivacyPolicy.vue +++ b/src/features/auth/ui/PrivacyPolicy.vue @@ -1,15 +1,28 @@ @@ -18,7 +31,7 @@ import { redirect } from '@/shared/lib/helpers'; padding: 10px 0px 0px 0px; text-align: center; color: #72717a; - max-width: 320px; + max-width: v-bind('maxWidth'); margin: 0 auto; .inside { @@ -33,13 +46,12 @@ import { redirect } from '@/shared/lib/helpers'; } } -:global(html.dark){ - .main_text{ +:global(html.dark) { + .main_text { color: var(--zinc-300); - .inside{ - - &:hover{ + .inside { + &:hover { color: var(--zinc-400); } } diff --git a/src/features/auth/ui/SignInForm.vue b/src/features/auth/ui/SignInForm.vue index e30de518..d09bced0 100644 --- a/src/features/auth/ui/SignInForm.vue +++ b/src/features/auth/ui/SignInForm.vue @@ -1,13 +1,15 @@ @@ -17,20 +27,16 @@ const info = computed(() => {
- +

Jenda

-

- {{ route.name === RouteNames.login ? 'Welcome back' : 'Get started' }} -

-

- {{ info }} -

+

{{ title }}

+

{{ info }}

- Or continue with + {{ t('authentication.line') }}
@@ -117,22 +123,21 @@ const info = computed(() => { } } -:global(html.dark){ - .container{ +:global(html.dark) { + .container { background-color: var(--zinc-800); - .container_inside{ - .form_wrapper{ - - .info_text{ + .container_inside { + .form_wrapper { + .info_text { color: var(--zinc-300); } - .line_container{ - .line{ + .line_container { + .line { background-color: var(--zinc-600); } - & span{ + & span { color: var(--zinc-300); } }