chore: reset the primary color after logout
This commit is contained in:
@@ -193,6 +193,22 @@ const options: BackendParameter[] = [
|
||||
{
|
||||
label: '--multi-token-prediction-tokens',
|
||||
value: '--multi-token-prediction-tokens'
|
||||
},
|
||||
{
|
||||
label: '--context-parallel-size',
|
||||
value: '--context-parallel-size'
|
||||
},
|
||||
{
|
||||
label: '--models',
|
||||
value: '--models'
|
||||
},
|
||||
{
|
||||
label: '--max-prefill-tokens',
|
||||
value: '--max-prefill-tokens'
|
||||
},
|
||||
{
|
||||
label: '--max-iter-times',
|
||||
value: '--max-iter-times'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { userAtom } from '@/atoms/user';
|
||||
import { clearAtomStorage } from '@/atoms/utils';
|
||||
import { clearAtomStorage, clearStorageUserSettings } from '@/atoms/utils';
|
||||
import { request } from '@umijs/max';
|
||||
import qs from 'query-string';
|
||||
|
||||
@@ -27,6 +27,7 @@ export const logout = async (userInfo?: any) => {
|
||||
await request(`${AUTH_API}/logout`, {
|
||||
method: 'POST'
|
||||
});
|
||||
clearStorageUserSettings();
|
||||
clearAtomStorage(userAtom);
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -30,8 +30,6 @@ const SettingsItem = styled.div`
|
||||
const Appearance: React.FC = () => {
|
||||
const { setTheme, userSettings } = useUserSettings();
|
||||
|
||||
console.log('userSettings', userSettings);
|
||||
|
||||
const intl = useIntl();
|
||||
const allLocals = getAllLocales();
|
||||
|
||||
@@ -57,8 +55,6 @@ const Appearance: React.FC = () => {
|
||||
setTheme(value);
|
||||
};
|
||||
|
||||
console.log('allLocals', allLocals);
|
||||
|
||||
const languageOptions = allLocals.map((locale) => ({
|
||||
value: locale,
|
||||
label: _.get(langConfigMap, [locale, 'label'])
|
||||
@@ -71,6 +67,7 @@ const Appearance: React.FC = () => {
|
||||
<span>{intl.formatMessage({ id: 'common.appearance.theme' })}</span>
|
||||
</span>
|
||||
<BaseSelect
|
||||
defaultValue={'light'}
|
||||
value={userSettings.mode}
|
||||
options={ThemeOptions}
|
||||
onChange={handleOnChange}
|
||||
|
||||
Reference in New Issue
Block a user