no passkey gate
This commit is contained in:
@@ -130,7 +130,8 @@ export function DashboardLayout({ children, mobileFull }: DashboardLayoutProps)
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className={`flex-1 min-h-0 ${mobileFull ? 'pb-0 md:pb-20' : 'pb-16 md:pb-20'}`}>
|
<div className={`flex-1 min-h-0 ${mobileFull ? 'pb-0 md:pb-20' : 'pb-16 md:pb-20'}`}>
|
||||||
{isProduction && passkeyCount === 0 ? <PasskeyGate /> : children}
|
{/* {isProduction && passkeyCount === 0 ? <PasskeyGate /> : children} */}
|
||||||
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<Dock items={dockItems} className={mobileFull ? 'hidden md:flex' : 'flex'} />
|
<Dock items={dockItems} className={mobileFull ? 'hidden md:flex' : 'flex'} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Card } from '@/components/Card';
|
import { Card } from '@/components/Card';
|
||||||
import { useClient } from 'hooks/useClient';
|
import { useClient } from 'hooks/useClient';
|
||||||
import { DashboardLayout } from '../../Layout';
|
import { DashboardLayout } from '../../Layout';
|
||||||
|
import { EmbeddableChat, useClaude, useOpenCode } from 'plugins/Chat/client';
|
||||||
|
import { useVisibleClaudeModels, useVisibleOpenCodeModels } from '@/state/useModels';
|
||||||
|
|
||||||
type AppStatus = {
|
type AppStatus = {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -77,10 +79,12 @@ export const ResourceSettings = () => {
|
|||||||
return app.hasUpdate && !(app.manualUpdateCommand ?? app.manualInstallCommand);
|
return app.hasUpdate && !(app.manualUpdateCommand ?? app.manualInstallCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [provider, setProvider] = useState<'claude' | 'opencode'>('claude');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayout>
|
<DashboardLayout>
|
||||||
<div className="flex justify-center h-full px-4 py-8 overflow-y-auto">
|
<div className="flex h-full gap-4 px-4 py-8 overflow-hidden">
|
||||||
<Card className="w-full max-w-2xl h-fit p-6">
|
<Card className="w-full max-w-2xl h-fit p-6 overflow-y-auto">
|
||||||
<h2 className="text-lg font-bold text-duck-dark mb-1">Applications</h2>
|
<h2 className="text-lg font-bold text-duck-dark mb-1">Applications</h2>
|
||||||
<p className="text-sm text-duck-dark/60 mb-6">System tools and dependencies used by Officer.dev</p>
|
<p className="text-sm text-duck-dark/60 mb-6">System tools and dependencies used by Officer.dev</p>
|
||||||
|
|
||||||
@@ -163,7 +167,47 @@ export const ResourceSettings = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
<Card className="flex-1 min-w-0 flex flex-col overflow-hidden">
|
||||||
|
{provider === 'claude' ? (
|
||||||
|
<ClaudeChat key="claude" onProviderChange={setProvider} />
|
||||||
|
) : (
|
||||||
|
<OpenCodeChat key="opencode" onProviderChange={setProvider} />
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type ChatInnerProps = {
|
||||||
|
onProviderChange: (p: 'claude' | 'opencode') => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
const ClaudeChat = ({ onProviderChange }: ChatInnerProps) => {
|
||||||
|
const chat = useClaude(undefined, undefined, { replaceUrl: false });
|
||||||
|
const models = useVisibleClaudeModels();
|
||||||
|
return (
|
||||||
|
<EmbeddableChat
|
||||||
|
chat={chat}
|
||||||
|
provider="claude"
|
||||||
|
availableModels={models}
|
||||||
|
onProviderChange={onProviderChange}
|
||||||
|
className="flex-1 min-h-0"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const OpenCodeChat = ({ onProviderChange }: ChatInnerProps) => {
|
||||||
|
const chat = useOpenCode(undefined, undefined, { replaceUrl: false });
|
||||||
|
const models = useVisibleOpenCodeModels();
|
||||||
|
return (
|
||||||
|
<EmbeddableChat
|
||||||
|
chat={chat}
|
||||||
|
provider="opencode"
|
||||||
|
availableModels={models}
|
||||||
|
onProviderChange={onProviderChange}
|
||||||
|
className="flex-1 min-h-0"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user