feat: files related improvements

This commit is contained in:
Mo
2022-05-10 10:32:05 -05:00
parent 026a26ac04
commit d7ba3935ed
7 changed files with 42 additions and 46 deletions

View File

@@ -49,6 +49,7 @@ export const NotesListItem: FunctionComponent<Props> = ({
tags,
}) => {
const flags = flagsForNote(note)
const hasFiles = application.items.getFilesForNote(note).length > 0
const showModifiedDate = sortedBy === CollectionSort.UpdatedAt
const editorForNote = application.componentManager.editorForNote(note)
const editorName = editorForNote?.name ?? PLAIN_EDITOR_NAME
@@ -132,6 +133,11 @@ export const NotesListItem: FunctionComponent<Props> = ({
<Icon ariaLabel="Pinned" type="pin-filled" className="sn-icon--small color-info" />
</span>
)}
{hasFiles && (
<span title="Files">
<Icon ariaLabel="Files" type="attachment-file" className="sn-icon--small color-info" />
</span>
)}
</div>
</div>
)