perf: detailed control of models service displaying

This commit is contained in:
Junyan Qin
2026-01-27 22:44:58 +08:00
parent 61f3f31edc
commit 13f42857f5
6 changed files with 68 additions and 11 deletions
+3 -2
View File
@@ -21,7 +21,7 @@ import {
FormMessage,
} from '@/components/ui/form';
import { useEffect, useState } from 'react';
import { httpClient } from '@/app/infra/http/HttpClient';
import { httpClient, initializeUserInfo } from '@/app/infra/http';
import { useRouter } from 'next/navigation';
import { Mail, Lock, Loader2 } from 'lucide-react';
import langbotIcon from '@/app/assets/langbot-logo.webp';
@@ -95,9 +95,10 @@ export default function Login() {
function handleLogin(username: string, password: string) {
httpClient
.authUser(username, password)
.then((res) => {
.then(async (res) => {
localStorage.setItem('token', res.token);
localStorage.setItem('userEmail', username);
await initializeUserInfo();
router.push('/home');
toast.success(t('common.loginSuccess'));
})