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]);
|
}, [props.location.pathname]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
const _theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
|
||||||
setFetchMethod(window.fetch);
|
setFetchMethod(window.fetch);
|
||||||
if (theme === 'dark') {
|
if (_theme === 'dark') {
|
||||||
enableDarkMode({});
|
enableDarkMode({});
|
||||||
} else if (theme === 'light') {
|
} else if (_theme === 'light') {
|
||||||
disableDarkMode();
|
disableDarkMode();
|
||||||
} else {
|
} else {
|
||||||
followSystemColorScheme({});
|
followSystemColorScheme({});
|
||||||
|
|
|
@ -12,6 +12,7 @@ import config from '@/utils/config';
|
||||||
import { history, Link } from 'umi';
|
import { history, Link } from 'umi';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
import { request } from '@/utils/http';
|
import { request } from '@/utils/http';
|
||||||
|
import { useTheme } from '@/utils/hooks';
|
||||||
|
|
||||||
const FormItem = Form.Item;
|
const FormItem = Form.Item;
|
||||||
const { Countdown } = Statistic;
|
const { Countdown } = Statistic;
|
||||||
|
@ -19,6 +20,7 @@ const { Countdown } = Statistic;
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [waitTime, setWaitTime] = useState<any>();
|
const [waitTime, setWaitTime] = useState<any>();
|
||||||
|
const { theme } = useTheme();
|
||||||
|
|
||||||
const handleOk = (values: any) => {
|
const handleOk = (values: any) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
@ -106,7 +108,12 @@ const Login = () => {
|
||||||
<Button type="primary" style={{ width: '100%' }} disabled>
|
<Button type="primary" style={{ width: '100%' }} disabled>
|
||||||
请
|
请
|
||||||
<Countdown
|
<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"
|
className="inline-countdown"
|
||||||
onFinish={() => setWaitTime(null)}
|
onFinish={() => setWaitTime(null)}
|
||||||
format="ss"
|
format="ss"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user