mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-03 07:57:22 +00:00
further optimization for small screens
This commit is contained in:
1 parent
47e3bf8fe5
commit
213eda9797
4 files changed
+55
-55
No files matched your search
@@ -24,72 +24,72 @@ export function AISettingsStep({ onNext, onPrevious, onSkip }: AISettingsStepPro
|
||||
const isValid = localSettings.apiKey.trim() && localSettings.baseUrl.trim() && localSettings.model.trim();
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="text-center space-y-2">
|
||||
<div className="flex justify-center mb-2">
|
||||
<Bot className="h-8 w-8 text-primary" />
|
||||
<div className="space-y-2 sm:space-y-4 mb-3 sm:mb-0">
|
||||
<div className="text-center space-y-1 sm:space-y-1.5">
|
||||
<div className="flex justify-center mb-0.5 sm:mb-1">
|
||||
<Bot className="h-5 w-5 sm:h-6 sm:w-6 text-primary" />
|
||||
</div>
|
||||
<h1 className="text-2xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent">
|
||||
<h1 className="text-base sm:text-lg md:text-xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent leading-tight">
|
||||
Configure AI Settings
|
||||
</h1>
|
||||
<p className="text-sm text-muted-foreground max-w-lg mx-auto">
|
||||
<p className="text-xs sm:text-sm text-muted-foreground max-w-md mx-auto px-2">
|
||||
Set up your AI provider to start building with AI assistance.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Card className="max-w-lg mx-auto">
|
||||
<CardHeader className="pb-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<Settings className="h-4 w-4 text-primary" />
|
||||
<CardTitle className="text-lg">AI Provider</CardTitle>
|
||||
<Card className="max-w-md sm:max-w-lg md:max-w-lg mx-auto">
|
||||
<CardHeader className="pb-2 sm:pb-3">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2">
|
||||
<Settings className="h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary" />
|
||||
<CardTitle className="text-base sm:text-lg">AI Provider</CardTitle>
|
||||
</div>
|
||||
<CardDescription className="text-xs">
|
||||
<CardDescription className="text-[10px] sm:text-xs">
|
||||
We recommend OpenRouter for easy setup
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="space-y-3">
|
||||
<CardContent className="space-y-2 sm:space-y-3">
|
||||
<div className="space-y-2 sm:space-y-3">
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="apiKey" className="text-sm">API Key *</Label>
|
||||
<Label htmlFor="apiKey" className="text-xs sm:text-sm">API Key *</Label>
|
||||
<Input
|
||||
id="apiKey"
|
||||
type="password"
|
||||
placeholder="sk-... or your-api-key"
|
||||
value={localSettings.apiKey}
|
||||
onChange={(e) => setLocalSettings({ ...localSettings, apiKey: e.target.value })}
|
||||
className="font-mono text-sm h-9"
|
||||
className="font-mono text-xs sm:text-sm h-8 sm:h-9"
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
<p className="text-[10px] sm:text-xs text-muted-foreground">
|
||||
Stored locally, never shared
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="baseUrl" className="text-sm">Base URL *</Label>
|
||||
<Label htmlFor="baseUrl" className="text-xs sm:text-sm">Base URL *</Label>
|
||||
<Input
|
||||
id="baseUrl"
|
||||
placeholder="https://openrouter.ai/api/v1"
|
||||
value={localSettings.baseUrl}
|
||||
onChange={(e) => setLocalSettings({ ...localSettings, baseUrl: e.target.value })}
|
||||
className="text-sm h-9"
|
||||
className="text-xs sm:text-sm h-8 sm:h-9"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="model" className="text-sm">Model *</Label>
|
||||
<Label htmlFor="model" className="text-xs sm:text-sm">Model *</Label>
|
||||
<Input
|
||||
id="model"
|
||||
placeholder="anthropic/claude-sonnet-4"
|
||||
value={localSettings.model}
|
||||
onChange={(e) => setLocalSettings({ ...localSettings, model: e.target.value })}
|
||||
className="text-sm h-9"
|
||||
className="text-xs sm:text-sm h-8 sm:h-9"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<div className="flex justify-center gap-3 pt-2">
|
||||
<div className="flex justify-center gap-2 sm:gap-3 pt-1 sm:pt-2">
|
||||
<Button
|
||||
onClick={onPrevious}
|
||||
variant="outline"
|
||||
@@ -115,7 +115,7 @@ export function AISettingsStep({ onNext, onPrevious, onSkip }: AISettingsStepPro
|
||||
onClick={onSkip}
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="text-muted-foreground text-xs h-7"
|
||||
className="text-muted-foreground text-[10px] sm:text-xs h-6 sm:h-7"
|
||||
>
|
||||
Skip for now
|
||||
</Button>
|
||||
|
||||
@@ -100,25 +100,25 @@ export function OnboardingDialog({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="max-w-4xl max-h-[85vh] overflow-y-auto p-0 w-[95vw] md:w-full">
|
||||
<div className="sticky top-0 bg-background border-b p-6 pb-4 z-10">
|
||||
<DialogContent className="max-w-lg w-[95vw] max-h-[90vh] overflow-y-auto p-0 sm:max-w-xl md:max-w-4xl">
|
||||
<div className="sticky top-0 bg-background border-b p-4 sm:p-5 pb-3 z-10">
|
||||
<DialogTitle className="sr-only">Getting Started Onboarding</DialogTitle>
|
||||
<DialogDescription className="sr-only">Complete the onboarding process to get started with Shakespeare</DialogDescription>
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-1.5">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-lg font-semibold">Getting Started</h2>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
Step {currentStep + 1} of {STEPS.length}
|
||||
<h2 className="text-base sm:text-lg font-semibold">Getting Started</h2>
|
||||
<span className="text-xs sm:text-sm text-muted-foreground">
|
||||
{currentStep + 1} / {STEPS.length}
|
||||
</span>
|
||||
</div>
|
||||
<div className="relative">
|
||||
<Progress value={progress} className="h-2" />
|
||||
<Progress value={progress} className="h-1.5" />
|
||||
</div>
|
||||
<div className="flex justify-between text-xs text-muted-foreground">
|
||||
<div className="flex justify-between text-[10px] sm:text-xs text-muted-foreground">
|
||||
{STEPS.map((step, index) => (
|
||||
<span
|
||||
key={step.id}
|
||||
className={index <= currentStep ? 'text-primary font-medium' : ''}
|
||||
className={`${index <= currentStep ? 'text-primary font-medium' : ''} truncate`}
|
||||
>
|
||||
{step.title}
|
||||
</span>
|
||||
@@ -127,7 +127,7 @@ export function OnboardingDialog({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-6 pt-4">
|
||||
<div className="px-2 sm:p-6">
|
||||
{renderStep()}
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
@@ -37,50 +37,50 @@ export function ProjectStep({ onPrevious, onComplete, onProjectCreated, initialP
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="text-center space-y-4">
|
||||
<div className="flex justify-center mb-2">
|
||||
<Sparkles className="h-8 w-8 text-primary" />
|
||||
<div className="space-y-3 sm:space-y-6 pb-4">
|
||||
<div className="text-center space-y-1 sm:space-y-4">
|
||||
<div className="flex justify-center mb-0.5 sm:mb-2">
|
||||
<Sparkles className="h-5 w-5 sm:h-8 sm:w-8 text-primary" />
|
||||
</div>
|
||||
<h1 className="text-3xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent">
|
||||
<h1 className="text-base sm:text-2xl md:text-3xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent leading-tight">
|
||||
Create Your First Project
|
||||
</h1>
|
||||
<p className="text-base text-muted-foreground max-w-2xl mx-auto">
|
||||
<p className="text-xs sm:text-base text-muted-foreground max-w-md sm:max-w-2xl mx-auto px-2">
|
||||
Our AI will help you create it step by step.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Card className="max-w-2xl mx-auto">
|
||||
<CardHeader>
|
||||
<div className="flex items-center gap-2">
|
||||
<Sparkles className="h-5 w-5 text-primary" />
|
||||
<CardTitle>Project Description</CardTitle>
|
||||
<Card className="max-w-md sm:max-w-2xl md:max-w-2xl mx-auto">
|
||||
<CardHeader className="pb-3 sm:pb-4">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2">
|
||||
<Sparkles className="h-4 w-4 sm:h-5 sm:w-5 text-primary" />
|
||||
<CardTitle className="text-base sm:text-lg">Project Description</CardTitle>
|
||||
</div>
|
||||
<CardDescription>
|
||||
<CardDescription className="text-xs sm:text-sm">
|
||||
Be as detailed as possible about what you want to build
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<CardContent className="space-y-3 sm:space-y-4">
|
||||
<Textarea
|
||||
placeholder="e.g., Create a farming equipment marketplace for local farmers to buy and sell tractors, tools, and supplies. Include user profiles, product listings with images, search functionality, and direct messaging between buyers and sellers..."
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
className="min-h-[125px] text-sm leading-relaxed"
|
||||
className="min-h-[175px] sm:min-h-[100px] sm:min-h-[125px] text-xs sm:text-sm leading-relaxed"
|
||||
disabled={isCreating}
|
||||
/>
|
||||
|
||||
<div className="space-y-2">
|
||||
<h3 className="font-medium text-sm">Example prompts:</h3>
|
||||
<ul className="text-xs text-muted-foreground space-y-1">
|
||||
<li>• "Build a social media platform for photographers to share their work and connect with clients"</li>
|
||||
<li>• "Create a blog platform with markdown support and Nostr-based comments"</li>
|
||||
<li>• "Design a marketplace for vintage clothing with categories, filters, and user ratings"</li>
|
||||
<div className="hidden sm:block space-y-1.5 sm:space-y-2">
|
||||
<h3 className="font-medium text-xs sm:text-sm">Example prompts:</h3>
|
||||
<ul className="text-[10px] sm:text-xs text-muted-foreground space-y-0.5 sm:space-y-1">
|
||||
<li>• "Build a social media platform for photographers"</li>
|
||||
<li>• "Create a blog with markdown and Nostr comments"</li>
|
||||
<li>• "Design a marketplace with categories and ratings"</li>
|
||||
</ul>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<div className="flex flex-col items-center gap-2 pt-4">
|
||||
<div className="flex flex-col items-center gap-2 pt-2 sm:pt-4">
|
||||
<Button
|
||||
onClick={handleCreateProject}
|
||||
disabled={!prompt.trim() || isCreating}
|
||||
|
||||
@@ -9,7 +9,7 @@ interface WelcomeStepProps {
|
||||
|
||||
export function WelcomeStep({ onNext, onSkip }: WelcomeStepProps) {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-6 p-4">
|
||||
<div className="text-center space-y-4">
|
||||
<div className="text-6xl mb-4">🎭</div>
|
||||
<h1 className="text-3xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent">
|
||||
|
||||
Reference in new issue
Block a user