an independent Bluesky client using Constellation, PDS Queries, and other services reddwarf.app
frontend spa bluesky reddwarf microcosm client app
93
fork

Configure Feed

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

Replace the default following feed with Rinds Fresh

+31 -17
+31 -17
src/routes/index.tsx
··· 353 353 354 354 const [isAtTop] = useAtom(isAtTopAtom); 355 355 356 + 357 + // todo terrible hack lmaoo (hack type: forcing following feed to fallback to rinds fresh feed) 358 + const selectedFeedComputed = selectedFeed === "following" ? "at://did:plc:mn45tewwnse5btfftvd3powc/app.bsky.feed.generator/rinds" : selectedFeed; 359 + const feedServiceDidComputed = selectedFeed === "following" ? "did:web:rinds.whey.party" : feedServiceDid; 360 + 356 361 return ( 357 362 <div 358 363 className={`relative flex flex-col divide-y divide-gray-200 dark:divide-gray-800 ${hidden && "hidden"}`} 359 364 > 360 365 {!isAuthRestoring && savedFeeds.length > 0 ? ( 361 366 <div className={`flex items-center px-4 py-2 h-[52px] sticky top-0 bg-[var(--header-bg-light)] dark:bg-[var(--header-bg-dark)] ${!isAtTop && "shadow-sm"} sm:shadow-none sm:bg-white sm:dark:bg-gray-950 z-10 border-0 sm:border-b border-gray-200 dark:border-gray-700 overflow-x-auto overflow-y-hidden scroll-thin`}> 362 - {savedFeeds.map((item: any, idx: number) => {return <FeedTabOnTop key={item} item={item} idx={idx} />})} 367 + {savedFeeds.map((item: any, idx: number) => { return <FeedTabOnTop key={item} item={item} idx={idx} /> })} 363 368 </div> 364 369 ) : ( 365 370 // <span className="text-xl font-bold ml-2">Home</span> ··· 377 382 /> 378 383 ))} */} 379 384 380 - {isAuthRestoring || authed && (!identity?.pds || !feedServiceDid) && ( 385 + {isAuthRestoring || authed && (!identity?.pds || !feedServiceDidComputed) && ( 381 386 <div className="p-4 text-center text-gray-500"> 382 387 Preparing your feed... 383 388 </div> ··· 385 390 386 391 {!isAuthRestoring && (isReadyForAuthedFeed || isReadyForUnauthedFeed) ? ( 387 392 <InfiniteCustomFeed 388 - key={selectedFeed!} 389 - feedUri={selectedFeed!} 393 + key={selectedFeedComputed!} 394 + feedUri={selectedFeedComputed!} 390 395 pdsUrl={identity?.pds} 391 - feedServiceDid={feedServiceDid} 396 + feedServiceDid={feedServiceDidComputed} 397 + /> 398 + 399 + // todo terrible hack lmaoo (hack type: forcing following feed to fallback to rinds fresh feed) 400 + ) : selectedFeed === "following" ? ( 401 + <InfiniteCustomFeed 402 + key={"at://did:plc:mn45tewwnse5btfftvd3powc/app.bsky.feed.generator/rinds"} 403 + feedUri={"at://did:plc:mn45tewwnse5btfftvd3powc/app.bsky.feed.generator/rinds"} 404 + pdsUrl={identity?.pds} 405 + feedServiceDid={"did:web:rinds.whey.party"} 392 406 /> 393 407 ) : ( 394 408 <div className="p-4 text-center text-gray-500"> 395 409 Loading....... 396 410 </div> 397 - )} 411 + ) 412 + 413 + } 398 414 {/* {false && restoringScrollPosition && ( 399 415 <div className="fixed top-1/2 left-1/2 right-1/2"> 400 416 restoringScrollPosition ··· 407 423 408 424 // todo please use types this is dangerous very dangerous. 409 425 // todo fix this whenever proper preferences is handled 410 - function FeedTabOnTop({item, idx}:{item: any, idx: number}) { 426 + function FeedTabOnTop({ item, idx }: { item: any, idx: number }) { 411 427 const [persistentSelectedFeed, setPersistentSelectedFeed] = useAtom(selectedFeedUriAtom); 412 428 const selectedFeed = persistentSelectedFeed 413 429 const setSelectedFeed = setPersistentSelectedFeed ··· 418 434 return ( 419 435 <button 420 436 key={item.value || idx} 421 - className={`px-3 py-1 rounded-full whitespace-nowrap font-medium transition-colors ${ 422 - isActive 423 - ? "text-gray-900 dark:text-gray-100 hover:bg-gray-300 dark:bg-gray-700 bg-gray-200 hover:dark:bg-gray-600" 424 - : "text-gray-600 dark:text-gray-400 hover:bg-gray-100 hover:dark:bg-gray-800" 437 + className={`px-3 py-1 rounded-full whitespace-nowrap font-medium transition-colors ${isActive 438 + ? "text-gray-900 dark:text-gray-100 hover:bg-gray-300 dark:bg-gray-700 bg-gray-200 hover:dark:bg-gray-600" 439 + : "text-gray-600 dark:text-gray-400 hover:bg-gray-100 hover:dark:bg-gray-800" 425 440 // ? "bg-gray-500 text-white" 426 441 // : item.pinned 427 442 // ? "bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-200" 428 443 // : "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-200" 429 - }`} 444 + }`} 430 445 onClick={() => setSelectedFeed(item.value)} 431 446 title={item.value} 432 447 > 433 448 {label} 434 449 {item.pinned && ( 435 450 <span 436 - className={`ml-1 text-xs ${ 437 - isActive 438 - ? "text-gray-900 dark:text-gray-100" 439 - : "text-gray-600 dark:text-gray-400" 440 - }`} 451 + className={`ml-1 text-xs ${isActive 452 + ? "text-gray-900 dark:text-gray-100" 453 + : "text-gray-600 dark:text-gray-400" 454 + }`} 441 455 > 442 456 443 457 </span>