Convert posting stats box into a link to account page
This commit is contained in:
parent
908efb17ff
commit
941d2efeb1
2 changed files with 53 additions and 42 deletions
|
@ -196,6 +196,8 @@
|
|||
.account-container .account-metadata-box {
|
||||
overflow: hidden;
|
||||
border-radius: 16px;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
|
||||
& > * {
|
||||
margin-bottom: 2px;
|
||||
|
@ -308,6 +310,10 @@
|
|||
--size: 8px;
|
||||
--original-color: var(--link-color);
|
||||
|
||||
&:is(:hover, :focus-within) {
|
||||
background-color: var(--link-bg-hover-color);
|
||||
}
|
||||
|
||||
.posting-stats-bar {
|
||||
height: var(--size);
|
||||
border-radius: var(--size);
|
||||
|
|
|
@ -648,12 +648,18 @@ function RelatedActions({ info, instance, authenticated, standalone }) {
|
|||
const [showAddRemoveLists, setShowAddRemoveLists] = useState(false);
|
||||
|
||||
const hasPostingStats = postingStats?.total >= 3;
|
||||
const accountLink = instance ? `/${instance}/a/${id}` : `/a/${id}`;
|
||||
|
||||
return (
|
||||
<>
|
||||
{hasPostingStats && (
|
||||
<div class="account-metadata-box">
|
||||
{hasPostingStats && (
|
||||
<Link
|
||||
to={accountLink}
|
||||
class="account-metadata-box"
|
||||
onClick={() => {
|
||||
states.showAccount = false;
|
||||
}}
|
||||
>
|
||||
<div class="shazam-container">
|
||||
<div class="shazam-container-inner">
|
||||
<div class="posting-stats">
|
||||
|
@ -698,8 +704,7 @@ function RelatedActions({ info, instance, authenticated, standalone }) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
<p class="actions">
|
||||
<span>
|
||||
|
|
Loading…
Add table
Reference in a new issue