mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
parent
a2f7638257
commit
44d440649f
1 changed files with 6 additions and 4 deletions
|
@ -568,9 +568,9 @@ function AccountInfo({
|
|||
</div>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
const handle = `@${acct}`;
|
||||
const handleWithInstance = acct.includes('@') ? `@${acct}` : `@${acct}@${instance}`;
|
||||
try {
|
||||
navigator.clipboard.writeText(handle);
|
||||
navigator.clipboard.writeText(handleWithInstance);
|
||||
showToast('Handle copied');
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
@ -924,6 +924,8 @@ function RelatedActions({
|
|||
const [currentInfo, setCurrentInfo] = useState(null);
|
||||
const [isSelf, setIsSelf] = useState(false);
|
||||
|
||||
const acctWithInstance = acct.includes('@') ? acct : `${acct}@${instance}`;
|
||||
|
||||
useEffect(() => {
|
||||
if (info) {
|
||||
const currentAccount = getCurrentAccountID();
|
||||
|
@ -1205,7 +1207,7 @@ function RelatedActions({
|
|||
)}
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
const handle = `@${currentInfo?.acct || acct}`;
|
||||
const handle = `@${currentInfo?.acct || acctWithInstance}`;
|
||||
try {
|
||||
navigator.clipboard.writeText(handle);
|
||||
showToast('Handle copied');
|
||||
|
@ -1220,7 +1222,7 @@ function RelatedActions({
|
|||
Copy handle
|
||||
<br />
|
||||
<span class="more-insignificant">
|
||||
@{currentInfo?.acct || acct}
|
||||
@{currentInfo?.acct || acctWithInstance}
|
||||
</span>
|
||||
</small>
|
||||
</MenuItem>
|
||||
|
|
Loading…
Reference in a new issue