Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
576 changes: 576 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion electron_app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "criptext",
"version": "0.11.3",
"version": "0.11.4",
"author": {
"name": "Criptext Inc.",
"email": "info@criptext.com",
Expand Down
5 changes: 4 additions & 1 deletion email_composer/src/components/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class Autocomplete extends Component {

componentDidMount() {
const inputName = this.props.inputProps.name;
if (inputName === 'To') {
if (
inputName === 'To' &&
this.props.inputProps.isfocuseditorinput === 'false'
) {
this.autosuggest.input.focus();
}
}
Expand Down
1 change: 1 addition & 0 deletions email_composer/src/components/AutocompleteWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const AutocompleteWrapper = ({ addTag, ...props }) => {

AutocompleteWrapper.propTypes = {
addTag: PropTypes.func,
isfocuseditorinput: PropTypes.bool,
onChange: PropTypes.func,
value: PropTypes.object
};
Expand Down
2 changes: 2 additions & 0 deletions email_composer/src/components/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Body = props => (
getHtmlBody={props.getHtmlBody}
htmlBody={props.htmlBody}
isDragActive={props.isDragActive}
isFocusEditorInput={props.isFocusEditorInput}
isToolbarHidden={props.isToolbarHidden}
onClearFile={props.onClearFile}
onDragLeave={props.handleDragLeave}
Expand Down Expand Up @@ -40,6 +41,7 @@ Body.propTypes = {
handleDragOver: PropTypes.func,
htmlBody: PropTypes.object,
isDragActive: PropTypes.bool,
isFocusEditorInput: PropTypes.bool,
isToolbarHidden: PropTypes.bool,
onClearFile: PropTypes.func,
onClickDiscardDraft: PropTypes.func,
Expand Down
2 changes: 2 additions & 0 deletions email_composer/src/components/BodyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class BodyWrapper extends Component {
{...this.props}
getHtmlBody={this.props.getHtmlBody}
htmlBody={this.props.htmlBody}
isFocusEditorInput={this.props.isFocusEditorInput}
isToolbarHidden={this.state.isToolbarHidden}
onClickTextEditor={this.handleTextEditor}
onDrop={this.props.onDrop}
Expand All @@ -32,6 +33,7 @@ class BodyWrapper extends Component {
BodyWrapper.propTypes = {
getHtmlBody: PropTypes.func,
htmlBody: PropTypes.object,
isFocusEditorInput: PropTypes.bool,
onDrop: PropTypes.func,
onFocusTextEditor: PropTypes.func
};
Expand Down
3 changes: 3 additions & 0 deletions email_composer/src/components/Composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const Composer = props => (
getCcEmails={props.getCcEmails}
getBccEmails={props.getBccEmails}
isCollapsedMoreRecipient={props.isCollapsedMoreRecipient}
isFocusEditorInput={props.isFocusEditorInput}
onToggleRecipient={props.onToggleRecipient}
/>
<SubjectWrapper
Expand All @@ -33,6 +34,7 @@ const Composer = props => (
handleDragOver={props.handleDragOver}
htmlBody={props.htmlBody}
isDragActive={props.isDragActive}
isFocusEditorInput={props.isFocusEditorInput}
onClearFile={props.onClearFile}
onClickDiscardDraft={props.onClickDiscardDraft}
onClickSendMessage={props.onClickSendMessage}
Expand Down Expand Up @@ -77,6 +79,7 @@ Composer.propTypes = {
htmlBody: PropTypes.object,
isCollapsedMoreRecipient: PropTypes.bool,
isDragActive: PropTypes.bool,
isFocusEditorInput: PropTypes.bool,
onClickCancelSendMessage: PropTypes.func,
onDrop: PropTypes.func,
onClearFile: PropTypes.func,
Expand Down
2 changes: 2 additions & 0 deletions email_composer/src/components/DropfileField.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const DropfileField = props => (
>
<EditorWrapper
htmlBody={props.htmlBody}
isFocusEditorInput={props.isFocusEditorInput}
toolbarHidden={props.isToolbarHidden}
getHtmlBody={props.getHtmlBody}
blockRenderMap={props.blockRenderMap}
Expand Down Expand Up @@ -74,6 +75,7 @@ DropfileField.propTypes = {
getHtmlBody: PropTypes.func,
htmlBody: PropTypes.object,
isDragActive: PropTypes.bool,
isFocusEditorInput: PropTypes.bool,
isToolbarHidden: PropTypes.bool,
multiple: PropTypes.bool,
onClearFile: PropTypes.func,
Expand Down
10 changes: 10 additions & 0 deletions email_composer/src/components/EditorWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class EditorWrapper extends Component {
return (
<Editor
{...this.props}
ref={editor => {
this.editor = editor;
}}
toolbar={{
options: [
'inline',
Expand Down Expand Up @@ -38,6 +41,12 @@ class EditorWrapper extends Component {
);
}

componentDidMount() {
if (this.props.isFocusEditorInput) {
this.editor.focusEditor();
}
}

onChangeHtmlBody = html => {
this.props.getHtmlBody(html);
};
Expand All @@ -51,6 +60,7 @@ EditorWrapper.propTypes = {
blockRenderMap: PropTypes.object,
getHtmlBody: PropTypes.func,
htmlBody: PropTypes.object,
isFocusEditorInput: PropTypes.bool,
onFocusTextEditor: PropTypes.func
};

Expand Down
3 changes: 3 additions & 0 deletions email_composer/src/components/Recipient.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const renderRecipientTo = props => (
focusedClassName={'cstm-tags-border'}
inputProps={{
className: 'tags-input',
isfocuseditorinput: props.isFocusEditorInput ? 'true' : 'false',
placeholder: '',
name: 'To'
}}
Expand Down Expand Up @@ -121,12 +122,14 @@ const renderRecipientBcc = props => (

Recipient.propTypes = {
isCollapsedMoreRecipient: PropTypes.bool,
isFocusEditorInput: PropTypes.bool,
onToggleRecipient: PropTypes.func
};

renderRecipientTo.propTypes = {
checkDisableSendButton: PropTypes.func,
handleOnValidationRejectToTag: PropTypes.func,
isFocusEditorInput: PropTypes.bool,
onChangeToTag: PropTypes.func,
toTags: PropTypes.string
};
Expand Down
17 changes: 13 additions & 4 deletions email_composer/src/containers/Composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ const blockRenderMap = DefaultDraftBlockRenderMap.merge(
class ComposerWrapper extends Component {
constructor(props) {
super(props);
this.emailToEdit = getEmailToEdit();
this.isFocusEditorInput = this.emailToEdit
? this.emailToEdit.type === 'reply'
? true
: false
: false;
this.state = {
bccEmails: [],
ccEmails: [],
Expand Down Expand Up @@ -108,6 +114,7 @@ class ComposerWrapper extends Component {
htmlBody={this.state.htmlBody}
isCollapsedMoreRecipient={this.state.isCollapsedMoreRecipient}
isDragActive={this.state.isDragActive}
isFocusEditorInput={this.isFocusEditorInput}
onClearFile={this.handleClearFile}
onClickCancelSendMessage={this.handleClickCancelSendMessage}
onClickDiscardDraft={this.handleClickDiscardDraft}
Expand All @@ -127,11 +134,13 @@ class ComposerWrapper extends Component {
}

async componentDidMount() {
const emailToEdit = getEmailToEdit();
let state;
if (emailToEdit) {
const composerData = await this.getComposerDataByType(emailToEdit);
state = { ...composerData, status: Status.ENABLED };
if (this.emailToEdit) {
const composerData = await this.getComposerDataByType(this.emailToEdit);
state = {
...composerData,
status: Status.ENABLED
};
} else {
const composerData = await this.getDefaultComposerWithSignature();
const status = myAccount.signatureEnabled
Expand Down
2 changes: 1 addition & 1 deletion email_mailbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "email_mailbox",
"version": "0.11.3",
"version": "0.11.4",
"private": true,
"dependencies": {
"animejs": "^2.2.0",
Expand Down