mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复登录倒计时颜色
This commit is contained in:
parent
8ce1a33bd3
commit
79e5b2fb84
|
@ -45,11 +45,11 @@ export default function (props: any) {
|
|||
}, [props.location.pathname]);
|
||||
|
||||
useEffect(() => {
|
||||
const theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
||||
const _theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
||||
setFetchMethod(window.fetch);
|
||||
if (theme === 'dark') {
|
||||
if (_theme === 'dark') {
|
||||
enableDarkMode({});
|
||||
} else if (theme === 'light') {
|
||||
} else if (_theme === 'light') {
|
||||
disableDarkMode();
|
||||
} else {
|
||||
followSystemColorScheme({});
|
||||
|
|
|
@ -12,6 +12,7 @@ import config from '@/utils/config';
|
|||
import { history, Link } from 'umi';
|
||||
import styles from './index.less';
|
||||
import { request } from '@/utils/http';
|
||||
import { useTheme } from '@/utils/hooks';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
const { Countdown } = Statistic;
|
||||
|
@ -19,6 +20,7 @@ const { Countdown } = Statistic;
|
|||
const Login = () => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [waitTime, setWaitTime] = useState<any>();
|
||||
const { theme } = useTheme();
|
||||
|
||||
const handleOk = (values: any) => {
|
||||
setLoading(true);
|
||||
|
@ -106,7 +108,12 @@ const Login = () => {
|
|||
<Button type="primary" style={{ width: '100%' }} disabled>
|
||||
请
|
||||
<Countdown
|
||||
valueStyle={{ color: 'rgba(232, 230, 227, 0.25)' }}
|
||||
valueStyle={{
|
||||
color:
|
||||
theme === 'vs'
|
||||
? 'rgba(0,0,0,.25)'
|
||||
: 'rgba(232, 230, 227, 0.25)',
|
||||
}}
|
||||
className="inline-countdown"
|
||||
onFinish={() => setWaitTime(null)}
|
||||
format="ss"
|
||||
|
|
Loading…
Reference in New Issue
Block a user