@@ -260,86 +260,32 @@ onMount(() => {
260260 <canvas bind:this ={canvas1 } class =" hidden" ></canvas >
261261 <canvas bind:this ={canvas2 } class =" hidden" ></canvas >
262262
263- <!-- Preview thumbnails -->
264- {#if $documentType === " passport" }
265- <!-- Passport only needs one preview -->
266- <div class =" flex w-full justify-center gap-3 mb-6" >
267- {#if $DocFront }
268- <div class =" relative h-[120px] w-full max-w-[200px] rounded-lg overflow-hidden border-2 border-purple-500 shadow-lg" >
269- <img
270- class =" h-full w-full object-cover"
271- src ={$DocFront }
272- alt =" Passport Photo Page"
273- />
274- <div class =" absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent px-2 py-1" >
275- <p class =" text-xs text-white font-medium" >Photo Page</p >
276- </div >
277- </div >
278- {:else }
279- <div
280- class =" flex h-[120px] w-full max-w-[200px] flex-col items-center justify-center rounded-lg border-2 border-dashed border-purple-500 transition-colors hover:border-purple-400"
281- >
282- <svg class =" w-8 h-8 text-purple-500 mb-2" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
283- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
284- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
285- </svg >
286- <p class =" text-sm text-gray-400 font-medium" >Photo Page</p >
287- </div >
288- {/if }
289- </div >
290- {:else }
291- <!-- Other documents need front and back -->
292- <div class =" flex w-full justify-center gap-3 mb-6" >
293- {#if $DocFront }
294- <div class =" relative h-[120px] w-full max-w-[177px] rounded-lg overflow-hidden border-2 border-purple-500 shadow-lg" >
295- <img
296- class =" h-full w-full object-cover"
297- src ={$DocFront }
298- alt =" Document Front"
299- />
300- <div class =" absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent px-2 py-1" >
301- <p class =" text-xs text-white font-medium" >Front</p >
302- </div >
303- </div >
304- {:else }
305- <div
306- class =" flex h-[120px] w-full max-w-[177px] flex-col items-center justify-center rounded-lg border-2 border-dashed border-purple-500 transition-colors hover:border-purple-400"
307- >
308- <svg class =" w-8 h-8 text-purple-500 mb-2" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
309- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
310- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
311- </svg >
312- <p class =" text-sm text-gray-400 font-medium" >Front</p >
313- </div >
314- {/if }
315-
316- {#if $DocBack }
317- <div class =" relative h-[120px] w-full max-w-[177px] rounded-lg overflow-hidden border-2 border-purple-500 shadow-lg" >
318- <img
319- class =" h-full w-full object-cover"
320- src ={$DocBack }
321- alt =" Document Back"
322- />
323- <div class =" absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent px-2 py-1" >
324- <p class =" text-xs text-white font-medium" >Back</p >
325- </div >
326- </div >
327- {:else }
328- <div
329- class =" flex h-[120px] w-full max-w-[177px] flex-col items-center justify-center rounded-lg border-2 border-dashed border-purple-500 transition-colors hover:border-purple-400"
330- >
331- <svg class =" w-8 h-8 text-purple-500 mb-2" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
332- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
333- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
334- </svg >
335- <p class =" text-sm text-gray-400 font-medium" >Back</p >
336- </div >
337- {/if }
338- </div >
339- {/if }
340-
341263 <div class =" text-center text-xs text-gray-400 mb-4 px-4" >
342- Accepted documents: Driver's License, Residence Permit, Passport, ID Card.
264+ <!-- Accepted documents: Driver's License, Residence Permit, Passport, ID Card. -->
265+ {#if $documentType === " passport" }
266+ Present your Passport's photo page
267+ {:else if $documentType === " id" }
268+ Present your ID Card's
269+ {#if ! $DocFront }
270+ front page
271+ {:else }
272+ back page
273+ {/if }
274+ {:else if $documentType === " dl" }
275+ Present your Driving License's
276+ {#if ! $DocFront }
277+ front page
278+ {:else }
279+ back page
280+ {/if }
281+ {:else if $documentType === " permit" }
282+ Present your Residence Permit's
283+ {#if ! $DocFront }
284+ front page
285+ {:else }
286+ back page
287+ {/if }
288+ {/if }
343289 </div >
344290
345291 {#if ($documentType !== " passport" && $image1Captured && $image2Captured ) || ($documentType === " passport" && $image1Captured )}
0 commit comments