FileDecrypter: support inline preview

This commit is contained in:
Peter Cai 2020-02-19 17:08:52 +08:00
parent 226afdc13a
commit 008db6cf8c
No known key found for this signature in database
GPG Key ID: 71F5FB4E4F3FD54F
1 changed files with 11 additions and 0 deletions

View File

@ -106,6 +106,17 @@ class FileDecrypter extends React.Component
>
Save File
</a>
}{
# In-browser previewing for certain file types
# we can't just use this for all because it cannot handle file name
@state.downloaded and util.shouldShowInline(@state.mime) and
<a
className="button-blue"
href={@state.downloaded}
target="_blank"
>
Preview
</a>
}
<br/>
<Link