ProtonMail / proton-mail-settings

React web application to manage ProtonMail settings
53 stars 13 forks source link

ProtonMail-settings

You will need:

⚠ If you use Windows plz follow this document before anything else how to prepare Windows

How to dev 1

  1. Clone this repository
  2. Run $ npm i
  3. $ npm start

It will give you the URL where it's available.

You can login via /login

How to dev 2

  1. Clone the WebClient
  2. Clone this repository
  3. Clone fe-proxy
  4. Run $ npm install in every repo
  5. Create an env file with the key ROOT_DIR=/tmp (if you cloned everything inside /tmp )

:warning: Clone them inside the same root dir.

Once it's done ./app dev :tada:

It will run first, WebClient, then settings and proxy. :warning: A bit static for now, it's quick&dirty so 8080, 8081 and 8040 need to be available.

App available on http://localhost:8040. Settings available on http://localhost:8040/settings/

Where should I should I clone them ?

Better to keep the default dir and inside the same dir. ex:

49 directories, 56 files 
[atlas]:~/dev/taf
$ pwd     
/home/dhoko/dev/taf
[atlas]:~/dev/taf
$ tree -l
.
├── Angular
├── protonmail-settings
└── fe-proxy

Here WebClient is inside the dir Angular, is it an issue ? Nope. We can configure it via the env.

ROOT_DIR=/home/dhoko/dev/taf
WEBCLIENT_APP=Angular

One key/env:

Default === dirname with the default git clone dir.

Sync translations [App to crowdin]

You can sync them via $ npm run i18n:upgrade, it will:

How to deploy

Based on proton-bundler

Deploy to prod

$ npm run deploy:prod

Build from master post git clone into /tmp. --no-remote build from local.

How to test

  1. Set up tests
  2. Start the app
  3. Run npm run e2e for the CLI or npm run e2e-dev for the cypress test runner.
  4. 🎉🎉🎉

Sync translations [Crowdin to our App]

To get latest translations available on crowdin, you can run $ npm run i18n:getlatest. It will:

:warning: If you want to get only a custom list of translations, configure it inside po/i18n.txt and run $ npm run i18n:getlatest -- --custom

:rocket: Create a new version (before deploy)

This command will:

$ npx proton-version <patch|minor|major>

Default is patch

If you want to force the update of all dependencies add the flag --all;

By default it provides a prompt and ask you what you want to update etc.

If you have an active npm link it will remove it from your node_modules.