From 6a6f7e970cf9c31b65fb1db284c16dcd0c9041b7 Mon Sep 17 00:00:00 2001 From: yoge Date: Fri, 27 Mar 2026 02:25:26 +0800 Subject: [PATCH] feat: simplify workspace account UI and geo language defaults --- src/components/LeftSidebar.tsx | 28 ++--------------------- src/components/layout/MarketingNavbar.tsx | 8 ------- src/contexts/LanguageContext.tsx | 11 ++++----- src/lib/ipLocation.ts | 17 ++------------ 4 files changed, 8 insertions(+), 56 deletions(-) diff --git a/src/components/LeftSidebar.tsx b/src/components/LeftSidebar.tsx index 3aea924..cd4d6c6 100644 --- a/src/components/LeftSidebar.tsx +++ b/src/components/LeftSidebar.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useCallback, useEffect } from 'react'; -import { Upload, LogOut, FileText, Clock, ChevronLeft, ChevronRight, MousePointerClick, FileUp, ClipboardPaste, Loader2 } from 'lucide-react'; +import { Upload, FileText, Clock, ChevronLeft, ChevronRight, MousePointerClick, FileUp, ClipboardPaste, Loader2 } from 'lucide-react'; import { useAuth } from '../contexts/AuthContext'; import { useLanguage } from '../contexts/LanguageContext'; import { FileRecord } from '../types'; @@ -37,12 +37,11 @@ export default function LeftSidebar({ historyEnabled, onToggleHistory, }: LeftSidebarProps) { - const { user, signOut } = useAuth(); + const { user } = useAuth(); const { t } = useLanguage(); const [isDragging, setIsDragging] = useState(false); const fileInputRef = useRef(null); const listRef = useRef(null); - const displayName = user?.username?.trim() || user?.email || ''; // Handle scroll to load more const handleScroll = useCallback(() => { @@ -308,29 +307,6 @@ export default function LeftSidebar({ )} - - {/* Bottom Area: User info (only shown when logged in) */} - {user && ( -
-
-
- - - -
-
-

{displayName}

-
- -
-
- )} ); diff --git a/src/components/layout/MarketingNavbar.tsx b/src/components/layout/MarketingNavbar.tsx index 5482c88..9d7e81f 100644 --- a/src/components/layout/MarketingNavbar.tsx +++ b/src/components/layout/MarketingNavbar.tsx @@ -111,14 +111,6 @@ export default function MarketingNavbar() { {userMenuOpen && (
-
- setUserMenuOpen(false)}> - - - - - {language === 'zh' ? '启动应用' : 'Launch App'} -