feat(workshop): simplify button visibility and update user message.

This commit is contained in:
shay
2026-04-21 14:46:46 -04:00
parent 118c8b7cc4
commit a4ca81eab9
@@ -370,14 +370,12 @@ export function WorkshopScreen({
<div className="text-sm font-semibold text-gray-800 mb-4">{username}</div> <div className="text-sm font-semibold text-gray-800 mb-4">{username}</div>
{canEdit && (
<button <button
onClick={onGenerate} onClick={onGenerate}
className="w-full py-3 rounded-xl bg-gray-800 text-white text-sm font-medium hover:bg-gray-700 transition-colors mb-6" className="w-full py-3 rounded-xl bg-gray-800 text-white text-sm font-medium hover:bg-gray-700 transition-colors mb-6"
> >
Generate → Generate →
</button> </button>
)}
{fetchError && ( {fetchError && (
<div className="flex items-center gap-1.5 text-[10px] text-red-500 mb-6"> <div className="flex items-center gap-1.5 text-[10px] text-red-500 mb-6">
@@ -389,14 +387,11 @@ export function WorkshopScreen({
{!canEdit && ( {!canEdit && (
<div className="banner"> <div className="banner">
{me.login {me.login
? `Signed in as ${me.login}. You can only edit your own widget.` ? `Signed in as ${me.login}. Changes here produce a shareable link with query params. Only ${username} can save them permanently.`
: <a href={signInUrl()}>Sign in with GitHub to edit your widget</a>} : <><a href={signInUrl()}>Sign in with GitHub</a> to save these settings permanently. Otherwise, Generate gives you a drop-in URL with query params.</>}
</div> </div>
)} )}
{/* Theme, Widgets, Achievements editor, Generate — owner-only */}
{canEdit && (
<>
{/* Theme */} {/* Theme */}
<div className="mb-5"> <div className="mb-5">
<div className="text-[10px] uppercase tracking-wider text-gray-400 font-medium mb-3">Theme</div> <div className="text-[10px] uppercase tracking-wider text-gray-400 font-medium mb-3">Theme</div>
@@ -747,9 +742,6 @@ export function WorkshopScreen({
})} })}
</div> </div>
</div> </div>
</>
)}
</div> </div>
{/* Right preview area */} {/* Right preview area */}