fix: theme setting in login
This commit is contained in:
@@ -2,7 +2,7 @@ import LogoIcon from '@/assets/images/gpustack-logo.png';
|
||||
import { initialPasswordAtom, userAtom } from '@/atoms/user';
|
||||
import LangSelect from '@/components/lang-select';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import ThemeToggle from '@/components/theme-toggle';
|
||||
import ThemeDropActions from '@/components/theme-toggle/theme-drop-actions';
|
||||
import externalLinks from '@/constants/external-links';
|
||||
import {
|
||||
CRYPT_TEXT,
|
||||
@@ -30,6 +30,7 @@ const useStyles = createStyles(({ token, css }) => ({
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 60px;
|
||||
padding: 20px;
|
||||
.anticon-global {
|
||||
color: ${token.colorText};
|
||||
@@ -153,7 +154,7 @@ const LoginForm = () => {
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.header}>
|
||||
<ThemeToggle></ThemeToggle>
|
||||
<ThemeDropActions></ThemeDropActions>
|
||||
<LangSelect />
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import useUserSettings from '@/hooks/use-user-settings';
|
||||
import { MoonOutlined, SunOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Select } from 'antd';
|
||||
import React, { useMemo } from 'react';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
@@ -56,10 +56,6 @@ const Appearance: React.FC = () => {
|
||||
setTheme(value);
|
||||
};
|
||||
|
||||
const theme = useMemo(() => {
|
||||
return userSettings?.theme || 'auto';
|
||||
}, [userSettings?.theme]);
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<div className="theme">
|
||||
|
||||
Reference in New Issue
Block a user