feat(10-01): add IntroSection and showIntro gate to App.tsx

- Add useState import to WizardShell
- Add showIntro local state (default true) — no persistence, resets on reload
- Add IntroSection component with action-first copy and Get Started CTA
- Copy mentions Azure Blob, S3, OneDrive, and 4 more backends
- Explains rclone.conf + deployment script generation
- Uses MD3_BTN_FILLED for CTA, MD3 tokens throughout
- When showIntro false, renders existing StepIndicator + step content unchanged
This commit is contained in:
2026-04-01 12:48:53 +02:00
parent 3c9c5fd7d8
commit c1d1633816
+30
View File
@@ -2,6 +2,7 @@
// Step router — renders the correct step component based on currentStep. // Step router — renders the correct step component based on currentStep.
// StepIndicator renders above each step as persistent breadcrumb navigation. // StepIndicator renders above each step as persistent breadcrumb navigation.
import { useState } from 'react';
import { useWizard } from './store/context'; import { useWizard } from './store/context';
import { WizardProvider } from './store/context'; import { WizardProvider } from './store/context';
import { ThemeToggle } from './components/ui/ThemeToggle'; import { ThemeToggle } from './components/ui/ThemeToggle';
@@ -10,9 +11,32 @@ import { BackendSelectionStep } from './components/wizard/BackendSelectionStep';
import { RemoteConfigStep } from './components/wizard/RemoteConfigStep'; import { RemoteConfigStep } from './components/wizard/RemoteConfigStep';
import { DeploymentStep } from './components/wizard/DeploymentStep'; import { DeploymentStep } from './components/wizard/DeploymentStep';
import { ReviewStep } from './components/wizard/ReviewStep'; import { ReviewStep } from './components/wizard/ReviewStep';
import { MD3_BTN_FILLED } from './styles/md3-buttons';
function IntroSection({ onStart }: { onStart: () => void }) {
return (
<div className="flex flex-col items-center text-center py-16 px-4">
<h2 className="text-2xl font-bold text-on-surface mb-4">
Go from zero to a deployable rclone setup in minutes
</h2>
<p className="text-base text-on-surface-variant max-w-lg mb-3">
Ready2Blob walks you through configuring rclone for Azure Blob, S3, OneDrive, and 4 more
cloud backends no syntax knowledge required.
</p>
<p className="text-base text-on-surface-variant max-w-lg mb-8">
The wizard generates a ready-to-use <code className="font-mono text-sm">rclone.conf</code>{' '}
and deployment scripts (Intune / RMM) you can download and run immediately.
</p>
<button type="button" className={MD3_BTN_FILLED} onClick={onStart}>
Get Started
</button>
</div>
);
}
function WizardShell() { function WizardShell() {
const { state } = useWizard(); const { state } = useWizard();
const [showIntro, setShowIntro] = useState(true);
const steps = [ const steps = [
<BackendSelectionStep key="backend" />, <BackendSelectionStep key="backend" />,
@@ -33,10 +57,16 @@ function WizardShell() {
<h1 className="text-3xl font-bold text-on-surface">Ready2Blob</h1> <h1 className="text-3xl font-bold text-on-surface">Ready2Blob</h1>
<ThemeToggle /> <ThemeToggle />
</div> </div>
{showIntro ? (
<IntroSection onStart={() => setShowIntro(false)} />
) : (
<>
<StepIndicator /> <StepIndicator />
<div className="mt-8"> <div className="mt-8">
{CurrentStep} {CurrentStep}
</div> </div>
</>
)}
</div> </div>
</div> </div>
); );