mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
a841417011
Summary: - Add initial version of snooze and send later plugins - Tests are missing since this will probably heavily change before we are done with them Test Plan: - TODO Reviewers: drew, bengotow, evan Reviewed By: bengotow, evan Differential Revision: https://phab.nylas.com/D2578
28 lines
885 B
JavaScript
28 lines
885 B
JavaScript
import React, {Component, PropTypes} from 'react'
|
|
import {Flexbox} from 'nylas-component-kit'
|
|
import {timestamp} from './formatting-utils'
|
|
import SendingProgressBar from './sending-progress-bar'
|
|
import SendingCancelButton from './sending-cancel-button'
|
|
|
|
export default class DraftListSendStatus extends Component {
|
|
static displayName = 'DraftListSendStatus';
|
|
|
|
static propTypes = {
|
|
draft: PropTypes.object,
|
|
};
|
|
|
|
static containerRequired = false;
|
|
|
|
render() {
|
|
const {draft} = this.props
|
|
if (draft.uploadTaskId) {
|
|
return (
|
|
<Flexbox style={{width: 150, whiteSpace: 'no-wrap'}}>
|
|
<SendingProgressBar style={{flex: 1, marginRight: 10}} progress={draft.uploadProgress * 100} />
|
|
<SendingCancelButton taskId={draft.uploadTaskId} />
|
|
</Flexbox>
|
|
)
|
|
}
|
|
return <span className="timestamp">{timestamp(draft.date)}</span>
|
|
}
|
|
}
|