Spaces:
Running
Running
axeronis commited on
Commit ·
6e3a1f6
1
Parent(s): d8e601b
feat(ui): hide analytics and make AI Brain settings the default screen
Browse files
frontend/components/MobileNav.tsx
CHANGED
|
@@ -60,7 +60,7 @@ export function MobileHeader({ onOpen }: { onOpen?: () => void }) {
|
|
| 60 |
<div className="flex flex-col fixed top-0 left-0 right-0 z-[60] bg-[#0D0E18]/80 backdrop-blur-2xl backdrop-saturate-[1.8] border-b border-white/10 pt-[env(safe-area-inset-top,0px)]">
|
| 61 |
<div className="flex items-center justify-between px-4 h-16 text-white w-full">
|
| 62 |
{/* Left: Logo + Brand Name */}
|
| 63 |
-
<Link href="/
|
| 64 |
<div className="w-8 h-8 relative">
|
| 65 |
<img src="/logo-v2.png" alt="Logo" className="w-full h-full object-contain relative z-10" />
|
| 66 |
</div>
|
|
|
|
| 60 |
<div className="flex flex-col fixed top-0 left-0 right-0 z-[60] bg-[#0D0E18]/80 backdrop-blur-2xl backdrop-saturate-[1.8] border-b border-white/10 pt-[env(safe-area-inset-top,0px)]">
|
| 61 |
<div className="flex items-center justify-between px-4 h-16 text-white w-full">
|
| 62 |
{/* Left: Logo + Brand Name */}
|
| 63 |
+
<Link href="/settings/brain" className="flex items-center gap-3">
|
| 64 |
<div className="w-8 h-8 relative">
|
| 65 |
<img src="/logo-v2.png" alt="Logo" className="w-full h-full object-contain relative z-10" />
|
| 66 |
</div>
|
frontend/components/SecondaryNav.tsx
CHANGED
|
@@ -22,7 +22,7 @@ import { useAuth } from '@/contexts/AuthContext'
|
|
| 22 |
import { useRef, useEffect, useState } from 'react'
|
| 23 |
|
| 24 |
const navItems = [
|
| 25 |
-
{ href: '/dashboard', icon: LayoutDashboard, labelKey: 'nav.analytics', label: 'Аналитика', ownerOnly: true },
|
| 26 |
{ href: '/chats', icon: MessageSquare, labelKey: 'nav.chats', label: 'Чаты', ownerOnly: false },
|
| 27 |
{ href: '/appointments', icon: Calendar, labelKey: 'nav.appointments', label: 'Записи', ownerOnly: false },
|
| 28 |
// { href: '/demo-chat', icon: Bot, labelKey: 'nav.demo', label: 'Корректировка', ownerOnly: true, highlight: true }, // HIDDEN AS REQUESTED
|
|
|
|
| 22 |
import { useRef, useEffect, useState } from 'react'
|
| 23 |
|
| 24 |
const navItems = [
|
| 25 |
+
// { href: '/dashboard', icon: LayoutDashboard, labelKey: 'nav.analytics', label: 'Аналитика', ownerOnly: true },
|
| 26 |
{ href: '/chats', icon: MessageSquare, labelKey: 'nav.chats', label: 'Чаты', ownerOnly: false },
|
| 27 |
{ href: '/appointments', icon: Calendar, labelKey: 'nav.appointments', label: 'Записи', ownerOnly: false },
|
| 28 |
// { href: '/demo-chat', icon: Bot, labelKey: 'nav.demo', label: 'Корректировка', ownerOnly: true, highlight: true }, // HIDDEN AS REQUESTED
|
frontend/components/Sidebar.tsx
CHANGED
|
@@ -51,7 +51,7 @@ const itemVariants = {
|
|
| 51 |
// ============================================================================
|
| 52 |
|
| 53 |
const mainNavItems = [
|
| 54 |
-
{ href: '/dashboard', icon: LayoutDashboard, labelKey: 'nav.analytics', ownerOnly: true },
|
| 55 |
{ href: '/chats', icon: MessageSquare, labelKey: 'nav.chats', ownerOnly: false },
|
| 56 |
{ href: '/appointments', icon: Calendar, labelKey: 'nav.appointments', ownerOnly: false },
|
| 57 |
]
|
|
@@ -150,7 +150,7 @@ export function Sidebar() {
|
|
| 150 |
>
|
| 151 |
{/* Logo Section - Hidden on mobile, already in MobileHeader */}
|
| 152 |
<div className="p-6 relative z-50 hidden lg:block">
|
| 153 |
-
<Link href="/
|
| 154 |
<div className="w-8 h-8 flex items-center justify-center relative">
|
| 155 |
<img src="/logo-v2.png" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
|
| 156 |
</div>
|
|
|
|
| 51 |
// ============================================================================
|
| 52 |
|
| 53 |
const mainNavItems = [
|
| 54 |
+
// { href: '/dashboard', icon: LayoutDashboard, labelKey: 'nav.analytics', ownerOnly: true },
|
| 55 |
{ href: '/chats', icon: MessageSquare, labelKey: 'nav.chats', ownerOnly: false },
|
| 56 |
{ href: '/appointments', icon: Calendar, labelKey: 'nav.appointments', ownerOnly: false },
|
| 57 |
]
|
|
|
|
| 150 |
>
|
| 151 |
{/* Logo Section - Hidden on mobile, already in MobileHeader */}
|
| 152 |
<div className="p-6 relative z-50 hidden lg:block">
|
| 153 |
+
<Link href="/settings/brain" className="flex items-center gap-3 group">
|
| 154 |
<div className="w-8 h-8 flex items-center justify-center relative">
|
| 155 |
<img src="/logo-v2.png" alt="MicroFunnel Logo" className="w-full h-full object-contain" />
|
| 156 |
</div>
|
frontend/contexts/AuthContext.tsx
CHANGED
|
@@ -339,8 +339,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|
| 339 |
// Reset auth check flag to allow re-checking on next mount
|
| 340 |
setHasCheckedAuth(false)
|
| 341 |
|
| 342 |
-
// Redirect to
|
| 343 |
-
router.push('/
|
| 344 |
} catch (error) {
|
| 345 |
console.error('Login error:', error)
|
| 346 |
throw error
|
|
@@ -414,8 +414,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|
| 414 |
// Reset auth check flag to allow re-checking on next mount
|
| 415 |
setHasCheckedAuth(false)
|
| 416 |
|
| 417 |
-
// Redirect to
|
| 418 |
-
router.push('/
|
| 419 |
} catch (error) {
|
| 420 |
console.error('Registration error:', error)
|
| 421 |
throw error
|
|
@@ -448,7 +448,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|
| 448 |
setToken(data.access_token)
|
| 449 |
setUser(data.user)
|
| 450 |
setHasCheckedAuth(false)
|
| 451 |
-
router.push('/
|
| 452 |
} catch (error) {
|
| 453 |
console.error('Verification error:', error)
|
| 454 |
throw error
|
|
@@ -568,8 +568,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|
| 568 |
setToken(data.access_token)
|
| 569 |
setUser(data.user)
|
| 570 |
|
| 571 |
-
// Redirect to
|
| 572 |
-
router.push('/
|
| 573 |
} catch (error) {
|
| 574 |
console.error('Google auth error:', error)
|
| 575 |
throw error
|
|
|
|
| 339 |
// Reset auth check flag to allow re-checking on next mount
|
| 340 |
setHasCheckedAuth(false)
|
| 341 |
|
| 342 |
+
// Redirect to settings/brain
|
| 343 |
+
router.push('/settings/brain')
|
| 344 |
} catch (error) {
|
| 345 |
console.error('Login error:', error)
|
| 346 |
throw error
|
|
|
|
| 414 |
// Reset auth check flag to allow re-checking on next mount
|
| 415 |
setHasCheckedAuth(false)
|
| 416 |
|
| 417 |
+
// Redirect to settings/brain
|
| 418 |
+
router.push('/settings/brain')
|
| 419 |
} catch (error) {
|
| 420 |
console.error('Registration error:', error)
|
| 421 |
throw error
|
|
|
|
| 448 |
setToken(data.access_token)
|
| 449 |
setUser(data.user)
|
| 450 |
setHasCheckedAuth(false)
|
| 451 |
+
router.push('/settings/brain')
|
| 452 |
} catch (error) {
|
| 453 |
console.error('Verification error:', error)
|
| 454 |
throw error
|
|
|
|
| 568 |
setToken(data.access_token)
|
| 569 |
setUser(data.user)
|
| 570 |
|
| 571 |
+
// Redirect to settings/brain
|
| 572 |
+
router.push('/settings/brain')
|
| 573 |
} catch (error) {
|
| 574 |
console.error('Google auth error:', error)
|
| 575 |
throw error
|
frontend/next.config.ts
CHANGED
|
@@ -10,6 +10,15 @@ const nextConfig: NextConfig = {
|
|
| 10 |
},
|
| 11 |
]
|
| 12 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
};
|
| 14 |
|
| 15 |
export default nextConfig;
|
|
|
|
| 10 |
},
|
| 11 |
]
|
| 12 |
},
|
| 13 |
+
async redirects() {
|
| 14 |
+
return [
|
| 15 |
+
{
|
| 16 |
+
source: '/dashboard',
|
| 17 |
+
destination: '/settings/brain',
|
| 18 |
+
permanent: false,
|
| 19 |
+
},
|
| 20 |
+
]
|
| 21 |
+
},
|
| 22 |
};
|
| 23 |
|
| 24 |
export default nextConfig;
|