Skip to content

Commit 1918161

Browse files
committed
add: mobile responsiveness, bolt terminal, deploy to netlify, open in stackblitz, download as zip, action changes
1 parent 15f9bf1 commit 1918161

37 files changed

+2182
-370
lines changed

app/components/auth/Auth.tsx

+34-17
Original file line numberDiff line numberDiff line change
@@ -79,36 +79,53 @@ export default function AuthComponent({ onClose }: AuthComponentProps = { onClos
7979
const handleOAuthSignIn = async (provider: 'github' | 'google' | 'apple') => {
8080
if (!supabase) return
8181

82-
const { error } = await supabase.auth.signInWithOAuth({
83-
provider,
84-
options: {
85-
redirectTo: `${window.location.origin}/auth/callback`,
86-
},
87-
})
82+
setLoading(true)
83+
setError(null)
8884

89-
if (error) {
90-
setError(error.message)
85+
try {
86+
const { error } = await supabase.auth.signInWithOAuth({
87+
provider,
88+
options: {
89+
redirectTo: `${window.location.origin}/auth/callback`,
90+
},
91+
})
92+
if (error) {
93+
setError(error.message)
94+
}
95+
} catch (err) {
96+
setError('An unexpected error occurred')
97+
} finally {
98+
setLoading(false)
9199
}
92100
}
93101

94102
if (!supabase) {
95103
return <div className="text-center text-gray-300">Loading...</div>
96104
}
97105

106+
if (loading) {
107+
return (
108+
<div className="w-full min-w-md max-w-md p-8 bg-bolt-elements-background-depth-2 rounded-lg shadow-lg flex flex-col items-center justify-center gap-4">
109+
<div className="i-svg-spinners:90-ring-with-bg w-8 h-8 text-bolt-elements-button-primary-background" />
110+
<p className="text-bolt-elements-textPrimary text-lg">Signing in...</p>
111+
</div>
112+
);
113+
}
114+
98115
return (
99-
<div className="w-full max-w-md p-8 bg-[#0E1117] rounded-lg shadow-lg">
116+
<div className="w-full min-w-md max-w-md p-8 bg-bolt-elements-background-depth-2 rounded-lg shadow-lg">
100117
<div className="flex mb-6">
101118
<button
102119
className={`flex-1 py-2 text-lg font-semibold transition-colors duration-300 bg-transparent ${
103-
activeTab === 'signin' ? 'text-blue-400 border-b-2 border-blue-400' : 'text-gray-400'
120+
activeTab === 'signin' ? 'text-bolt-elements-button-primary-background border-b-2 border-bolt-elements-button-primary-background' : 'text-gray-400'
104121
}`}
105122
onClick={() => setActiveTab('signin')}
106123
>
107124
Sign In
108125
</button>
109126
<button
110127
className={`flex-1 py-2 text-lg font-semibold transition-colors duration-300 bg-transparent ${
111-
activeTab === 'signup' ? 'text-blue-400 border-b-2 border-blue-400' : 'text-gray-400'
128+
activeTab === 'signup' ? 'text-bolt-elements-button-primary-background border-b-2 border-bolt-elements-button-primary-background' : 'text-gray-400'
112129
}`}
113130
onClick={() => setActiveTab('signup')}
114131
>
@@ -135,7 +152,7 @@ export default function AuthComponent({ onClose }: AuthComponentProps = { onClos
135152
id="email"
136153
value={email}
137154
onChange={(e) => setEmail(e.target.value)}
138-
className="w-full px-3 py-2 bg-[#1C2128] text-white border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400"
155+
className="w-full px-3 py-2 bg-bolt-elements-background-depth-3 text-white border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-bolt-elements-button-primary-background"
139156
required
140157
/>
141158
</div>
@@ -148,13 +165,13 @@ export default function AuthComponent({ onClose }: AuthComponentProps = { onClos
148165
id="password"
149166
value={password}
150167
onChange={(e) => setPassword(e.target.value)}
151-
className="w-full px-3 py-2 bg-[#1C2128] text-white border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400"
168+
className="w-full px-3 py-2 bg-bolt-elements-background-depth-3 text-white border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-bolt-elements-button-primary-background"
152169
required
153170
/>
154171
</div>
155172
<motion.button
156173
type="submit"
157-
className="w-full bg-blue-400 text-white py-2 rounded-md hover:bg-blue-500 transition-colors duration-300"
174+
className="w-full bg-bolt-elements-button-primary-background text-white py-2 rounded-md hover:bg-bolt-elements-button-primary-hover transition-colors duration-300"
158175
disabled={loading}
159176
whileHover={{ scale: 1.05 }}
160177
whileTap={{ scale: 0.95 }}
@@ -179,23 +196,23 @@ export default function AuthComponent({ onClose }: AuthComponentProps = { onClos
179196
<div className="flex justify-center space-x-4">
180197
<motion.button
181198
onClick={() => handleOAuthSignIn('github')}
182-
className="p-2 bg-[#1C2128] rounded-full hover:bg-[#2D3748] transition-colors duration-300"
199+
className="p-2 bg-bolt-elements-background-depth-3 rounded-full hover:bg-bolt-elements-button-primary-hover transition-colors duration-300"
183200
whileHover={{ scale: 1.1 }}
184201
whileTap={{ scale: 0.9 }}
185202
>
186203
<Github className="w-6 h-6 text-white" />
187204
</motion.button>
188205
<motion.button
189206
onClick={() => handleOAuthSignIn('google')}
190-
className="p-2 bg-[#1C2128] rounded-full hover:bg-[#2D3748] transition-colors duration-300"
207+
className="p-2 bg-bolt-elements-background-depth-3 rounded-full hover:bg-bolt-elements-button-primary-hover transition-colors duration-300"
191208
whileHover={{ scale: 1.1 }}
192209
whileTap={{ scale: 0.9 }}
193210
>
194211
<Mail className="w-6 h-6 text-white" />
195212
</motion.button>
196213
<motion.button
197214
onClick={() => handleOAuthSignIn('apple')}
198-
className="p-2 bg-[#1C2128] rounded-full hover:bg-[#2D3748] transition-colors duration-300"
215+
className="p-2 bg-bolt-elements-background-depth-3 rounded-full hover:bg-bolt-elements-button-primary-hover transition-colors duration-300"
199216
whileHover={{ scale: 1.1 }}
200217
whileTap={{ scale: 0.9 }}
201218
>

app/components/chat/Artifact.tsx

+12-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ const ActionList = memo(({ actions }: ActionListProps) => {
151151
<div className="flex items-center gap-1.5 text-sm">
152152
<div className={classNames('text-lg', getIconColor(action.status))}>
153153
{status === 'running' ? (
154-
<div className="i-svg-spinners:90-ring-with-bg"></div>
154+
<>
155+
{type !== 'start' ? (
156+
<div className="i-svg-spinners:90-ring-with-bg"></div>
157+
) : (
158+
<div className="i-ph:terminal text-[#2ba6ff]"></div>
159+
)}
160+
</>
155161
) : status === 'pending' ? (
156162
<div className="i-ph:circle-duotone"></div>
157163
) : status === 'complete' ? (
@@ -171,9 +177,13 @@ const ActionList = memo(({ actions }: ActionListProps) => {
171177
<div className="flex items-center w-full min-h-[28px]">
172178
<span className="flex-1">Run command</span>
173179
</div>
180+
) : type === 'start' ? (
181+
<div className="flex items-center w-full min-h-[28px]">
182+
<span className="flex-1">Start application</span>
183+
</div>
174184
) : null}
175185
</div>
176-
{type === 'shell' && (
186+
{(type === 'shell' || type === 'start') && (
177187
<ShellCodeBlock
178188
classsName={classNames('mt-1', {
179189
'mb-3.5': !isLast,

0 commit comments

Comments
 (0)