mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 10:38:11 +08:00
a48fc2dd34
Summary: Fixes T1975 Fixes T1900 Fixes T1899 Fixes T1979 Attachments downloading update progress downloads will restart if the file on disk isn't complete can drag images onto drive Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Maniphest Tasks: T1900, T1899, T1975, T1979 Differential Revision: https://phab.nylas.com/D1638
28 lines
828 B
CoffeeScript
28 lines
828 B
CoffeeScript
path = require 'path'
|
|
React = require 'react'
|
|
FileUpload = require './file-upload'
|
|
{RetinaImg, DraggableImg} = require 'nylas-component-kit'
|
|
|
|
class ImageFileUpload extends FileUpload
|
|
@displayName: 'ImageFileUpload'
|
|
|
|
@propTypes:
|
|
uploadData: React.PropTypes.object
|
|
|
|
render: =>
|
|
<div className="image-file-upload #{@props.uploadData.state}">
|
|
<span className="attachment-file-actions">
|
|
<div className="attachment-icon" onClick={@_onClickRemove}>
|
|
<RetinaImg className="remove-icon" name="remove-attachment.png"/>
|
|
</div>
|
|
</span>
|
|
|
|
<div className="attachment-preview" >
|
|
<DraggableImg src={@props.uploadData.filePath} />
|
|
</div>
|
|
|
|
<span className="attachment-upload-progress" style={@_uploadProgressStyle()}></span>
|
|
|
|
</div>
|
|
|
|
module.exports = ImageFileUpload
|