[Feature] Add image count to gallery list (#429)

* Add imagecount to gallery list
* Port to 2.5
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
ueaslsef 2020-04-01 21:27:33 +00:00 committed by GitHub
parent 82201e23e0
commit 10b6d4b579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export const GalleryList: React.FC = () => {
</Link>
</td>
<td className="d-none d-sm-block">
<Link to={`/galleries/${gallery.id}`}>{gallery.path}</Link>
<Link to={`/galleries/${gallery.id}`}>{gallery.path} ({gallery.files.length} {gallery.files.length === 1 ? 'image' : 'images'})</Link>
</td>
</tr>
))}

View File

@ -38,7 +38,7 @@ export const GalleryList: FunctionComponent<IProps> = (props: IProps) => {
{gallery.files.length > 0 ? <img alt={gallery.title} src={`${gallery.files[0].path}?thumb=true`} /> : undefined}
</Link>
</td>
<td><Link to={`/galleries/${gallery.id}`}>{gallery.path}</Link></td>
<td><Link to={`/galleries/${gallery.id}`}>{gallery.path} ({gallery.files.length} {gallery.files.length === 1 ? 'image' : 'images'})</Link></td>
</tr>
))}
</tbody>