Compare commits

..

73 Commits

Author SHA1 Message Date
Ramiro Saenz eaa33fc8f3
EOL: Thank you, thank you, thank you, thank you 3 years ago
Ramiro Saenz 0669dafde5 EOL: Thank you, thank you, thank you, thank you 3 years ago
Ramiro Saenz 78acfeed42 Update .travis.yml 3 years ago
Ramiro Saenz f9e9a547bd Update appveyor.yml 3 years ago
Ramiro Saenz 02aa8ce840 Update appveyor.yml 3 years ago
Ramiro Saenz 6c31dcce1d Update appveyor.yml 3 years ago
Ramiro Saenz 7f3ecf5e1e Update appveyor.yml 3 years ago
Ramiro Saenz 287ee85067 CI fixes 3 years ago
Ramiro Saenz b7a5b39b1f
Merge pull request #3109 from KevinRoebert/master 3 years ago
Ramiro Saenz 6fcd982b46
Merge pull request #3102 from rodriguescelio/fix/screen-share 3 years ago
Kevin 5c4ee8d06a
Update package.json 3 years ago
Kevin R cb654525e0
Added Apple Silicon Support 3 years ago
Ramiro Saenz 1eebe2445f
Removed invitation to Slack 4 years ago
Celio Rodrigues 4a79697487 Fixed the screenshare capability 4 years ago
Ramiro Saenz 84a8f20bbc Versioning 4 years ago
Ramiro Saenz 04413c81eb Fixed exit on Master Password screen 4 years ago
Ramiro Saenz 1605ec5ebd Temporary fix to load Twitter and other websites inside webviews 4 years ago
Ramiro Saenz 6f4f33d53d Minor fixes 4 years ago
Ramiro Saenz f3fc3c7cf0 Removed diskusage because of build problems 4 years ago
Ramiro Saenz 89d0560ed3 Update appveyor.yml 4 years ago
Ramiro Saenz cc39ed6980 Update appveyor.yml 4 years ago
Ramiro Saenz 58f53323f3 Update appveyor.yml 4 years ago
Ramiro Saenz 82a44e93fc Updated Node 4 years ago
Ramiro Saenz c91ef575e3 Updated Electron and fixed some major bugs 4 years ago
Ramiro Saenz 5e94ebf0e9
Merge pull request #2897 from mhatvan/chore/update-electron 4 years ago
Ramiro Saenz c26845662c
Merge branch 'master' into chore/update-electron 4 years ago
Ramiro Saenz 008efd5f08 Reviewed code and tested 4 years ago
Ramiro Saenz 4f0c6e9bc1
Merge pull request #2807 from Vioner/fix/#2077-stop-rambox-when-running-out-of-space 4 years ago
mhatvan e18ff5e003
chore: Update Electron (#2871) 4 years ago
Ramiro Saenz 611235aee6 Added required scope to snap 5 years ago
Ramiro Saenz a8e5a42e51 Added new permissions to Snap package 5 years ago
Ramiro Saenz 2037dbafe5 Versioning 5 years ago
Ramiro Saenz 5eed7f02fd Changed URLs for updates and services 5 years ago
Ramiro Saenz 58b5975912 Added new Google URLs to avoid security rule 5 years ago
Karol Putra f8610047eb Merge branch 'fix/#2077-stop-rambox-when-running-out-of-space' of https://github.com/Vioner/community-edition into fix/#2077-stop-rambox-when-running-out-of-space 5 years ago
Karol Putra 072997e59c Added availableSpaceWatchDog. 5 years ago
Karol Putra 4127e0a707 Added availableSpaceWatchDog 5 years ago
Ramiro Saenz e14cfdff86 Update package.json 5 years ago
Ramiro Saenz 82f70c0c89 Changed URLs 5 years ago
Ramiro Saenz 120512e386 Update electron to 7.23.4 5 years ago
Ramiro Saenz dcaa45e86f Changed publisher name 5 years ago
Ramiro Saenz 95d04aa76e Versioning 5 years ago
Ramiro Saenz 025a8fab68 Fixes #2780 5 years ago
Ramiro Saenz 18ae907bd0 Update README.md 5 years ago
Ramiro Saenz 155a7fd2a2 Fixes #2706 5 years ago
Ramiro Saenz 6e1220fbae Added Volta 5 years ago
Ramiro Saenz c0293be615 Merge branch 'master' of https://github.com/saenzramiro/rambox 5 years ago
Ramiro Saenz 03e0c3be2d
Merge pull request #2639 from Zarel/patch-3 5 years ago
Ramiro Saenz 429721393e
Merge pull request #2751 from ramboxapp/dependabot/npm_and_yarn/electron-7.2.4 5 years ago
Ramiro Saenz 813c0d4628
Merge pull request #2671 from ramboxapp/dependabot/npm_and_yarn/auth0-js-9.13.2 5 years ago
Ramiro Saenz 3048d9d28c Install exact versions of libs 5 years ago
dependabot[bot] eb88f5d8fc
Bump electron from 7.1.12 to 7.2.4 5 years ago
Vulich Fernando d4b89a48ac Fix Do Not Disturb Tooltip 5 years ago
dependabot[bot] 02c0c549ce
Bump auth0-js from 9.7.3 to 9.13.2 5 years ago
Vulich Fernando ef2a2a9f15
Add files via upload 5 years ago
Vulich Fernando 9a5e686bb0
Add files via upload 5 years ago
Vulich Fernando 01265fdbae
Add files via upload 5 years ago
Vulich Fernando 02c8bacb2a
Add files via upload 5 years ago
Guangcong Luo c00109417f
Update repo URL in CONTRIBUTING.md 5 years ago
Vulich Fernando e01453b6a0
Merge pull request #2635 from Zarel/patch-1 5 years ago
Guangcong Luo d748323142
Update CONTRIBUTING.md with new services location 5 years ago
Vulich Fernando 7261dd10c6 Versioning 5 years ago
Vulich Fernando 10f577549a Provide option to disable auto-reload on fail 5 years ago
Vulich Fernando bec9bae9b9 Fix: Blue screen after getting the backup from Auth0 5 years ago
Vulich Fernando 151caa037d
Merge pull request #2621 from andia89/minimized 5 years ago
andreas 2185f32dd8 Adds requested changes for start minimized 5 years ago
Ramiro Saenz 168eacb2fe Added script for notarization 5 years ago
Ramiro Saenz 9166c49aae Fixed camera and mic permissions prompt 5 years ago
Ramiro Saenz 3326447d0f
Merge pull request #2628 from ramboxapp/0.7.4 5 years ago
Vulich Fernando fb1ab0dae5
Merge pull request #2623 from BKPepe/fix_readme 5 years ago
Josef Schlehofer 66f16e465d
Drop Table of Contents from menu 5 years ago
Josef Schlehofer 7d63ba374e
Fix Services available in Table of Contents 5 years ago
andreas e4f6746b28 Fixes start miniized 5 years ago
  1. 2
      .gitignore
  2. 2
      .npmrc
  3. 5
      .travis.yml
  4. 6
      Backers.md
  5. 43
      CONTRIBUTING.md
  6. 130
      README.md
  7. 6
      app.js
  8. 8
      app.json
  9. 104
      app/Application.js
  10. 2
      app/store/ServicesList.js
  11. 299
      app/ux/Auth0.js
  12. 210
      app/ux/WebView.js
  13. 11
      app/view/add/Add.js
  14. 1
      app/view/add/AddController.js
  15. 149
      app/view/main/Main.js
  16. 70
      app/view/main/MainController.js
  17. 94
      app/view/preferences/Preferences.js
  18. 2
      app/view/preferences/PreferencesController.js
  19. 7
      appveyor.yml
  20. 192
      electron/main.js
  21. 34
      electron/menu.js
  22. 4
      electron/tray.js
  23. 12
      electron/updater.js
  24. 5
      env-sample.js
  25. 12
      masterpassword.html
  26. 6128
      package-lock.json
  27. 82
      package.json
  28. 5
      packages/local/rambox-default-theme/sass/etc/all.scss
  29. BIN
      resources/icons/airdroid.png
  30. BIN
      resources/icons/androidmessages.png
  31. BIN
      resources/icons/aol.png
  32. BIN
      resources/icons/awsworkmail.png
  33. BIN
      resources/icons/bearychat.png
  34. BIN
      resources/icons/bip.png
  35. BIN
      resources/icons/calendar.png
  36. BIN
      resources/icons/chatwork.png
  37. BIN
      resources/icons/cliq.png
  38. BIN
      resources/icons/converse.png
  39. BIN
      resources/icons/crisp.png
  40. BIN
      resources/icons/devrant.png
  41. BIN
      resources/icons/dingtalk.png
  42. BIN
      resources/icons/discord.png
  43. BIN
      resources/icons/drift.png
  44. BIN
      resources/icons/duo.png
  45. BIN
      resources/icons/element.png
  46. BIN
      resources/icons/facebook.png
  47. BIN
      resources/icons/fastmail.png
  48. BIN
      resources/icons/fleep.png
  49. BIN
      resources/icons/flock.png
  50. BIN
      resources/icons/flowdock.png
  51. BIN
      resources/icons/freenode.png
  52. BIN
      resources/icons/gadugadu.png
  53. BIN
      resources/icons/gitter.png
  54. BIN
      resources/icons/glip.png
  55. BIN
      resources/icons/glowingbear.png
  56. BIN
      resources/icons/gmail.png
  57. BIN
      resources/icons/googledrive.png
  58. BIN
      resources/icons/googlevoice.png
  59. BIN
      resources/icons/grape.png
  60. BIN
      resources/icons/groupme.png
  61. BIN
      resources/icons/guilded.png
  62. BIN
      resources/icons/hangouts.png
  63. BIN
      resources/icons/hangoutschat.png
  64. BIN
      resources/icons/hibox.png
  65. BIN
      resources/icons/honeypot.png
  66. BIN
      resources/icons/hootsuite.png
  67. BIN
      resources/icons/horde.png
  68. BIN
      resources/icons/hushmail.png
  69. BIN
      resources/icons/icloudmail.png
  70. BIN
      resources/icons/icq.png
  71. BIN
      resources/icons/inbox.png
  72. BIN
      resources/icons/instagramdirect.png
  73. BIN
      resources/icons/intercom.png
  74. BIN
      resources/icons/irccloud.png
  75. BIN
      resources/icons/jandi.png
  76. BIN
      resources/icons/kaiwa.png
  77. BIN
      resources/icons/kezmo.png
  78. BIN
      resources/icons/kiwi.png
  79. BIN
      resources/icons/kune.png
  80. BIN
      resources/icons/linkedin.png
  81. BIN
      resources/icons/lounge.png
  82. BIN
      resources/icons/mailru.png
  83. BIN
      resources/icons/mastodon.png
  84. BIN
      resources/icons/mattermost.png
  85. BIN
      resources/icons/messenger.png
  86. BIN
      resources/icons/messengerpages.png
  87. BIN
      resources/icons/mightytext.png
  88. BIN
      resources/icons/missive.png
  89. BIN
      resources/icons/movim.png
  90. BIN
      resources/icons/mysms.png
  91. BIN
      resources/icons/noysi.png
  92. BIN
      resources/icons/okru.png
  93. BIN
      resources/icons/openmailbox.png
  94. BIN
      resources/icons/outlook.png
  95. BIN
      resources/icons/outlook365.png
  96. BIN
      resources/icons/protonmail.png
  97. BIN
      resources/icons/protonmailch.png
  98. BIN
      resources/icons/pushbullet.png
  99. BIN
      resources/icons/rainloop.png
  100. BIN
      resources/icons/reddit.png
  101. Some files were not shown because too many files have changed in this diff Show More

2
.gitignore vendored

@ -34,7 +34,5 @@ npm-debug.log
# Vagrant
.vagrant/
env.js
rambox_cfg.json
languages.js
electron/dev-app-update.yml

2
.npmrc

@ -0,0 +1,2 @@
package-lock = false
save-exact = true

5
.travis.yml

@ -1,9 +1,9 @@
matrix:
include:
- os: osx
osx_image: xcode10.1
osx_image: xcode12.4
language: node_js
node_js: "10"
node_js: "14.16.1"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
@ -44,5 +44,6 @@ script:
else
cd $TRAVIS_BUILD_DIR/build/production/Rambox/
npm i
npm i cli-truncate
npm run build:osx
fi

6
Backers.md

@ -1,6 +0,0 @@
# Monthly Donators
[Martin Grünbaum](https://github.com/alathon)
Ivan Toshkov
[Simon Joda Stößer](https://github.com/SimJoSt)

43
CONTRIBUTING.md

@ -2,7 +2,7 @@
We welcome pull requests! Follow these steps to contribute:
1. Find an [issue](https://github.com/saenzramiro/rambox/issues) that needs assistance.
1. Find an [issue](https://github.com/ramboxapp/community-edition/issues) that needs assistance.
1. Let us know you are working on it by posting a comment on the issue.
1. Follow the [Contribution Guidelines](#contribution-guidelines) to start working on the issue.
@ -65,15 +65,15 @@ If your versions are lower than the prerequisite versions, you should update.
#### Forking rambox
1. Go to the top level rambox repository: <https://github.com/saenzramiro/rambox>
1. Go to the top level rambox repository: <https://github.com/ramboxapp/community-edition>
1. Click the "Fork" Button in the upper right hand corner of the interface ([More Details Here](https://help.github.com/articles/fork-a-repo/))
1. After the repository (repo) has been forked, you will be taken to your copy of the rambox repo at <https://github.com/yourUsername/rambox>
1. After the repository (repo) has been forked, you will be taken to your copy of the rambox repo at <https://github.com/yourUsername/community-edition>
#### Cloning Your Fork
1. Open a Terminal / Command Line / Bash Shell in your projects directory (_i.e.: `/yourprojectdirectory/`_)
1. Clone your fork of rambox
- `git clone https://github.com/yourUsername/rambox.git`
- `git clone https://github.com/yourUsername/community-edition.git`
**(make sure to replace `yourUsername` with your GitHub username)**
@ -81,9 +81,9 @@ This will download the entire rambox repo to your projects directory.
#### Setup Your Upstream
1. Change directory to the new rambox directory (`cd rambox`)
1. Change directory to the new rambox directory (`cd community-edition`)
1. Add a remote to the official rambox repo:
- `git remote add upstream https://github.com/saenzramiro/rambox.git`
- `git remote add upstream https://github.com/ramboxapp/community-edition.git`
Congratulations, you now have a local copy of the rambox repo! :tada:
@ -122,22 +122,6 @@ Once you have rambox cloned, before you start the application, you first need to
npm install
```
Then you need to add the private environment variables (API Keys):
```bash
# Copy `env-sample.js` with a name of env.js
# Populate it with Auth0 clientid and domain e.g. test.auth0.com
# You can get these details from one of your "apps" here https://manage.auth0.com/#/clients/
# macOS / Linux
cp env-sample.js env.js
# Windows
copy env-sample.js env.js
```
Then edit the `env.js` file and modify the API keys only for services that you will use.
```bash
# Compile the files...
sencha app watch
@ -157,8 +141,11 @@ Always feel free to reach out to the chat room when you are not certain of any t
#### Adding or Editing Services
The services are stored inside the file `./app/store/ServicesList.js`. Add your service to the *BOTTOM* of the array.
The logo it's referencing is located in `./resources/icons/`.
The services are stored inside the file `./api/services.json` in the `gh-pages` branch:
https://github.com/ramboxapp/community-edition/blob/gh-pages/api/services.json
Add your service to the *BOTTOM* of the array.
To see these changes you'll need to stop your `npm start` and `sencha app watch`, and then rerun those.
### Creating a Pull Request
@ -170,15 +157,15 @@ You will make changes to copies of thefiles which make up rambox in a personal f
#### Important: ALWAYS EDIT ON A BRANCH
Take away only one thing from this document: Never, **EVER** make edits to the `staging` branch.
Take away only one thing from this document: Never, **EVER** make edits to the `master` branch.
ALWAYS make a new branch BEFORE you edit files.
This is critical, because if your PR is not accepted, your copy of staging will be forever sullied and the only way to fix it is to delete your fork and re-fork.
This is critical, because your copy of `master` will be forever sullied and the only way to fix it is a difficult hard-reset and force-push process, or deleting your fork and re-forking.
### Common Steps
1. Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page.
1. By default, all pull requests should be against the rambox main repo, `staging` branch.
- **Make sure that your Base Fork is set to saenzramiro/rambox when raising a Pull Request.**
1. By default, all pull requests should be against the rambox main repo, `master` branch.
- **Make sure that your Base Fork is set to ramboxapp/community-edition when raising a Pull Request.**
1. Submit a pull request.
1. The title (also called the subject) of your PR should be descriptive of your changes and succinctly indicates what is being fixed.
- **Do not add the issue number in the PR title or commit message.**

130
README.md

@ -1,3 +1,14 @@
# EOL
The Community Edition of Rambox is no longer maintained. We highly recommend that you update to the new version of Rambox, which has a FREE plan with all the features you already use and much more!
Visit: https://rambox.app/download
Thank you so much for all the users who contribute to this project all these years.
[Read our blog post to know more about our new Rambox.](https://rambox.medium.com/hello-2022-hello-new-rambox-4bdef5d6c3b8)
---
<div align="center">
<h1>
<br />
@ -35,9 +46,8 @@
## Table of Contents
- [Table of Contents](#table-of-contents)
- [Screenshot](#screenshot)
- [Services available - 100](#services-available---100)
- [Apps available](#apps-available)
- [Features](#features)
- [Privacy](#privacy)
- [Donations](#donations)
@ -54,117 +64,9 @@
![Rambox](./resources/screenshots/mac.png)
## Services available - 103
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fwhatsapp.png?alt=media" alt="WhatsApp" title="WhatsApp" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmessenger.png?alt=media" alt="Messenger" title="Messenger" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fskype.png?alt=media" alt="Skype" title="Skype" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fslack.png?alt=media" alt="Slack" title="Slack" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhangouts.png?alt=media" alt="Hangouts" title="Hangouts" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ftelegram.png?alt=media" alt="Telegram" title="Telegram" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fwechat.png?alt=media" alt="WeChat" title="WeChat" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgmail.png?alt=media" alt="Gmail" title="Gmail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Finbox.png?alt=media" alt="Inbox" title="Inbox" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fawsworkmail.png?alt=media" alt="Amazon WorkMail" title="Amazon WorkMail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fchatwork.png?alt=media" alt="ChatWork" title="ChatWork"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgroupme.png?alt=media" alt="GroupMe" title="GroupMe"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgrape.png?alt=media" alt="Grape" title="Grape"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgitter.png?alt=media" alt="Gitter" title="Gitter"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsteam.png?alt=media" alt="Steam" title="Steam"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fdiscord.png?alt=media" alt="Discord" title="Discord"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fnoysi.png?alt=media" alt="Noysi" title="Noysi"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Foutlook.png?alt=media" alt="Outlook" title="Outlook"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Foutlook365.png?alt=media" alt="Outlook 365" title="Outlook 365"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ftutanota.png?alt=media" alt="TutaNota" title="TutaNota"/>
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhushmail.png?alt=media" alt="Hushmail" title="Hushmail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fbearychat.png?alt=media" alt="BearyChat" title="BearyChat" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Faol.png?alt=media" alt="Aol" title="Aol" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsync.png?alt=media" alt="Sync" title="Sync" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fwire.png?alt=media" alt="Wire" title="Wire" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Frocketchat.png?alt=media" alt="Rocket Chat" title="Rocket Chat" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmissive.png?alt=media" alt="Missive" title="Missive" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fyahoo.png?alt=media" alt="Yahoo! Mail" title="Yahoo! Mail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fryver.png?alt=media" alt="Ryver" title="Ryver" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fyandex.png?alt=media" alt="Yandex Mail" title="Yandex Mail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fdasher.png?alt=media" alt="Dasher" title="Dasher" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fdingtalk.png?alt=media" alt="DingTalk" title="DingTalk" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fflowdock.png?alt=media" alt="FlowDock" title="FlowDock" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmattermost.png?alt=media" alt="Mattermost" title="Mattermost" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fvoxer.png?alt=media" alt="Voxer" title="Voxer" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fglip.png?alt=media" alt="Glip" title="Glip" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmysms.png?alt=media" alt="mysms" title="mysms" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ficq.png?alt=media" alt="ICQ" title="ICQ" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ftweetdeck.png?alt=media" alt="TweetDeck" title="TweetDeck" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzinc.png?alt=media" alt="Zinc" title="Zinc" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ffreenode.png?alt=media" alt="FreeNode" title="FreeNode" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmightytext.png?alt=media" alt="MightyText" title="MightyText" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzohoemail.png?alt=media" alt="Zoho Email" title="Zoho Email" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzohocliq.png?alt=media" alt="Zoho Cliq" title="Zoho Cliq" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Froundcube.png?alt=media" alt="Roundcube" title="Roundcube" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhorde.png?alt=media" alt="Horde" title="Horde" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsquirrelmail.png?alt=media" alt="SquirrelMail" title="SquirrelMail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzimbra.png?alt=media" alt="Zimbra" title="Zimbra" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhootsuite.png?alt=media" alt="Hootsuite" title="Hootsuite" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Famium.png?alt=media" alt="Amium" title="Amium" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Frainloop.png?alt=media" alt="RainLoop" title="RainLoop" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ficloud.png?alt=media" alt="iCloud Mail" title="iCloud Mail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Firccloud.png?alt=media" alt="IRC Cloud" title="IRC Cloud" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fkiwi.png?alt=media" alt="Kiwi IRC" title="Kiwi IRC" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsmooch.png?alt=media" alt="Smooch" title="Smooch" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fcrisp.png?alt=media" alt="Crisp" title="Crisp" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fflock.png?alt=media" alt="Flock" title="Flock" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fopenmailbox.png?alt=media" alt="Openmailbox" title="Openmailbox" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ftypetalk.png?alt=media" alt="Typetalk" title="Typetalk" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fdrift.png?alt=media" alt="Drift" title="Drift" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fwebexteams.png?alt=media" alt="Cisco Webex Teams" title="Cisco Webex Teams" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ffleep.png?alt=media" alt="Fleep" title="Fleep" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsocialcast.png?alt=media" alt="Socialcast" title="Socialcast" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Friot.png?alt=media" alt="Riot" title="Riot" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fpushbullet.png?alt=media" alt="Pushbullet" title="Pushbullet" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmovim.png?alt=media" alt="Movim" title="Movim" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fkaiwa.png?alt=media" alt="Kaiwa" title="Kaiwa" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzyptonite.png?alt=media" alt="Zyptonite" title="Zyptonite" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Flinkedin.png?alt=media" alt="LinkedIn" title="LinkedIn" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Flounge.png?alt=media" alt="The Lounge" title="The Lounge" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fkezmo.png?alt=media" alt="Kezmo" title="Kezmo" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fteams.png?alt=media" alt="Teams" title="Teams" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fxing.png?alt=media" alt="Xing" title="Xing" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fworkplace.png?alt=media" alt="Workplace" title="Workplace" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ffastmail.png?alt=media" alt="FastMail" title="FastMail" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhibox.png?alt=media" alt="Hibox" title="Hibox" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fjandi.png?alt=media" alt="Jandi" title="Jandi" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fthreema.png?alt=media" alt="Threema" title="Threema" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmessengerpages.png?alt=media" alt="Messenger for Pages" title="Messenger for Pages" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fvk.png?alt=media" alt="VK Messenger" title="VK Messenger" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmastodon.png?alt=media" alt="Mastodon" title="Mastodon" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fteamworkchat.png?alt=media" alt="Teamwork Chat" title="Teamwork Chat" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fclocktweets.png?alt=media" alt="ClockTweets" title="ClockTweets" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fintercom.png?alt=media" alt="Intercom" title="Intercom" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgooglevoice.png?alt=media" alt="Voice" title="Voice" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsandstorm.png?alt=media" alt="Sandstorm" title="Sandstorm" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fgadugadu.png?alt=media" alt="Gadu-Gadu" title="Gadu-Gadu" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmailru.png?alt=media" alt="Mail.Ru" title="Mail.Ru" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fkune.png?alt=media" alt="Kune" title="Kune" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fzulip.png?alt=media" alt="Zulip" title="Zulip" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fstride.png?alt=media" alt="Stride" title="Stride" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fhangoutschat.png?alt=media" alt="Hangouts Chat" title="Hangouts Chat" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fmessengerpages.png?alt=media" alt="Messenger for Business" title="Messenger for Business" />
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fandroidmessages.png?alt=media" alt="Android Messages" title="Android Messages">
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fsococo.png?alt=media" alt="Sococo" title="Sococo">
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Ftawkto.png?alt=media" alt="Tawk.to" title="Tawk.to">
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fprotonmail.png?alt=media" alt="ProtonMail & ProtonMail Onion" title="ProtonMail & ProtonMail Onion">
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fdevrant.png?alt=media" alt="devRant" title="devRant">
<img width="80" align="left" src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Freddit.png?alt=media" alt="Reddit" title="Reddit">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
## Apps available
Visit our website https://rambox.app/#apps and select the "Community-Edition" filter to see all the apps available.
## Features
@ -219,8 +121,6 @@ Fork and work!
```shell
git clone https://github.com/saenzramiro/rambox.git
cd rambox
cp env-sample.js env.js
# update env.js with your auth0 details.
npm install
sencha app watch
npm start

6
app.js

@ -61,18 +61,18 @@ ipc.on('autoUpdater:update-downloaded', function(e, info) {
'->'
,{
xtype: 'label'
,html: '<b>New version ready to install ('+info.version+')!</b> It will be installed the next time Rambox is relaunched.'
,html: '<b>New version is ready to be installed ('+info.version+')!</b> Click the following button to install it now.'
}
,{
xtype: 'button'
,text: 'Relaunch Now'
,text: 'Install now'
,handler: function(btn) { ipc.send('autoUpdater:quit-and-install'); }
}
,{
xtype: 'button'
,text: 'Changelog'
,ui: 'decline'
,href: 'https://github.com/ramboxapp/community-edition/releases/tag/'+info.version
,href: 'https://github.com/ramboxapp/download/releases/latest'
}
,'->'
,{

8
app.json

@ -109,10 +109,6 @@
{
"path": "resources/js/loadscreen.js"
},
{
"path": "env.js",
"remote": true
},
{
"path": "app.js",
"bundle": true
@ -291,10 +287,10 @@
*/
"resources": [
"electron",
"env.js",
"package.json",
"package-lock.json",
"masterpassword.html"
"masterpassword.html",
"screenselector.html"
],
/**

104
app/Application.js

@ -4,8 +4,7 @@ Ext.define('Rambox.Application', {
,name: 'Rambox'
,requires: [
'Rambox.ux.Auth0'
,'Rambox.util.MD5'
'Rambox.util.MD5'
,'Ext.window.Toast'
,'Ext.util.Cookies'
]
@ -23,7 +22,9 @@ Ext.define('Rambox.Application', {
,config: {
totalServicesLoaded: 0
,totalNotifications: 0
,googleURLs: []
}
,launch: function () {
const isOnline = require('is-online');
@ -132,39 +133,20 @@ Ext.define('Rambox.Application', {
]
});
}
// Prevent track if the user have disabled this option (default: false)
if ( !ipc.sendSync('sendStatistics') ) {
ga_storage = {
_enableSSL: Ext.emptyFn
,_disableSSL: Ext.emptyFn
,_setAccount: Ext.emptyFn
,_setDomain: Ext.emptyFn
,_setLocale: Ext.emptyFn
,_setCustomVar: Ext.emptyFn
,_deleteCustomVar: Ext.emptyFn
,_trackPageview: Ext.emptyFn
,_trackEvent: Ext.emptyFn
}
}
// Set Google Analytics events
ga_storage._setAccount('UA-80680424-1');
ga_storage._trackPageview('/index.html', 'main');
ga_storage._trackEvent('Versions', require('electron').remote.app.getVersion());
// Load language for Ext JS library
Ext.Loader.loadScript({url: Ext.util.Format.format("ext/packages/ext-locale/build/ext-locale-{0}.js", localStorage.getItem('locale-auth0') || 'en')});
// Initialize Auth0
if ( auth0Cfg.clientID !== '' && auth0Cfg.domain !== '' ) Rambox.ux.Auth0.init();
// Set cookies to help Tooltip.io messages segmentation
Ext.util.Cookies.set('version', require('electron').remote.app.getVersion());
if ( Ext.util.Cookies.get('auth0') === null ) Ext.util.Cookies.set('auth0', false);
// Check for updates
if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Rambox.app.checkUpdate(true);
Ext.Loader.loadScript({url: Ext.util.Format.format("ext/packages/ext-locale/build/ext-locale-{0}.js", localStorage.getItem('locale-extjs') || 'en')});
// Set Google URLs
Rambox.app.config.googleURLs = [
"accounts.google.com/ServiceLogin",
"accounts.google.com/signin",
"accounts.google.com/_/lookup/accountlookup",
"accounts.google.com/o/oauth2",
"accounts.google.com/_/signin",
"accounts.google.com/AddSession?",
"accounts.google.com/_/"
];
// Shortcuts
const platform = require('electron').remote.process.platform;
@ -265,60 +247,6 @@ Ext.define('Rambox.Application', {
}
,checkUpdate: function(silence) {
console.info('Checking for updates...');
Ext.Ajax.request({
url: 'https://rambox.pro/api/latestversion.json'
,method: 'GET'
,success: function(response) {
var json = Ext.decode(response.responseText);
var appVersion = new Ext.Version(require('electron').remote.app.getVersion());
if ( appVersion.isLessThan(json.version) ) {
console.info('New version is available', json.version);
Ext.cq1('app-main').addDocked({
xtype: 'toolbar'
,dock: 'top'
,ui: 'newversion'
,items: [
'->'
,{
xtype: 'label'
,html: '<b>'+locale['app.update[0]']+'</b> ('+json.version+')' + ( process.platform === 'win32' ? ' is downloading in the background and you will be notified when it is ready to be installed.' : '' )
}
,{
xtype: 'button'
,text: locale['app.update[1]']
,href: process.platform === 'darwin' ? 'https://getrambox.herokuapp.com/download/'+process.platform+'_'+process.arch : 'https://github.com/ramboxapp/community-edition/releases/latest'
,hidden: process.platform === 'win32'
}
,{
xtype: 'button'
,text: locale['app.update[2]']
,ui: 'decline'
,tooltip: 'Click here to see more information about the new version.'
,href: 'https://github.com/ramboxapp/community-edition/releases/tag/'+json.version
}
,'->'
,{
glyph: 'xf00d@FontAwesome'
,baseCls: ''
,style: 'cursor:pointer;'
,handler: function(btn) { Ext.cq1('app-main').removeDocked(btn.up('toolbar'), true); }
}
]
});
ipc.send('autoUpdater:check-for-updates');
return;
} else if ( !silence ) {
Ext.Msg.show({
title: locale['app.update[3]']
,message: locale['app.update[4]']
,icon: Ext.Msg.INFO
,buttons: Ext.Msg.OK
});
}
console.info('Your version is the latest. No need to update.');
}
});
ipc.send('autoUpdater:check-for-updates');
}
});

2
app/store/ServicesList.js

@ -10,7 +10,7 @@ Ext.define('Rambox.store.ServicesList', {
,proxy: {
type: 'ajax',
url: 'https://raw.githubusercontent.com/saenzramiro/rambox/gh-pages/api/services.json',
url: 'resources/services.json',
reader: {
type: 'json',
rootProperty: 'responseText'

299
app/ux/Auth0.js

@ -1,299 +0,0 @@
Ext.define('Rambox.ux.Auth0', {
singleton: true
// private
,lock: null
,auth0: null
,authService: null
,backupCurrent: false
,init: function() {
var me = this;
var Auth0 = require('auth0-js');
var _AuthService = require('./resources/js/AuthService');
me.authService = new _AuthService.default({
clientId: auth0Cfg.clientID,
authorizeEndpoint: 'https://'+auth0Cfg.domain+'/authorize',
audience: 'https://'+auth0Cfg.domain+'/userinfo',
scope: 'openid profile offline_access',
redirectUri: 'https://'+auth0Cfg.domain+'/mobile',
tokenEndpoint: 'https://'+auth0Cfg.domain+'/oauth/token'
});
me.auth0 = new Auth0.WebAuth({ clientID: auth0Cfg.clientID, domain : auth0Cfg.domain });
//me.defineEvents();
}
,onLogin: function(token, authWindow) {
var me = this;
authWindow.close();
me.auth0.client.userInfo(token.access_token, function(err, profile) {
if ( err ) {
if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration);
Ext.Msg.hide();
return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.error_description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
}
profile.user_metadata = profile['https://rambox.pro/user_metadata'];
delete profile['https://rambox.pro/user_metadata'];
// Display a spinner while waiting
Ext.Msg.wait(locale['app.window[29]'], locale['app.window[28]']);
// Google Analytics Event
ga_storage._trackEvent('Users', 'loggedIn');
// Set cookies to help Tooltip.io messages segmentation
Ext.util.Cookies.set('auth0', true);
// User is logged in
// Save the profile and JWT.
localStorage.setItem('profile', JSON.stringify(profile));
localStorage.setItem('access_token', token.access_token);
localStorage.setItem('id_token', token.id_token);
localStorage.setItem('refresh_token', token.refresh_token);
if ( !Ext.isEmpty(profile.user_metadata) && !Ext.isEmpty(profile.user_metadata.services) && !me.backupCurrent ) {
Ext.each(profile.user_metadata.services, function(s) {
var service = Ext.create('Rambox.model.Service', s);
service.save();
Ext.getStore('Services').add(service);
});
require('electron').remote.getCurrentWindow().reload();
}
Ext.Msg.hide();
Ext.cq1('app-main').getViewModel().set('username', profile.name);
Ext.cq1('app-main').getViewModel().set('avatar', profile.picture);
});
}
,backupConfiguration: function(callback) {
var me = this;
Ext.Msg.wait('Saving backup...', 'Please wait...');
// Getting all services
var lastupdate = (new Date()).toJSON();
var services = [];
Ext.getStore('Services').each(function(service) {
var s = Ext.clone(service);
delete s.data.id;
delete s.data.zoomLevel;
services.push(s.data);
});
Ext.Ajax.request({
url: 'https://rambox.auth0.com/api/v2/users/'+Ext.decode(localStorage.getItem('profile')).sub
,method: 'PATCH'
,headers: { authorization: "Bearer " + localStorage.getItem('id_token') }
,jsonData: { user_metadata: { services: services, services_lastupdate: lastupdate } }
,success: function(response) {
Ext.Msg.hide();
// Save the last update in localStorage
var profile = Ext.decode(localStorage.getItem('profile'));
if ( !profile.user_metadata ) profile.user_metadata = {};
profile.user_metadata.services_lastupdate = lastupdate;
localStorage.setItem('profile', Ext.encode(profile));
Ext.cq1('app-main').getViewModel().set('last_sync', new Date(lastupdate).toUTCString());
Ext.toast({
html: '<i class="fa fa-check fa-3x fa-pull-left" aria-hidden="true"></i> Your configuration were successfully backed up.'
,title: 'Synchronize Configuration'
,width: 300
,align: 't'
,closable: false
});
if ( Ext.isFunction(callback) ) callback.bind(me)();
}
,failure: function(response) {
if ( response.status === 401 ) return me.renewToken(me.backupConfiguration);
Ext.Msg.hide();
Ext.toast({
html: '<i class="fa fa-times fa-3x fa-pull-left" aria-hidden="true"></i> Error occurred when trying to backup your configuration.'
,title: 'Synchronize Configuration'
,width: 300
,align: 't'
,closable: false
});
if ( Ext.isFunction(callback) ) callback.bind(me)();
console.error(response);
}
});
}
,restoreConfiguration: function() {
var me = this;
me.auth0.client.userInfo(localStorage.getItem('access_token'), function(err, profile) {
if ( err ) {
if ( err.code === 401 ) return me.renewToken(me.restoreConfiguration);
return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
}
profile.user_metadata = profile['https://rambox.pro/user_metadata'];
delete profile['https://rambox.pro/user_metadata'];
// First we remove all current services
Ext.cq1('app-main').getController().removeAllServices(false, function() {
if ( !profile.user_metadata || !profile.user_metadata.services ) return;
Ext.each(profile.user_metadata.services, function(s) {
var service = Ext.create('Rambox.model.Service', s);
service.save();
Ext.getStore('Services').add(service);
});
require('electron').remote.getCurrentWindow().reload();
});
});
}
,checkConfiguration: function() {
var me = this;
me.auth0.client.userInfo(localStorage.getItem('access_token'), function(err, profile) {
if ( err ) {
if ( err.code === 401 ) return me.renewToken(me.checkConfiguration);
return Ext.Msg.show({
title: 'Error'
,message: 'There was an error getting the profile: ' + err.description
,icon: Ext.Msg.ERROR
,buttons: Ext.Msg.OK
});
}
profile.user_metadata = profile['https://rambox.pro/user_metadata'];
delete profile['https://rambox.pro/user_metadata'];
if ( !profile.user_metadata ) {
Ext.toast({
html: 'You don\'t have any backup yet.'
,title: 'Synchronize Configuration'
,width: 300
,align: 't'
,closable: false
});
return;
}
if ( Math.floor(new Date(profile.user_metadata.services_lastupdate) / 1000) > Math.floor(new Date(Ext.decode(localStorage.getItem('profile')).user_metadata.services_lastupdate) / 1000) ) {
Ext.toast({
html: 'Your settings are out of date.'
,title: 'Synchronize Configuration'
,width: 300
,align: 't'
,closable: false
});
} else {
Ext.toast({
html: '<i class="fa fa-check fa-3x fa-pull-left" aria-hidden="true"></i> Latest backup is already applied.'
,title: 'Synchronize Configuration'
,width: 300
,align: 't'
,closable: false
});
}
});
}
,renewToken: function(callback) {
var me = this;
Ext.Ajax.request({
url: 'https://rambox.auth0.com/oauth/token'
,method: 'POST'
,jsonData: {
grant_type: 'refresh_token'
,client_id: auth0Cfg.clientID
,client_secret: auth0Cfg.clientSecret
,refresh_token: localStorage.getItem('refresh_token')
,api_type: 'app'
}
,success: function(response) {
var json = Ext.decode(response.responseText);
localStorage.setItem('access_token', json.access_token);
localStorage.setItem('id_token', json.id_token);
if ( Ext.isFunction(callback) ) callback.bind(me)();
}
,failure: function(response) {
console.error(response);
}
});
}
,login: function() {
var me = this;
var electron = require('electron').remote;
var authWindow = new electron.BrowserWindow({
title: 'Rambox - Login'
,width: 400
,height: 600
,maximizable: false
,minimizable: false
,resizable: false
,center: true
,autoHideMenuBar: true
,skipTaskbar: true
,fullscreenable: false
,modal: true
,parent: require('electron').remote.getCurrentWindow()
,webPreferences: {
partition: 'persist:rambox'
}
});
authWindow.on('closed', function() {
authWindow = null;
});
authWindow.loadURL(me.authService.requestAuthCode());
authWindow.webContents.on('did-start-loading', function(e) {
authWindow.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => {
let googleLoginURLs = ['accounts.google.com/signin/oauth', 'accounts.google.com/ServiceLogin']
googleLoginURLs.forEach((loginURL) => {
if ( details.url.indexOf(loginURL) > -1 ) details.requestHeaders['User-Agent'] = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0' })
callback({ cancel: false, requestHeaders: details.requestHeaders });
});
});
authWindow.webContents.on('did-navigate', function(e, url) {
me.authService.requestAccessCode(url, me.onLogin.bind(me), authWindow);
});
}
,logout: function() {
var me = this;
localStorage.removeItem('profile');
localStorage.removeItem('id_token');
localStorage.removeItem('refresh_token');
localStorage.removeItem('access_token');
// Set cookies to help Tooltip.io messages segmentation
Ext.util.Cookies.set('auth0', false);
}
});

210
app/ux/WebView.js

@ -35,14 +35,11 @@ Ext.define('Rambox.ux.WebView',{
}
}
// Allow Custom sites with self certificates
//if ( me.record.get('trust') ) ipc.send('allowCertificate', me.src);
const prefConfig = ipc.sendSync('getConfig');
Ext.apply(me, {
items: me.webViewConstructor()
,title: prefConfig.hide_tabbar_labels ? '' : (me.record.get('tabname') ? me.record.get('name') : '')
,icon: me.record.get('type') === 'custom' ? (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo')) : 'https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2F'+me.record.get('logo')+'?alt=media'
,icon: me.record.get('type') === 'custom' ? (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo')) : 'resources/icons/'+me.record.get('logo')
,src: me.record.get('url')
,type: me.record.get('type')
,align: me.record.get('align')
@ -216,14 +213,13 @@ Ext.define('Rambox.ux.WebView',{
,plugins: 'true'
,allowtransparency: 'on'
,autosize: 'on'
,webpreferences: '' //,nativeWindowOpen=yes
//,disablewebsecurity: 'on' // Disabled because some services (Like Google Drive) dont work with this enabled
,webpreferences: 'nativeWindowOpen=yes, spellcheck=no, contextIsolation=no'
,allowpopups: 'on'
// ,disablewebsecurity: 'on' // Disabled because some services (Like Google Drive) dont work with this enabled
,useragent: me.getUserAgent()
,preload: './resources/js/rambox-service-api.js'
}
}];
if ( Ext.getStore('ServicesList').getById(this.record.get('type')) ? Ext.getStore('ServicesList').getById(me.record.get('type')).get('allow_popups') : false ) cfg[0].autoEl.allowpopups = 'on';
}
return cfg;
@ -276,27 +272,25 @@ Ext.define('Rambox.ux.WebView',{
if ( !me.record.get('enabled') ) return;
var webview = me.getWebView();
let googleLoginURLs = ['accounts.google.com/signin', 'accounts.google.com/ServiceLogin', ]
me.errorCodeLog = []
// Google Analytics Event
ga_storage._trackEvent('Services', 'load', me.type, 1, true);
// Notifications in Webview
me.setNotifications(localStorage.getItem('locked') || JSON.parse(localStorage.getItem('dontDisturb')) ? false : me.record.get('notifications'));
require('electron').remote.session.fromPartition('persist:' + me.record.get('type') + '_' + me.id.replace('tab_', '') + (localStorage.getItem('id_token') ? '_' + Ext.decode(localStorage.getItem('profile')).sub : '')).webRequest.onBeforeSendHeaders((details, callback) => {
const change = details.url.match(/^https:\/\/accounts\.google\.com(\/|$)/);
if ( change ) details.requestHeaders['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0';
callback({ cancel: false, requestHeaders: details.requestHeaders });
});
// Show and hide spinner when is loading
webview.addEventListener("did-start-loading", function() {
console.info('Start loading...', me.src);
webview.getWebContents().session.webRequest.onBeforeSendHeaders((details, callback) => {
googleLoginURLs.forEach((loginURL) => { if ( details.url.indexOf(loginURL) > -1 ) details.requestHeaders['User-Agent'] = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0'})
callback({ cancel: false, requestHeaders: details.requestHeaders });
});
if ( !me.down('statusbar').closed || !me.down('statusbar').keep ) me.down('statusbar').show();
me.down('statusbar').showBusy();
});
webview.addEventListener("did-stop-loading", function() {
me.down('statusbar').clearStatus({useDefaults: true});
if ( !me.down('statusbar').keep ) me.down('statusbar').hide();
@ -326,6 +320,8 @@ Ext.define('Rambox.ux.WebView',{
// On search text
webview.addEventListener('did-fail-load', function(e) {
console.info('The service fail at loading', me.src, e);
if ( me.record.get('disableAutoReloadOnFail') || !e.isMainFrame ) return
me.errorCodeLog.push(e.errorCode)
var attempt = me.errorCodeLog.filter(function(code) { return code === e.errorCode });
@ -379,140 +375,14 @@ Ext.define('Rambox.ux.WebView',{
// Open links in default browser
webview.addEventListener('new-window', function(e) {
switch ( me.type ) {
case 'skype':
// hack to fix multiple browser tabs on Skype link click, re #11
if ( require('url').parse(me.down('statusbar #url').html).protocol !== null ) {
e.url = me.down('statusbar #url').html;
} else if ( e.url.indexOf('imgpsh_fullsize') >= 0 ) {
ipc.send('image:download', e.url, e.target.partition);
e.preventDefault();
return;
}
break;
case 'hangouts':
e.preventDefault();
if ( e.url.indexOf('plus.google.com/u/0/photos/albums') >= 0 ) {
ipc.send('image:popup', e.url, e.target.partition);
return;
} else if ( e.url.indexOf('/el/CONVERSATION/') >= 0 ) {
me.add({
xtype: 'window'
,title: 'Video Call'
,width: '80%'
,height: '80%'
,maximizable: true
,resizable: true
,draggable: true
,collapsible: true
,items: {
xtype: 'component'
,hideMode: 'offsets'
,autoRender: true
,autoShow: true
,autoEl: {
tag: 'webview'
,src: e.url
,style: 'width:100%;height:100%;'
,partition: me.getWebView().partition
,useragent: me.getUserAgent()
}
}
}).show();
return;
}
break;
case 'slack':
if ( e.url.indexOf('slack.com/call/') >= 0 ) {
me.add({
xtype: 'window'
,title: e.options.title
,width: e.options.width
,height: e.options.height
,maximizable: true
,resizable: true
,draggable: true
,collapsible: true
,items: {
xtype: 'component'
,hideMode: 'offsets'
,autoRender: true
,autoShow: true
,autoEl: {
tag: 'webview'
,src: e.url
,style: 'width:100%;height:100%;'
,partition: me.getWebView().partition
,useragent: me.getUserAgent()
}
}
}).show();
e.preventDefault();
return;
}
break;
case 'icloud':
if ( e.url.indexOf('index.html#compose') >= 0 ) {
me.add({
xtype: 'window'
,title: 'iCloud - Compose'
,width: 700
,height: 500
,maximizable: true
,resizable: true
,draggable: true
,collapsible: true
,items: {
xtype: 'component'
,itemId: 'webview'
,hideMode: 'offsets'
,autoRender: true
,autoShow: true
,autoEl: {
tag: 'webview'
,src: e.url
,style: 'width:100%;height:100%;'
,partition: me.getWebView().partition
,useragent: me.getUserAgent()
,preload: './resources/js/rambox-modal-api.js'
}
}
,listeners: {
show: function(win) {
const webview = win.down('#webview').el.dom;
webview.addEventListener('ipc-message', function(event) {
var channel = event.channel;
switch (channel) {
case 'close':
win.close();
break;
default:
break;
}
});
}
}
}).show();
e.preventDefault();
return;
}
break;
case 'flowdock':
if ( e.disposition === 'new-window' ) {
e.preventDefault();
require('electron').shell.openExternal(e.url);
}
return;
break;
default:
break;
}
const protocol = require('url').parse(e.url).protocol;
if (protocol === 'http:' || protocol === 'https:' || protocol === 'mailto:') {
e.preventDefault();
require('electron').shell.openExternal(e.url);
}
e.preventDefault();
const { URL } = require('url');
const url = new URL(e.url);
const protocol = url.protocol;
// Block some Deep links to prevent that open its app (Ex: Slack)
if ( ['slack:'].includes(protocol) ) return;
// Allow Deep links
if ( !['http:', 'https:', 'about:'].includes(protocol) ) return require('electron').shell.openExternal(url.href);
});
webview.addEventListener('will-navigate', function(e, url) {
@ -550,8 +420,8 @@ Ext.define('Rambox.ux.WebView',{
js_inject += 'document.body.scrollTop=0;';
// Handles Certificate Errors
webview.getWebContents().on('certificate-error', function(event, url, error, certificate, callback) {
if ( me.record.get('trust') ) {
require('electron').remote.webContents.fromId(webview.getWebContentsId()).on('certificate-error', function(event, url, error, certificate, callback) {
if (me.record.get('trust')) {
event.preventDefault();
callback(true);
} else {
@ -561,25 +431,25 @@ Ext.define('Rambox.ux.WebView',{
me.down('statusbar').keep = true;
me.down('statusbar').show();
me.down('statusbar').setStatus({
text: '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Certification Warning'
text: '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Certification Warning',
});
me.down('statusbar').down('button').show();
});
if (!eventsOnDom) {
webview.getWebContents().on('before-input-event', (event, input) => {
require('electron').remote.webContents.fromId(webview.getWebContentsId()).on('before-input-event', (event, input) => {
if (input.type !== 'keyDown') return;
var modifiers = [];
if ( input.shift ) modifiers.push('shift');
if ( input.control ) modifiers.push('control');
if ( input.alt ) modifiers.push('alt');
if ( input.meta ) modifiers.push('meta');
if ( input.isAutoRepeat ) modifiers.push('isAutoRepeat');
if (input.shift) modifiers.push('shift');
if (input.control) modifiers.push('control');
if (input.alt) modifiers.push('alt');
if (input.meta) modifiers.push('meta');
if (input.isAutoRepeat) modifiers.push('isAutoRepeat');
if ( input.key === 'Tab' && !(modifiers && modifiers.length) ) return;
if (input.key === 'Tab' && !(modifiers && modifiers.length)) return;
// Maps special keys to fire the correct event in Mac OS
if ( require('electron').remote.process.platform === 'darwin' ) {
if (require('electron').remote.process.platform === 'darwin') {
var keys = [];
keys['ƒ'] = 'f'; // Search
keys[' '] = 'l'; // Lock
@ -588,17 +458,25 @@ Ext.define('Rambox.ux.WebView',{
input.key = keys[input.key] ? keys[input.key] : input.key;
}
if ( input.key === 'F11' || input.key === 'a' || input.key === 'A' || input.key === 'F12' || input.key === 'q' || (input.key === 'F1' && modifiers.includes('control'))) return;
if (
input.key === 'F11' ||
input.key === 'a' ||
input.key === 'A' ||
input.key === 'F12' ||
input.key === 'q' ||
(input.key === 'F1' && modifiers.includes('control'))
)
return;
require('electron').remote.getCurrentWebContents().sendInputEvent({
type: input.type,
keyCode: input.key,
modifiers: modifiers
modifiers: modifiers,
});
})
});
eventsOnDom = true;
googleLoginURLs.forEach((loginURL) => { if ( webview.getURL().indexOf(loginURL) > -1 ) webview.reload() })
Rambox.app.config.googleURLs.forEach((loginURL) => { if ( webview.getURL().indexOf(loginURL) > -1 ) webview.reload() })
}
webview.executeJavaScript(js_inject).then(result => {} ).catch(err => { console.log(err) })
});

11
app/view/add/Add.js

@ -28,7 +28,7 @@ Ext.define('Rambox.view.add.Add',{
var me = this;
me.title = (!me.edit ? locale['app.window[0]'] : locale['app.window[1]']) + ' ' + me.record.get('name');
me.icon = me.record.get('type') === 'custom' ? (!me.edit ? 'resources/icons/custom.png' : (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo'))) : 'https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2F'+me.record.get('logo')+'?alt=media';
me.icon = me.record.get('type') === 'custom' ? (!me.edit ? 'resources/icons/custom.png' : (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo'))) : 'resources/icons/'+me.record.get('logo');
me.items = [
{
xtype: 'form'
@ -192,6 +192,15 @@ Ext.define('Rambox.view.add.Add',{
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: 'Disable auto-reload on fail'
,name: 'disableAutoReloadOnFail'
,hidden: false
,checked: me.edit ? me.record.get('disableAutoReloadOnFail') : false
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: locale['app.window[19]']

1
app/view/add/AddController.js

@ -40,6 +40,7 @@ Ext.define('Rambox.view.add.AddController', {
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter
,trust: formValues.trust
,js_unread: formValues.js_unread
,disableAutoReloadOnFail: formValues.disableAutoReloadOnFail
});
var view = Ext.getCmp('tab_'+win.record.get('id'));

149
app/view/main/Main.js

@ -28,13 +28,6 @@ Ext.define('Rambox.view.main.Main', {
,tabBar: {
id: 'mainTabBar'
,cls: JSON.parse(localStorage.getItem('dontDisturb')) ? 'dontdisturb' : ''
,items: [{
xtype: 'button'
,html: '<span class="fa fa-heart" style="color:red;font-size:16px;cursor:pointer;padding:0 5px;"></span>'
,baseCls: ''
,tooltip: locale['app.main[25]']
,href: 'https://rambox.app/donate.html'
}]
}
,items: [
{
@ -110,7 +103,7 @@ Ext.define('Rambox.view.main.Main', {
,tpl: [
'<tpl for=".">'
,'<div class="service" data-qtip="{description}">'
,'<img src="https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2F{logo}?alt=media&token=49036238-8f37-4f08-a7e5-1563be94c36e" width="48" />'
,'<img src="resources/icons/{logo}" width="48" />'
,'<span>{name}</span>'
,'</div>'
,'</tpl>'
@ -158,7 +151,7 @@ Ext.define('Rambox.view.main.Main', {
xtype: 'templatecolumn'
,width: 52
,variableRowHeight: true
,tpl: '<img src="{[ values.type !== \"custom\" ? \"https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2F\"+values.logo+\"?alt=media\" : (values.logo == \"\" ? \"https://firebasestorage.googleapis.com/v0/b/rambox-d1326.appspot.com/o/services%2Fcustom.png?alt=media\" : values.logo) ]}" data-qtip="{type:capitalize}" width="32" style="{[ values.enabled ? \"-webkit-filter: grayscale(0)\" : \"-webkit-filter: grayscale(1)\" ]}" />'
,tpl: '<img src="{[ values.type !== \"custom\" ? \"resources/icons/\"+values.logo : (values.logo == \"\" ? \"resources/icons/custom.png\" : values.logo) ]}" data-qtip="{type:capitalize}" width="32" style="{[ values.enabled ? \"-webkit-filter: grayscale(0)\" : \"-webkit-filter: grayscale(1)\" ]}" />'
}
,{
dataIndex: 'name'
@ -243,7 +236,7 @@ Ext.define('Rambox.view.main.Main', {
{
glyph: JSON.parse(localStorage.getItem('dontDisturb')) ? 'xf1f7@FontAwesome' : 'xf0f3@FontAwesome'
,text: locale['app.main[16]']+': '+(JSON.parse(localStorage.getItem('dontDisturb')) ? locale['app.window[20]'] : locale['app.window[21]'])
,tooltip: locale['app.main[17]']+'<br/><b>'+locale['app.main[18]']+(require('electron').remote.process.platform === 'darwin' ? ': Cmd + D</b>' : ': Alt + Shift + D</b>')
,tooltip: locale['app.main[17]']+'<br/><b>'+locale['app.main[18]']+(require('electron').remote.process.platform === 'darwin' ? ': Cmd + Alt + D</b>' : ': Alt + Shift + D</b>')
,enableToggle: true
,handler: 'dontDisturb'
,reference: 'disturbBtn'
@ -256,79 +249,8 @@ Ext.define('Rambox.view.main.Main', {
,tooltip: locale['app.main[20]']+'<br/><b>'+locale['app.main[18]']+(require('electron').remote.process.platform === 'darwin' ? ': Cmd + Alt + L</b>' : ': Alt + Shift + L</b>')
,handler: 'lockRambox'
,id: 'lockRamboxBtn'
},'-'
,{
html: '<span style="color:#FFF;cursor:pointer;"><span class="fa fa-star" style="color:#F8D64E;font-size:16px;padding:0 5px;"></span> Try Rambox Pro</span>'
,href: 'https://rambox.pro/api/download'
,baseCls: ''
}
,'->'
,{
xtype: 'image'
,id: 'avatar'
,bind: {
src: '{avatar}'
,hidden: '{!avatar}'
}
,width: 30
,height: 30
,style: 'border-radius: 50%;border:2px solid #d8d8d8;'
}
,{
id: 'usernameBtn'
,bind: {
text: '{username}'
,hidden: '{!username}'
}
,menu: [
{
text: 'Synchronize Configuration'
,glyph: 'xf0c2@FontAwesome'
,menu: [
{
xtype: 'label'
,bind: {
html: '<b class="menu-title">Last Sync: {last_sync}</b>'
}
}
,{
text: 'Backup'
,glyph: 'xf0ee@FontAwesome'
,scope: Rambox.ux.Auth0
,handler: Rambox.ux.Auth0.backupConfiguration
}
,{
text: 'Restore'
,glyph: 'xf0ed@FontAwesome'
,scope: Rambox.ux.Auth0
,handler: Rambox.ux.Auth0.restoreConfiguration
}
,{
text: 'Check for updated backup'
,glyph: 'xf021@FontAwesome'
,scope: Rambox.ux.Auth0
,handler: Rambox.ux.Auth0.checkConfiguration
}
]
}
,'-'
,{
text: locale['app.main[21]']
,glyph: 'xf08b@FontAwesome'
,handler: 'logout'
}
]
}
,{
text: locale['app.main[22]']
,icon: 'resources/auth0.png'
,id: 'loginBtn'
,tooltip: locale['app.main[23]']+'<br /><br /><i>'+locale['app.main[24]']+' Auth0 (https://auth0.com)</i>'
,bind: {
hidden: '{username}'
}
,handler: 'login'
}
,{
tooltip: locale['preferences[0]']
,glyph: 'xf013@FontAwesome'
@ -336,56 +258,23 @@ Ext.define('Rambox.view.main.Main', {
}
]
}
,bbar: [
{
xtype: 'segmentedbutton'
,allowToggle: false
,items: [
{
text: '<b>Help us</b> with'
,pressed: true
}
,{
text: locale['app.main[25]']
,glyph: 'xf21e@FontAwesome'
,href: 'https://rambox.app/donate.html'
}
,{
text: 'Translation'
,glyph: 'xf0ac@FontAwesome'
,href: 'https://crowdin.com/project/rambox/invite'
}
]
}
,'->'
,{
xtype: 'label'
,html: '<span class="fa fa-code" style="color:black;"></span> '+locale['app.main[26]']+' <span class="fa fa-heart" style="color:red;"></span> '+locale['app.main[27]'].replace('Argentina', '<img src="resources/flag.png" alt="Argentina" data-qtip="Argentina" />')
}
,'->'
,{
xtype: 'segmentedbutton'
,allowToggle: false
,items: [
{
text: '<b>Follow us</b>'
,pressed: true
}
,{
glyph: 'xf082@FontAwesome'
,href: 'https://www.facebook.com/ramboxapp'
}
,{
glyph: 'xf099@FontAwesome'
,href: 'https://www.twitter.com/ramboxapp'
}
,{
glyph: 'xf09b@FontAwesome'
,href: 'https://github.com/ramboxapp/community-edition'
,bbar: {
xtype: 'toolbar'
,cls: 'deprecation'
,items: [
'<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <b>This version of Rambox is no longer supported.</b> We highly recommend that you update to the new version of Rambox which has a free plan with all the features you already use and much more!'
,'->'
,{
xtype: 'button'
,text: 'Migrate now'
,handler: function(btn) {
btn.setText('Downloading...');
btn.setDisabled(true);
Rambox.app.checkUpdate();
}
]
}
]
}
]
}
}
,{ id: 'tbfill', tabConfig : { xtype : 'tbfill' } }
]

70
app/view/main/MainController.js

@ -23,9 +23,6 @@ Ext.define('Rambox.view.main.MainController', {
,onTabChange: function( tabPanel, newTab, oldTab ) {
var me = this;
// Set Google Analytics event
ga_storage._trackPageview('/index.html', 'main');
localStorage.setItem('last_active_service', newTab.id);
if ( newTab.id === 'ramboxTab' ) {
@ -162,11 +159,15 @@ Ext.define('Rambox.view.main.MainController', {
if ( config.default_service === rec.get('id') ) ipc.send('setConfig', Ext.apply(config, { default_service: 'ramboxTab' }));
function clearData(webview, tab) {
webview.getWebContents().clearHistory();
webview.getWebContents().session.flushStorageData();
webview.getWebContents().session.clearCache().then(() => {
webview.getWebContents().session.clearStorageData().then(() => {
webview.getWebContents().session.cookies.flushStore().then(() => {
const currentWebView = require("electron").remote.webContents.fromId(
webview.getWebContentsId()
);
currentWebView.clearHistory();
currentWebView.session.flushStorageData();
currentWebView.session.clearCache().then(() => {
currentWebView.session.clearStorageData().then(() => {
currentWebView.session.cookies.flushStore().then(() => {
// Remove record from localStorage
Ext.getStore('Services').remove(rec);
// Close tab
@ -296,9 +297,6 @@ Ext.define('Rambox.view.main.MainController', {
,dontDisturb: function(btn, e, called) {
console.info('Dont Disturb:', btn.pressed ? 'Enabled' : 'Disabled');
// Google Analytics Event
if ( !called ) ga_storage._trackEvent('Usability', 'dontDisturb', ( btn.pressed ? 'on' : 'off' ));
Ext.Array.each(Ext.getStore('Services').collect('id'), function(serviceId) {
// Get Tab
var tab = Ext.getCmp('tab_'+serviceId);
@ -393,9 +391,6 @@ Ext.define('Rambox.view.main.MainController', {
// Save encrypted password in localStorage to show locked when app is reopen
localStorage.setItem('locked', text);
// Google Analytics Event
ga_storage._trackEvent('Usability', 'locked');
me.lookupReference('disturbBtn').setPressed(true);
me.dontDisturb(me.lookupReference('disturbBtn'), false, true);
@ -483,53 +478,6 @@ Ext.define('Rambox.view.main.MainController', {
}
,openPreferences: function( btn ) {
var me = this;
Ext.create('Rambox.view.preferences.Preferences').show();
}
,login: function(btn) {
var me = this;
Rambox.ux.Auth0.login();
}
,logout: function(btn) {
var me = this;
var logoutFn = function(callback) {
Ext.Msg.wait(locale['app.window[37]'], locale['app.main[21]']);
// Google Analytics Event
ga_storage._trackEvent('Users', 'loggedOut');
// Logout from Auth0
Rambox.ux.Auth0.logout();
Ext.cq1('app-main').getViewModel().set('username', '');
Ext.cq1('app-main').getViewModel().set('avatar', '');
if ( Ext.isFunction(callback) ) {
callback(false, function() {
Ext.Msg.hide();
});
} else {
Ext.Msg.hide();
}
}
if ( btn ) {
Ext.Msg.confirm(locale['app.main[21]'], locale['app.window[38]'], function(btnId) {
if ( btnId === 'yes' ) {
logoutFn(me.removeAllServices.bind(me));
}
});
} else {
logoutFn();
}
}
,showDonate: function( btn ) {
Signalayer.API.show('tChaoq3PwSG9wswhn');
}
});

94
app/view/preferences/Preferences.js

@ -74,50 +74,50 @@ Ext.define('Rambox.view.preferences.Preferences',{
,store: Ext.create('Ext.data.Store', {
fields: ['value', 'label']
,data: [
{ 'value': 'af', 'auth0': 'af', 'label': 'Afrikaans' }
,{ 'value': 'ar', 'auth0': 'en', 'label': 'Arabic' }
,{ 'value': 'bs2', 'auth0': 'en', 'label': 'Barndutsch, Switzerland' }
,{ 'value': 'bn', 'auth0': 'en', 'label': 'Bengali' }
,{ 'value': 'bg', 'auth0': 'en', 'label': 'Bulgarian' }
,{ 'value': 'ca', 'auth0': 'ca', 'label': 'Catalan' }
,{ 'value': 'ceb', 'auth0': 'en', 'label': 'Cebuano' }
,{ 'value': 'zh-CN', 'auth0': 'zh', 'label': 'Chinese Simplified' }
,{ 'value': 'zh-TW', 'auth0': 'zh-tw', 'label': 'Chinese Traditional' }
,{ 'value': 'hr', 'auth0': 'en', 'label': 'Croatian' }
,{ 'value': 'cs', 'auth0': 'cs', 'label': 'Czech' }
,{ 'value': 'da', 'auth0': 'da', 'label': 'Danish' }
,{ 'value': 'nl', 'auth0': 'nl', 'label': 'Dutch' }
,{ 'value': 'en', 'auth0': 'en', 'label': 'English' }
,{ 'value': 'fi', 'auth0': 'fi', 'label': 'Finnish' }
,{ 'value': 'fil', 'auth0': 'en', 'label': 'Filipino' }
,{ 'value': 'fr', 'auth0': 'fr', 'label': 'French' }
,{ 'value': 'de', 'auth0': 'de', 'label': 'German' }
,{ 'value': 'de-CH', 'auth0': 'de', 'label': 'German, Switzerland' }
,{ 'value': 'el', 'auth0': 'el', 'label': 'Greek' }
,{ 'value': 'he', 'auth0': 'en', 'label': 'Hebrew' }
,{ 'value': 'hi', 'auth0': 'en', 'label': 'Hindi' }
,{ 'value': 'hu', 'auth0': 'hu', 'label': 'Hungarian' }
,{ 'value': 'id', 'auth0': 'en', 'label': 'Indonesian' }
,{ 'value': 'it', 'auth0': 'it', 'label': 'Italian' }
,{ 'value': 'ja', 'auth0': 'ja', 'label': 'Japanese' }
,{ 'value': 'ko', 'auth0': 'ko', 'label': 'Korean' }
,{ 'value': 'no', 'auth0': 'no', 'label': 'Norwegian' }
,{ 'value': 'fa', 'auth0': 'fa', 'label': 'Persian' }
,{ 'value': 'pl', 'auth0': 'pl', 'label': 'Polish' }
,{ 'value': 'pt-PT', 'auth0': 'pt-br', 'label': 'Portuguese' }
,{ 'value': 'pt-BR', 'auth0': 'pt-br', 'label': 'Portuguese (Brazilian)' }
,{ 'value': 'ro', 'auth0': 'ro', 'label': 'Romanian' }
,{ 'value': 'ru', 'auth0': 'ru', 'label': 'Russian' }
,{ 'value': 'sr', 'auth0': 'en', 'label': 'Serbian (Cyrillic)' }
,{ 'value': 'sk', 'auth0': 'sk', 'label': 'Slovak' }
,{ 'value': 'es-ES', 'auth0': 'es', 'label': 'Spanish' }
,{ 'value': 'sv-SE', 'auth0': 'sv', 'label': 'Swedish' }
,{ 'value': 'tl', 'auth0': 'en', 'label': 'Tagalog' }
,{ 'value': 'th', 'auth0': 'en', 'label': 'Thai' }
,{ 'value': 'tr', 'auth0': 'tr', 'label': 'Turkish' }
,{ 'value': 'uk', 'auth0': 'en', 'label': 'Ukrainian' }
,{ 'value': 'ur-PK', 'auth0': 'en', 'label': 'Urdu (Pakistan)' }
,{ 'value': 'vi', 'auth0': 'en', 'label': 'Vietnamese' }
{ 'value': 'af', 'extjs': 'af', 'label': 'Afrikaans' }
,{ 'value': 'ar', 'extjs': 'en', 'label': 'Arabic' }
,{ 'value': 'bs2', 'extjs': 'en', 'label': 'Barndutsch, Switzerland' }
,{ 'value': 'bn', 'extjs': 'en', 'label': 'Bengali' }
,{ 'value': 'bg', 'extjs': 'en', 'label': 'Bulgarian' }
,{ 'value': 'ca', 'extjs': 'ca', 'label': 'Catalan' }
,{ 'value': 'ceb', 'extjs': 'en', 'label': 'Cebuano' }
,{ 'value': 'zh-CN', 'extjs': 'zh', 'label': 'Chinese Simplified' }
,{ 'value': 'zh-TW', 'extjs': 'zh-tw', 'label': 'Chinese Traditional' }
,{ 'value': 'hr', 'extjs': 'en', 'label': 'Croatian' }
,{ 'value': 'cs', 'extjs': 'cs', 'label': 'Czech' }
,{ 'value': 'da', 'extjs': 'da', 'label': 'Danish' }
,{ 'value': 'nl', 'extjs': 'nl', 'label': 'Dutch' }
,{ 'value': 'en', 'extjs': 'en', 'label': 'English' }
,{ 'value': 'fi', 'extjs': 'fi', 'label': 'Finnish' }
,{ 'value': 'fil', 'extjs': 'en', 'label': 'Filipino' }
,{ 'value': 'fr', 'extjs': 'fr', 'label': 'French' }
,{ 'value': 'de', 'extjs': 'de', 'label': 'German' }
,{ 'value': 'de-CH', 'extjs': 'de', 'label': 'German, Switzerland' }
,{ 'value': 'el', 'extjs': 'el', 'label': 'Greek' }
,{ 'value': 'he', 'extjs': 'en', 'label': 'Hebrew' }
,{ 'value': 'hi', 'extjs': 'en', 'label': 'Hindi' }
,{ 'value': 'hu', 'extjs': 'hu', 'label': 'Hungarian' }
,{ 'value': 'id', 'extjs': 'en', 'label': 'Indonesian' }
,{ 'value': 'it', 'extjs': 'it', 'label': 'Italian' }
,{ 'value': 'ja', 'extjs': 'ja', 'label': 'Japanese' }
,{ 'value': 'ko', 'extjs': 'ko', 'label': 'Korean' }
,{ 'value': 'no', 'extjs': 'no', 'label': 'Norwegian' }
,{ 'value': 'fa', 'extjs': 'fa', 'label': 'Persian' }
,{ 'value': 'pl', 'extjs': 'pl', 'label': 'Polish' }
,{ 'value': 'pt-PT', 'extjs': 'pt-br', 'label': 'Portuguese' }
,{ 'value': 'pt-BR', 'extjs': 'pt-br', 'label': 'Portuguese (Brazilian)' }
,{ 'value': 'ro', 'extjs': 'ro', 'label': 'Romanian' }
,{ 'value': 'ru', 'extjs': 'ru', 'label': 'Russian' }
,{ 'value': 'sr', 'extjs': 'en', 'label': 'Serbian (Cyrillic)' }
,{ 'value': 'sk', 'extjs': 'sk', 'label': 'Slovak' }
,{ 'value': 'es-ES', 'extjs': 'es', 'label': 'Spanish' }
,{ 'value': 'sv-SE', 'extjs': 'sv', 'label': 'Swedish' }
,{ 'value': 'tl', 'extjs': 'en', 'label': 'Tagalog' }
,{ 'value': 'th', 'extjs': 'en', 'label': 'Thai' }
,{ 'value': 'tr', 'extjs': 'tr', 'label': 'Turkish' }
,{ 'value': 'uk', 'extjs': 'en', 'label': 'Ukrainian' }
,{ 'value': 'ur-PK', 'extjs': 'en', 'label': 'Urdu (Pakistan)' }
,{ 'value': 'vi', 'extjs': 'en', 'label': 'Vietnamese' }
]
})
}
@ -361,12 +361,6 @@ Ext.define('Rambox.view.preferences.Preferences',{
}
]
}
,{
xtype: 'checkbox'
,name: 'sendStatistics'
,boxLabel: locale['preferences[27]']
,value: config.sendStatistics
}
]
}
];

2
app/view/preferences/PreferencesController.js

@ -55,7 +55,7 @@ Ext.define('Rambox.view.preferences.PreferencesController', {
// Locale
if ( values.locale !== ipc.sendSync('getConfig').locale ) {
localStorage.setItem('locale', values.locale);
localStorage.setItem('locale-auth0', me.getView().down('form').down('combo[name="locale"]').getSelection().get('auth0'));
localStorage.setItem('locale-extjs', me.getView().down('form').down('combo[name="locale"]').getSelection().get('extjs'));
Ext.Msg.confirm('Action required', 'To change the language of Rambox, you need to reload the app. Do you want to do it now?', function(btnId) {
if ( btnId === 'yes' ) ipc.send('relaunchApp');
});

7
appveyor.yml

@ -1,6 +1,6 @@
environment:
matrix:
- nodejs_version: '8'
- nodejs_version: '14.16.1'
pull_requests:
do_not_increment_build_number: true
branches:
@ -12,16 +12,13 @@ init:
- cmd: node --version
- cmd: npm --version
install:
- ps: Install-Product node $env:nodejs_version
- ps: Update-NodeJsInstallation $env:nodejs_version x64
- cmd: >-
git clone https://github.com/saenzramiro/rambox-build.git %APPVEYOR_BUILD_FOLDER%\build\production\Rambox\
cd %APPVEYOR_BUILD_FOLDER%\build\production\Rambox\
npm install
cache:
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.electron'
build_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%\build\production\Rambox\
- cmd: npm run build:win

192
electron/main.js

@ -1,6 +1,6 @@
'use strict';
const {app, protocol, BrowserWindow, dialog, shell, Menu, ipcMain, nativeImage, session} = require('electron');
const {app, BrowserWindow, shell, Menu, ipcMain, nativeImage, session} = require('electron');
// Tray
const tray = require('./tray');
// AutoLaunch
@ -15,6 +15,9 @@ const updater = require('./updater');
var fs = require("fs");
const path = require('path');
// Disk usage:
// const disk = require('diskusage');
if ( isDev ) app.getVersion = function() { return require('../package.json').version; }; // FOR DEV ONLY, BECAUSE IN DEV RETURNS ELECTRON'S VERSION
// Initial Config
@ -60,6 +63,10 @@ if (config.get('enable_hidpi_support') && (process.platform === 'win32')) {
app.commandLine.appendSwitch('lang', config.get('locale') === 'en' ? 'en-US' : config.get('locale'));
// Temporary fix to load Twitter and other websites inside webviews
// Bug related with Electron: https://github.com/electron/electron/issues/25469
app.commandLine.appendSwitch('disable-features', 'CrossOriginOpenerPolicy');
// Because we build it using Squirrel, it will assign UserModelId automatically, so we match it here to display notifications correctly.
// https://github.com/electron-userland/electron-builder/issues/362
app.setAppUserModelId('com.grupovrs.ramboxce');
@ -98,24 +105,22 @@ function createWindow () {
,show: !config.get('start_minimized')
,acceptFirstMouse: true
,webPreferences: {
plugins: true
enableRemoteModule: true
,plugins: true
,partition: 'persist:rambox'
,nodeIntegration: true
,webviewTag: true
,contextIsolation: false
,spellcheck: false
}
});
// Check if user has defined a custom User-Agent
if ( config.get('user_agent').length > 0 ) mainWindow.webContents.setUserAgent( config.get('user_agent') );
if ( !config.get('start_minimized') && config.get('maximized') ) mainWindow.maximize();
if ( config.get('window_display_behavior') !== 'show_trayIcon' && config.get('start_minimized') ) {
// Wait for the mainWindow.loadURL(..) and the optional mainWindow.webContents.openDevTools()
// to be finished before minimizing
mainWindow.webContents.once('did-finish-load', function(e) {
mainWindow.minimize();
});
}
// Wait for the mainWindow.loadURL(..) and the optional mainWindow.webContents.openDevTools()
// to be finished before minimizing
config.get('start_minimized') && mainWindow.webContents.once('did-finish-load', () => config.get('window_display_behavior') === 'show_trayIcon' ? mainWindow.hide() : mainWindow.minimize());
// Check if the window its outside of the view (ex: multi monitor setup)
const { positionOnScreen } = require('./utils/positionOnScreen');
@ -138,7 +143,7 @@ function createWindow () {
tray.create(mainWindow, config);
if ( process.argv.indexOf('--without-update') === -1 ) updater.initialize(mainWindow);
updater.initialize(mainWindow);
// Open links in default browser
mainWindow.webContents.on('new-window', function(e, url, frameName, disposition, options) {
@ -228,7 +233,8 @@ function createMasterPasswordWindow() {
backgroundColor: '#0675A0'
,frame: false
,webPreferences: {
nodeIntegration: true
nodeIntegration: true
,enableRemoteModule: true
}
});
// Open the DevTools.
@ -255,6 +261,40 @@ function updateBadge(title) {
if ( messageCount > 0 && !mainWindow.isFocused() && !config.get('dont_disturb') && config.get('flash_frame') ) mainWindow.flashFrame(true);
}
function formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
/* async function availableSpaceWatchDog() {
// optionally render this information also in rambox window
try {
const { available } = await disk.check(appPath);
if (available < 1073741824) { // 1 GB
const options = {
type: 'warning',
buttons: ['OK, quit'],
defaultId: 0,
title: `Running out of disk space! - Rambox shutting down`,
detail: `You've got just ${formatBytes(available)} space left.\n\nRambox has been frozen to prevent settings corruption.\n\nOnce you quit this dialog, Rambox will shutdown.\n\n1 GB of avalable disk space is required.\nFree up space on partition where Rambox is installed then start the app again.\n\nRambox path: \n${appPath}`,
message: `Running out of disk space! - Rambox shutting down`,
};
dialog.showMessageBoxSync(null, options);
app.quit();
}
} catch (err) {
console.error(err)
}
} */
ipcMain.on('setBadge', function(event, messageCount, value) {
mainWindow.setOverlayIcon(nativeImage.createFromDataURL(value), messageCount.toString());
});
@ -352,6 +392,85 @@ app.on('second-instance', (event, commandLine, workingDirectory) => {
}
});
// ALLOWED URLS POPUPS
let allowPopUp = [
'feedly.com/v3/auth/',
'identity.linuxfoundation.org/cas/login',
'auth.missiveapp.com',
'accounts.google.com/AccountChooser',
'facebook.com/v3.1/dialog/oauth?',
'accounts.google.com/o/oauth2',
'app.slack.com/files/import/gdrive',
'spikenow.com/s/account',
'app.mixmax.com/_oauth/google',
'officeapps.live.com',
'dropbox.com/profile_services/start_auth_flow',
'facebook.com/v3.2/dialog/oauth?',
'notion.so/googlepopupredirect',
'zoom.us/office365',
'figma.com/start_google_sso',
'mail.google.com/mail',
'app.slack.com/free-willy/',
'messenger.com/videocall',
'api.moo.do',
'manychat.com/fb?popup',
'=?print=true' // esta ultima checkea como anda imprimir un pedf desde gmail, si no va bie sacala
];
app.on('web-contents-created', (webContentsCreatedEvent, contents) => {
if (contents.getType() !== 'webview') return;
// Block some Deep links to prevent that open its app (Ex: Slack)
contents.on('will-navigate', (event, url) => url.substring(0, 8) === 'slack://' && event.preventDefault());
// New Window handler
contents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures, referrer, postBody) => {
// If the url is about:blank we allow the window and handle it in 'did-create-window'
if (['about:blank', 'about:blank#blocked'].includes(url)) {
event.preventDefault();
Object.assign(options, { show: false });
const win = new BrowserWindow(options);
win.center();
let once = false;
win.webContents.on('will-navigate', (e, nextURL) => {
if (once) return;
if (['about:blank', 'about:blank#blocked'].includes(nextURL)) return;
once = true;
let allow = false;
allowPopUp.forEach(url => nextURL.indexOf(url) > -1 && (allow = true));
// If the url is in aboutBlankOnlyWindow we handle this as a popup window
if (allow) return win.show();
shell.openExternal(nextURL);
win.close()
})
event.newGuest = win;
return;
}
// We check if url is in the allowPopUpLoginURLs or allowForegroundTabURLs in Firebase to open a as a popup,
// if it is not we send this to the app
let allow = false;
allowPopUp.forEach(allowed => url.indexOf(allowed) > -1 && (allow = true));
if (allow) return;
shell.openExternal(url);
event.preventDefault();
});
contents.on('did-create-window', (win, details) => {
// Here we center the new window.
win.center();
// The following code is for handling the about:blank cases only.
if (!['about:blank', 'about:blank#blocked'].includes(details.url)) return;
let once = false;
win.webContents.on('will-navigate', (e, nextURL) => {
if (once) return;
if (['about:blank', 'about:blank#blocked'].includes(nextURL)) return;
once = true;
let allow = false;
allowPopUp.forEach(url => nextURL.indexOf(url) > -1 && (allow = true));
// If the url is in aboutBlankOnlyWindow we handle this as a popup window
if (allow) return win.show();
shell.openExternal(url);
win.close();
});
});
});
// Code for downloading images as temporal files
// Credit: Ghetto Skype (https://github.com/stanfieldr/ghetto-skype)
@ -457,6 +576,53 @@ ipcMain.on('toggleWin', function(event, allwaysShow) {
}
});
// ScreenShare
ipcMain.on('screenShare:show', (event, screenList) => {
let tmpWindow = new BrowserWindow({
title: 'Rambox - Select screen',
width: 600,
height: 500,
icon: __dirname + '/../resources/Icon.ico',
autoHideMenuBar: true,
transparent: true,
show: true,
frame: false,
hasShadow: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
const close = () => {
tmpWindow.close();
tmpWindow = null;
};
const onCancel = () => {
event.sender.send('screenShare:cancel');
close();
};
const onShare = (_, shareId) => {
event.sender.send('screenShare:share', shareId);
close();
};
ipcMain.handle('screenShare:getSources', () => screenList);
ipcMain.on('screenShare:cancelSelection', onCancel);
ipcMain.on('screenShare:selectScreen', onShare);
tmpWindow.on('closed', () => {
ipcMain.removeHandler('screenShare:getSources');
ipcMain.removeAllListeners('screenShare:cancelSelection');
ipcMain.removeAllListeners('screenShare:selectScreen');
});
tmpWindow.loadFile(__dirname + '/../screenselector.html');
});
// Proxy
if ( config.get('proxy') ) {
app.commandLine.appendSwitch('proxy-server', config.get('proxyHost')+':'+config.get('proxyPort'));
@ -479,8 +645,8 @@ if ( config.get('disable_gpu') ) app.disableHardwareAcceleration();
// initialization and is ready to create browser windows.
app.on('ready', function() {
config.get('master_password') ? createMasterPasswordWindow() : createWindow();
// setInterval(availableSpaceWatchDog, 1000 * 60);
});
// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar

34
electron/menu.js

@ -23,7 +23,7 @@ module.exports = function(config) {
{
label: `&`+locale['menu.help[0]'],
click() {
shell.openExternal('https://rambox.pro');
shell.openExternal('https://rambox.app');
}
},
{
@ -47,29 +47,6 @@ module.exports = function(config) {
{
type: 'separator'
},
{
label: '&'+locale['menu.help[1]'],
click() {
const body = `
<!-- Please describe here your issue and steps to reproduce it. -->
<!-- DON'T REMOVE THE FOLLOWING LINES -->
-
> ${app.getName()} ${app.getVersion()}
> Electron ${process.versions.electron}
> ${process.platform} ${process.arch} ${os.release()}`;
shell.openExternal(`https://github.com/ramboxapp/community-edition/issues/new?body=${encodeURIComponent(body)}`);
}
},
{
label: `&`+locale['menu.help[2]'],
click() {
shell.openExternal('https://rambox.typeform.com/to/t7jc4C');
}
},
{
label: `&Tools`,
submenu: [
@ -98,15 +75,6 @@ module.exports = function(config) {
}
]
},
{
type: 'separator'
},
{
label: `&`+locale['menu.help[3]'],
click() {
shell.openExternal('https://rambox.app/donate.html');
}
}
];
let tpl = [

4
electron/tray.js

@ -44,12 +44,12 @@ exports.create = function(win, config) {
// Double click is not supported and Click its only supported when app indicator is not used.
// Read more here (Platform limitations): https://github.com/electron/electron/blob/master/docs/api/tray.md
appIcon.on('click', function() {
win.webContents.executeJavaScript('ipc.send("toggleWin", true);');
win.webContents.executeJavaScript('ipc.send("toggleWin", false);');
});
break;
case 'win32':
appIcon.on('double-click', function() {
win.webContents.executeJavaScript('ipc.send("toggleWin", true);');
win.webContents.executeJavaScript('ipc.send("toggleWin", false);');
});
break;
default:

12
electron/updater.js

@ -1,12 +1,18 @@
const { app, ipcMain, BrowserWindow } = require('electron');
const { autoUpdater } = require("electron-updater");
const path = require('path');
// autoUpdater.logger = require("electron-log");
// autoUpdater.logger.transports.file.level = "debug";
// autoUpdater.currentVersion = '0.6.0';
// autoUpdater.currentVersion = '0.8.0';
// autoUpdater.updateConfigPath = path.join(__dirname, 'dev-app-update.yml');
autoUpdater.setFeedURL({
"provider": "github",
"owner": "ramboxapp",
"repo": "download",
"vPrefixedTagName": true
});
const initialize = (window) => {
const webContents = window.webContents;
const send = webContents.send.bind(window.webContents);
@ -15,7 +21,7 @@ const initialize = (window) => {
ipcMain.on('autoUpdater:quit-and-install', (event) => {
app.removeAllListeners('window-all-closed');
BrowserWindow.getAllWindows().forEach((browserWindow) => browserWindow.removeAllListeners('close'));
autoUpdater.quitAndInstall()
autoUpdater.quitAndInstall(true, true);
});
ipcMain.on('autoUpdater:check-for-updates', (event) => autoUpdater.checkForUpdates());
};

5
env-sample.js

@ -1,5 +0,0 @@
var auth0Cfg = {
clientID: ''
,clientSecret: ''
,domain: ''
};

12
masterpassword.html

@ -17,15 +17,15 @@
function handlePaste(e) {
var clipboardData, pastedData;
// Stop data actually being pasted into div
e.stopPropagation();
e.preventDefault();
// Stop data actually being pasted into div
e.stopPropagation();
e.preventDefault();
// Get pasted data via clipboard API
clipboardData = e.clipboardData || window.clipboardData;
// Get pasted data via clipboard API
clipboardData = e.clipboardData || window.clipboardData;
pastedData = clipboardData.getData('Text');
document.getElementsByTagName('input')[0].value += pastedData
// Do whatever with pasteddata
// Do whatever with pasteddata
}
function doValidate(e, value) {
document.getElementById('wrong-pass').style.visibility = 'hidden'

6128
package-lock.json generated

File diff suppressed because it is too large Load Diff

82
package.json

@ -1,7 +1,7 @@
{
"name": "Rambox",
"productName": "Rambox",
"version": "0.7.4",
"version": "0.8.0",
"description": "Free and Open Source messaging and emailing app that combines common web applications into one.",
"main": "electron/main.js",
"repository": {
@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/ramboxapp/community-edition/issues"
},
"homepage": "https://rambox.pro",
"homepage": "https://rambox.app",
"keywords": [
"Rambox",
"messaging",
@ -25,7 +25,7 @@
"hangouts",
"skype"
],
"author": "Rambox <support@rambox.pro>",
"author": "Rambox LLC <support@rambox.app>",
"license": "GPL-3.0",
"scripts": {
"start": "electron electron/main.js",
@ -39,7 +39,9 @@
"clean:osx": "rm -rf ./dist/Rambox-darwin-*",
"clean:win": "rm -rf ./dist/Rambox-win32-*",
"pack": "npm run pack:osx && npm run pack:win",
"pack:osx": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=x64 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:osx": "npm run pack:osx64 && npm run pack:osxarm64",
"pack:osx64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=x64 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:osxarm64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=arm64 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:win": "npm run pack:win32 && npm run pack:win64",
"pack:win32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=ia32 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=32-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:win64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=x64 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
@ -47,14 +49,16 @@
"pack:linux32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=ia32 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"pack:linux64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=x64 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite",
"build": "npm run build:linux && npm run build:osx && npm run build:win",
"build:osx": "electron-builder --macos",
"build:osx": "electron-builder --macos --universal",
"build:osx64": "electron-builder --macos --x64",
"build:osxarm64": "electron-builder --macos --arm64",
"build:linux": "electron-builder --linux --publish=onTagOrDraft",
"build:linux32": "electron-builder --linux --ia32 --publish=onTagOrDraft",
"build:linux64": "electron-builder --linux --x64 --publish=onTagOrDraft",
"build:win": "electron-builder --win --ia32 --x64",
"build:win32": "electron-builder --win --ia32",
"build:win64": "electron-builder --win --x64",
"setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx",
"setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx && npm run build:osx64 && npm run build:osxarm64",
"setup:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run build:win",
"all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win",
"all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux",
@ -66,14 +70,20 @@
"appId": "com.grupovrs.ramboxce",
"afterSign": "resources/installer/notarize.js",
"asar": true,
"electronVersion": "13.6.3",
"electronDownload": {
"version": "7.1.12"
"version": "13.6.3"
},
"mac": {
"category": "public.app-category.productivity",
"artifactName": "Rambox-${version}-mac.${ext}",
"artifactName": "Rambox-${version}-mac-${arch}.${ext}",
"target": [
"default"
{
"target": "default",
"arch": [
"universal"
]
}
],
"hardenedRuntime": true,
"gatekeeperAssess": false,
@ -103,7 +113,7 @@
]
},
"win": {
"publisherName": "Ramiro Pablo Saenz",
"publisherName": "Rambox LLC",
"artifactName": "Rambox-${version}-win-${arch}.${ext}",
"target": [
"nsis",
@ -124,10 +134,17 @@
],
"plugs": [
"default",
"camera"
"camera",
"audio-record",
"audio-playback",
"removable-media",
"raw-usb",
"u2f-devices",
"cups-control"
]
},
"linux": {
"icon": "resources/installer/icons",
"category": "Network",
"desktop": {
"Terminal": "false",
@ -135,6 +152,9 @@
"Categories": "GTK;GNOME;Network;Email;Chat;InstantMessaging;"
},
"artifactName": "Rambox-${version}-linux-${arch}.${ext}",
"executableArgs": [
"--no-sandbox"
],
"target": [
{
"target": "snap",
@ -193,33 +213,35 @@
]
},
"devDependencies": {
"asar": "^0.12.4",
"asar": "0.12.4",
"chai": "3.5.0",
"crowdin": "1.0.0",
"csvjson": "4.3.3",
"electron": "7.1.12",
"electron-builder": "21.2.0",
"electron-notarize": "0.2.1",
"electron-packager": "^12.1.0",
"mocha": "^5.2.0",
"spectron": "^3.8.0"
"electron": "13.6.3",
"electron-builder": "22.14.13",
"electron-notarize": "1.0.0",
"electron-packager": "15.1.0",
"mocha": "5.2.0",
"spectron": "^15.0.0"
},
"dependencies": {
"@exponent/electron-cookies": "2.0.0",
"auth0-js": "^9.7.3",
"auto-launch-patched": "5.0.2",
"crypto": "^1.0.1",
"electron-contextmenu-wrapper": "2.0.0",
"electron-is-dev": "^0.3.0",
"electron-log": "^2.2.17",
"electron-store": "^2.0.0",
"electron-updater": "4.1.2",
"is-online": "^8.2.0",
"mime": "^2.3.1",
"mousetrap": "^1.6.3",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"crypto": "1.0.1",
"electron-contextmenu-wrapper": "git+https://github.com/ramboxapp/electron-contextmenu-wrapper.git",
"electron-is-dev": "1.2.0",
"electron-log": "4.3.0",
"electron-store": "6.0.1",
"electron-updater": "4.5.2",
"is-online": "8.2.0",
"mime": "2.3.1",
"mousetrap": "1.6.3",
"request": "2.88.0",
"request-promise": "4.2.2",
"rimraf": "2.6.1",
"tmp": "0.0.28"
},
"volta": {
"node": "14.16.1"
}
}

5
packages/local/rambox-default-theme/sass/etc/all.scss

@ -279,3 +279,8 @@ body {
background-color: #c3c3c3;
}
}
.deprecation {
background-color: #E6A23C !important;
color: #FFF;
}

BIN
resources/icons/airdroid.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
resources/icons/androidmessages.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
resources/icons/aol.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
resources/icons/awsworkmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
resources/icons/bearychat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
resources/icons/bip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
resources/icons/calendar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
resources/icons/chatwork.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
resources/icons/cliq.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
resources/icons/converse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
resources/icons/crisp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
resources/icons/devrant.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
resources/icons/dingtalk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
resources/icons/discord.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
resources/icons/drift.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
resources/icons/duo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
resources/icons/element.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
resources/icons/facebook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
resources/icons/fastmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
resources/icons/fleep.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
resources/icons/flock.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
resources/icons/flowdock.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
resources/icons/freenode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
resources/icons/gadugadu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
resources/icons/gitter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
resources/icons/glip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
resources/icons/glowingbear.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
resources/icons/gmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
resources/icons/googledrive.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
resources/icons/googlevoice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
resources/icons/grape.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
resources/icons/groupme.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
resources/icons/guilded.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
resources/icons/hangouts.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
resources/icons/hangoutschat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

BIN
resources/icons/hibox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
resources/icons/honeypot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
resources/icons/hootsuite.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
resources/icons/horde.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
resources/icons/hushmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
resources/icons/icloudmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
resources/icons/icq.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
resources/icons/inbox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
resources/icons/instagramdirect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
resources/icons/intercom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
resources/icons/irccloud.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
resources/icons/jandi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
resources/icons/kaiwa.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
resources/icons/kezmo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
resources/icons/kiwi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
resources/icons/kune.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
resources/icons/linkedin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
resources/icons/lounge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
resources/icons/mailru.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
resources/icons/mastodon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
resources/icons/mattermost.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
resources/icons/messenger.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
resources/icons/messengerpages.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
resources/icons/mightytext.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
resources/icons/missive.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
resources/icons/movim.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
resources/icons/mysms.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
resources/icons/noysi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
resources/icons/okru.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
resources/icons/openmailbox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
resources/icons/outlook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
resources/icons/outlook365.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
resources/icons/protonmail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
resources/icons/protonmailch.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
resources/icons/pushbullet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
resources/icons/rainloop.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
resources/icons/reddit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save