1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 19:01:42 +00:00

[dir view, repo wiki mode] show thumbnails for image files (#2805)

* [dir view, repo wiki mode] show thumbnails for image files

* modification for 'thumbnail' after api was updated
This commit is contained in:
llj
2019-01-11 16:16:07 +08:00
committed by Daniel Pan
parent 5fd87ff6f1
commit 377681422c
5 changed files with 99 additions and 13 deletions

View File

@@ -433,7 +433,10 @@ class DirentListItem extends React.Component {
</td>
<td className="text-center">
<div className="dir-icon">
<img src={iconUrl} width="24" alt='' />
{dirent.encoded_thumbnail_src ?
<img src={`${siteRoot}${dirent.encoded_thumbnail_src}`} className="thumbnail" alt="" /> :
<img src={iconUrl} width="24" alt='' />
}
{dirent.is_locked && <img className="locked" src={siteRoot + mediaUrl + 'img/file-locked-32.png'} alt={gettext('locked')} />}
</div>
</td>