refactor(leads): combine QR and Search buttons into a single toggle

- Simplified Tab 2 interface by replacing segmented control with a single toggle button.
- Updated button labels and icons to indicate the available switch action.
This commit is contained in:
Scott Idem
2026-02-07 18:09:29 -05:00
parent 677571dde2
commit aa5c795287

View File

@@ -30,25 +30,20 @@
</script> </script>
<div class="ae-tab-add flex flex-col items-center space-y-6 w-full mx-auto"> <div class="ae-tab-add flex flex-col items-center space-y-6 w-full mx-auto">
<!-- Mode Toggle - Stable Width --> <!-- Mode Toggle - Combined Button -->
<div class="flex p-1 bg-surface-200-800 rounded-xl w-full max-w-md shadow-inner"> <div class="flex justify-center w-full">
<button <button
type="button" type="button"
class="flex-1 btn btn-sm py-3 flex items-center justify-center gap-2 rounded-lg transition-all duration-200" class="btn btn-sm variant-filled-secondary font-bold shadow-md px-6 py-3 flex items-center gap-2 transition-all duration-200"
class:preset-filled-primary={mode === 'qr'} onclick={() => set_mode(mode === 'qr' ? 'search' : 'qr')}
onclick={() => set_mode('qr')}
> >
<QrCode size="1.2em" /> {#if mode === 'qr'}
<span class="font-bold">Scan QR</span> <Search size="1.2em" />
</button> <span>Switch to Manual Search</span>
<button {:else}
type="button" <QrCode size="1.2em" />
class="flex-1 btn btn-sm py-3 flex items-center justify-center gap-2 rounded-lg transition-all duration-200" <span>Switch to QR Scan</span>
class:preset-filled-primary={mode === 'search'} {/if}
onclick={() => set_mode('search')}
>
<Search size="1.2em" />
<span class="font-bold">Search</span>
</button> </button>
</div> </div>