mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +01: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,
|
ancestor: true,
|
||||||
isThread: ancestorsIsThread,
|
isThread: ancestorsIsThread,
|
||||||
accountID: s.account.id,
|
accountID: s.account.id,
|
||||||
|
account: s.account,
|
||||||
repliesCount: s.repliesCount,
|
repliesCount: s.repliesCount,
|
||||||
weight: calcStatusWeight(s),
|
weight: calcStatusWeight(s),
|
||||||
})),
|
})),
|
||||||
|
@ -705,6 +706,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
block: 'start',
|
block: 'start',
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
title="Go to main post"
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
icon={heroPointer === 'down' ? 'arrow-down' : 'arrow-up'}
|
icon={heroPointer === 'down' ? 'arrow-down' : 'arrow-up'}
|
||||||
|
@ -727,12 +729,31 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
hidden={!ancestors.length || nearReachStart}
|
hidden={!ancestors.length || nearReachStart}
|
||||||
|
title={`${ancestors.length} posts above ‒ Go to top`}
|
||||||
>
|
>
|
||||||
<Icon icon="arrow-up" />
|
<Icon icon="arrow-up" />
|
||||||
<Icon icon="comment" />{' '}
|
{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">
|
<span class="insignificant">
|
||||||
{shortenNumber(ancestors.length)}
|
{shortenNumber(ancestors.length)}
|
||||||
</span>
|
</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue