your personal website on atproto - mirror blento.app
25
fork

Configure Feed

Select the types of activity you want to include in your feed.

some small improvements

Florian 273ecc64 568cd438

+35 -68
+2 -2
src/lib/cards/_base/BaseCard/BaseCard.svelte
··· 45 45 draggable={false} 46 46 class={[ 47 47 fillPage 48 - ? 'card group/card selection:bg-accent-600/50 focus-within:outline-accent-500 @container/card relative isolate z-0 h-full w-full outline-offset-2 transition-all duration-200 focus-within:outline-2' 49 - : 'card group/card selection:bg-accent-600/50 focus-within:outline-accent-500 @container/card absolute isolate z-0 rounded-3xl outline-offset-2 transition-all duration-200 focus-within:outline-2', 48 + ? 'card group/card selection:bg-accent-600/50 focus-within:outline-accent-500 @container/card relative isolate z-0 h-full w-full outline-offset-2 transition-[outline] duration-200 focus-within:outline-2' 49 + : 'card group/card selection:bg-accent-600/50 focus-within:outline-accent-500 @container/card absolute isolate z-0 rounded-3xl outline-offset-2 transition-[outline] duration-200 focus-within:outline-2', 50 50 !fillPage ? (color ? (colors[color] ?? colors.accent) : colors.base) : '', 51 51 color !== 'accent' && item.color !== 'base' && item.color !== 'transparent' ? color : '', 52 52 showOutline ? 'outline-2' : '',
+7 -15
src/lib/cards/core/MapCard/Map.svelte
··· 5 5 6 6 let { item = $bindable(), isEditing = false }: { item: Item; isEditing?: boolean } = $props(); 7 7 8 - let center = $state({ lng: parseFloat(item.cardData.lon), lat: parseFloat(item.cardData.lat) }); 8 + const center = { lng: parseFloat(item.cardData.lon), lat: parseFloat(item.cardData.lat) }; 9 9 let showAttribution = $state(false); 10 10 let map: maplibregl.Map | undefined = $state(); 11 11 12 - const fixedCenter = { lng: parseFloat(item.cardData.lon), lat: parseFloat(item.cardData.lat) }; 13 - 14 12 function handleZoom() { 15 - if (!isEditing && map) { 16 - map.setCenter(fixedCenter); 13 + if (map) { 14 + map.setCenter(center); 17 15 } 18 16 } 19 - 20 - $effect(() => { 21 - if (!isEditing && map) { 22 - map.getCanvas().style.touchAction = 'pan-x pan-y'; 23 - } 24 - }); 25 17 </script> 26 18 27 19 <div ··· 38 30 zoom={item.cardData.zoom} 39 31 {center} 40 32 attributionControl={false} 41 - dragPan={isEditing} 33 + dragPan={false} 42 34 dragRotate={false} 43 35 keyboard={false} 44 - touchZoomRotate={true} 45 - scrollZoom={true} 36 + touchZoomRotate={isEditing} 37 + scrollZoom={isEditing} 46 38 boxZoom={false} 47 39 pitchWithRotate={false} 48 40 touchPitch={false} ··· 50 42 > 51 43 <Projection type="globe" /> 52 44 53 - <Marker bind:lnglat={center}> 45 + <Marker lnglat={center}> 54 46 {#snippet content()} 55 47 <div class="from-accent-400 size-10 rounded-full bg-radial via-transparent p-3"> 56 48 <div class="bg-accent-500 size-4 rounded-full ring-2 ring-white"></div>
+1 -1
src/lib/cards/social/EventCard/EventCard.svelte
··· 91 91 92 92 let eventUrl = $derived(() => { 93 93 if (parsedUri) { 94 - return `https://blento.app/${parsedUri.repo}/events/${parsedUri.rkey}`; 94 + return `https://atmo.rsvp/p/${parsedUri.repo}/e/${parsedUri.rkey}`; 95 95 } 96 96 return '#'; 97 97 });
+22 -8
src/lib/cards/social/UpcomingEventsCard/UpcomingEventsCard.svelte
··· 1 1 <script lang="ts"> 2 2 import { onMount } from 'svelte'; 3 - import { Badge } from '@foxui/core'; 3 + import { Badge, Button, Modal } from '@foxui/core'; 4 4 import { getAdditionalUserData, getDidContext, getHandleContext } from '$lib/website/context'; 5 5 import type { ContentComponentProps } from '../../types'; 6 6 import { UpcomingEventsCardDefinition } from '.'; 7 7 import type { EventData } from '../EventCard'; 8 8 import { user } from '$lib/atproto'; 9 9 import { qrOverlay } from '$lib/components/qr/qrOverlay.svelte'; 10 - import * as TID from '@atcute/tid'; 10 + let showCreateModal = $state(false); 11 11 12 12 let { item }: ContentComponentProps = $props(); 13 13 ··· 143 143 /> 144 144 </svg> 145 145 </button> 146 - <a 147 - href="/{handle}/events/{TID.now()}/edit" 148 - target="_blank" 146 + <button 147 + onclick={() => (showCreateModal = true)} 149 148 title="Create new event" 150 - class="bg-base-100 hover:bg-base-200 dark:bg-base-800 dark:hover:bg-base-700 accent:bg-accent-400/30 accent:hover:bg-accent-400/50 text-base-700 dark:text-base-300 z-50 flex size-7 items-center justify-center rounded-lg transition-colors" 149 + class="bg-base-100 hover:bg-base-200 dark:bg-base-800 dark:hover:bg-base-700 accent:bg-accent-400/30 accent:hover:bg-accent-400/50 text-base-700 dark:text-base-300 z-50 flex size-7 cursor-pointer items-center justify-center rounded-lg transition-colors" 151 150 > 152 151 <svg 153 152 xmlns="http://www.w3.org/2000/svg" ··· 159 158 > 160 159 <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> 161 160 </svg> 162 - </a> 161 + </button> 163 162 </div> 164 163 {/if} 165 164 </div> ··· 170 169 <div class="flex flex-col gap-2"> 171 170 {#each events as event (event.rkey)} 172 171 <a 173 - href="https://blento.app/{did}/events/{event.rkey}" 172 + href="https://atmo.rsvp/p/{did}/e/{event.rkey}" 174 173 target="_blank" 175 174 class="hover:bg-base-100 dark:hover:bg-base-800 accent:hover:bg-accent-400/20 flex flex-col gap-1 rounded-lg p-2 transition-colors" 176 175 use:qrOverlay={{ context: { title: event.name } }} ··· 252 251 {/if} 253 252 </div> 254 253 </div> 254 + 255 + <Modal bind:open={showCreateModal}> 256 + <div class="flex flex-col gap-4"> 257 + <h3 class="text-lg font-semibold">Create Event</h3> 258 + <p class="text-base-600 dark:text-base-400 text-sm"> 259 + Create events on atmo.rsvp, these events will show up here (might take a few minutes). 260 + </p> 261 + <div class="flex justify-end gap-2"> 262 + <Button variant="ghost" onclick={() => (showCreateModal = false)}>Cancel</Button> 263 + <Button href="https://atmo.rsvp" target="_blank" onclick={() => (showCreateModal = false)}> 264 + Go to atmo.rsvp 265 + </Button> 266 + </div> 267 + </div> 268 + </Modal>
+1 -1
src/lib/cards/social/UpcomingRsvpsCard/UpcomingRsvpsCard.svelte
··· 85 85 <div class="flex flex-col gap-2"> 86 86 {#each rsvps as rsvp, i (`${rsvp.eventUri}-${i}`)} 87 87 <a 88 - href="https://blento.app/{rsvp.hostDid}/events/{rsvp.rkey}" 88 + href="https://atmo.rsvp/p/{rsvp.hostDid}/e/{rsvp.rkey}" 89 89 target="_blank" 90 90 class="hover:bg-base-100 dark:hover:bg-base-800 accent:hover:bg-accent-400/20 flex flex-col gap-1 rounded-lg p-2 transition-colors" 91 91 use:qrOverlay={{ context: { title: rsvp.event.name } }}
+1 -31
src/routes/[[actor=actor]]/events/+page.svelte
··· 1 1 <script lang="ts"> 2 2 import type { EventData } from '$lib/cards/social/EventCard'; 3 3 import { getCDNImageBlobUrl } from '$lib/atproto'; 4 - import { user } from '$lib/atproto/auth.svelte'; 5 - import { Avatar as FoxAvatar, Badge, Button, toast } from '@foxui/core'; 6 - import { page } from '$app/state'; 4 + import { Avatar as FoxAvatar, Badge, Button } from '@foxui/core'; 7 5 import Avatar from 'svelte-boring-avatars'; 8 - import * as TID from '@atcute/tid'; 9 - import { goto } from '$app/navigation'; 10 - 11 6 let { data } = $props(); 12 7 13 8 let events: (EventData & { rkey: string })[] = $derived(data.events); ··· 78 73 return { url, alt: media.alt || event.name }; 79 74 } 80 75 81 - let isOwner = $derived(user.isLoggedIn && user.did === did); 82 - 83 76 let showPast: boolean = $state(false); 84 77 let now = $derived(new Date()); 85 78 let filteredEvents = $derived( ··· 121 114 <span class="text-base-900 dark:text-base-100 text-sm font-medium">{hostName}</span> 122 115 </a> 123 116 </div> 124 - </div> 125 - <div class="flex flex-col items-end gap-2"> 126 - {#if isOwner} 127 - <Button 128 - variant="primary" 129 - onclick={() => { 130 - const rkey = TID.now(); 131 - const handle = 132 - user.profile?.handle && user.profile.handle !== 'handle.invalid' 133 - ? user.profile.handle 134 - : user.did; 135 - goto(`/${handle}/events/${rkey}/edit`); 136 - }}>New event</Button 137 - > 138 - {/if} 139 - <Button 140 - variant="secondary" 141 - onclick={async () => { 142 - const calendarUrl = `${page.url.origin}${page.url.pathname.replace(/\/$/, '')}/calendar`; 143 - await navigator.clipboard.writeText(calendarUrl); 144 - toast.success('Subscription link copied to clipboard'); 145 - }}>Subscribe</Button 146 - > 147 117 </div> 148 118 </div> 149 119
+1 -10
src/routes/[[actor=actor]]/rsvp/+page.svelte
··· 1 1 <script lang="ts"> 2 2 import type { EventData } from '$lib/cards/social/EventCard'; 3 3 import { getCDNImageBlobUrl } from '$lib/atproto'; 4 - import { Avatar as FoxAvatar, Badge, Button, toast } from '@foxui/core'; 5 - import { page } from '$app/state'; 4 + import { Avatar as FoxAvatar, Badge } from '@foxui/core'; 6 5 import Avatar from 'svelte-boring-avatars'; 7 6 import type { CachedProfile } from '$lib/cache'; 8 7 ··· 106 105 <span class="text-base-900 dark:text-base-100 text-sm font-medium">{userName}</span> 107 106 </div> 108 107 </div> 109 - <Button 110 - variant="secondary" 111 - onclick={async () => { 112 - const calendarUrl = `${page.url.origin}${page.url.pathname.replace(/\/$/, '')}/calendar`; 113 - await navigator.clipboard.writeText(calendarUrl); 114 - toast.success('Subscription link copied to clipboard'); 115 - }}>Subscribe</Button 116 - > 117 108 </div> 118 109 119 110 <!-- Toggle -->