mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
add flags to help to decide file icon
This commit is contained in:
@@ -58,7 +58,7 @@ const queryToPath = (query?: ParsedUrlQuery) => {
|
||||
}
|
||||
|
||||
const FileListItem: FC<{
|
||||
fileContent: { id: string; name: string; size: number; file: Object; lastModifiedDateTime: string }
|
||||
fileContent: { id: string; name: string; size: number; file: Object; lastModifiedDateTime: string, video: any }
|
||||
}> = ({ fileContent: c }) => {
|
||||
const emojiIcon = emojiRegex().exec(c.name)
|
||||
const renderEmoji = emojiIcon && !emojiIcon.index
|
||||
@@ -71,7 +71,7 @@ const FileListItem: FC<{
|
||||
{renderEmoji ? (
|
||||
<span>{emojiIcon ? emojiIcon[0] : '📁'}</span>
|
||||
) : (
|
||||
<FontAwesomeIcon icon={c.file ? getFileIcon(c.name) : ['far', 'folder']} />
|
||||
<FontAwesomeIcon icon={c.file ? getFileIcon(c.name, { video: Boolean(c.video) }) : ['far', 'folder']} />
|
||||
)}
|
||||
</div>
|
||||
<div className="truncate">
|
||||
|
||||
Reference in New Issue
Block a user