your personal website on atproto - mirror blento.app

fix statusphere

Florian 771e2db3 ac61d3b1

+33 -33
+29 -31
src/lib/cards/StatusphereCard/EditStatusphereCard.svelte
··· 20 let handle = getHandleContext(); 21 22 onMount(async () => { 23 - console.log(record); 24 if (!record) { 25 record = (await CardDefinitionsByType[item.cardType]?.loadData?.([], { 26 did, 27 handle 28 })) as any; 29 - 30 - console.log(record); 31 32 data[item.cardType] = record; 33 } ··· 37 </script> 38 39 <div class="flex h-full w-full items-center justify-center p-4"> 40 - {#if record?.value?.status} 41 - <PopoverEmojiPicker 42 - bind:open={showPopover} 43 - onpicked={(emoji) => { 44 - record.value.status = emoji.unicode; 45 46 - item.cardData.hasUpdate = true; 47 - item.cardData.emoji = emoji.unicode; 48 49 - showPopover = false; 50 - }} 51 - > 52 - {#snippet child({ props })} 53 - {@const animated = emojiToNotoAnimatedWebp(record.value.status)} 54 - <button {...props} class="z-20 h-full max-h-40 w-full max-w-40"> 55 - {#if animated} 56 - <img 57 - src={animated} 58 - alt="" 59 - class="hover:bg-base-500/10 h-full max-h-40 w-full max-w-40 rounded-2xl object-contain" 60 - /> 61 - {:else} 62 - <div class="text-9xl"> 63 - {record.value.status} 64 - </div> 65 - {/if} 66 - </button> 67 - {/snippet} 68 - </PopoverEmojiPicker> 69 - {/if} 70 71 <div 72 class={cn(
··· 20 let handle = getHandleContext(); 21 22 onMount(async () => { 23 if (!record) { 24 record = (await CardDefinitionsByType[item.cardType]?.loadData?.([], { 25 did, 26 handle 27 })) as any; 28 29 data[item.cardType] = record; 30 } ··· 34 </script> 35 36 <div class="flex h-full w-full items-center justify-center p-4"> 37 + <PopoverEmojiPicker 38 + bind:open={showPopover} 39 + onpicked={(emoji) => { 40 + record.value.status = emoji.unicode; 41 42 + item.cardData.hasUpdate = true; 43 + item.cardData.emoji = emoji.unicode; 44 45 + showPopover = false; 46 + }} 47 + > 48 + {#snippet child({ props })} 49 + {@const animated = emojiToNotoAnimatedWebp(record?.value?.status)} 50 + 51 + <button {...props} class="z-20 h-full max-h-40 w-full max-w-40"> 52 + {#if animated} 53 + <img 54 + src={animated} 55 + alt="" 56 + class="hover:bg-base-500/10 h-full max-h-40 w-full max-w-40 rounded-2xl object-contain" 57 + /> 58 + {:else if record?.value?.status} 59 + <div class="text-9xl"> 60 + {record.value.status} 61 + </div> 62 + {:else} 63 + <div>Click here to set a status</div> 64 + {/if} 65 + </button> 66 + {/snippet} 67 + </PopoverEmojiPicker> 68 69 <div 70 class={cn(
+4 -2
src/lib/cards/StatusphereCard/StatusphereCard.svelte
··· 17 <div class="flex h-full w-full items-center justify-center p-4"> 18 {#if animated} 19 <img src={animated} alt="" class="h-full max-h-40 w-full object-contain" /> 20 - {:else} 21 <div class="text-9xl"> 22 - {record.value.status} 23 </div> 24 {/if} 25 26 {#if item.cardData.title}
··· 17 <div class="flex h-full w-full items-center justify-center p-4"> 18 {#if animated} 19 <img src={animated} alt="" class="h-full max-h-40 w-full object-contain" /> 20 + {:else if record?.value?.status} 21 <div class="text-9xl"> 22 + {record?.value?.status} 23 </div> 24 + {:else} 25 + No status yet 26 {/if} 27 28 {#if item.cardData.title}