your personal website on atproto - mirror blento.app

fix: login error when pressing enter #131

pdewey.com 95904236 4feffd02

verified
+6 -4
+5 -2
src/lib/atproto/UI/HandleInput.svelte
··· 38 (val) => { 39 const profile = results.find((v) => v.handle === val); 40 if (profile) onselected?.(profile); 41 - 42 - value = val; 43 } 44 } 45 bind:open={ ··· 56 oninput={(e) => { 57 value = e.currentTarget.value; 58 search(e.currentTarget.value); 59 }} 60 class="focus-within:outline-accent-600 dark:focus-within:outline-accent-500 dark:placeholder:text-base-400 w-full touch-none rounded-full border-0 bg-white ring-0 outline-1 -outline-offset-1 outline-gray-300 focus-within:outline-2 focus-within:-outline-offset-2 dark:bg-white/5 dark:outline-white/10" 61 placeholder="handle"
··· 38 (val) => { 39 const profile = results.find((v) => v.handle === val); 40 if (profile) onselected?.(profile); 41 + // Only update if val has content - prevents Combobox from clearing on Enter 42 + if (val) value = val; 43 } 44 } 45 bind:open={ ··· 56 oninput={(e) => { 57 value = e.currentTarget.value; 58 search(e.currentTarget.value); 59 + }} 60 + onkeydown={(e) => { 61 + if (e.key === 'Enter') e.currentTarget.form?.requestSubmit(); 62 }} 63 class="focus-within:outline-accent-600 dark:focus-within:outline-accent-500 dark:placeholder:text-base-400 w-full touch-none rounded-full border-0 bg-white ring-0 outline-1 -outline-offset-1 outline-gray-300 focus-within:outline-2 focus-within:-outline-offset-2 dark:bg-white/5 dark:outline-white/10" 64 placeholder="handle"
+1 -2
src/routes/(auth)/oauth/callback/+page.svelte
··· 12 goto('/' + getHandleOrDid(user.profile) + '/edit', {}); 13 } 14 15 - if(!user.isInitializing && !startedErrorTimer) { 16 startedErrorTimer = true; 17 18 setTimeout(() => { ··· 30 >There was an error signing you in, please go back to the 31 <a class="text-accent-600 dark:text-accent-400" href="/">homepage</a> 32 and try again. 33 - 34 </span> 35 </div> 36 {/if}
··· 12 goto('/' + getHandleOrDid(user.profile) + '/edit', {}); 13 } 14 15 + if (!user.isInitializing && !startedErrorTimer) { 16 startedErrorTimer = true; 17 18 setTimeout(() => { ··· 30 >There was an error signing you in, please go back to the 31 <a class="text-accent-600 dark:text-accent-400" href="/">homepage</a> 32 and try again. 33 </span> 34 </div> 35 {/if}