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