mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-09 10:59:47 +00:00
feat: load git config during onboarding
This commit is contained in:
@@ -34,12 +34,31 @@ const Onboarding = ({ onComplete }) => {
|
|||||||
|
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
|
|
||||||
|
// Load existing git config on mount
|
||||||
|
useEffect(() => {
|
||||||
|
loadGitConfig();
|
||||||
|
}, []);
|
||||||
|
|
||||||
// Check authentication status on mount and when modal closes
|
// Check authentication status on mount and when modal closes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
checkClaudeAuthStatus();
|
checkClaudeAuthStatus();
|
||||||
checkCursorAuthStatus();
|
checkCursorAuthStatus();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const loadGitConfig = async () => {
|
||||||
|
try {
|
||||||
|
const response = await authenticatedFetch('/api/user/git-config');
|
||||||
|
if (response.ok) {
|
||||||
|
const data = await response.json();
|
||||||
|
if (data.gitName) setGitName(data.gitName);
|
||||||
|
if (data.gitEmail) setGitEmail(data.gitEmail);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error loading git config:', error);
|
||||||
|
// Silently fail - user can still enter config manually
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Auto-check authentication status periodically when on CLI steps
|
// Auto-check authentication status periodically when on CLI steps
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentStep === 1 || currentStep === 2) {
|
if (currentStep === 1 || currentStep === 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user