mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-23 01:35:38 +03:00
Experiment show avatars instead
Add a bit of tooltips too
This commit is contained in:
parent
12b8651d18
commit
aae74aa476
1 changed files with 25 additions and 4 deletions
|
@ -336,6 +336,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
ancestor: true,
|
||||
isThread: ancestorsIsThread,
|
||||
accountID: s.account.id,
|
||||
account: s.account,
|
||||
repliesCount: s.repliesCount,
|
||||
weight: calcStatusWeight(s),
|
||||
})),
|
||||
|
@ -705,6 +706,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
block: 'start',
|
||||
});
|
||||
}}
|
||||
title="Go to main post"
|
||||
>
|
||||
<Icon
|
||||
icon={heroPointer === 'down' ? 'arrow-down' : 'arrow-up'}
|
||||
|
@ -727,12 +729,31 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
});
|
||||
}}
|
||||
hidden={!ancestors.length || nearReachStart}
|
||||
title={`${ancestors.length} posts above ‒ Go to top`}
|
||||
>
|
||||
<Icon icon="arrow-up" />
|
||||
<Icon icon="comment" />{' '}
|
||||
<span class="insignificant">
|
||||
{shortenNumber(ancestors.length)}
|
||||
</span>
|
||||
{ancestors
|
||||
.filter(
|
||||
(a, i, arr) =>
|
||||
arr.findIndex((b) => b.accountID === a.accountID) === i,
|
||||
)
|
||||
.slice(0, 3)
|
||||
.map((ancestor) => (
|
||||
<Avatar
|
||||
key={ancestor.account.id}
|
||||
url={ancestor.account.avatar}
|
||||
alt={ancestor.account.displayName}
|
||||
/>
|
||||
))}
|
||||
{/* <Icon icon="comment" />{' '} */}
|
||||
{ancestors.length > 3 && (
|
||||
<>
|
||||
{' '}
|
||||
<span class="insignificant">
|
||||
{shortenNumber(ancestors.length)}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue