this repo has no description
0
fork

Configure Feed

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

Handle moved account cases

+61 -1
+40
src/components/account-info.css
··· 9 9 color: var(--outline-color); 10 10 } 11 11 12 + .account-container .account-moved { 13 + animation: fade-in 0.3s both ease-in-out 0.3s; 14 + padding: 16px; 15 + background-color: var(--bg-color); 16 + position: absolute; 17 + top: 8px; 18 + inset-inline: 8px; 19 + z-index: 2; 20 + border: 1px solid var(--outline-color); 21 + box-shadow: 0 8px 16px var(--drop-shadow-color); 22 + border-radius: calc(16px - 8px); 23 + overflow: hidden; 24 + 25 + p { 26 + margin: 0 0 8px; 27 + padding: 0; 28 + } 29 + 30 + .account-block { 31 + background-color: var(--bg-faded-color); 32 + padding: 8px; 33 + border-radius: 8px; 34 + border: 1px solid var(--link-faded-color); 35 + 36 + &:hover { 37 + background-color: var(--link-bg-hover-color); 38 + border-color: var(--link-color); 39 + } 40 + 41 + b { 42 + color: var(--link-color); 43 + } 44 + } 45 + 46 + ~ * { 47 + /* pointer-events: none; */ 48 + filter: grayscale(0.75) brightness(0.75); 49 + } 50 + } 51 + 12 52 .account-container .header-banner { 13 53 /* pointer-events: none; */ 14 54 aspect-ratio: 6 / 1;
+21 -1
src/components/account-info.jsx
··· 115 115 url, 116 116 username, 117 117 memorial, 118 + moved, 118 119 } = info || {}; 119 120 let headerIsAvatar = false; 120 121 let { header, headerStatic } = info || {}; ··· 235 236 ) : ( 236 237 info && ( 237 238 <> 239 + {!!moved && ( 240 + <div class="account-moved"> 241 + <p> 242 + <b>{displayName}</b> has indicated that their new account is 243 + now: 244 + </p> 245 + <AccountBlock 246 + account={moved} 247 + instance={instance} 248 + onClick={(e) => { 249 + e.stopPropagation(); 250 + states.showAccount = moved; 251 + }} 252 + /> 253 + </div> 254 + )} 238 255 {header && !/missing\.png$/.test(header) && ( 239 256 <img 240 257 src={header} ··· 496 513 const [relationship, setRelationship] = useState(null); 497 514 const [postingStats, setPostingStats] = useState(); 498 515 499 - const { id, acct, url, username, locked, lastStatusAt, note, fields } = info; 516 + const { id, acct, url, username, locked, lastStatusAt, note, fields, moved } = 517 + info; 500 518 const accountID = useRef(id); 501 519 502 520 const { ··· 552 570 } 553 571 554 572 accountID.current = currentID; 573 + 574 + if (moved) return; 555 575 556 576 setRelationshipUIState('loading'); 557 577 accountInfoStates.familiarFollowers = [];