b302be30e3
Resolve verified V1 frontend feedback by improving channel workflows, auth behavior, API key interactions, user filtering, layout persistence, subscription quota handling, i18n text, pricing metadata, and stale frontend cache recovery. - Add a global frontend cache version cleanup to prevent old frontend localStorage from causing page errors after upgrades. - Fix channel copy refresh, model mapping input focus loss, create-channel fetch-model title state, upstream model update confirmation, and batch test toast behavior. - Respect password login settings and improve Turnstile, forgot-password, registration, and invite-link flows. - Make user role/status filtering server-side and preserve table page size in URLs. - Improve API key edit validation feedback and prefetch real keys for reliable copy actions. - Fix rankings access fail-open behavior, double scrollbars, subscription received amount conversion/display, token i18n wording, model deletion confirmation grammar, and Claude pricing context inference. - Add clearer Playground model/group loading errors. Validation: - bun run typecheck - bun run i18n:sync - gofmt on modified Go files - go test ./controller ./model -run '^$'
60 lines
2.1 KiB
TypeScript
Vendored
60 lines
2.1 KiB
TypeScript
Vendored
/*
|
|
Copyright (C) 2023-2026 QuantumNous
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
For commercial licensing, please contact support@quantumnous.com
|
|
*/
|
|
import { getCookie } from '@/lib/cookies'
|
|
import { cn } from '@/lib/utils'
|
|
import { LayoutProvider } from '@/context/layout-provider'
|
|
import { SearchProvider } from '@/context/search-provider'
|
|
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar'
|
|
import { AnimatedOutlet } from '@/components/page-transition'
|
|
import { SkipToMain } from '@/components/skip-to-main'
|
|
import { AppHeader } from './app-header'
|
|
import { AppSidebar } from './app-sidebar'
|
|
|
|
type AuthenticatedLayoutProps = {
|
|
children?: React.ReactNode
|
|
}
|
|
|
|
export function AuthenticatedLayout(props: AuthenticatedLayoutProps) {
|
|
const defaultOpen = getCookie('sidebar_state') !== 'false'
|
|
|
|
return (
|
|
<LayoutProvider>
|
|
<SearchProvider>
|
|
<SidebarProvider defaultOpen={defaultOpen} className='flex-col'>
|
|
<SkipToMain />
|
|
<AppHeader />
|
|
<div className='flex min-h-0 w-full flex-1'>
|
|
<AppSidebar />
|
|
<SidebarInset
|
|
className={cn(
|
|
'@container/content',
|
|
'h-[calc(100svh-var(--app-header-height,0px))]',
|
|
'min-h-0 overflow-hidden',
|
|
'peer-data-[variant=inset]:h-[calc(100svh-var(--app-header-height,0px)-(var(--spacing)*4))]'
|
|
)}
|
|
>
|
|
{props.children ?? <AnimatedOutlet />}
|
|
</SidebarInset>
|
|
</div>
|
|
</SidebarProvider>
|
|
</SearchProvider>
|
|
</LayoutProvider>
|
|
)
|
|
}
|