atmo.rsvp
1
fork

Configure Feed

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

add logout button to atmosphereconf.org profile page

+9 -1
+9 -1
src/routes/(app)/p/atmosphereconf.org/+page.svelte
··· 1 1 <script lang="ts"> 2 2 import { getProfileBlobUrl } from '$lib/contrail'; 3 + import { user, logout } from '$lib/atproto/auth.svelte'; 3 4 import UserProfile from '$lib/components/UserProfile.svelte'; 4 5 import { Button, ToggleGroup, ToggleGroupItem } from '@foxui/core'; 5 6 import DaySchedule from './DaySchedule.svelte'; ··· 18 19 19 20 let hostProfile = $derived(data.hostProfile); 20 21 let hostDid = $derived(hostProfile?.did ?? ''); 22 + let isOwnProfile = $derived(user.isLoggedIn && !!hostDid && user.did === hostDid); 21 23 let hostName = $derived( 22 24 hostProfile?.record?.displayName || hostProfile?.handle || 'ATmosphereConf' 23 25 ); ··· 114 116 ? getProfileBlobUrl(hostDid, hostProfile.record.avatar) 115 117 : undefined 116 118 }} 117 - /> 119 + > 120 + {#snippet actions()} 121 + {#if isOwnProfile} 122 + <Button onclick={logout} color="rose" variant="secondary">Logout</Button> 123 + {/if} 124 + {/snippet} 125 + </UserProfile> 118 126 119 127 <p class="text-base-500 dark:text-base-400 mb-2 text-sm"> 120 128 See all info on the <a