Skip to content
This repository was archived by the owner on Jan 7, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7e082d9
Getting the SD handle of an existing file directly from the FILE_INDE…
Dec 9, 2016
76fabc8
fix/Email Switch to latest electron forge setup
gnunicorn Mar 10, 2017
b0e43ea
fix/Email remove cruft config files
gnunicorn Mar 10, 2017
a7d0dd5
feat/Dependencis Add new nodejs library
gnunicorn Mar 13, 2017
75469bc
fix/Actions Simplify actions
gnunicorn Mar 13, 2017
3449090
feat/Auth Implement fake auth-flow
gnunicorn Mar 15, 2017
29ac7d0
fix/Email Cleaning up crufty actions
gnunicorn Mar 27, 2017
f0e3489
feat/Email Load accounts from new HomeContainer
gnunicorn Mar 27, 2017
a569d97
docs/Readme Update Documentation on using electron forge
gnunicorn Mar 27, 2017
271e76f
Merge remote-tracking branch 'upstream/master'
bochaco Mar 27, 2017
6f90c15
First draft to handle authentication
bochaco Mar 31, 2017
eeaec0c
feat/Enabling the flow for the creation of an email account
bochaco Apr 3, 2017
28b5ce8
MAID-2001 Migration to the new API to use MutableData (#168)
bochaco May 1, 2017
44b7cf9
fix/ui: update window size (#169)
May 2, 2017
d2f6767
MAID-2018 Markdown Editor to support SAFE Authenticator (#170)
May 3, 2017
9d48cae
fix/create_public_id: update to latest safe_app_nodejs (#171)
May 3, 2017
a1d28e7
fix/crypto_sha: update to use node crypto sha to safe crypto sha (#173)
May 3, 2017
cff45c2
fix/typo: update crypto to safeCrypto (#172)
May 3, 2017
381585c
feat/use_home_container: update to use home container (#175)
May 4, 2017
01a11fb
fix/Authorisation was not working on windows due to a known bug in sa…
bochaco May 4, 2017
c5f76e5
feat/adapt code to encrypt and decrypt entries for private MDs and Ho…
bochaco May 17, 2017
2530f84
Update to adapt latest saf_app_nodejs (#179)
May 19, 2017
63a30a4
fix/Adapt to latest safe_app_nodejs and minor fix (#178)
bochaco May 22, 2017
436a05d
fix/read_file: resolve read file issue (#176)
May 22, 2017
df52b05
feat/Encrypt entries in `_publicNames` container (#181)
bochaco May 26, 2017
f69bcb9
fix/UI: resolve ui related issues (#182)
May 26, 2017
71699bd
fix/Minor fix to make use of error codes rather than error names/mess…
bochaco Jun 5, 2017
8a1a01f
fix/auth_response: update to handle auth response (#185)
Jun 8, 2017
d4002a1
fix/tagtype_issue: resolve tagtype issue (#188)
Jun 15, 2017
78d1214
fix/Removing warnings and errors reported by React (#190)
bochaco Jun 19, 2017
4db2d2a
feat/Adapt to recent changes in ImmutableData close function (#191)
bochaco Jun 21, 2017
3dcce58
feat/revamp: update code quality and fix bugs (#192)
Jun 21, 2017
9d21ee2
docs/Enhance README to exaplain how to install dependencies to use mo…
bochaco Jun 21, 2017
fdebe0a
fix/file_upload_download: resolve upload download issue (#194)
Jun 22, 2017
38841a2
feat/Support for network state notifications in email app (#196)
bochaco Jun 29, 2017
cbb05a9
Integrated reconnect to network and minor UI fixes (#195)
Jun 29, 2017
5b5f2f3
fix/If reconnect fails enable the re-enable the reconnet button (#197)
bochaco Jun 29, 2017
5562f89
fix/ui_fixes: resolve minor ui fixes (#198)
Jul 3, 2017
3d497f2
feat/keytar: remove key tar deps (#199)
Jul 3, 2017
33a02dc
feat/no_local_key_trace: remove local storage (#200)
hitman401 Jul 3, 2017
55c36c3
feat/Display a loading spinner when processing some task (#202)
bochaco Jul 7, 2017
f531f48
MAID-2111 feat/Support multiple email ids (#203)
bochaco Jul 12, 2017
d5724b7
FIX :: Dropdown for email list (#204)
Jul 12, 2017
05dfd78
Update hosting app title (#205)
Jul 12, 2017
155eb41
fix/hosting_app: update hosting app version (#206)
Jul 12, 2017
6046d8b
Merge remote-tracking branch 'upstream/dev' into merge-dev-2-master
bochaco Jul 13, 2017
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
20 changes: 0 additions & 20 deletions email_app/.babelrc

This file was deleted.

33 changes: 33 additions & 0 deletions email_app/.compilerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"application/javascript": {
"presets": [
["env", { "targets": { "electron": "1.6.0" } }],
"es2015",
"stage-0",
"react"
],
"sourceMaps": "none",
"env": {
"development": {
"plugins": [
"transform-async-to-generator",
"transform-class-properties",
"transform-es2015-classes",
"react-hot-loader/babel"
],
"sourceMaps": "inline"
},
"production": {
"plugins": [
"transform-async-to-generator",
"transform-class-properties",
"transform-es2015-classes",
"react-optimize"
]
}
}
},
"text/less": {
"dumpLineNumbers": "comments"
}
}
1 change: 1 addition & 0 deletions email_app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Thumbs.db
/dist
/main.js
/main.js.map
/out
49 changes: 35 additions & 14 deletions email_app/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,51 @@
# Safe Mail Tutorial Application

The tutorial app show cases how to use the low level API from launcher to
build a simple email application.
The tutorial app show cases how to use the low level API from `safe_app_nodejs`
library to build a simple email application.

Demonstrates the usage of
- Private AppendableData
- StructuredData
Demonstrates the usage of:
- Private MutableData
- Public MutableData
- Immutable data
- App's home container
- `_publicNames` and services containers

Requires [safe_launcher](https://github.com/maidsafe/safe_launcher) version 0.9.1
Please refer to the [Application Data Model](#application-data-model) section below for additional details.

## Install

First, clone the repo and then install dependencies.
First, clone the repository:

```bash
$ cd your-project-name && npm install
$ cd your-project-name
```

## Run
And then install the dependencies:

```bash
$ npm install
```

If you are working on a development environment, you can run the command below instead, in order to get the `safe_client` libraries that use the `MockVault` file rather than connecting to the SAFE Network:

```bash
$ NODE_ENV=dev npm install
```

Run this two commands __simultaneously__ in different console tabs.
## Run

```bash
$ npm run hot-server
$ npm run start-hot
$ npm start
```

or run two servers with one command
This starts the app in development mode with hot-reloading.

### Faking Authentication

If you don't have authenticator set up and want to run the test with randomly generated testing credentials, run it as:

```bash
$ npm run dev
$ NODE_ENV=development SAFE_FAKE_AUTH=1 npm start
```

*Note: requires a node version >= 4 and an npm version >= 2.*
Expand Down Expand Up @@ -63,3 +78,9 @@ To package apps with options:
```bash
$ npm run package -- --[option]
```

## Application Data Model

The following diagram depicts how the emails are stored in the SAFE network, as well as how the email app stores email accounts information.

![Email App Data Model](./design/EmailApp-DataModel.png)
60 changes: 17 additions & 43 deletions email_app/app/actions/actionTypes.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
const ACTION_TYPES = {
// Initializer
AUTHORISE_APP: 'AUTHORISE_APP',
GET_CONFIG_FILE: 'GET_CONFIG_FILE',
WRITE_CONFIG_FILE: 'WRITE_CONFIG_FILE',
FETCH_DATA_ID_AT: 'FETCH_DATA_ID_AT',
SET_CREATE_ACCOUNT_PROCESSING: 'SET_CREATE_ACCOUNT_PROCESSING',
SET_CREATE_ACCOUNT_ERROR: 'SET_CREATE_ACCOUNT_ERROR',
CREATE_STRUCTURED_DATA: 'CREATE_STRUCTURED_DATA',
UPDATE_STRUCTURED_DATA: 'UPDATE_STRUCTURED_DATA',
FETCH_STRUCTURED_DATA: 'FETCH_STRUCTURED_DATA',
FETCH_STRUCTURE_DATA_HANDLE: 'FETCH_STRUCTURE_DATA_HANDLE',
DROP_STRUCTURED_DATA_HANDLE: 'DROP_STRUCTURED_DATA_HANDLE',
FETCH_STRUCTURE_DATA_ID_HANDLE: 'FETCH_STRUCTURE_DATA_ID_HANDLE',
POST_STRUCTURED_DATA: 'POST_STRUCTURED_DATA',
PUT_STRUCTURED_DATA: 'PUT_STRUCTURED_DATA',
FETCH_EMAIL_IDS: 'FETCH_EMAIL_IDS',
GET_CONFIG: 'GET_CONFIG',
REFRESH_EMAIL: 'REFRESH_EMAIL',
SET_INITIALIZER_TASK: 'SET_INITIALIZER_TASK',
SET_APPENDABLE_DATA_ID: 'SET_APPENDABLE_DATA_ID',
CREATE_APPENDABLE_DATA: 'CREATE_APPENDABLE_DATA',
FETCH_APPENDABLE_DATA_META: 'FETCH_APPENDABLE_DATA_META',
FETCH_APPENDABLE_DATA_HANDLER: 'FETCH_APPENDABLE_DATA_HANDLER',
APPEND_APPENDABLE_DATA: 'APPEND_APPENDABLE_DATA',
REMOVE_FROM_APPENDABLE_DATA: 'REMOVE_FROM_APPENDABLE_DATA',
POST_APPENDABLE_DATA: 'POST_APPENDABLE_DATA',
PUT_APPENDABLE_DATA: 'PUT_APPENDABLE_DATA',
DROP_APPENDABLE_DATA_HANDLE: 'DROP_APPENDABLE_DATA_HANDLE',
CLEAR_DELETE_DATA: 'CLEAR_DELETE_DATA',
GET_APPENDABLE_DATA_LENGTH: 'GET_APPENDABLE_DATA_LENGTH',
CREATE_IMMUT_WRITER_HANDLE: 'CREATE_IMMUT_WRITER_HANDLE',
GET_IMMUT_READ_HANDLE: 'GET_IMMUT_READ_HANDLE',
CLOSE_IMMUT_DATA_READER: 'CLOSE_IMMUT_DATA_READER',
READ_IMMUT_DATA: 'READ_IMMUT_DATA',
WRITE_IMMUT_DATA: 'WRITE_IMMUT_DATA',
CLOSE_IMMUT_DATA_WRITER: 'CLOSE_IMMUT_DATA_WRITER',
PUT_IMMUT_DATA: 'PUT_IMMUT_DATA',
STORE_NEW_ACCOUNT: 'STORE_NEW_ACCOUNT',
NET_STATUS_CHANGED: 'NET_STATUS_CHANGED',
RECONNECT_APP: 'RECONNECT_APP',

// Create Account
CREATE_ACCOUNT: 'CREATE_ACCOUNT',
CREATE_ACCOUNT_ERROR: 'SET_CREATE_ACCOUNT_ERROR',

// Mail Inbox
PUSH_MAIL: 'PUSH_MAIL',
SET_MAIL_PROCESSING: 'SET_MAIL_PROCESSING',
CLEAR_MAIL_PROCESSING: 'CLEAR_MAIL_PROCESSING',
MAIL_PROCESSING: 'MAIL_PROCESSING',
SET_ACTIVE_MAIL: 'SET_ACTIVE_MAIL',
SERIALISE_DATA_ID: 'SERIALISE_DATA_ID',
DESERIALISE_DATA_ID: 'DESERIALISE_DATA_ID',
GET_STRUCTURED_DATA_ID_HANDLE: 'GET_STRUCTURED_DATA_ID_HANDLE',
DROP_HANDLER: 'DROP_HANDLER',
GET_ENCRYPTED_KEY: 'GET_ENCRYPTED_KEY',
DELETE_ENCRYPTED_KEY: 'DELETE_ENCRYPTED_KEY',
GET_CIPHER_OPTS_HANDLE: 'GET_CIPHER_OPTS_HANDLE',
DELETE_CIPHER_OPTS_HANDLE: 'DELETE_CIPHER_OPTS_HANDLE',

CANCEL_COMPOSE: 'CANCEL_COMPOSE',
CLEAR_INBOX: 'CLEAR_INBOX',
PUSH_TO_INBOX: 'PUSH_TO_INBOX'
PUSH_TO_INBOX: 'PUSH_TO_INBOX',
PUSH_TO_ARCHIVE: 'PUSH_TO_ARCHIVE'
};

export default ACTION_TYPES;
188 changes: 0 additions & 188 deletions email_app/app/actions/appendable_data_actions.js

This file was deleted.

Loading