an archive for weeekly's 🫧 messages

change first run dialog behaviour

Changed files
+11 -8
src
routes
(home)
+11 -8
src/routes/(home)/+page.svelte
··· 13 13 LOCAL_STORAGE_ITEMS.memberShortcuts.key, 14 14 LOCAL_STORAGE_ITEMS.memberShortcuts.default 15 15 ); 16 + 17 + let firstRunDialogIsOpen = $state(true); 18 + 16 19 let enabledApps = $derived( 17 20 APPS.filter((app) => enabledMembers.current.includes(app.label.toLowerCase())) 18 21 ); ··· 59 62 </div> 60 63 61 64 {#if firstRun.current} 62 - <Dialog open={true} escapeKeydownBehavior="ignore" interactOutsideBehavior="ignore" disableClose> 65 + <Dialog bind:open={firstRunDialogIsOpen} disableClose> 63 66 {#snippet title()} 64 67 Welcome to <span class="font-pacifico font-normal">rubble</span> 65 68 {/snippet} ··· 71 74 <p class="text-sm">Enjoy exploring!</p> 72 75 73 76 {#snippet buttonRight()} 74 - <a 75 - href="/settings" 76 - onclick={() => (firstRun.current = false)} 77 + <button 78 + onclick={() => { 79 + firstRun.current = false; 80 + firstRunDialogIsOpen = false; 81 + }} 77 82 class="font-fixel flex-1 rounded-sm rounded-br-2xl bg-amber-50 p-2 text-center text-sm hover:brightness-90" 78 83 > 79 - Go To Settings 80 - 81 - <ArrowRight class="inline" /> 82 - </a> 84 + Ok 85 + </button> 83 86 {/snippet} 84 87 </Dialog> 85 88 {/if}