diff --git a/Makefile b/Makefile index a3bd3cfe..f838467b 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ GO.MACRO = $${GO:-go} VERBOSE.MACRO = $${VERBOSE:-0} CHANNEL = development -CLIENT_DIR = client +CLIENT_DIR = client_v2 DEPLOY_SCRIPT_PATH = not/a/real/path DIST_DIR = dist GOAMD64 = v1 diff --git a/client_v2/src/install/Setup/AddressList.tsx b/client_v2/src/install/Setup/AddressList.tsx index 4d9488fa..48a900ee 100644 --- a/client_v2/src/install/Setup/AddressList.tsx +++ b/client_v2/src/install/Setup/AddressList.tsx @@ -3,6 +3,7 @@ import React from 'react'; import { getIpList, getDnsAddress, getWebAddress } from '../../helpers/helpers'; import { ALL_INTERFACES_IP } from '../../helpers/constants'; import { InstallInterface } from '../../initialState'; +import theme from 'panel/lib/theme'; interface renderItemProps { ip: string; @@ -19,7 +20,7 @@ const renderItem = ({ ip, port, isDns }: renderItemProps) => { {isDns ? ( {dnsAddress} ) : ( - + {webAddress} )} diff --git a/client_v2/src/install/Setup/Auth.tsx b/client_v2/src/install/Setup/Auth.tsx index a0632383..d75a81c8 100644 --- a/client_v2/src/install/Setup/Auth.tsx +++ b/client_v2/src/install/Setup/Auth.tsx @@ -3,7 +3,7 @@ import { Controller, useForm } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; import Controls from './Controls'; import { validatePasswordLength, validateRequiredValue } from '../../helpers/validators'; -import { Input } from '../../components/ui/Controls/Input'; +import { Input } from 'panel/common/controls/Input'; type AuthFormValues = { username: string; @@ -60,10 +60,11 @@ export const Auth = ({ onAuthSubmit }: Props) => { )} @@ -84,10 +85,11 @@ export const Auth = ({ onAuthSubmit }: Props) => { )} @@ -108,10 +110,11 @@ export const Auth = ({ onAuthSubmit }: Props) => { )} diff --git a/client_v2/src/install/Setup/Controls.tsx b/client_v2/src/install/Setup/Controls.tsx index 6b79af0e..6e13f7ab 100644 --- a/client_v2/src/install/Setup/Controls.tsx +++ b/client_v2/src/install/Setup/Controls.tsx @@ -3,6 +3,7 @@ import { connect } from 'react-redux'; import { Trans } from 'react-i18next'; import * as actionCreators from '../../actions/install'; +import { Button } from 'panel/common/ui/Button'; interface ControlsProps { install: { @@ -33,13 +34,15 @@ class Controls extends Component { case 2: case 3: return ( - + ); default: return false; @@ -52,44 +55,52 @@ class Controls extends Component { switch (step) { case 1: return ( - + ); case 2: case 3: return ( - + ); case 4: return ( - + ); case 5: return ( - + ); default: return false; @@ -101,10 +112,8 @@ class Controls extends Component { return (
-
- {this.renderPrevButton(install.step)} - {this.renderNextButton(install.step)} -
+ {this.renderPrevButton(install.step)} + {this.renderNextButton(install.step)}
); } diff --git a/client_v2/src/install/Setup/Setup.css b/client_v2/src/install/Setup/Setup.css index d5d130b8..f22442b1 100644 --- a/client_v2/src/install/Setup/Setup.css +++ b/client_v2/src/install/Setup/Setup.css @@ -52,7 +52,9 @@ } .setup__nav { - text-align: center; + display: flex; + gap: 16px; + justify-content: center; } .setup__step { @@ -130,9 +132,7 @@ } .setup__button { - min-width: 120px; - padding-left: 30px; - padding-right: 30px; + max-width: 200px; } .setup__error { diff --git a/client_v2/src/login/Login/Form.tsx b/client_v2/src/login/Login/Form.tsx index 10cae9ef..3d1bebef 100644 --- a/client_v2/src/login/Login/Form.tsx +++ b/client_v2/src/login/Login/Form.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Controller, useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import { Input } from '../../components/ui/Controls/Input'; -import { validateRequiredValue } from '../../helpers/validators'; +import { validateRequiredValue } from 'panel/helpers/validators'; +import { Input } from 'panel/common/controls/Input'; +import { Button } from 'panel/common/ui/Button'; export type LoginFormValues = { username: string; @@ -39,14 +40,14 @@ const Form = ({ onSubmit, processing }: LoginFormProps) => { render={({ field, fieldState }) => ( )} /> @@ -60,26 +61,28 @@ const Form = ({ onSubmit, processing }: LoginFormProps) => { render={({ field, fieldState }) => ( )} />
- +
diff --git a/client_v2/src/login/Login/Login.css b/client_v2/src/login/Login/Login.css index 79d0203e..3cc3ad60 100644 --- a/client_v2/src/login/Login/Login.css +++ b/client_v2/src/login/Login/Login.css @@ -38,6 +38,12 @@ letter-spacing: 0; } +.login__link { + margin-top: 16px; + border: 0; + background: transparent; +} + @media screen and (min-width: 992px) { .login__message { position: absolute; diff --git a/client_v2/src/login/Login/index.tsx b/client_v2/src/login/Login/index.tsx index 846656c7..2461e32d 100644 --- a/client_v2/src/login/Login/index.tsx +++ b/client_v2/src/login/Login/index.tsx @@ -1,14 +1,16 @@ import React, { useState } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { Trans } from 'react-i18next'; +import cn from 'clsx'; + +import theme from 'panel/lib/theme'; import * as actionCreators from '../../actions/login'; - import Toasts from '../../components/Toasts'; import Form, { LoginFormValues } from './Form'; +import { LoginState } from '../../initialState'; import './Login.css'; -import { LoginState } from '../../initialState'; export const Login = () => { const dispatch = useDispatch(); @@ -29,7 +31,7 @@ export const Login = () => {
- @@ -41,7 +43,9 @@ export const Login = () => { href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#password-reset" key="0" target="_blank" - rel="noopener noreferrer"> + rel="noopener noreferrer" + className={theme.link.link} + > link , ]}>