this repo has no description
0
fork

Configure Feed

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

Merge pull request #597 from graue/graue/copy-handle-with-instance

Include domain when copying local user's handle

authored by

Chee Aun and committed by
GitHub
808c6262 a2f76382

+6 -4
+6 -4
src/components/account-info.jsx
··· 568 568 </div> 569 569 <MenuItem 570 570 onClick={() => { 571 - const handle = `@${acct}`; 571 + const handleWithInstance = acct.includes('@') ? `@${acct}` : `@${acct}@${instance}`; 572 572 try { 573 - navigator.clipboard.writeText(handle); 573 + navigator.clipboard.writeText(handleWithInstance); 574 574 showToast('Handle copied'); 575 575 } catch (e) { 576 576 console.error(e); ··· 924 924 const [currentInfo, setCurrentInfo] = useState(null); 925 925 const [isSelf, setIsSelf] = useState(false); 926 926 927 + const acctWithInstance = acct.includes('@') ? acct : `${acct}@${instance}`; 928 + 927 929 useEffect(() => { 928 930 if (info) { 929 931 const currentAccount = getCurrentAccountID(); ··· 1205 1207 )} 1206 1208 <MenuItem 1207 1209 onClick={() => { 1208 - const handle = `@${currentInfo?.acct || acct}`; 1210 + const handle = `@${currentInfo?.acct || acctWithInstance}`; 1209 1211 try { 1210 1212 navigator.clipboard.writeText(handle); 1211 1213 showToast('Handle copied'); ··· 1220 1222 Copy handle 1221 1223 <br /> 1222 1224 <span class="more-insignificant"> 1223 - @{currentInfo?.acct || acct} 1225 + @{currentInfo?.acct || acctWithInstance} 1224 1226 </span> 1225 1227 </small> 1226 1228 </MenuItem>