global fix and add tauri app

This commit is contained in:
lendry
2026-06-26 13:56:54 +03:00
parent aa228d84eb
commit 3b05b7e4d4
50 changed files with 3947 additions and 80 deletions

32
tauri_app/src/App.tsx Normal file
View File

@@ -0,0 +1,32 @@
import { useState } from 'react';
import { MobileShell, type MobileTab } from './components/mobile-shell';
import { LoginScreen } from './features/auth/login-screen';
import { ChatsScreen } from './features/chat/chats-screen';
import { SecurityScreen } from './features/security/security-screen';
import { TotpScreen } from './features/totp/totp-screen';
import { MobileAuthProvider, useMobileAuth } from './lib/auth';
function AppContent() {
const { isAuthenticated } = useMobileAuth();
const [activeTab, setActiveTab] = useState<MobileTab>('security');
if (!isAuthenticated) {
return <LoginScreen />;
}
return (
<MobileShell activeTab={activeTab} onTabChange={setActiveTab}>
{activeTab === 'chats' ? <ChatsScreen /> : null}
{activeTab === 'totp' ? <TotpScreen /> : null}
{activeTab === 'security' ? <SecurityScreen /> : null}
</MobileShell>
);
}
export function App() {
return (
<MobileAuthProvider>
<AppContent />
</MobileAuthProvider>
);
}