Skip to content

Commit 62ecc37

Browse files
author
Erika Perugachi
authored
Merge pull request #1134 from erikaperugachi/database
Fix crash events
2 parents 255ee42 + aa00c4e commit 62ecc37

File tree

8 files changed

+42
-114
lines changed

8 files changed

+42
-114
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Finally, an email service that's built around your privacy. Get your @criptext.c
1111
## Contributing Bug reports
1212

1313
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!
14+
[https://github.com/Criptext/Criptext-Email-React-Client/issues](https://github.com/Criptext/Criptext-Email-React-Client/issues)
1415

1516
## Contributing Translations
1617

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

2324
To build Criptext on your machine you'll need:
2425

25-
* Node.js (Recommended 8.12+)
26+
* Node.js (Recommended 8.15+)
2627
* Yarn
2728

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

39-
On some directories, like `email_login` it is recommended to have a .env file
39+
To up all projects, got to each project and run:
40+
``` bash
41+
yarn start # Run locally
42+
```
43+
First up the projects like `email_*` and last `electrop_app`
44+
45+
On all directories, like `email_*` it is recommended to have a .env file
4046
with the following content:
4147

4248
```
49+
PORT=####
4350
SKIP_PREFLIGHT_CHECK=true
51+
REACT_APP_APPDOMAIN=criptext.com
52+
REACT_APP_AVATAR_URL=https://api.criptext.com/user/avatar/
53+
```
54+
55+
The project `electrop_app` the .env file should have this:
56+
```
57+
NODE_ENV=development
58+
MAILBOX_URL=http://localhost:####
59+
LOGIN_URL=http://localhost:####
60+
LOADING_URL=http://localhost:####
61+
COMPOSER_URL=http://localhost:####
62+
DEV_SOCKET_URL=wss://socket.criptext.com
63+
DEV_SERVER_URL=https://api.criptext.com
64+
DEV_DATA_TRANSFER_URL=https://transfer.criptext.com
65+
CSC_IDENTITY_AUTO_DISCOVERY=true
66+
DEV_APP_DOMAIN=criptext.com
4467
```
68+
69+
4570
## Contributing Code
4671

4772
Contributions are welcome. This project contains subdirectories according to each module of the app:

electron_app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "criptext",
3-
"version": "0.23.0",
3+
"version": "0.23.1",
44
"author": {
55
"name": "Criptext Inc",
66
"email": "[email protected]",

email_mailbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "email_mailbox",
3-
"version": "0.23.0",
3+
"version": "0.23.1",
44
"private": true,
55
"dependencies": {
66
"@criptext/electron-better-ipc": "^0.1.2-rc5",

email_mailbox/src/components/HeaderMainWrapper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class HeaderMainWrapper extends Component {
4040
}
4141

4242
componentDidMount() {
43+
if (!this.props.sectionSelected) return;
4344
const text = this.props.sectionSelected.params.searchParams
4445
? this.props.sectionSelected.params.searchParams.text
4546
: false;

email_mailbox/src/components/contacttag.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
.tag{
1010
font-size: 12px;
11+
font-weight: 300;
1112
text-decoration: none;
1213
}
1314
}

email_mailbox/src/utils/electronEventInterface.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,7 @@ ipcRenderer.on(TOKEN_UPDATED, async (_, token) => {
14291429
});
14301430

14311431
ipcRenderer.on(NOTIFICATION_RECEIVED, async (_, { data }) => {
1432+
isGettingEvents = true;
14321433
try {
14331434
const eventData = await fetchGetSingleEvent({ rowId: data.rowId });
14341435
await parseAndStoreEventsBatch({
@@ -1441,6 +1442,7 @@ ipcRenderer.on(NOTIFICATION_RECEIVED, async (_, { data }) => {
14411442
// eslint-disable-next-line no-console
14421443
console.error(`[Firebase Error]: `, firebaseNotifErr);
14431444
}
1445+
isGettingEvents = false;
14441446
});
14451447

14461448
ipcRenderer.send(START_NOTIFICATION_SERVICE, senderNotificationId);

install.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@ const { spawn } = require('child_process')
66
const abs = r => path.join(__dirname, r);
77

88
const packageDirs = [
9-
abs('electron_app'),
109
abs('email_composer'),
1110
abs('email_loading'),
1211
abs('email_login'),
13-
abs('email_mailbox')
12+
abs('email_mailbox'),
13+
abs('electron_app')
1414
]
1515

1616
const installModules = cwd =>
1717
new Promise((resolve, reject) => {
1818
const cp = spawn('yarn', [], { cwd });
19+
const names = cwd.split('/');
20+
const nameProject = names[names.length-1];
1921
cp.on('exit', code => {
2022
code == 0
21-
? resolve()
23+
? resolve(`Project ${nameProject} installed ...wait`)
2224
: reject(` Failed to install modules at ${cwd}.\n Yarn exited with code: ${code}`)
2325
});
24-
})
26+
}).then(value => {console.log(value)});
2527

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

2830
installations.then(
29-
() => console.log(' Installed modules successfully!'),
31+
() => console.log('Installed modules successfully!'),
3032
err => console.error(err)
3133
);

start.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)