Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into 0.5.17

pull/1613/head
Ramiro Saenz 7 years ago
parent
commit
094957e2d8
  1. 5
      .editorconfig
  2. 271
      CONTRIBUTING.md
  3. 59
      README.md
  4. 6
      TODO.md
  5. 11
      app.js
  6. 3
      app/package.json
  7. 22
      app/store/ServicesList.js
  8. 2
      app/ux/WebView.js
  9. 8
      app/view/main/MainController.js
  10. 1
      app/view/preferences/Preferences.js
  11. 9
      electron/menu.js
  12. 87
      package-lock.json
  13. 3
      package.json
  14. BIN
      resources/icons/gmail.png
  15. BIN
      resources/icons/hangoutschat.png
  16. BIN
      resources/icons/lounge.png

5
.editorconfig

@ -8,3 +8,8 @@ root = true
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
indent_style = tab indent_style = tab
tab_width = 2
[*{yml,yaml}]
indent_style = space
indent_size = 2

271
CONTRIBUTING.md

@ -0,0 +1,271 @@
# Contributor's Guide
We welcome pull requests! Follow these steps to contribute:
1. Find an [issue](https://github.com/saenzramiro/rambox/issues) that needs assistance.
2. Let us know you are working on it by posting a comment on the issue.
3. Follow the [Contribution Guidelines](#contribution-guidelines) to start working on the issue.
Working on your first Pull Request? You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub]
(https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
###### If you've found a bug that is not on the board, [follow these steps](README.md#found-a-bug).
--------------------------------------------------------------------------------
## Contribution Guidelines
### Setup
- [Prerequisites](#prerequisites)
- [Forking the Project](#forking-the-project)
- [Create a Branch](#create-a-branch)
- [Set Up rambox](#set-up-rambox)
### Create
- [Make Changes](#make-changes)
- [Run The Test Suite](#run-the-test-suite)
### Submit
- [Creating a Pull Request](#creating-a-pull-request)
- [Common Steps](#common-steps)
- [How We Review and Merge Pull Requests](#how-we-review-and-merge-pull-requests)
- [How We Close Stale Issues](#how-we-close-stale-issues)
- [Next Steps](#next-steps)
- [Other Resources](#other-resources)
### Prerequisites
| Prerequisite | Version |
| ------------------------------------------------------------- | ------- |
| [Sencha](https://www.sencha.com/products/extjs/cmd-download/) | `=6.1.2.15` |
| [Ruby](https://www.ruby-lang.org/en/downloads/) | `=2.3` |
| [Node.js](http://nodejs.org) | `~ ^4.0.0` |
| npm (comes with Node) | `~ ^3.8.7` |
> _Updating to the latest releases is recommended_.
If Node.js, ruby, or sencha cmd is already installed on your machine, run the following commands to validate the versions:
```shell
node -v
ruby -v
sencha
```
If your versions are lower than the prerequisite versions, you should update.
### Forking the Project
#### Setting Up Your System
1. Install [Git](https://git-scm.com/) or your favorite Git client.
2. (Optional) [Setup an SSH Key](https://help.github.com/articles/generating-an-ssh-key/) for GitHub.
#### Forking rambox
1. Go to the top level rambox repository: <https://github.com/saenzramiro/rambox>
2. Click the "Fork" Button in the upper right hand corner of the interface ([More Details Here](https://help.github.com/articles/fork-a-repo/))
3. After the repository (repo) has been forked, you will be taken to your copy of the rambox repo at <https://github.com/yourUsername/rambox>
#### Cloning Your Fork
1. Open a Terminal / Command Line / Bash Shell in your projects directory (_i.e.: `/yourprojectdirectory/`_)
2. Clone your fork of rambox
```shell
$ git clone https://github.com/yourUsername/rambox.git
```
**(make sure to replace `yourUsername` with your GitHub username)**
This will download the entire rambox repo to your projects directory.
#### Setup Your Upstream
1. Change directory to the new rambox directory (`cd rambox`)
2. Add a remote to the official rambox repo:
```shell
$ git remote add upstream https://github.com/saenzramiro/rambox.git
```
Congratulations, you now have a local copy of the rambox repo!
### Create a Branch
Before you start working, you will need to create a separate branch specific to the issue / feature you're working on. You will push your work to this branch.
#### Naming Your Branch
Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a short description of the changes or feature you are attempting to add. For example
`fix/email-login` would be a branch where you fix something specific to email login.
#### Adding Your Branch
To create a branch on your local machine (and switch to this branch):
```shell
$ git checkout -b [name_of_your_new_branch]
```
and to push to GitHub:
```shell
$ git push origin [name_of_your_new_branch]
```
**If you need more help with branching, take a look at [this](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches).**
### Set Up rambox
Once you have rambox cloned, before you start the application, you first need to install all of the dependencies:
```bash
# Install NPM dependencies
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
$ npm start # in a new terminal
```
### Make Changes
This bit is up to you!
#### How to find the code in the rambox codebase to fix/edit
The best way to find out any code you wish to change/add or remove is using
the GitHub search bar at the top of the repository page. For example, you could
search for a challenge name and the results will display all the files along
with line numbers. Then you can proceed to the files and verify this is the area
that you were looking forward to edit. Always feel free to reach out to the chat
room when you are not certain of any thing specific in the code.
#### 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/`.
To see these changes you'll need to stop your `npm start` and `sencha app watch`, and then rerun those.
### Creating a Pull Request
#### What is a Pull Request?
A pull request (PR) is a method of submitting proposed changes to the rambox
repo (or any repo, for that matter). You will make changes to copies of the
files which make up rambox in a personal fork, then apply to have them
accepted by rambox proper.
#### Important: ALWAYS EDIT ON A BRANCH
Take away only one thing from this document: Never, **EVER**
make edits to the `staging` 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.
### Common Steps
1. Once the edits have been committed, you will be prompted to create a pull
request on your fork's GitHub Page.
2. 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.**
3. Submit a pull request.
4. 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.**
- Examples: `Added Service servicename` `Correct typo in menu`
5. In the body of your PR include a more detailed summary of the changes you
made and why.
- If the PR is meant to fix an existing bug/issue then, at the end of
your PR's description, append the keyword `closes` and #xxxx (where xxxx
is the issue number). Example: `closes #1337`. This tells GitHub to
close the existing issue, if the PR is merged.
6. Indicate if you have tested on a local copy of the site or not.
### How We Review and Merge Pull Requests
rambox has a team of volunteer Issue Moderators. These Issue Moderators routinely go through open pull requests in a process called [Quality Assurance]
(https://en.wikipedia.org/wiki/Quality_assurance) (QA).
1. If an Issue Moderator QA's a pull request and confirms that the new code does what it is supposed without seeming to introduce any new bugs, they will comment
"LGTM" which means "Looks good to me."
2. Another Issue Moderator will QA the same pull request. Once they have also confirmed that the new code does what it is supposed to without seeming to introduce
any new bugs, they will merge the pull request.
If you would like to apply to join our Issue Moderator team - which is a Core Team position - message [@BerkeleyTrue](https://gitter.im/berkeleytrue) with links
to 5 of your pull requests that have been accepted and 5 issues where you have helped someone else through commenting or QA'ing.
### How We Close Stale Issues
We will close any issues or pull requests that have been inactive for more than 15 days, except those that match the following criteria:
- bugs that are confirmed
- pull requests that are waiting on other pull requests to be merged
- features that are a part of a GitHub project
### Next Steps
#### If your PR is accepted
Once your PR is accepted, you may delete the branch you created to submit it.
This keeps your working fork clean.
You can do this with a press of a button on the GitHub PR interface. You can
delete the local copy of the branch with: `git branch -D branch/to-delete-name`
#### If your PR is rejected
Don't despair! You should receive solid feedback as to
why it was rejected and what changes are needed.
Many Pull Requests, especially first Pull Requests, require correction or
updating. If you have used the GitHub interface to create your PR, you will need
to close your PR, create a new branch, and re-submit.
If you have a local copy of the repo, you can make the requested changes and
amend your commit with: `git commit --amend` This will update your existing
commit. When you push it to your fork you will need to do a force push to
overwrite your old commit: `git push --force`
Be sure to post in the PR conversation that you have made the requested changes.

59
README.md

@ -41,12 +41,7 @@
- [Translations](#translations) - [Translations](#translations)
- [Install on Linux - Steps](#install-on-linux---steps) - [Install on Linux - Steps](#install-on-linux---steps)
- [To Do](#to-do) - [To Do](#to-do)
- [Getting Involved](#getting-involved) - [Contributing](#contributing)
- [Getting Started](#getting-started)
- [Technologies](#technologies)
- [Environment](#environment)
- [Quickstart](#quickstart)
- [Compile on Ubuntu](#compile-on-ubuntu)
- [Disclosure](#disclosure) - [Disclosure](#disclosure)
- [Licence](#licence) - [Licence](#licence)
@ -184,7 +179,7 @@
No personal information will be saved No personal information will be saved
Sessions will persist using the [partition:persist](http://electron.atom.io/docs/api/web-view-tag/#partition) attribute for Webviews. So every time you open Rambox, your sessions will keep alive until you remove the service. Sessions will persist using the [partition:persist](https://electronjs.org/docs/api/webview-tag#partition) attribute for Webviews. So every time you open Rambox, your sessions will keep alive until you remove the service.
Sync feature use Auth0 for Single Sign On & Token Based Authentication and to store the services that user is using (and the configuration for each service). You are always welcome to check the code! ;) Sync feature use Auth0 for Single Sign On & Token Based Authentication and to store the services that user is using (and the configuration for each service). You are always welcome to check the code! ;)
@ -201,49 +196,23 @@ Help us translate Rambox on https://crowdin.com/project/rambox/invite.
## [Install on Linux - Steps](https://github.com/saenzramiro/rambox/wiki/Install-on-Linux) ## [Install on Linux - Steps](https://github.com/saenzramiro/rambox/wiki/Install-on-Linux)
## [To Do](https://github.com/saenzramiro/rambox/blob/master/TODO.md) ## Contributing
## Getting Involved
Want to report a bug, request a feature, contribute to or translate Rambox? We need all the help we can get! Fork and work! Want to report a bug, request a feature, contribute to or translate Rambox? We need all the help we can get! Fork and work!
## Getting Started ### Quickstart:
If you're comfortable getting up and running from a `git clone`, this method is for you.
#### Technologies:
* Sencha Ext JS 5.1.1.451
* Electron
* Node JS
#### Environment:
* Sencha Cmd 6.1.2.15 (make sure to check "Compass extension" during install if you don't have installed yet)
* Ruby 2.3
* NPM 3.8.7
* Node.js 4.0.0
#### Quickstart:
1. `git clone https://github.com/saenzramiro/rambox.git`
2. `npm install`
3. Configure `env-sample.js` and rename it to `env.js`.
4. `npm run sencha:compile`
5. `npm start`
#### Compile on Ubuntu:
These instructions were tested with Ubuntu 17.04. ```shell
1. Install dependencies: `sudo apt install nodejs-legacy npm git` git clone https://github.com/saenzramiro/rambox.git
2. Build and install electron: `sudo npm install electron-prebuilt -g` cd rambox
3. Install Sencha Cmd (non-free): https://www.sencha.com/products/extjs/cmd-download/ cp env-sample.js env.js
4. Clone repository: `git clone https://github.com/saenzramiro/rambox.git` # update env.js with your auth0 details.
5. Install npm dependencies: `npm install` npm install
6. Configure `env-sample.js` and rename it to `env.js`. sencha app watch
7. Compile: `npm run sencha:compile` npm start
8. Start program: `npm start` ```
See [Contributing.md](https://github.com/saenzramiro/rambox/blob/master/CONTRIBUTING.md) for more detailed information about getting set up.
------------------- -------------------

6
TODO.md

@ -1,6 +0,0 @@
## To Do
- Change theme.
- Deeplink to add new service.
- Dock Menu (http://electron.atom.io/docs/tutorial/desktop-environment-integration/#custom-dock-menu-os-x)
- Crash Reporter.

11
app.js

@ -15,6 +15,9 @@ Ext.application({
// auto update logic // auto update logic
const ipc = require('electron').ipcRenderer; const ipc = require('electron').ipcRenderer;
require('electron-context-menu')();
ipc.on('showAbout', function(event, message) { ipc.on('showAbout', function(event, message) {
!Ext.cq1('about') ? Ext.create('Rambox.view.main.About') : ''; !Ext.cq1('about') ? Ext.create('Rambox.view.main.About') : '';
}); });
@ -127,6 +130,14 @@ ipc.on('reloadCurrentService', function(e) {
var tab = Ext.cq1('app-main').getActiveTab(); var tab = Ext.cq1('app-main').getActiveTab();
if ( tab.id !== 'ramboxTab' ) tab.reloadService(); if ( tab.id !== 'ramboxTab' ) tab.reloadService();
}); });
// Toggle Status Bar
ipc.on('toggleStatusBar', function() {
var tab = Ext.cq1('app-main').getActiveTab();
if ( tab.id !== 'ramboxTab' ) {
tab.down('statusbar').closed ? tab.setStatusBar(tab.record.get('statusbar')) : tab.closeStatusBar();
}
});
// Focus the current service when Alt + Tab or click in webviews textfields // Focus the current service when Alt + Tab or click in webviews textfields
window.addEventListener('focus', function() { window.addEventListener('focus', function() {
if(Ext.cq1("app-main")) Ext.cq1("app-main").getActiveTab().down('component').el.dom.focus(); if(Ext.cq1("app-main")) Ext.cq1("app-main").getActiveTab().down('component').el.dom.focus();

3
app/package.json

@ -37,6 +37,7 @@
"electron-is-dev": "^0.3.0", "electron-is-dev": "^0.3.0",
"mime": "^1.4.0", "mime": "^1.4.0",
"rimraf": "2.6.1", "rimraf": "2.6.1",
"tmp": "0.0.28" "tmp": "0.0.28",
"electron-context-menu": "0.9.1"
} }
} }

22
app/store/ServicesList.js

@ -113,7 +113,7 @@ Ext.define('Rambox.store.ServicesList', {
,logo: 'gmail.png' ,logo: 'gmail.png'
,name: 'Gmail' ,name: 'Gmail'
,description: locale['services[9]'] ,description: locale['services[9]']
,url: 'https://mail.google.com/mail/' ,url: 'https://mail.google.com/mail/?labs=0'
,type: 'email' ,type: 'email'
,allow_popups: true ,allow_popups: true
,js_unread: 'function checkUnread(){var a=document.getElementsByClassName("aim")[0];updateBadge(-1!=a.textContent.indexOf("(")&&(t=parseInt(a.textContent.replace(/[^0-9]/g,""))))}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' ,js_unread: 'function checkUnread(){var a=document.getElementsByClassName("aim")[0];updateBadge(-1!=a.textContent.indexOf("(")&&(t=parseInt(a.textContent.replace(/[^0-9]/g,""))))}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);'
@ -776,7 +776,7 @@ Ext.define('Rambox.store.ServicesList', {
,logo: 'vk.png' ,logo: 'vk.png'
,name: 'VK Messenger' ,name: 'VK Messenger'
,description: 'Simple and Easy App for Messaging on VK.' ,description: 'Simple and Easy App for Messaging on VK.'
,url: 'https://vk.com/im' ,url: 'https://m.vk.com/im'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){updateBadge(parseInt(document.getElementById("l_msg").innerText.replace(/\D+/g,"")))}function updateBadge(e){e>=1?document.title="("+e+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' ,js_unread: 'function checkUnread(){updateBadge(parseInt(document.getElementById("l_msg").innerText.replace(/\D+/g,"")))}function updateBadge(e){e>=1?document.title="("+e+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);'
}, },
@ -795,7 +795,7 @@ Ext.define('Rambox.store.ServicesList', {
,logo: 'teamworkchat.png' ,logo: 'teamworkchat.png'
,name: 'Teamwork Chat' ,name: 'Teamwork Chat'
,description: 'Say goodbye to email. Take your online collaboration to the next level with Teamwork Chat and keep all team discussions in one place. Chat to your team in a fun and informal way with Teamwork Chat.' ,description: 'Say goodbye to email. Take your online collaboration to the next level with Teamwork Chat and keep all team discussions in one place. Chat to your team in a fun and informal way with Teamwork Chat.'
,url: 'https://___.teamwork.com/chat' ,url: 'https://___/chat'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){updateBadge(parseInt(document.getElementsByClassName("sidebar-notification-indicator").length > 0 ? document.getElementsByClassName("sidebar-notification-indicator")[0].innerHTML : 0))}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' ,js_unread: 'function checkUnread(){updateBadge(parseInt(document.getElementsByClassName("sidebar-notification-indicator").length > 0 ? document.getElementsByClassName("sidebar-notification-indicator")[0].innerHTML : 0))}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);'
,dont_update_unread_from_title: true ,dont_update_unread_from_title: true
@ -825,7 +825,7 @@ Ext.define('Rambox.store.ServicesList', {
,description: 'Google Allo is a smart messaging app that helps you say more and do more. Express yourself better with stickers, doodles, and HUGE emojis & text. Allo also brings you the Google Assistant.' ,description: 'Google Allo is a smart messaging app that helps you say more and do more. Express yourself better with stickers, doodles, and HUGE emojis & text. Allo also brings you the Google Assistant.'
,url: 'https://allo.google.com/web' ,url: 'https://allo.google.com/web'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){var e=document.querySelectorAll(".hasUnread.conversation_item"),n=0;for(i=0;i<e.length;i++){var r="none"===e[i].querySelector("#muted").style.display?parseInt(e[i].querySelector(".unreadCount").innerHTML.trim()):0;n+=isNaN(r)?0:r}updateBadge(n)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' ,js_unread: 'function checkUnread(){var e=document.querySelectorAll(".hasUnread.conversation_item"),n=0;for(i=0;i<e.length;i++){var m=e[i].querySelector("#muted"),u=e[i].querySelector(".unreadCount"),c=parseInt(u.innerHTML.trim()),r=(m===null||m.style.display==="none")?c:0;n+=isNaN(r)?0:r}updateBadge(n)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);'
,dont_update_unread_from_title: true ,dont_update_unread_from_title: true
}, },
{ {
@ -843,7 +843,7 @@ Ext.define('Rambox.store.ServicesList', {
,description: 'A free phone number for life. Stay in touch from any screen. Use your free number to text, call, and check voicemail all from one app. Plus, Google Voice works on all of your devices so you can connect and communicate how you want.' ,description: 'A free phone number for life. Stay in touch from any screen. Use your free number to text, call, and check voicemail all from one app. Plus, Google Voice works on all of your devices so you can connect and communicate how you want.'
,url: 'https://voice.google.com' ,url: 'https://voice.google.com'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function parseIntOrZero(e){return isNaN(parseInt(e))?0:parseInt(e)}function checkUnread(){var e=document.querySelector(".msgCount"),n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[\(\) ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){var r=document.querySelector(\'gv-nav-button[tooltip="\'+e+\'"] div[aria-label="Unread count"]\');r&&(n+=parseIntOrZero(r.innerHTML))}),updateBadge(n)}function updateBadge(e){var n=e>0?"("+e+") ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' ,js_unread: 'function parseIntOrZero(e){return isNaN(parseInt(e))?0:parseInt(e)}function checkUnread(){var e=document.querySelector(".msgCount"),n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[\(\) ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){var r=document.querySelector(\'gv-nav-tab[tooltip="\'+e+\'"] div[aria-label="Unread count"]\');r&&(n+=parseIntOrZero(r.innerHTML))}),updateBadge(n)}function updateBadge(e){var n=e>0?"("+e+") ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);'
}, },
{ {
id: 'sandstorm' id: 'sandstorm'
@ -888,6 +888,18 @@ Ext.define('Rambox.store.ServicesList', {
,url: 'https://app.stride.com/___' ,url: 'https://app.stride.com/___'
,type: 'messaging' ,type: 'messaging'
,js_unread: 'function checkUnread(){var t=0,e=!1;document.querySelectorAll(".conversations-nav .nav-item .activity-indicator").forEach(function(n){n.classList.contains("has-count")?t+=parseInt(n.innerHTML):e=!0}),updateBadge(t,e)}function updateBadge(t,e){var n=t>0?"("+t+") ":e?"(•) ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3e3);' ,js_unread: 'function checkUnread(){var t=0,e=!1;document.querySelectorAll(".conversations-nav .nav-item .activity-indicator").forEach(function(n){n.classList.contains("has-count")?t+=parseInt(n.innerHTML):e=!0}),updateBadge(t,e)}function updateBadge(t,e){var n=t>0?"("+t+") ":e?"(•) ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3e3);'
},
{
id: 'hangoutschat'
,logo: 'hangoutschat.png'
,name: 'Hangouts Chat'
,description: 'A messaging platform built for teams.'
,url: 'https://chat.google.com/'
,type: 'messaging'
,titleBlink: true
,manual_notifications: true
,dont_update_unread_from_title: true
,js_unread: 'function checkUnread(){updateBadge(document.querySelectorAll(".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .eM5l9e.FVKzAb").length)}function updateBadge(e){e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3000);'
} }
] ]
}); });

2
app/ux/WebView.js

@ -230,6 +230,8 @@ Ext.define('Rambox.ux.WebView',{
var webview = me.down('component').el.dom; var webview = me.down('component').el.dom;
require('electron-context-menu')({window: webview});
// Google Analytics Event // Google Analytics Event
ga_storage._trackEvent('Services', 'load', me.type, 1, true); ga_storage._trackEvent('Services', 'load', me.type, 1, true);

8
app/view/main/MainController.js

@ -42,14 +42,20 @@ Ext.define('Rambox.view.main.MainController', {
console.log('Updating Tabs positions...'); console.log('Updating Tabs positions...');
var store = Ext.getStore('Services'); var store = Ext.getStore('Services');
var align = 'left';
store.suspendEvent('remove'); store.suspendEvent('remove');
Ext.each(tabPanel.items.items, function(t, i) { Ext.each(tabPanel.items.items, function(t, i) {
if ( t.id !== 'ramboxTab' && t.id !== 'tbfill' && t.record.get('enabled') ) { if ( t.id !== 'ramboxTab' && t.id !== 'tbfill' && t.record.get('enabled') ) {
var rec = store.getById(t.record.get('id')); var rec = store.getById(t.record.get('id'));
if ( rec.get('align') === 'right' ) i--; if ( align === 'right' ) i--;
rec.set('align', align);
rec.set('position', i); rec.set('position', i);
rec.save(); rec.save();
} }
else if ( t.id === 'tbfill' ) {
align = 'right';
}
}); });
store.load(); store.load();

1
app/view/preferences/Preferences.js

@ -234,6 +234,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
,name: 'enable_hidpi_support' ,name: 'enable_hidpi_support'
,boxLabel: locale['preferences[8]'] ,boxLabel: locale['preferences[8]']
,value: config.enable_hidpi_support ,value: config.enable_hidpi_support
,hidden: process.platform !== 'win32'
} }
,{ ,{
xtype: 'fieldset' xtype: 'fieldset'

9
electron/menu.js

@ -162,6 +162,15 @@ module.exports = function(config) {
{ {
type: 'separator' type: 'separator'
}, },
{
label: '&Toggle Status Bar',
click() {
sendAction('toggleStatusBar');
}
},
{
type: 'separator'
},
{ {
role: 'zoomin' role: 'zoomin'
}, },

87
package-lock.json generated

@ -2347,6 +2347,32 @@
} }
} }
}, },
"electron-context-menu": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-0.9.1.tgz",
"integrity": "sha1-7U3yDAgEkcPJlqv8s2MVmUajgFg=",
"requires": {
"electron-dl": "1.11.0",
"electron-is-dev": "0.1.2"
},
"dependencies": {
"electron-is-dev": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.1.2.tgz",
"integrity": "sha1-ihBD4ys6HaHD9VPc4oznZCRhZ+M="
}
}
},
"electron-dl": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.11.0.tgz",
"integrity": "sha512-iL9qHzzWOuL9bus+UT+P72SwrDQcFTV6QHqcbhwgqjCC9/K5jhdRzG0dIMB3TzYlk6rmApanPqh9DvWykwIH1Q==",
"requires": {
"ext-name": "5.0.0",
"pupa": "1.0.0",
"unused-filename": "1.0.0"
}
},
"electron-download": { "electron-download": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz",
@ -3705,6 +3731,23 @@
"strip-eof": "1.0.0" "strip-eof": "1.0.0"
} }
}, },
"ext-list": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz",
"integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==",
"requires": {
"mime-db": "1.30.0"
}
},
"ext-name": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz",
"integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==",
"requires": {
"ext-list": "2.2.2",
"sort-keys-length": "1.0.1"
}
},
"extend": { "extend": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
@ -3726,6 +3769,7 @@
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
"integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
"dev": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -4078,6 +4122,11 @@
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
"dev": true "dev": true
}, },
"is-plain-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4="
},
"is-redirect": { "is-redirect": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
@ -4859,6 +4908,11 @@
} }
} }
}, },
"modify-filename": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz",
"integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE="
},
"ms": { "ms": {
"version": "0.7.1", "version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
@ -5049,8 +5103,7 @@
"path-exists": { "path-exists": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
"dev": true
}, },
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
@ -5196,6 +5249,11 @@
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true "dev": true
}, },
"pupa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz",
"integrity": "sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y="
},
"q": { "q": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz",
@ -5586,6 +5644,22 @@
"hoek": "2.16.3" "hoek": "2.16.3"
} }
}, },
"sort-keys": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
"integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=",
"requires": {
"is-plain-obj": "1.1.0"
}
},
"sort-keys-length": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz",
"integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=",
"requires": {
"sort-keys": "1.1.2"
}
},
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@ -7253,6 +7327,15 @@
"integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=",
"dev": true "dev": true
}, },
"unused-filename": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-1.0.0.tgz",
"integrity": "sha1-00CID3GuIRXrqhMlvvBcxmhEacY=",
"requires": {
"modify-filename": "1.1.0",
"path-exists": "3.0.0"
}
},
"unzip-response": { "unzip-response": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz",

3
package.json

@ -112,6 +112,7 @@
"electron-is-dev": "^0.3.0", "electron-is-dev": "^0.3.0",
"mime": "^1.4.0", "mime": "^1.4.0",
"rimraf": "2.6.1", "rimraf": "2.6.1",
"tmp": "0.0.28" "tmp": "0.0.28",
"electron-context-menu": "0.9.1"
} }
} }

BIN
resources/icons/gmail.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
resources/icons/hangoutschat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
resources/icons/lounge.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Loading…
Cancel
Save