style(login): change LangSwitches's position to top-left

This commit is contained in:
Tran Anh Tuan
2025-11-21 14:44:02 +07:00
parent 38c9639fcc
commit 4d4463a517
2 changed files with 10 additions and 10 deletions

View File

@@ -30,7 +30,11 @@ const LangSwitches = () => {
checked={isEnglish}
onChange={handleLanguageChange}
/>
<div className="w-20 h-10 rounded-full bg-gradient-to-r from-orange-400 to-red-400 peer-checked:from-blue-400 peer-checked:to-indigo-500 transition-all duration-500 after:content-['🇻🇳'] after:absolute after:top-1 after:left-1 after:bg-white after:rounded-full after:h-8 after:w-8 after:flex after:items-center after:justify-center after:transition-all after:duration-500 peer-checked:after:translate-x-10 peer-checked:after:content-['🏴󠁧󠁢󠁥󠁮󠁧󠁿'] after:shadow-md after:text-lg"></div>
<div className="w-20 h-10 rounded-full bg-gradient-to-r from-orange-400 to-red-400 peer-checked:from-blue-400 peer-checked:to-indigo-500
transition-all duration-500 after:content-['🇻🇳'] after:absolute after:top-1 after:left-1 after:bg-white after:rounded-full after:h-8
after:w-8 after:flex after:items-center after:justify-center after:transition-all after:duration-500 peer-checked:after:translate-x-10
peer-checked:after:content-['🏴󠁧󠁢󠁥󠁮󠁧󠁿'] after:shadow-md after:text-2xl"
></div>
</label>
);
};

View File

@@ -1,4 +1,5 @@
import Footer from '@/components/Footer/Footer';
import LangSwitches from '@/components/switch/LangSwitches';
import { ROUTE_HOME } from '@/constants';
import { login } from '@/services/controller/AuthController';
import { parseJwt } from '@/utils/jwtTokenUtils';
@@ -6,11 +7,10 @@ import { getToken, removeToken, setToken } from '@/utils/localStorageUtils';
import { LockOutlined, UserOutlined } from '@ant-design/icons';
import { LoginFormPage, ProFormText } from '@ant-design/pro-components';
import { history, useIntl } from '@umijs/max';
import { Image, Space, theme } from 'antd';
import { Image, theme } from 'antd';
import { useEffect } from 'react';
import logoImg from '../../../public/logo.png';
import mobifontImg from '../../../public/owner.png';
import LangSwitches from '@/components/switch/LangSwitches';
const LoginPage = () => {
const { token } = theme.useToken();
@@ -90,11 +90,6 @@ const LoginPage = () => {
},
}}
onFinish={async (values: API.LoginRequestBody) => handleLogin(values)}
actions={
<Space className='mt-3'>
<LangSwitches />
</Space>
}
>
<>
<ProFormText
@@ -152,9 +147,10 @@ const LoginPage = () => {
]}
/>
</>
</LoginFormPage>
<LangSwitches />
<div className="absolute top-5 right-5 z-50">
<LangSwitches />
</div>
<div
style={{
backgroundColor: 'transparent',