diff --git a/src/components/wizard/ReviewStep.tsx b/src/components/wizard/ReviewStep.tsx
index 6ee9a0b..ba92c7d 100644
--- a/src/components/wizard/ReviewStep.tsx
+++ b/src/components/wizard/ReviewStep.tsx
@@ -15,7 +15,7 @@ import { downloadZip } from '../../utils/downloadZip';
const PLACEHOLDER = '# Fill in the wizard steps to generate your rclone.conf';
export function ReviewStep() {
- const { state } = useWizard();
+ const { state, dispatch } = useWizard();
const [acknowledged, setAcknowledged] = useState(false);
// CONF-02: live preview — updates on every state change
@@ -51,17 +51,22 @@ export function ReviewStep() {
}
}, [state]);
- // DOWN-05: ZIP bundle — always include all 4 files
+ const showIntune = state.deployment.scriptTargets.includes('intune');
+ const showRmm = state.deployment.scriptTargets.includes('rmm');
+
+ // DOWN-05: ZIP bundle — filtered by scriptTargets (TECH-01)
async function handleDownloadZip() {
- await downloadZip(
- [
- { name: 'rclone.conf', content: rcloneConf },
- { name: 'intune-install.ps1', content: intuneInstall },
- { name: 'intune-detection.ps1', content: intuneDetection },
- { name: 'rmm-script.ps1', content: rmmScript },
- ],
- 'rclone-deployment.zip'
- );
+ const files: { name: string; content: string }[] = [
+ { name: 'rclone.conf', content: rcloneConf },
+ ];
+ if (showIntune) {
+ files.push({ name: 'intune-install.ps1', content: intuneInstall });
+ files.push({ name: 'intune-detection.ps1', content: intuneDetection });
+ }
+ if (showRmm) {
+ files.push({ name: 'rmm-script.ps1', content: rmmScript });
+ }
+ await downloadZip(files, 'rclone-deployment.zip');
}
return (
@@ -93,24 +98,41 @@ export function ReviewStep() {
filename="rclone.conf"
disabled={!acknowledged}
/>
-