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

Configure Feed

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

small fixes

Florian 96324db6 6de7eb10

+59 -18
+42
src/app.css
··· 7 7 8 8 @custom-variant dark (&:where(.dark, .dark *)); 9 9 10 + .body::-webkit-scrollbar-track { 11 + background-color: transparent; 12 + } 13 + 14 + @supports (scrollbar-width: auto) { 15 + body { 16 + scrollbar-color: var(--color-base-400) transparent; 17 + scrollbar-width: thin; 18 + } 19 + 20 + .dark body { 21 + scrollbar-color: var(--color-base-800) transparent; 22 + } 23 + } 24 + 25 + @supports not (scrollbar-width: auto) { 26 + body::-webkit-scrollbar { 27 + width: 14px; 28 + height: 14px; 29 + } 30 + } 31 + 32 + body::-webkit-scrollbar-thumb { 33 + background-color: var(--color-base-400); 34 + border-radius: 20px; 35 + border: 4px solid transparent; 36 + background-clip: content-box; 37 + } 38 + 39 + body::-webkit-scrollbar-thumb:hover { 40 + background-color: var(--color-base-500); 41 + } 42 + 43 + .dark body::-webkit-scrollbar-thumb { 44 + background-color: var(--color-base-800); 45 + } 46 + 47 + .dark body::-webkit-scrollbar-thumb:hover { 48 + background-color: var(--color-base-700); 49 + } 50 + 51 + 10 52 @theme inline { 11 53 --color-base-50: var(--base-50); 12 54 --color-base-100: var(--base-100);
+2 -17
src/lib/cards/SpecialCards/UpdatedBlentos/UpdatedBlentosCard.svelte
··· 10 10 11 11 const data = getAdditionalUserData(); 12 12 // svelte-ignore state_referenced_locally 13 - const recentRecords = (data[item.cardType] as any); 14 - 15 - let profiles: ProfileViewDetailed[] = $state([]); 16 - 17 - onMount(async () => { 18 - let uniqueDids = new Set<string>(); 19 - for (let record of recentRecords as { did: string }[]) { 20 - uniqueDids.add(record.did); 21 - } 22 - 23 - for (let did of Array.from(uniqueDids)) { 24 - const profile = await getProfile({ did }); 25 - profiles.push(profile); 26 - if (profiles.length > 20) return; 27 - } 28 - }); 13 + const profiles = (data[item.cardType] as ProfileViewDetailed[]); 29 14 </script> 30 15 31 16 <div class="pointer-events-none"> ··· 34 19 ></div> 35 20 <div class="absolute bottom-3 left-4 text-sm font-semibold">recently updated blentos</div> 36 21 </div> 37 - <div class="flex h-full max-w-full items-center gap-4 overflow-x-scroll px-8"> 22 + <div class="flex h-full max-w-full items-center gap-4 overflow-x-scroll px-8 overflow-y-hidden"> 38 23 {#each profiles as profile} 39 24 <a 40 25 href="/{profile.handle}"
+15 -1
src/lib/cards/SpecialCards/UpdatedBlentos/index.ts
··· 1 + import { getProfile } from '$lib/oauth/atproto'; 2 + import type { ProfileViewDetailed } from '@atproto/api/dist/client/types/app/bsky/actor/defs'; 1 3 import type { CardDefinition } from '../../types'; 2 4 import UpdatedBlentosCard from './UpdatedBlentosCard.svelte'; 3 5 ··· 8 10 const response = await fetch( 9 11 'https://ufos-api.microcosm.blue/records?collection=app.blento.card' 10 12 ); 11 - return await response.json(); 13 + const recentRecords = await response.json(); 14 + const uniqueDids = new Set<string>(); 15 + for (const record of recentRecords as { did: string }[]) { 16 + uniqueDids.add(record.did); 17 + } 18 + const profiles: Promise<ProfileViewDetailed>[] = []; 19 + 20 + for (const did of Array.from(uniqueDids)) { 21 + const profile = getProfile({ did }); 22 + profiles.push(profile); 23 + if (profiles.length > 20) return; 24 + } 25 + return JSON.parse(JSON.stringify(await Promise.all(profiles))); 12 26 } 13 27 } as CardDefinition & { type: 'updatedBlentos' };