mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 01:35:52 +08:00
19d97e5393
Summary: fix(attachment): Bad filenames breaking icons fix developer bar colors fix critical bug with files Render small attachments inline-block, without hover effect, and with nice dotted transparency background Test Plan: No new tests Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D1661
31 lines
979 B
CoffeeScript
31 lines
979 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}">
|
|
<div className="attachment-file-actions">
|
|
<div className="attachment-icon" onClick={@_onClickRemove}>
|
|
<RetinaImg className="image-remove-icon" name="image-cancel-button.png"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="attachment-preview" >
|
|
<div className="attachment-name-container">
|
|
<div className="attachment-name">{@props.uploadData.fileName}</div>
|
|
</div>
|
|
<DraggableImg src={@props.uploadData.filePath} />
|
|
</div>
|
|
|
|
<span className="attachment-upload-progress" style={@_uploadProgressStyle()}></span>
|
|
|
|
</div>
|
|
|
|
module.exports = ImageFileUpload
|