diff --git a/src/components/name-text.jsx b/src/components/name-text.jsx index 8971ce55..b4dafee1 100644 --- a/src/components/name-text.jsx +++ b/src/components/name-text.jsx @@ -5,7 +5,7 @@ import states from '../utils/states'; import Avatar from './avatar'; -function NameText({ account, showAvatar, showAcct, short, external }) { +function NameText({ account, showAvatar, showAcct, short, external, onClick }) { const { acct, avatar, avatarStatic, id, url, displayName, emojis } = account; let { username } = account; @@ -31,6 +31,7 @@ function NameText({ account, showAvatar, showAcct, short, external }) { onClick={(e) => { if (external) return; e.preventDefault(); + if (onClick) return onClick(e); states.showAccount = account; }} > diff --git a/src/pages/settings.jsx b/src/pages/settings.jsx index acd1acca..a3582474 100644 --- a/src/pages/settings.jsx +++ b/src/pages/settings.jsx @@ -5,6 +5,7 @@ import { useRef, useState } from 'preact/hooks'; import Avatar from '../components/avatar'; import Icon from '../components/icon'; import NameText from '../components/name-text'; +import states from '../utils/states'; import store from '../utils/store'; /* @@ -42,7 +43,13 @@ function Settings({ onClose }) { )} - + { + states.showAccount = `${account.info.username}@${account.instanceURL}`; + }} + />
{isDefault && moreThanOneAccount && (