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
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Finally, an email service that's built around your privacy. Get your @criptext.c
## Contributing Bug reports

We use GitHub for bug tracking. Please search the existing issues for your bug and create a new one if the issue is not yet tracked!
[https://github.com/Criptext/Criptext-Email-React-Client/issues](https://github.com/Criptext/Criptext-Email-React-Client/issues)

## Contributing Translations

Expand All @@ -22,7 +23,7 @@ We use Lokalise for translations. If you are interested in helping please write

To build Criptext on your machine you'll need:

* Node.js (Recommended 8.12+)
* Node.js (Recommended 8.15+)
* Yarn

## Run locally
Expand All @@ -32,16 +33,40 @@ Clone this repository and run a few scripts:
``` bash
git clone https://github.com/Criptext/Criptext-Email-React-Client
cd Criptext-Email-React-Client
node install.js # Install dependencies
node start.js # Run locally
node install.js # Install dependenciess
```

On some directories, like `email_login` it is recommended to have a .env file
To up all projects, got to each project and run:
``` bash
yarn start # Run locally
```
First up the projects like `email_*` and last `electrop_app`

On all directories, like `email_*` it is recommended to have a .env file
with the following content:

```
PORT=####
SKIP_PREFLIGHT_CHECK=true
REACT_APP_APPDOMAIN=criptext.com
REACT_APP_AVATAR_URL=https://api.criptext.com/user/avatar/
```

The project `electrop_app` the .env file should have this:
```
NODE_ENV=development
MAILBOX_URL=http://localhost:####
LOGIN_URL=http://localhost:####
LOADING_URL=http://localhost:####
COMPOSER_URL=http://localhost:####
DEV_SOCKET_URL=wss://socket.criptext.com
DEV_SERVER_URL=https://api.criptext.com
DEV_DATA_TRANSFER_URL=https://transfer.criptext.com
CSC_IDENTITY_AUTO_DISCOVERY=true
DEV_APP_DOMAIN=criptext.com
```


## Contributing Code

Contributions are welcome. This project contains subdirectories according to each module of the app:
Expand Down
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.23.0",
"version": "0.23.1",
"author": {
"name": "Criptext Inc",
"email": "support@criptext.com",
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.23.0",
"version": "0.23.1",
"private": true,
"dependencies": {
"@criptext/electron-better-ipc": "^0.1.2-rc5",
Expand Down
1 change: 1 addition & 0 deletions email_mailbox/src/components/HeaderMainWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class HeaderMainWrapper extends Component {
}

componentDidMount() {
if (!this.props.sectionSelected) return;
const text = this.props.sectionSelected.params.searchParams
? this.props.sectionSelected.params.searchParams.text
: false;
Expand Down
1 change: 1 addition & 0 deletions email_mailbox/src/components/contacttag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

.tag{
font-size: 12px;
font-weight: 300;
text-decoration: none;
}
}
Expand Down
2 changes: 2 additions & 0 deletions email_mailbox/src/utils/electronEventInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,7 @@ ipcRenderer.on(TOKEN_UPDATED, async (_, token) => {
});

ipcRenderer.on(NOTIFICATION_RECEIVED, async (_, { data }) => {
isGettingEvents = true;
try {
const eventData = await fetchGetSingleEvent({ rowId: data.rowId });
await parseAndStoreEventsBatch({
Expand All @@ -1441,6 +1442,7 @@ ipcRenderer.on(NOTIFICATION_RECEIVED, async (_, { data }) => {
// eslint-disable-next-line no-console
console.error(`[Firebase Error]: `, firebaseNotifErr);
}
isGettingEvents = false;
});

ipcRenderer.send(START_NOTIFICATION_SERVICE, senderNotificationId);
Expand Down
12 changes: 7 additions & 5 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@ const { spawn } = require('child_process')
const abs = r => path.join(__dirname, r);

const packageDirs = [
abs('electron_app'),
abs('email_composer'),
abs('email_loading'),
abs('email_login'),
abs('email_mailbox')
abs('email_mailbox'),
abs('electron_app')
]

const installModules = cwd =>
new Promise((resolve, reject) => {
const cp = spawn('yarn', [], { cwd });
const names = cwd.split('/');
const nameProject = names[names.length-1];
cp.on('exit', code => {
code == 0
? resolve()
? resolve(`Project ${nameProject} installed ...wait`)
: reject(` Failed to install modules at ${cwd}.\n Yarn exited with code: ${code}`)
});
})
}).then(value => {console.log(value)});

const installations = Promise.all(packageDirs.map(installModules));

installations.then(
() => console.log(' Installed modules successfully!'),
() => console.log('Installed modules successfully!'),
err => console.error(err)
);
103 changes: 0 additions & 103 deletions start.js

This file was deleted.