mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Show remaining count if exceed the avatars limit
This commit is contained in:
parent
887503e40b
commit
dafff4b635
1 changed files with 5 additions and 1 deletions
|
@ -61,6 +61,8 @@ const contentText = {
|
||||||
'admin.report': 'reported a post.',
|
'admin.report': 'reported a post.',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const AVATARS_LIMIT = 50;
|
||||||
|
|
||||||
function Notification({ notification, instance, reload, isStatic }) {
|
function Notification({ notification, instance, reload, isStatic }) {
|
||||||
const { id, status, account, _accounts, _statuses } = notification;
|
const { id, status, account, _accounts, _statuses } = notification;
|
||||||
let { type } = notification;
|
let { type } = notification;
|
||||||
|
@ -207,7 +209,7 @@ function Notification({ notification, instance, reload, isStatic }) {
|
||||||
)}
|
)}
|
||||||
{_accounts?.length > 1 && (
|
{_accounts?.length > 1 && (
|
||||||
<p class="avatars-stack">
|
<p class="avatars-stack">
|
||||||
{_accounts.slice(0, 50).map((account, i) => (
|
{_accounts.slice(0, AVATARS_LIMIT).map((account, i) => (
|
||||||
<>
|
<>
|
||||||
<a
|
<a
|
||||||
href={account.url}
|
href={account.url}
|
||||||
|
@ -254,6 +256,8 @@ function Notification({ notification, instance, reload, isStatic }) {
|
||||||
class="small plain"
|
class="small plain"
|
||||||
onClick={handleOpenGenericAccounts}
|
onClick={handleOpenGenericAccounts}
|
||||||
>
|
>
|
||||||
|
{_accounts.length > AVATARS_LIMIT &&
|
||||||
|
`+${_accounts.length - AVATARS_LIMIT}`}
|
||||||
<Icon icon="chevron-down" />
|
<Icon icon="chevron-down" />
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue