diff --git a/src/lib/components/wizard/StepColumnMap.svelte b/src/lib/components/wizard/StepColumnMap.svelte
index d890780..d50e8bc 100644
--- a/src/lib/components/wizard/StepColumnMap.svelte
+++ b/src/lib/components/wizard/StepColumnMap.svelte
@@ -2,6 +2,7 @@
import { selectedSheet, columnMapping, rawSheetData, currentStep } from '$lib/stores';
import { getSheetNames, getSheetData } from '$lib/google';
import { onMount } from 'svelte';
+ import Navigator from './subcomponents/Navigator.svelte';
// Type definitions for better TypeScript support
interface ColumnMappingType {
@@ -444,8 +445,6 @@
} catch (err) {
console.error('Failed to save column mapping to localStorage:', err);
}
-
- currentStep.set(4); // Move to next step
}
async function handleShowEditor() {
@@ -754,20 +753,12 @@
{/if}
-
- currentStep.set(2)}
- class="rounded-lg bg-gray-200 px-4 py-2 font-medium text-gray-700 hover:bg-gray-300"
- >
- ← Back to Sheet Selection
-
-
-
- {mappingComplete ? 'Continue →' : 'Select a column mapping'}
-
-
+
diff --git a/src/lib/components/wizard/StepGallery.svelte b/src/lib/components/wizard/StepGallery.svelte
index cd03d31..628dfc0 100644
--- a/src/lib/components/wizard/StepGallery.svelte
+++ b/src/lib/components/wizard/StepGallery.svelte
@@ -1,506 +1,510 @@
-
-
-
- Review & Crop Photos
-
-
-
- Photos are automatically cropped using face detection. Click the pen icon to manually adjust the crop area.
-
-
+
+
Review & Crop Photos
-
- {#if isProcessing}
-
-
-
-
-
- Processing photos...
-
-
-
- {processedCount} / {totalCount}
-
-
-
- {#if totalCount > 0}
-
- {/if}
-
- {/if}
+
+ Photos are automatically cropped using face detection. Click the pen icon to manually adjust
+ the crop area.
+
+
-
- {#if !isProcessing && photos.length > 0}
-
-
Processing Summary
-
-
-
-
{photos.length}
-
Total Photos
-
-
-
-
- {photos.filter(p => p.status === 'success').length}
-
-
Loaded
-
-
-
-
- {photos.filter(p => p.faceDetectionStatus === 'completed').length}
-
-
Auto-cropped
-
-
-
-
- {photos.filter(p => p.cropData).length}
-
-
Ready
-
-
-
-
- {photos.filter(p => p.status === 'error').length}
-
-
Failed
-
-
+
+ {#if isProcessing}
+
+
+
+
+
Processing photos...
+
+
+ {processedCount} / {totalCount}
+
+
- {#if photos.filter(p => p.status === 'error').length > 0}
-
-
- Note: Cards will only be generated for photos that load successfully.
-
-
- {/if}
-
- {#if !canProceed() && photos.filter(p => p.status === 'success').length > 0}
-
-
- Tip: All photos need to be cropped before proceeding. Face detection runs automatically.
-
-
- {/if}
-
- {/if}
+ {#if totalCount > 0}
+
+ {/if}
+
+ {/if}
-
-
- {#if photos.length === 0 && !isProcessing}
-
-
-
-
-
No photos found
-
- Go back to check your column mapping and selected rows.
-
-
- {:else}
-
- {#each photos as photo, index}
-
handleCropUpdate(index, e)}
- onRetry={() => retryPhoto(index)}
- />
- {/each}
-
- {/if}
-
+
+ {#if !isProcessing && photos.length > 0}
+
+
Processing Summary
-
-
- currentStep.set(4)}
- class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg font-medium hover:bg-gray-300"
- >
- ← Back to Row Filter
-
-
- currentStep.set(6)}
- disabled={!canProceed()}
- class="px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed"
- >
- {canProceed()
- ? `Generate ${photos.filter(p => p.status === 'success' && p.cropData).length} Cards →`
- : 'Waiting for photos to load and crop'}
-
-
-
+
+
+
{photos.length}
+
Total Photos
+
+
+
+
+ {photos.filter((p) => p.status === 'success').length}
+
+
Loaded
+
+
+
+
+ {photos.filter((p) => p.faceDetectionStatus === 'completed').length}
+
+
Auto-cropped
+
+
+
+
+ {photos.filter((p) => p.cropData).length}
+
+
Ready
+
+
+
+
+ {photos.filter((p) => p.status === 'error').length}
+
+
Failed
+
+
+
+ {#if photos.filter((p) => p.status === 'error').length > 0}
+
+
+ Note: Cards will only be generated for photos that load successfully.
+
+
+ {/if}
+
+ {#if !canProceed() && photos.filter((p) => p.status === 'success').length > 0}
+
+
+ Tip: All photos need to be cropped before proceeding. Face detection runs
+ automatically.
+
+
+ {/if}
+
+ {/if}
+
+
+
+ {#if photos.length === 0 && !isProcessing}
+
+
+
+
+
No photos found
+
+ Go back to check your column mapping and selected rows.
+
+
+ {:else}
+
+ {#each photos as photo, index}
+
handleCropUpdate(index, e)}
+ onRetry={() => retryPhoto(index)}
+ />
+ {/each}
+
+ {/if}
+
+
+
+
p.status === 'success' && p.cropData).length} Cards`}
+ />
-
diff --git a/src/lib/components/wizard/StepGalleryNavigation.svelte b/src/lib/components/wizard/StepGalleryNavigation.svelte
new file mode 100644
index 0000000..37de2c1
--- /dev/null
+++ b/src/lib/components/wizard/StepGalleryNavigation.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+ ← Back to Row Filter
+
+
+
+ {canProceed()
+ ? `Generate ${photos.filter(p => p.status === 'success' && p.cropData).length} Cards →`
+ : 'Waiting for photos to load and crop'}
+
+
diff --git a/src/lib/components/wizard/StepRowFilter.svelte b/src/lib/components/wizard/StepRowFilter.svelte
index 8681423..e1a5215 100644
--- a/src/lib/components/wizard/StepRowFilter.svelte
+++ b/src/lib/components/wizard/StepRowFilter.svelte
@@ -7,7 +7,7 @@
currentStep,
sheetData
} from '$lib/stores';
- import type { RowData } from '$lib/stores';
+ import Navigator from './subcomponents/Navigator.svelte';
import { onMount } from 'svelte';
import { getSheetNames, getSheetData } from '$lib/google';
@@ -213,9 +213,6 @@
// Store the filtered data
filteredSheetData.set(selectedData);
-
- // Move to next step
- currentStep.set(5);
}
$: selectedValidCount = Array.from(selectedRows).filter((rowIndex) => {
@@ -496,22 +493,13 @@
{/if}
-
-
- currentStep.set(3)}
- class="rounded-lg bg-gray-200 px-4 py-2 font-medium text-gray-700 hover:bg-gray-300"
- >
- ← Back to Colum Selection
-
-
- {canProceed
- ? `Continue with ${selectedValidCount} ${selectedValidCount === 1 ? 'row' : 'rows'} →`
- : 'Select rows to continue'}
-
-
+
+
diff --git a/src/lib/components/wizard/StepSheetSearch.svelte b/src/lib/components/wizard/StepSheetSearch.svelte
index 4cb5bb8..d44fc73 100644
--- a/src/lib/components/wizard/StepSheetSearch.svelte
+++ b/src/lib/components/wizard/StepSheetSearch.svelte
@@ -2,6 +2,7 @@
import { availableSheets, selectedSheet, currentStep } from '$lib/stores';
import { searchSheets } from '$lib/google';
import { onMount } from 'svelte';
+ import Navigator from './subcomponents/Navigator.svelte';
let searchQuery = $state('');
let isLoading = $state(false);
@@ -66,11 +67,6 @@
}
let canProceed = $derived($selectedSheet !== null);
-
- function handleContinue() {
- if (!canProceed) return;
- currentStep.set(3); // Move to the column mapping step
- }
@@ -262,20 +258,11 @@
{/if}
-
- currentStep.set(1)}
- class="rounded-lg bg-gray-200 px-4 py-2 font-medium text-gray-700 hover:bg-gray-300"
- >
- ← Back to Auth
-
-
-
- {canProceed ? 'Continue →' : 'Select a sheet to continue'}
-
-
+
diff --git a/src/lib/components/wizard/subcomponents/Navigator.svelte b/src/lib/components/wizard/subcomponents/Navigator.svelte
new file mode 100644
index 0000000..05fbf38
--- /dev/null
+++ b/src/lib/components/wizard/subcomponents/Navigator.svelte
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+ {textBack}
+
+
+
+ {canProceed ? textForwardEnabled : textForwardDisabled}
+
+
+
+
+
diff --git a/src/lib/components/PhotoCard.svelte b/src/lib/components/wizard/subcomponents/PhotoCard.svelte
similarity index 100%
rename from src/lib/components/PhotoCard.svelte
rename to src/lib/components/wizard/subcomponents/PhotoCard.svelte
diff --git a/src/lib/components/PhotoCrop.svelte b/src/lib/components/wizard/subcomponents/PhotoCrop.svelte
similarity index 100%
rename from src/lib/components/PhotoCrop.svelte
rename to src/lib/components/wizard/subcomponents/PhotoCrop.svelte